@activecollab/components 2.0.574 → 2.0.576

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 (121) hide show
  1. package/dist/cjs/components/MainMenu/MainMenu.js +44 -40
  2. package/dist/cjs/components/MainMenu/MainMenu.js.map +1 -1
  3. package/dist/cjs/components/MainMenu/MainMenuSettings.js +112 -0
  4. package/dist/cjs/components/MainMenu/MainMenuSettings.js.map +1 -0
  5. package/dist/cjs/components/MainMenu/Styles.js +8 -3
  6. package/dist/cjs/components/MainMenu/Styles.js.map +1 -1
  7. package/dist/cjs/components/MainMenu/hooks.js +1 -9
  8. package/dist/cjs/components/MainMenu/hooks.js.map +1 -1
  9. package/dist/cjs/components/MainMenu/types.js +4 -2
  10. package/dist/cjs/components/MainMenu/types.js.map +1 -1
  11. package/dist/cjs/components/Popper/Popper.js +14 -0
  12. package/dist/cjs/components/Popper/Popper.js.map +1 -1
  13. package/dist/cjs/components/Popper/anchorMove.js +42 -0
  14. package/dist/cjs/components/Popper/anchorMove.js.map +1 -0
  15. package/dist/cjs/components/ScrollArea/ScrollArea.js +5 -3
  16. package/dist/cjs/components/ScrollArea/ScrollArea.js.map +1 -1
  17. package/dist/cjs/components/ViewSettings/Styles.js +26 -0
  18. package/dist/cjs/components/ViewSettings/Styles.js.map +1 -0
  19. package/dist/cjs/components/ViewSettings/ViewSettings.js +96 -0
  20. package/dist/cjs/components/ViewSettings/ViewSettings.js.map +1 -0
  21. package/dist/cjs/components/ViewSettings/index.js +17 -0
  22. package/dist/cjs/components/ViewSettings/index.js.map +1 -0
  23. package/dist/cjs/components/ViewSwitcher/ApplyToAllTab.js +199 -0
  24. package/dist/cjs/components/ViewSwitcher/ApplyToAllTab.js.map +1 -0
  25. package/dist/cjs/components/ViewSwitcher/Styles.js +73 -61
  26. package/dist/cjs/components/ViewSwitcher/Styles.js.map +1 -1
  27. package/dist/cjs/components/ViewSwitcher/{ViewSwitcherMenu.js → SubViewSwitcher.js} +70 -22
  28. package/dist/cjs/components/ViewSwitcher/SubViewSwitcher.js.map +1 -0
  29. package/dist/cjs/components/ViewSwitcher/ViewSwitcher.js +46 -184
  30. package/dist/cjs/components/ViewSwitcher/ViewSwitcher.js.map +1 -1
  31. package/dist/cjs/components/ViewSwitcher/index.js +4 -4
  32. package/dist/cjs/components/ViewSwitcher/index.js.map +1 -1
  33. package/dist/cjs/components/ViewSwitcher/useApplyToAllOffer.js +179 -0
  34. package/dist/cjs/components/ViewSwitcher/useApplyToAllOffer.js.map +1 -0
  35. package/dist/cjs/components/index.js +12 -0
  36. package/dist/cjs/components/index.js.map +1 -1
  37. package/dist/cjs/presentation/shared/ActivityFeed.js +1 -2
  38. package/dist/cjs/presentation/shared/ActivityFeed.js.map +1 -1
  39. package/dist/esm/components/MainMenu/MainMenu.d.ts +6 -4
  40. package/dist/esm/components/MainMenu/MainMenu.d.ts.map +1 -1
  41. package/dist/esm/components/MainMenu/MainMenu.js +39 -40
  42. package/dist/esm/components/MainMenu/MainMenu.js.map +1 -1
  43. package/dist/esm/components/MainMenu/MainMenuSettings.d.ts +14 -0
  44. package/dist/esm/components/MainMenu/MainMenuSettings.d.ts.map +1 -0
  45. package/dist/esm/components/MainMenu/MainMenuSettings.js +84 -0
  46. package/dist/esm/components/MainMenu/MainMenuSettings.js.map +1 -0
  47. package/dist/esm/components/MainMenu/Styles.d.ts +11 -0
  48. package/dist/esm/components/MainMenu/Styles.d.ts.map +1 -1
  49. package/dist/esm/components/MainMenu/Styles.js +7 -2
  50. package/dist/esm/components/MainMenu/Styles.js.map +1 -1
  51. package/dist/esm/components/MainMenu/hooks.d.ts.map +1 -1
  52. package/dist/esm/components/MainMenu/hooks.js +1 -8
  53. package/dist/esm/components/MainMenu/hooks.js.map +1 -1
  54. package/dist/esm/components/MainMenu/types.d.ts +4 -2
  55. package/dist/esm/components/MainMenu/types.d.ts.map +1 -1
  56. package/dist/esm/components/MainMenu/types.js +4 -2
  57. package/dist/esm/components/MainMenu/types.js.map +1 -1
  58. package/dist/esm/components/Popper/Popper.d.ts.map +1 -1
  59. package/dist/esm/components/Popper/Popper.js +12 -0
  60. package/dist/esm/components/Popper/Popper.js.map +1 -1
  61. package/dist/esm/components/Popper/anchorMove.d.ts +4 -0
  62. package/dist/esm/components/Popper/anchorMove.d.ts.map +1 -0
  63. package/dist/esm/components/Popper/anchorMove.js +33 -0
  64. package/dist/esm/components/Popper/anchorMove.js.map +1 -0
  65. package/dist/esm/components/ScrollArea/ScrollArea.d.ts +2 -0
  66. package/dist/esm/components/ScrollArea/ScrollArea.d.ts.map +1 -1
  67. package/dist/esm/components/ScrollArea/ScrollArea.js +5 -3
  68. package/dist/esm/components/ScrollArea/ScrollArea.js.map +1 -1
  69. package/dist/esm/components/ViewSettings/Styles.d.ts +4 -0
  70. package/dist/esm/components/ViewSettings/Styles.d.ts.map +1 -0
  71. package/dist/esm/components/ViewSettings/Styles.js +20 -0
  72. package/dist/esm/components/ViewSettings/Styles.js.map +1 -0
  73. package/dist/esm/components/ViewSettings/ViewSettings.d.ts +20 -0
  74. package/dist/esm/components/ViewSettings/ViewSettings.d.ts.map +1 -0
  75. package/dist/esm/components/ViewSettings/ViewSettings.js +87 -0
  76. package/dist/esm/components/ViewSettings/ViewSettings.js.map +1 -0
  77. package/dist/esm/components/ViewSettings/index.d.ts +2 -0
  78. package/dist/esm/components/ViewSettings/index.d.ts.map +1 -0
  79. package/dist/esm/components/ViewSettings/index.js +2 -0
  80. package/dist/esm/components/ViewSettings/index.js.map +1 -0
  81. package/dist/esm/components/ViewSwitcher/ApplyToAllTab.d.ts +24 -0
  82. package/dist/esm/components/ViewSwitcher/ApplyToAllTab.d.ts.map +1 -0
  83. package/dist/esm/components/ViewSwitcher/ApplyToAllTab.js +179 -0
  84. package/dist/esm/components/ViewSwitcher/ApplyToAllTab.js.map +1 -0
  85. package/dist/esm/components/ViewSwitcher/Styles.d.ts +15 -15
  86. package/dist/esm/components/ViewSwitcher/Styles.d.ts.map +1 -1
  87. package/dist/esm/components/ViewSwitcher/Styles.js +72 -60
  88. package/dist/esm/components/ViewSwitcher/Styles.js.map +1 -1
  89. package/dist/esm/components/ViewSwitcher/SubViewSwitcher.d.ts +50 -0
  90. package/dist/esm/components/ViewSwitcher/SubViewSwitcher.d.ts.map +1 -0
  91. package/dist/esm/components/ViewSwitcher/SubViewSwitcher.js +149 -0
  92. package/dist/esm/components/ViewSwitcher/SubViewSwitcher.js.map +1 -0
  93. package/dist/esm/components/ViewSwitcher/ViewSwitcher.d.ts +8 -8
  94. package/dist/esm/components/ViewSwitcher/ViewSwitcher.d.ts.map +1 -1
  95. package/dist/esm/components/ViewSwitcher/ViewSwitcher.js +48 -163
  96. package/dist/esm/components/ViewSwitcher/ViewSwitcher.js.map +1 -1
  97. package/dist/esm/components/ViewSwitcher/index.d.ts +1 -1
  98. package/dist/esm/components/ViewSwitcher/index.d.ts.map +1 -1
  99. package/dist/esm/components/ViewSwitcher/index.js +1 -1
  100. package/dist/esm/components/ViewSwitcher/index.js.map +1 -1
  101. package/dist/esm/components/ViewSwitcher/useApplyToAllOffer.d.ts +27 -0
  102. package/dist/esm/components/ViewSwitcher/useApplyToAllOffer.d.ts.map +1 -0
  103. package/dist/esm/components/ViewSwitcher/useApplyToAllOffer.js +159 -0
  104. package/dist/esm/components/ViewSwitcher/useApplyToAllOffer.js.map +1 -0
  105. package/dist/esm/components/index.d.ts +1 -0
  106. package/dist/esm/components/index.d.ts.map +1 -1
  107. package/dist/esm/components/index.js +1 -0
  108. package/dist/esm/components/index.js.map +1 -1
  109. package/dist/esm/presentation/shared/ActivityFeed.d.ts.map +1 -1
  110. package/dist/esm/presentation/shared/ActivityFeed.js +1 -2
  111. package/dist/esm/presentation/shared/ActivityFeed.js.map +1 -1
  112. package/dist/index.js +1679 -1174
  113. package/dist/index.js.map +1 -1
  114. package/dist/index.min.js +1 -1
  115. package/dist/index.min.js.map +1 -1
  116. package/package.json +1 -1
  117. package/dist/cjs/components/ViewSwitcher/ViewSwitcherMenu.js.map +0 -1
  118. package/dist/esm/components/ViewSwitcher/ViewSwitcherMenu.d.ts +0 -39
  119. package/dist/esm/components/ViewSwitcher/ViewSwitcherMenu.d.ts.map +0 -1
  120. package/dist/esm/components/ViewSwitcher/ViewSwitcherMenu.js +0 -101
  121. package/dist/esm/components/ViewSwitcher/ViewSwitcherMenu.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewSettings.js","names":["React","forwardRef","useCallback","useEffect","useRef","classnames","StyledViewSettings","StyledViewSettingsButton","StyledViewSettingsHost","useForkRef","SettingsIcon","Tooltip","ApplyToAllTab","useApplyToAllOffer","ViewSettings","_ref","ref","label","className","onApplyToAll","offerKey","_ref$applyToAllTitle","applyToAllTitle","_ref$appliedLabel","appliedLabel","_ref$applyToAllLabel","applyToAllLabel","_ref$dismissLabel","dismissLabel","rest","_objectWithoutPropertiesLoose","_excluded","hostRef","buttonRef","handleButtonRef","focusButton","_buttonRef$current","current","focus","offer","rootRef","onRestoreFocus","show","seenOfferKeyRef","hasChangeRef","expanded","isMenuOpen","track","createElement","title","_extends","type","onKeyDown","handleKeyDown","onBlur","handleBlur","isShown","tabRef","phase","isConfirmed","onApply","apply","onDismiss","leave","onHold","hold","displayName"],"sources":["../../../../src/components/ViewSettings/ViewSettings.tsx"],"sourcesContent":["import React, {\n ButtonHTMLAttributes,\n forwardRef,\n useCallback,\n useEffect,\n useRef,\n} from \"react\";\n\nimport classnames from \"classnames\";\n\nimport {\n StyledViewSettings,\n StyledViewSettingsButton,\n StyledViewSettingsHost,\n} from \"./Styles\";\nimport useForkRef from \"../../utils/useForkRef\";\nimport { SettingsIcon } from \"../Icons\";\nimport { Tooltip } from \"../Tooltip\";\nimport { ApplyToAllTab } from \"../ViewSwitcher/ApplyToAllTab\";\nimport { useApplyToAllOffer } from \"../ViewSwitcher/useApplyToAllOffer\";\n\nexport interface ViewSettingsProps\n extends ButtonHTMLAttributes<HTMLButtonElement> {\n /** The tooltip and the accessible name of the button. */\n label: string;\n /** Turns on the check button that slides out after a change. A result of false shows no confirmation. */\n onApplyToAll?: () => unknown;\n /** A new value opens the check button, for a change made in the settings. */\n offerKey?: string | number;\n /** Tooltip and accessible name of the check button. */\n applyToAllTitle?: string;\n /** Text that a screen reader reads after the apply. */\n appliedLabel?: string;\n /** Tooltip and accessible name of the button that closes the extra action. */\n /** Visible text of the apply button, shown where it has room. */\n applyToAllLabel?: string;\n dismissLabel?: string;\n}\n\n/** The settings button of a page view, with the look of ViewSwitcher and one icon. It sits left of the view switcher. */\nexport const ViewSettings = forwardRef<HTMLButtonElement, ViewSettingsProps>(\n (\n {\n label,\n className,\n onApplyToAll,\n offerKey,\n applyToAllTitle = \"Apply to All Projects\",\n appliedLabel = \"Applied\",\n applyToAllLabel = \"All Projects?\",\n dismissLabel = \"Dismiss\",\n ...rest\n },\n ref\n ) => {\n const hostRef = useRef<HTMLSpanElement | null>(null);\n const buttonRef = useRef<HTMLButtonElement | null>(null);\n const handleButtonRef = useForkRef(buttonRef, ref);\n const focusButton = useCallback(() => buttonRef.current?.focus(), []);\n const offer = useApplyToAllOffer<true>({\n rootRef: hostRef,\n onApplyToAll,\n onRestoreFocus: focusButton,\n });\n const { show } = offer;\n const seenOfferKeyRef = useRef(offerKey);\n const hasChangeRef = useRef(false);\n const expanded = rest[\"aria-expanded\"];\n const isMenuOpen = expanded === true || expanded === \"true\";\n\n // A change made in the open menu offers the apply once the menu closes.\n useEffect(() => {\n if (seenOfferKeyRef.current !== offerKey) {\n seenOfferKeyRef.current = offerKey;\n hasChangeRef.current = true;\n }\n\n if (hasChangeRef.current && !isMenuOpen) {\n hasChangeRef.current = false;\n show(true);\n }\n }, [isMenuOpen, offerKey, show]);\n\n const track = (\n <StyledViewSettings\n className={classnames(\"c-view-settings\", className)}\n data-testid=\"view-settings\"\n >\n <Tooltip title={label}>\n <StyledViewSettingsButton\n {...rest}\n ref={handleButtonRef}\n type=\"button\"\n aria-label={label}\n >\n <SettingsIcon />\n </StyledViewSettingsButton>\n </Tooltip>\n </StyledViewSettings>\n );\n\n if (!onApplyToAll) {\n return track;\n }\n\n return (\n <StyledViewSettingsHost\n ref={hostRef}\n onKeyDown={offer.handleKeyDown}\n onBlur={offer.handleBlur}\n >\n {track}\n {offer.isShown ? (\n <ApplyToAllTab\n ref={offer.tabRef}\n phase={offer.phase}\n isConfirmed={offer.isConfirmed}\n title={applyToAllTitle}\n appliedLabel={appliedLabel}\n onApply={offer.apply}\n onDismiss={offer.leave}\n onHold={offer.hold}\n dismissLabel={dismissLabel}\n applyToAllLabel={applyToAllLabel}\n />\n ) : null}\n </StyledViewSettingsHost>\n );\n }\n);\n\nViewSettings.displayName = \"ViewSettings\";\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAEVC,UAAU,EACVC,WAAW,EACXC,SAAS,EACTC,MAAM,QACD,OAAO;AAEd,OAAOC,UAAU,MAAM,YAAY;AAEnC,SACEC,kBAAkB,EAClBC,wBAAwB,EACxBC,sBAAsB,QACjB,UAAU;AACjB,OAAOC,UAAU,MAAM,wBAAwB;AAC/C,SAASC,YAAY,QAAQ,UAAU;AACvC,SAASC,OAAO,QAAQ,YAAY;AACpC,SAASC,aAAa,QAAQ,+BAA+B;AAC7D,SAASC,kBAAkB,QAAQ,oCAAoC;AAoBvE;AACA,OAAO,MAAMC,YAAY,gBAAGb,UAAU,CACpC,CAAAc,IAAA,EAYEC,GAAG,KACA;EAAA,IAXDC,KAAK,GAAAF,IAAA,CAALE,KAAK;IACLC,SAAS,GAAAH,IAAA,CAATG,SAAS;IACTC,YAAY,GAAAJ,IAAA,CAAZI,YAAY;IACZC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;IAAAC,oBAAA,GAAAN,IAAA,CACRO,eAAe;IAAfA,eAAe,GAAAD,oBAAA,cAAG,uBAAuB,GAAAA,oBAAA;IAAAE,iBAAA,GAAAR,IAAA,CACzCS,YAAY;IAAZA,YAAY,GAAAD,iBAAA,cAAG,SAAS,GAAAA,iBAAA;IA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ClC,CAAC,GACA,IACkB,CAAC;AAE7B,CACF,CAAC;AAEDZ,YAAY,CAACoD,WAAW,GAAG,cAAc","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export * from "./ViewSettings";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ViewSettings/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./ViewSettings";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/ViewSettings/index.ts"],"sourcesContent":["export * from \"./ViewSettings\";\n"],"mappings":"AAAA,cAAc,gBAAgB","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ import React, { ReactNode } from "react";
2
+ import { ApplyToAllPhase } from "./useApplyToAllOffer";
3
+ interface ApplyToAllTabProps {
4
+ phase: ApplyToAllPhase;
5
+ isConfirmed: boolean;
6
+ /** Tooltip and accessible name of the button. */
7
+ title: string;
8
+ /** Accessible name of the group. */
9
+ label?: ReactNode;
10
+ /** Text that confirms the apply. */
11
+ appliedLabel: string;
12
+ onApply: () => void;
13
+ /** Visible text of the apply button, shown where the button has room for it. */
14
+ applyToAllLabel?: string;
15
+ /** Tooltip and accessible name of the button that closes the tab. */
16
+ dismissLabel?: string;
17
+ onDismiss?: () => void;
18
+ /** Called with true while the pointer is over the tab, so the tab does not go away under it. */
19
+ onHold?: (isHeld: boolean) => void;
20
+ }
21
+ /** The extension that comes out from under a view control and applies its value to all projects. */
22
+ export declare const ApplyToAllTab: React.ForwardRefExoticComponent<ApplyToAllTabProps & React.RefAttributes<HTMLDivElement>>;
23
+ export {};
24
+ //# sourceMappingURL=ApplyToAllTab.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApplyToAllTab.d.ts","sourceRoot":"","sources":["../../../../src/components/ViewSwitcher/ApplyToAllTab.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAGZ,SAAS,EAKV,MAAM,OAAO,CAAC;AAYf,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AA6GvD,UAAU,kBAAkB;IAC1B,KAAK,EAAE,eAAe,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,oCAAoC;IACpC,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,gFAAgF;IAChF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qEAAqE;IACrE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,gGAAgG;IAChG,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC;AAED,oGAAoG;AACpG,eAAO,MAAM,aAAa,2FA4GzB,CAAC"}
@@ -0,0 +1,179 @@
1
+ import React, { forwardRef, useId, useLayoutEffect, useRef, useState } from "react";
2
+ import { StyledApplyToAllButton, StyledApplyToAllDismiss, StyledApplyToAllDone, StyledApplyToAllLine, StyledApplyToAllSlide, StyledApplyToAllTab, StyledViewSwitcherPromptTitle, TAB_RING } from "./Styles";
3
+ import { Portal } from "../../helpers";
4
+ import useForkRef from "../../utils/useForkRef";
5
+ import { CheckIcon, CloseIcon } from "../Icons";
6
+ import { ANCHOR_MOVE_EVENT, useAnnounceAnchorMove } from "../Popper/anchorMove";
7
+ import { Tooltip } from "../Tooltip";
8
+
9
+ // A control at least this wide gives the apply button room for its text.
10
+ const LABEL_ROOM = 120;
11
+ // The outline of the tab with a hole in the shape of the control, so the control shows on top of it.
12
+ const controlHole = (width, height, hole) => {
13
+ const r = Math.min(hole.height, hole.width) / 2;
14
+ const left = hole.x + r;
15
+ const right = hole.x + hole.width - r;
16
+ const bottom = hole.y + hole.height;
17
+ return "path(evenodd, \"M0 0H" + width + "V" + height + "H0Z M" + left + " " + hole.y + "H" + right + "A" + r + " " + r + " 0 0 1 " + right + " " + bottom + "H" + left + "A" + r + " " + r + " 0 0 1 " + left + " " + hole.y + "Z\")";
18
+ };
19
+
20
+ // The tab draws on top of the page, so neither the titlebar nor the paper under it cut it. It wraps the control with a
21
+ // thin ring, and a hole in the shape of the control keeps the control in front. A tab is wider only when its buttons
22
+ // need the room.
23
+ const usePlace = isConfirmed => {
24
+ var _keptRef$current;
25
+ const markerRef = useRef(null);
26
+ const tabRef = useRef(null);
27
+ const _useState = useState(null),
28
+ place = _useState[0],
29
+ setPlace = _useState[1];
30
+ // The confirmation keeps the size and the shape of the tab it replaces.
31
+ const keptRef = useRef(null);
32
+ const isConfirmedRef = useRef(isConfirmed);
33
+ isConfirmedRef.current = isConfirmed;
34
+ useLayoutEffect(() => {
35
+ var _markerRef$current;
36
+ const control = (_markerRef$current = markerRef.current) == null ? void 0 : _markerRef$current.parentElement;
37
+ if (!control) {
38
+ return undefined;
39
+ }
40
+ const measure = () => {
41
+ var _ref, _kept$width, _tabRef$current, _tabRef$current$offse, _tabRef$current2, _kept$isWrapping;
42
+ const rect = control.getBoundingClientRect();
43
+ const kept = isConfirmedRef.current ? keptRef.current : null;
44
+ const width = (_ref = (_kept$width = kept == null ? void 0 : kept.width) != null ? _kept$width : (_tabRef$current = tabRef.current) == null ? void 0 : _tabRef$current.offsetWidth) != null ? _ref : 0;
45
+ const height = (_tabRef$current$offse = (_tabRef$current2 = tabRef.current) == null ? void 0 : _tabRef$current2.offsetHeight) != null ? _tabRef$current$offse : 0;
46
+ const isWrapping = (_kept$isWrapping = kept == null ? void 0 : kept.isWrapping) != null ? _kept$isWrapping : width > rect.width + 2 * TAB_RING + 0.5;
47
+ if (!isConfirmedRef.current) {
48
+ keptRef.current = {
49
+ width,
50
+ isWrapping
51
+ };
52
+ }
53
+ const tuck = rect.height + TAB_RING;
54
+ setPlace({
55
+ top: rect.bottom - tuck,
56
+ left: rect.left + rect.width / 2,
57
+ minWidth: kept ? width : rect.width + 2 * TAB_RING,
58
+ width: kept ? width : undefined,
59
+ isLabeled: !isWrapping && rect.width >= LABEL_ROOM,
60
+ tuck,
61
+ clipPath: width && height ? controlHole(width, height, {
62
+ x: (width - rect.width) / 2,
63
+ y: TAB_RING,
64
+ width: rect.width,
65
+ height: rect.height
66
+ }) : undefined
67
+ });
68
+ };
69
+ measure();
70
+ // The width of the tab is known after its first draw.
71
+ const frame = requestAnimationFrame(measure);
72
+ window.addEventListener("resize", measure);
73
+ window.addEventListener("scroll", measure, true);
74
+ window.addEventListener(ANCHOR_MOVE_EVENT, measure);
75
+ return () => {
76
+ cancelAnimationFrame(frame);
77
+ window.removeEventListener("resize", measure);
78
+ window.removeEventListener("scroll", measure, true);
79
+ window.removeEventListener(ANCHOR_MOVE_EVENT, measure);
80
+ };
81
+ }, []);
82
+
83
+ // The kept width applies in the same draw as the confirmation, before a new measure.
84
+ const keptWidth = isConfirmed ? (_keptRef$current = keptRef.current) == null ? void 0 : _keptRef$current.width : undefined;
85
+ return {
86
+ markerRef,
87
+ tabRef,
88
+ place,
89
+ keptWidth
90
+ };
91
+ };
92
+ /** The extension that comes out from under a view control and applies its value to all projects. */
93
+ export const ApplyToAllTab = /*#__PURE__*/forwardRef((_ref2, ref) => {
94
+ var _place$tuck;
95
+ let phase = _ref2.phase,
96
+ isConfirmed = _ref2.isConfirmed,
97
+ title = _ref2.title,
98
+ label = _ref2.label,
99
+ appliedLabel = _ref2.appliedLabel,
100
+ onApply = _ref2.onApply,
101
+ _ref2$applyToAllLabel = _ref2.applyToAllLabel,
102
+ applyToAllLabel = _ref2$applyToAllLabel === void 0 ? "All Projects?" : _ref2$applyToAllLabel,
103
+ _ref2$dismissLabel = _ref2.dismissLabel,
104
+ dismissLabel = _ref2$dismissLabel === void 0 ? "Dismiss" : _ref2$dismissLabel,
105
+ onDismiss = _ref2.onDismiss,
106
+ onHold = _ref2.onHold;
107
+ const labelId = useId();
108
+ const _usePlace = usePlace(isConfirmed),
109
+ markerRef = _usePlace.markerRef,
110
+ tabRef = _usePlace.tabRef,
111
+ place = _usePlace.place,
112
+ keptWidth = _usePlace.keptWidth;
113
+ const handleRef = useForkRef(tabRef, ref);
114
+
115
+ // The tab grows and shrinks beside the controls, so it moves the ones before it.
116
+ useAnnounceAnchorMove([phase, isConfirmed]);
117
+ const style = {
118
+ top: place == null ? void 0 : place.top,
119
+ left: place == null ? void 0 : place.left,
120
+ minWidth: keptWidth != null ? keptWidth : place == null ? void 0 : place.minWidth,
121
+ width: keptWidth != null ? keptWidth : place == null ? void 0 : place.width,
122
+ clipPath: place == null ? void 0 : place.clipPath,
123
+ position: "fixed",
124
+ translate: "-50% 0",
125
+ visibility: place ? undefined : "hidden",
126
+ "--apply-to-all-tuck": ((_place$tuck = place == null ? void 0 : place.tuck) != null ? _place$tuck : 32 + TAB_RING) + "px"
127
+ };
128
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
129
+ ref: markerRef,
130
+ hidden: true
131
+ }), /*#__PURE__*/React.createElement(Portal, null, /*#__PURE__*/React.createElement(StyledApplyToAllTab, {
132
+ ref: handleRef,
133
+ style: style,
134
+ role: "group",
135
+ "aria-labelledby": label ? labelId : undefined,
136
+ "aria-label": label ? undefined : title,
137
+ className: "c-apply-to-all",
138
+ "data-phase": phase,
139
+ "data-confirmed": isConfirmed || undefined,
140
+ "data-labeled": (place == null ? void 0 : place.isLabeled) || undefined
141
+ // A menu that opens on a click around its control must not open from the tab.
142
+ ,
143
+ onClick: event => event.stopPropagation(),
144
+ onPointerEnter: () => onHold == null ? void 0 : onHold(true),
145
+ onPointerLeave: () => onHold == null ? void 0 : onHold(false)
146
+ }, label ? /*#__PURE__*/React.createElement(StyledViewSwitcherPromptTitle, {
147
+ id: labelId
148
+ }, label) : null, /*#__PURE__*/React.createElement(StyledApplyToAllSlide, {
149
+ className: "c-apply-to-all__slide"
150
+ }, isConfirmed ? /*#__PURE__*/React.createElement(StyledApplyToAllDone, {
151
+ role: "status",
152
+ className: "c-apply-to-all__done"
153
+ }, /*#__PURE__*/React.createElement(CheckIcon, null), /*#__PURE__*/React.createElement("span", {
154
+ className: "c-apply-to-all__done-text"
155
+ }, appliedLabel)) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Tooltip, {
156
+ title: title,
157
+ placement: "bottom"
158
+ }, /*#__PURE__*/React.createElement(StyledApplyToAllButton, {
159
+ type: "button",
160
+ "aria-label": title,
161
+ className: "c-apply-to-all__button",
162
+ onClick: onApply
163
+ }, /*#__PURE__*/React.createElement(CheckIcon, null), /*#__PURE__*/React.createElement("span", {
164
+ className: "c-apply-to-all__label",
165
+ "aria-hidden": true
166
+ }, applyToAllLabel))), onDismiss ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledApplyToAllLine, {
167
+ className: "c-apply-to-all__line"
168
+ }), /*#__PURE__*/React.createElement(Tooltip, {
169
+ title: dismissLabel,
170
+ placement: "bottom"
171
+ }, /*#__PURE__*/React.createElement(StyledApplyToAllDismiss, {
172
+ type: "button",
173
+ "aria-label": dismissLabel,
174
+ className: "c-apply-to-all__dismiss",
175
+ onClick: onDismiss
176
+ }, /*#__PURE__*/React.createElement(CloseIcon, null)))) : null)))));
177
+ });
178
+ ApplyToAllTab.displayName = "ApplyToAllTab";
179
+ //# sourceMappingURL=ApplyToAllTab.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ApplyToAllTab.js","names":["React","forwardRef","useId","useLayoutEffect","useRef","useState","StyledApplyToAllButton","StyledApplyToAllDismiss","StyledApplyToAllDone","StyledApplyToAllLine","StyledApplyToAllSlide","StyledApplyToAllTab","StyledViewSwitcherPromptTitle","TAB_RING","Portal","useForkRef","CheckIcon","CloseIcon","ANCHOR_MOVE_EVENT","useAnnounceAnchorMove","Tooltip","LABEL_ROOM","controlHole","width","height","hole","r","Math","min","left","x","right","bottom","y","usePlace","isConfirmed","_keptRef$current","markerRef","tabRef","_useState","place","setPlace","keptRef","isConfirmedRef","current","_markerRef$current","control","parentElement","undefined","measure","_ref","_kept$width","_tabRef$current","_tabRef$current$offse","_tabRef$current2","_kept$isWrapping","rect","getBoundingClientRect","kept","offsetWidth","offsetHeight","isWrapping","tuck","top","minWidth","isLabeled","clipPath","frame","requestAnimationFrame","window","addEventListener","cancelAnimationFrame","removeEventListener","keptWidth","ApplyToAllTab","_ref2","ref","_place$tuck","phase","title","label","appliedLabel","onApply","_ref2$applyToAllLabel","applyToAllLabel","_ref2$dismissLabel","dismissLabel","onDismiss","onHold","labelId","_usePlace","handleRef","style","position","translate","visibility","createElement","Fragment","hidden","role","className","onClick","event","stopPropagation","onPointerEnter","onPointerLeave","id","placement","type","displayName"],"sources":["../../../../src/components/ViewSwitcher/ApplyToAllTab.tsx"],"sourcesContent":["import React, {\n CSSProperties,\n forwardRef,\n ReactNode,\n useId,\n useLayoutEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport {\n StyledApplyToAllButton,\n StyledApplyToAllDismiss,\n StyledApplyToAllDone,\n StyledApplyToAllLine,\n StyledApplyToAllSlide,\n StyledApplyToAllTab,\n StyledViewSwitcherPromptTitle,\n TAB_RING,\n} from \"./Styles\";\nimport { ApplyToAllPhase } from \"./useApplyToAllOffer\";\nimport { Portal } from \"../../helpers\";\nimport useForkRef from \"../../utils/useForkRef\";\nimport { CheckIcon, CloseIcon } from \"../Icons\";\nimport { ANCHOR_MOVE_EVENT, useAnnounceAnchorMove } from \"../Popper/anchorMove\";\nimport { Tooltip } from \"../Tooltip\";\n\n// A control at least this wide gives the apply button room for its text.\nconst LABEL_ROOM = 120;\n\ninterface Place {\n top: number;\n left: number;\n minWidth: number;\n width?: number;\n isLabeled: boolean;\n tuck: number;\n clipPath?: string;\n}\n\n// The outline of the tab with a hole in the shape of the control, so the control shows on top of it.\nconst controlHole = (\n width: number,\n height: number,\n hole: { x: number; y: number; width: number; height: number }\n) => {\n const r = Math.min(hole.height, hole.width) / 2;\n const left = hole.x + r;\n const right = hole.x + hole.width - r;\n const bottom = hole.y + hole.height;\n\n return `path(evenodd, \"M0 0H${width}V${height}H0Z M${left} ${hole.y}H${right}A${r} ${r} 0 0 1 ${right} ${bottom}H${left}A${r} ${r} 0 0 1 ${left} ${hole.y}Z\")`;\n};\n\n// The tab draws on top of the page, so neither the titlebar nor the paper under it cut it. It wraps the control with a\n// thin ring, and a hole in the shape of the control keeps the control in front. A tab is wider only when its buttons\n// need the room.\nconst usePlace = (isConfirmed: boolean) => {\n const markerRef = useRef<HTMLSpanElement | null>(null);\n const tabRef = useRef<HTMLDivElement | null>(null);\n const [place, setPlace] = useState<Place | null>(null);\n // The confirmation keeps the size and the shape of the tab it replaces.\n const keptRef = useRef<{ width: number; isWrapping: boolean } | null>(null);\n const isConfirmedRef = useRef(isConfirmed);\n\n isConfirmedRef.current = isConfirmed;\n\n useLayoutEffect(() => {\n const control = markerRef.current?.parentElement;\n\n if (!control) {\n return undefined;\n }\n\n const measure = () => {\n const rect = control.getBoundingClientRect();\n const kept = isConfirmedRef.current ? keptRef.current : null;\n const width = kept?.width ?? tabRef.current?.offsetWidth ?? 0;\n const height = tabRef.current?.offsetHeight ?? 0;\n const isWrapping =\n kept?.isWrapping ?? width > rect.width + 2 * TAB_RING + 0.5;\n\n if (!isConfirmedRef.current) {\n keptRef.current = { width, isWrapping };\n }\n\n const tuck = rect.height + TAB_RING;\n\n setPlace({\n top: rect.bottom - tuck,\n left: rect.left + rect.width / 2,\n minWidth: kept ? width : rect.width + 2 * TAB_RING,\n width: kept ? width : undefined,\n isLabeled: !isWrapping && rect.width >= LABEL_ROOM,\n tuck,\n clipPath:\n width && height\n ? controlHole(width, height, {\n x: (width - rect.width) / 2,\n y: TAB_RING,\n width: rect.width,\n height: rect.height,\n })\n : undefined,\n });\n };\n\n measure();\n // The width of the tab is known after its first draw.\n const frame = requestAnimationFrame(measure);\n\n window.addEventListener(\"resize\", measure);\n window.addEventListener(\"scroll\", measure, true);\n window.addEventListener(ANCHOR_MOVE_EVENT, measure);\n\n return () => {\n cancelAnimationFrame(frame);\n window.removeEventListener(\"resize\", measure);\n window.removeEventListener(\"scroll\", measure, true);\n window.removeEventListener(ANCHOR_MOVE_EVENT, measure);\n };\n }, []);\n\n // The kept width applies in the same draw as the confirmation, before a new measure.\n const keptWidth = isConfirmed ? keptRef.current?.width : undefined;\n\n return { markerRef, tabRef, place, keptWidth };\n};\n\ninterface ApplyToAllTabProps {\n phase: ApplyToAllPhase;\n isConfirmed: boolean;\n /** Tooltip and accessible name of the button. */\n title: string;\n /** Accessible name of the group. */\n label?: ReactNode;\n /** Text that confirms the apply. */\n appliedLabel: string;\n onApply: () => void;\n /** Visible text of the apply button, shown where the button has room for it. */\n applyToAllLabel?: string;\n /** Tooltip and accessible name of the button that closes the tab. */\n dismissLabel?: string;\n onDismiss?: () => void;\n /** Called with true while the pointer is over the tab, so the tab does not go away under it. */\n onHold?: (isHeld: boolean) => void;\n}\n\n/** The extension that comes out from under a view control and applies its value to all projects. */\nexport const ApplyToAllTab = forwardRef<HTMLDivElement, ApplyToAllTabProps>(\n (\n {\n phase,\n isConfirmed,\n title,\n label,\n appliedLabel,\n onApply,\n applyToAllLabel = \"All Projects?\",\n dismissLabel = \"Dismiss\",\n onDismiss,\n onHold,\n },\n ref\n ) => {\n const labelId = useId();\n const { markerRef, tabRef, place, keptWidth } = usePlace(isConfirmed);\n const handleRef = useForkRef(tabRef, ref);\n\n // The tab grows and shrinks beside the controls, so it moves the ones before it.\n useAnnounceAnchorMove([phase, isConfirmed]);\n\n const style = {\n top: place?.top,\n left: place?.left,\n minWidth: keptWidth ?? place?.minWidth,\n width: keptWidth ?? place?.width,\n clipPath: place?.clipPath,\n position: \"fixed\",\n translate: \"-50% 0\",\n visibility: place ? undefined : \"hidden\",\n \"--apply-to-all-tuck\": `${place?.tuck ?? 32 + TAB_RING}px`,\n } as CSSProperties;\n\n return (\n <>\n <span ref={markerRef} hidden />\n <Portal>\n <StyledApplyToAllTab\n ref={handleRef}\n style={style}\n role=\"group\"\n aria-labelledby={label ? labelId : undefined}\n aria-label={label ? undefined : title}\n className=\"c-apply-to-all\"\n data-phase={phase}\n data-confirmed={isConfirmed || undefined}\n data-labeled={place?.isLabeled || undefined}\n // A menu that opens on a click around its control must not open from the tab.\n onClick={(event) => event.stopPropagation()}\n onPointerEnter={() => onHold?.(true)}\n onPointerLeave={() => onHold?.(false)}\n >\n {label ? (\n <StyledViewSwitcherPromptTitle id={labelId}>\n {label}\n </StyledViewSwitcherPromptTitle>\n ) : null}\n <StyledApplyToAllSlide className=\"c-apply-to-all__slide\">\n {isConfirmed ? (\n <StyledApplyToAllDone\n role=\"status\"\n className=\"c-apply-to-all__done\"\n >\n <CheckIcon />\n <span className=\"c-apply-to-all__done-text\">\n {appliedLabel}\n </span>\n </StyledApplyToAllDone>\n ) : (\n <>\n <Tooltip title={title} placement=\"bottom\">\n <StyledApplyToAllButton\n type=\"button\"\n aria-label={title}\n className=\"c-apply-to-all__button\"\n onClick={onApply}\n >\n <CheckIcon />\n <span className=\"c-apply-to-all__label\" aria-hidden>\n {applyToAllLabel}\n </span>\n </StyledApplyToAllButton>\n </Tooltip>\n {onDismiss ? (\n <>\n <StyledApplyToAllLine className=\"c-apply-to-all__line\" />\n <Tooltip title={dismissLabel} placement=\"bottom\">\n <StyledApplyToAllDismiss\n type=\"button\"\n aria-label={dismissLabel}\n className=\"c-apply-to-all__dismiss\"\n onClick={onDismiss}\n >\n <CloseIcon />\n </StyledApplyToAllDismiss>\n </Tooltip>\n </>\n ) : null}\n </>\n )}\n </StyledApplyToAllSlide>\n </StyledApplyToAllTab>\n </Portal>\n </>\n );\n }\n);\n\nApplyToAllTab.displayName = \"ApplyToAllTab\";\n"],"mappings":"AAAA,OAAOA,KAAK,IAEVC,UAAU,EAEVC,KAAK,EACLC,eAAe,EACfC,MAAM,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AAS,EAAC,uBAAuB;IAAC;EAAW,GAChDhB,eACG,CACgB,CACjB,CAAC,EACTG,SAAS,gBACRvF,KAAA,CAAAgG,aAAA,CAAAhG,KAAA,CAAAiG,QAAA,qBACEjG,KAAA,CAAAgG,aAAA,CAACvF,oBAAoB;IAAC2F,SAAS,EAAC;EAAsB,CAAE,CAAC,eACzDpG,KAAA,CAAAgG,aAAA,CAAC5E,OAAO;IAAC2D,KAAK,EAAEO,YAAa;IAACqB,SAAS,EAAC;EAAQ,gBAC9C3G,KAAA,CAAAgG,aAAA,CAACzF,uBAAuB;IACtBqG,IAAI,EAAC,QAAQ;IACb,cAAYtB,YAAa;IACzBc,SAAS,EAAC,yBAAyB;IACnCC,OAAO,EAAEd;EAAU,gBAEnBvF,KAAA,CAAAgG,aAAA,CAAC/E,SAAS,MAAE,CACW,CAClB,CACT,CAAC,GACD,IACJ,CAEiB,CACJ,CACf,CACR,CAAC;AAEP,CACF,CAAC;AAEDyD,aAAa,CAACmC,WAAW,GAAG,eAAe","ignoreList":[]}
@@ -1,16 +1,16 @@
1
1
  export declare const VIEW_SWITCHER_PROMPT_DELAY_MS = 100;
2
- export declare const VIEW_SWITCHER_PROMPT_MS = 5000;
3
- export declare const VIEW_SWITCHER_APPLIED_MS = 900;
2
+ export declare const VIEW_SWITCHER_APPLIED_MS = 1400;
3
+ export declare const VIEW_SWITCHER_OPEN_MS = 3000;
4
4
  export declare const VIEW_SWITCHER_LEAVE_MS = 200;
5
5
  export declare const StyledViewSwitcher: import("styled-components").StyledComponent<"div", any, {}, never>;
6
6
  export declare const StyledViewSwitcherTrack: import("styled-components").StyledComponent<"div", any, {}, never>;
7
7
  export declare const StyledViewSwitcherOptions: import("styled-components").StyledComponent<"div", any, {}, never>;
8
8
  export declare const StyledViewSwitcherOption: import("styled-components").StyledComponent<"button", any, {}, never>;
9
- export declare const StyledViewSwitcherMenuOption: import("styled-components").StyledComponent<"button", any, {}, never>;
10
- export declare const StyledViewSwitcherMenuRoot: import("styled-components").StyledComponent<"div", any, {}, never>;
11
- export declare const StyledViewSwitcherMenuClip: import("styled-components").StyledComponent<"div", any, {}, never>;
12
- export declare const StyledViewSwitcherMenuIcon: import("styled-components").StyledComponent<"span", any, {}, never>;
13
- export declare const StyledViewSwitcherMenuList: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").ListProps & {
9
+ export declare const StyledSubViewSwitcherOption: import("styled-components").StyledComponent<"button", any, {}, never>;
10
+ export declare const StyledSubViewSwitcherRoot: import("styled-components").StyledComponent<"div", any, {}, never>;
11
+ export declare const StyledSubViewSwitcherClip: import("styled-components").StyledComponent<"div", any, {}, never>;
12
+ export declare const StyledSubViewSwitcherIcon: import("styled-components").StyledComponent<"span", any, {}, never>;
13
+ export declare const StyledSubViewSwitcherList: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").ListProps & {
14
14
  children?: import("react").ReactNode | undefined;
15
15
  } & import("react").HTMLAttributes<HTMLUListElement> & import("react").RefAttributes<HTMLUListElement>> & {
16
16
  Item: import("react").ForwardRefExoticComponent<import("..").ListItemProps & {
@@ -21,13 +21,13 @@ export declare const StyledViewSwitcherMenuList: import("styled-components").Sty
21
21
  displayName: string;
22
22
  };
23
23
  }, any, {}, never>;
24
- export declare const StyledViewSwitcherMenuLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
24
+ export declare const StyledSubViewSwitcherLabel: import("styled-components").StyledComponent<"span", any, {}, never>;
25
25
  export declare const StyledViewSwitcherPromptTitle: import("styled-components").StyledComponent<"span", any, {}, never>;
26
- export declare const StyledViewSwitcherPrompt: import("styled-components").StyledComponent<"div", any, {}, never>;
27
- export declare const StyledViewSwitcherPromptClip: import("styled-components").StyledComponent<"div", any, {}, never>;
28
- export declare const StyledViewSwitcherPromptPill: import("styled-components").StyledComponent<"div", any, {}, never>;
29
- export declare const StyledViewSwitcherAction: import("styled-components").StyledComponent<"button", any, {}, never>;
30
- export declare const StyledViewSwitcherLine: import("styled-components").StyledComponent<"i", any, {}, never>;
31
- export declare const StyledViewSwitcherDismiss: import("styled-components").StyledComponent<"button", any, {}, never>;
32
- export declare const StyledViewSwitcherApplied: import("styled-components").StyledComponent<"span", any, {}, never>;
26
+ export declare const TAB_RING = 2;
27
+ export declare const StyledApplyToAllTab: import("styled-components").StyledComponent<"div", any, {}, never>;
28
+ export declare const StyledApplyToAllSlide: import("styled-components").StyledComponent<"div", any, {}, never>;
29
+ export declare const StyledApplyToAllButton: import("styled-components").StyledComponent<"button", any, {}, never>;
30
+ export declare const StyledApplyToAllLine: import("styled-components").StyledComponent<"i", any, {}, never>;
31
+ export declare const StyledApplyToAllDismiss: import("styled-components").StyledComponent<"button", any, {}, never>;
32
+ export declare const StyledApplyToAllDone: import("styled-components").StyledComponent<"span", any, {}, never>;
33
33
  //# sourceMappingURL=Styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/ViewSwitcher/Styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,6BAA6B,MAAM,CAAC;AACjD,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAC5C,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAC5C,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,eAAO,MAAM,kBAAkB,oEAI9B,CAAC;AAIF,eAAO,MAAM,uBAAuB,oEASnC,CAAC;AAIF,eAAO,MAAM,yBAAyB,oEAGrC,CAAC;AAIF,eAAO,MAAM,wBAAwB,uEA4CpC,CAAC;AAIF,eAAO,MAAM,4BAA4B,uEAwDxC,CAAC;AA6BF,eAAO,MAAM,0BAA0B,oEA8BtC,CAAC;AAIF,eAAO,MAAM,0BAA0B,oEAOtC,CAAC;AAIF,eAAO,MAAM,0BAA0B,qEAKtC,CAAC;AAIF,eAAO,MAAM,0BAA0B;;;;;;;;;;kBAEtC,CAAC;AAIF,eAAO,MAAM,2BAA2B,qEAOvC,CAAC;AAiCF,eAAO,MAAM,6BAA6B,qEAOz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uBAAuB,uEA+BnC,CAAC;AAKF,eAAO,MAAM,oBAAoB,qEAgChC,CAAC"}
@@ -1,19 +1,21 @@
1
1
  import styled, { keyframes } from "styled-components";
2
+ import { layers } from "../../utils/layers";
3
+ import { DARK_THEME_SELECTOR } from "../../utils/themes";
2
4
  import { BoxSizingStyle } from "../BoxSizingStyle";
3
5
  import { List } from "../List";
4
6
  export const VIEW_SWITCHER_PROMPT_DELAY_MS = 100;
5
- export const VIEW_SWITCHER_PROMPT_MS = 5000;
6
- export const VIEW_SWITCHER_APPLIED_MS = 900;
7
+ export const VIEW_SWITCHER_APPLIED_MS = 1400;
8
+ export const VIEW_SWITCHER_OPEN_MS = 3000;
7
9
  export const VIEW_SWITCHER_LEAVE_MS = 200;
8
10
  export const StyledViewSwitcher = styled.div.withConfig({
9
11
  displayName: "Styles__StyledViewSwitcher",
10
12
  componentId: "sc-1cg2mte-0"
11
- })(["", " display:inline-flex;flex-shrink:0;"], BoxSizingStyle);
13
+ })(["", " display:inline-flex;flex-shrink:0;isolation:isolate;"], BoxSizingStyle);
12
14
  StyledViewSwitcher.displayName = "StyledViewSwitcher";
13
15
  export const StyledViewSwitcherTrack = styled.div.withConfig({
14
16
  displayName: "Styles__StyledViewSwitcherTrack",
15
17
  componentId: "sc-1cg2mte-1"
16
- })(["", " position:relative;display:inline-flex;align-items:center;height:32px;padding:3px;border-radius:var(--ac-br-rounded);background-color:var(--color-theme-300);"], BoxSizingStyle);
18
+ })(["", " position:relative;display:inline-flex;align-items:center;height:32px;padding:3px;border-radius:var(--ac-br-rounded);background-color:var(--color-theme-300);z-index:1;"], BoxSizingStyle);
17
19
  StyledViewSwitcherTrack.displayName = "StyledViewSwitcherTrack";
18
20
  export const StyledViewSwitcherOptions = styled.div.withConfig({
19
21
  displayName: "Styles__StyledViewSwitcherOptions",
@@ -25,11 +27,11 @@ export const StyledViewSwitcherOption = styled.button.withConfig({
25
27
  componentId: "sc-1cg2mte-3"
26
28
  })(["", " display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:34px;height:26px;margin:0;padding:0;border:0;border-radius:var(--ac-br-rounded);background-color:transparent;cursor:pointer;outline:none;transition:background-color 150ms ease,box-shadow 150ms ease;svg{width:20px;height:20px;fill:var(--color-theme-700);}&:hover{background-color:color-mix( in srgb,var(--color-theme-900) 16%,transparent );}&[aria-checked=\"true\"]{background-color:var(--page-paper-main);box-shadow:var(--shadow-float);cursor:default;svg{fill:var(--color-theme-900);}}&:focus-visible{box-shadow:0 0 0 2px var(--color-primary);}"], BoxSizingStyle);
27
29
  StyledViewSwitcherOption.displayName = "StyledViewSwitcherOption";
28
- export const StyledViewSwitcherMenuOption = styled.button.withConfig({
29
- displayName: "Styles__StyledViewSwitcherMenuOption",
30
+ export const StyledSubViewSwitcherOption = styled.button.withConfig({
31
+ displayName: "Styles__StyledSubViewSwitcherOption",
30
32
  componentId: "sc-1cg2mte-4"
31
- })(["", " display:inline-flex;align-items:center;gap:4px;height:26px;margin:0;padding:0 8px 0 12px;border:0;border-radius:var(--ac-br-rounded);background-color:var(--page-paper-main);box-shadow:var(--shadow-float);color:var(--color-theme-900);font-size:calc(13px * var(--text-scale,1));white-space:nowrap;cursor:pointer;outline:none;svg{flex-shrink:0;fill:var(--color-theme-900);}&:has(.c-view-switcher-menu__icon){padding-left:8px;}.c-view-switcher-menu__values{display:inline-grid;}.c-view-switcher-menu__value{display:inline-flex;grid-area:1 / 1;align-items:center;gap:4px;visibility:hidden;}.c-view-switcher-menu__value[data-selected=\"true\"]{visibility:visible;}.c-view-switcher-menu__icon{display:inline-flex;flex-shrink:0;}.c-view-switcher-menu__icon svg{width:20px;height:20px;}&:focus-visible{box-shadow:0 0 0 2px var(--color-primary);}"], BoxSizingStyle);
32
- StyledViewSwitcherMenuOption.displayName = "StyledViewSwitcherMenuOption";
33
+ })(["", " display:inline-flex;align-items:center;gap:4px;height:26px;margin:0;padding:0 8px 0 12px;border:0;border-radius:var(--ac-br-rounded);background-color:var(--page-paper-main);box-shadow:var(--shadow-float);color:var(--color-theme-900);font-size:calc(13px * var(--text-scale,1));white-space:nowrap;cursor:pointer;outline:none;svg{flex-shrink:0;fill:var(--color-theme-900);}&:has(.c-sub-view-switcher__icon){padding-left:8px;}.c-sub-view-switcher__values{display:inline-grid;}.c-sub-view-switcher__value{display:inline-flex;grid-area:1 / 1;align-items:center;gap:4px;visibility:hidden;}.c-sub-view-switcher__value[data-selected=\"true\"]{visibility:visible;}.c-sub-view-switcher__icon{display:inline-flex;flex-shrink:0;}.c-sub-view-switcher__icon svg{width:20px;height:20px;}&:focus-visible{box-shadow:0 0 0 2px var(--color-primary);}"], BoxSizingStyle);
34
+ StyledSubViewSwitcherOption.displayName = "StyledSubViewSwitcherOption";
33
35
  const VIEW_SWITCHER_MENU_REVEAL_MS = 200;
34
36
  const VIEW_SWITCHER_MENU_GAP = 8;
35
37
  const menuReveal = keyframes(["from{grid-template-columns:0fr;margin-right:-", "px;}"], VIEW_SWITCHER_MENU_GAP);
@@ -37,77 +39,87 @@ const menuConceal = keyframes(["to{grid-template-columns:0fr;margin-right:-", "p
37
39
  const menuClip = keyframes(["from,to{overflow:hidden;}"]);
38
40
 
39
41
  // The width opens from nothing, so the controls beside the menu move aside with it.
40
- export const StyledViewSwitcherMenuRoot = styled(StyledViewSwitcher).withConfig({
41
- displayName: "Styles__StyledViewSwitcherMenuRoot",
42
+ export const StyledSubViewSwitcherRoot = styled(StyledViewSwitcher).withConfig({
43
+ displayName: "Styles__StyledSubViewSwitcherRoot",
42
44
  componentId: "sc-1cg2mte-5"
43
- })(["display:inline-grid;grid-template-columns:1fr;&[data-animate-in]{animation:", " ", "ms cubic-bezier(0.4,0,0.2,1);}&[data-animate-in] > .c-view-switcher-menu__clip{animation:", " ", "ms;}&[data-leaving]{pointer-events:none;animation:", " ", "ms cubic-bezier(0.4,0,0.2,1) forwards;}&[data-leaving] > .c-view-switcher-menu__clip{overflow:hidden;}@media (prefers-reduced-motion:reduce){&[data-animate-in],&[data-animate-in] > .c-view-switcher-menu__clip,&[data-leaving]{animation:none;}}"], menuReveal, VIEW_SWITCHER_MENU_REVEAL_MS, menuClip, VIEW_SWITCHER_MENU_REVEAL_MS, menuConceal, VIEW_SWITCHER_MENU_REVEAL_MS);
44
- StyledViewSwitcherMenuRoot.displayName = "StyledViewSwitcherMenuRoot";
45
- export const StyledViewSwitcherMenuClip = styled.div.withConfig({
46
- displayName: "Styles__StyledViewSwitcherMenuClip",
45
+ })(["display:inline-grid;grid-template-columns:1fr;&[data-animate-in]{animation:", " ", "ms cubic-bezier(0.4,0,0.2,1);}&[data-animate-in] > .c-sub-view-switcher__clip{animation:", " ", "ms;}&[data-leaving]{pointer-events:none;animation:", " ", "ms cubic-bezier(0.4,0,0.2,1) forwards;}&[data-leaving] > .c-sub-view-switcher__clip{overflow:hidden;}@media (prefers-reduced-motion:reduce){&[data-animate-in],&[data-animate-in] > .c-sub-view-switcher__clip,&[data-leaving]{animation:none;}}"], menuReveal, VIEW_SWITCHER_MENU_REVEAL_MS, menuClip, VIEW_SWITCHER_MENU_REVEAL_MS, menuConceal, VIEW_SWITCHER_MENU_REVEAL_MS);
46
+ StyledSubViewSwitcherRoot.displayName = "StyledSubViewSwitcherRoot";
47
+ export const StyledSubViewSwitcherClip = styled.div.withConfig({
48
+ displayName: "Styles__StyledSubViewSwitcherClip",
47
49
  componentId: "sc-1cg2mte-6"
48
50
  })(["display:flex;min-width:0;> *{flex-shrink:0;}"]);
49
- StyledViewSwitcherMenuClip.displayName = "StyledViewSwitcherMenuClip";
50
- export const StyledViewSwitcherMenuIcon = styled.span.withConfig({
51
- displayName: "Styles__StyledViewSwitcherMenuIcon",
51
+ StyledSubViewSwitcherClip.displayName = "StyledSubViewSwitcherClip";
52
+ export const StyledSubViewSwitcherIcon = styled.span.withConfig({
53
+ displayName: "Styles__StyledSubViewSwitcherIcon",
52
54
  componentId: "sc-1cg2mte-7"
53
55
  })(["display:inline-flex;flex-shrink:0;margin-right:8px;fill:var(--color-theme-900);"]);
54
- StyledViewSwitcherMenuIcon.displayName = "StyledViewSwitcherMenuIcon";
55
- export const StyledViewSwitcherMenuList = styled(List).withConfig({
56
- displayName: "Styles__StyledViewSwitcherMenuList",
56
+ StyledSubViewSwitcherIcon.displayName = "StyledSubViewSwitcherIcon";
57
+ export const StyledSubViewSwitcherList = styled(List).withConfig({
58
+ displayName: "Styles__StyledSubViewSwitcherList",
57
59
  componentId: "sc-1cg2mte-8"
58
60
  })(["padding:8px 0;"]);
59
- StyledViewSwitcherMenuList.displayName = "StyledViewSwitcherMenuList";
60
- export const StyledViewSwitcherMenuLabel = styled.span.withConfig({
61
- displayName: "Styles__StyledViewSwitcherMenuLabel",
61
+ StyledSubViewSwitcherList.displayName = "StyledSubViewSwitcherList";
62
+ export const StyledSubViewSwitcherLabel = styled.span.withConfig({
63
+ displayName: "Styles__StyledSubViewSwitcherLabel",
62
64
  componentId: "sc-1cg2mte-9"
63
65
  })(["flex:1;&[data-selected=\"true\"]{font-weight:bold;color:var(--color-primary);}"]);
64
- StyledViewSwitcherMenuLabel.displayName = "StyledViewSwitcherMenuLabel";
65
- const promptIn = keyframes(["from{opacity:0;}"]);
66
- const promptOut = keyframes(["to{clip-path:inset(0 0 0 100%);}"]);
67
- const appliedIn = keyframes(["from{opacity:0;transform:translateY(6px);}"]);
68
- const appliedIcon = keyframes(["from{opacity:0;transform:scale(0.4);}60%{transform:scale(1.2);}"]);
66
+ StyledSubViewSwitcherLabel.displayName = "StyledSubViewSwitcherLabel";
69
67
  export const StyledViewSwitcherPromptTitle = styled.span.withConfig({
70
68
  displayName: "Styles__StyledViewSwitcherPromptTitle",
71
69
  componentId: "sc-1cg2mte-10"
72
70
  })(["position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;"]);
73
71
  StyledViewSwitcherPromptTitle.displayName = "StyledViewSwitcherPromptTitle";
74
- const PROMPT_EASE = "cubic-bezier(0.4, 0, 0.2, 1)";
75
- const APPLIED_SWAP_MS = 160;
72
+ const TAB_EASE = "cubic-bezier(0.4, 0, 0.2, 1)";
73
+ // The radius of a 32px control.
74
+ const CONTROL_RADIUS = 16;
75
+ // The green shows this much around the top and the sides of the control.
76
+ export const TAB_RING = 2;
77
+ const TAB_RADIUS = CONTROL_RADIUS + TAB_RING;
78
+ // The buttons sit this far inside the green, so their corners follow its corners.
79
+ const TAB_INSET = 3;
80
+ const BUTTON_RADIUS = TAB_RADIUS - TAB_INSET;
81
+ const slideOut = keyframes(["from{transform:translateY(-100%);}"]);
82
+ const slideIn = keyframes(["to{transform:translateY(-100%);}"]);
83
+ const appliedIcon = keyframes(["from{transform:scale(0.3);}60%{transform:scale(1.2);}"]);
84
+ const doneText = keyframes(["from{opacity:0;transform:translateX(-4px);}"]);
76
85
 
77
- // The offer covers the buttons and keeps the width of the switcher, so nothing beside it moves.
78
- export const StyledViewSwitcherPrompt = styled.div.withConfig({
79
- displayName: "Styles__StyledViewSwitcherPrompt",
86
+ // The tab rings the control and clips its slide, which comes out from under the control.
87
+ export const StyledApplyToAllTab = styled.div.withConfig({
88
+ displayName: "Styles__StyledApplyToAllTab",
80
89
  componentId: "sc-1cg2mte-11"
81
- })(["", " position:absolute;top:3px;right:3px;bottom:3px;z-index:1;display:flex;min-width:calc(100% - 6px);animation:", " ", "ms ", ";&[data-phase=\"applying\"],&[data-phase=\"applied\"]{pointer-events:none;}&[data-phase=\"applying\"] .c-view-switcher__prompt-pill{opacity:0.7;}.c-view-switcher__action,.c-view-switcher__line,.c-view-switcher__dismiss{transition:opacity ", "ms ", ",transform ", "ms ", ",visibility 0s linear ", "ms,background-color 150ms ease;}&[data-confirmed] .c-view-switcher__action,&[data-confirmed] .c-view-switcher__line,&[data-confirmed] .c-view-switcher__dismiss{visibility:hidden;opacity:0;transform:translateY(-6px);}&[data-phase=\"leaving\"]{pointer-events:none;animation:", " ", "ms ", " forwards;}@media (prefers-reduced-motion:reduce){animation:none;&[data-phase=\"leaving\"]{animation:none;}.c-view-switcher__action,.c-view-switcher__line,.c-view-switcher__dismiss,.c-view-switcher__prompt-pill{transition:none;}}"], BoxSizingStyle, promptIn, VIEW_SWITCHER_LEAVE_MS, PROMPT_EASE, APPLIED_SWAP_MS, PROMPT_EASE, APPLIED_SWAP_MS, PROMPT_EASE, APPLIED_SWAP_MS, promptOut, VIEW_SWITCHER_LEAVE_MS, PROMPT_EASE);
82
- StyledViewSwitcherPrompt.displayName = "StyledViewSwitcherPrompt";
83
- export const StyledViewSwitcherPromptClip = styled.div.withConfig({
84
- displayName: "Styles__StyledViewSwitcherPromptClip",
90
+ })(["", " z-index:", ";overflow:hidden;border-radius:", "px;--apply-to-all-fill:#1f9d5a;", " &{--apply-to-all-fill:#2f8f5e;}&[data-phase=\"applying\"],&[data-phase=\"applied\"],&[data-phase=\"leaving\"]{pointer-events:none;}&[data-phase=\"applying\"] .c-apply-to-all__button{opacity:0.7;}.c-apply-to-all__slide{animation:", " ", "ms ", ";}&[data-phase=\"leaving\"] .c-apply-to-all__slide{animation:", " ", "ms ", " forwards;}.c-apply-to-all__label{display:none;}&[data-labeled] .c-apply-to-all__label{display:inline;}&:not([data-labeled]) .c-apply-to-all__done-text{display:none;}@media (prefers-reduced-motion:reduce){.c-apply-to-all__slide,&[data-phase=\"leaving\"] .c-apply-to-all__slide{animation:none;}}"], BoxSizingStyle, layers.house - 1, TAB_RADIUS, DARK_THEME_SELECTOR, slideOut, VIEW_SWITCHER_LEAVE_MS, TAB_EASE, slideIn, VIEW_SWITCHER_LEAVE_MS, TAB_EASE);
91
+ StyledApplyToAllTab.displayName = "StyledApplyToAllTab";
92
+
93
+ // The green part of the tab. Its top sits under the control.
94
+ export const StyledApplyToAllSlide = styled.div.withConfig({
95
+ displayName: "Styles__StyledApplyToAllSlide",
85
96
  componentId: "sc-1cg2mte-12"
86
- })(["display:flex;flex:1;min-width:0;"]);
87
- StyledViewSwitcherPromptClip.displayName = "StyledViewSwitcherPromptClip";
88
- export const StyledViewSwitcherPromptPill = styled.div.withConfig({
89
- displayName: "Styles__StyledViewSwitcherPromptPill",
97
+ })(["", " display:flex;align-items:center;padding:calc(var(--apply-to-all-tuck) + ", "px) ", "px ", "px;border-radius:inherit;background-color:var(--apply-to-all-fill);"], BoxSizingStyle, TAB_INSET, TAB_INSET, TAB_INSET);
98
+ StyledApplyToAllSlide.displayName = "StyledApplyToAllSlide";
99
+
100
+ // The apply button takes the room the dismiss button leaves, and only its outer bottom corner is round.
101
+ export const StyledApplyToAllButton = styled.button.withConfig({
102
+ displayName: "Styles__StyledApplyToAllButton",
90
103
  componentId: "sc-1cg2mte-13"
91
- })(["", " position:relative;display:inline-flex;flex:1;align-items:center;justify-content:center;height:26px;border-radius:var(--ac-br-rounded);background-color:var(--color-primary-opaque-300);color:var(--color-primary);font-size:calc(0.75rem * var(--text-scale,1));font-weight:500;white-space:nowrap;transition:opacity 150ms ease;"], BoxSizingStyle);
92
- StyledViewSwitcherPromptPill.displayName = "StyledViewSwitcherPromptPill";
93
- export const StyledViewSwitcherAction = styled.button.withConfig({
94
- displayName: "Styles__StyledViewSwitcherAction",
104
+ })(["", " display:inline-flex;flex:1;align-items:center;justify-content:center;gap:4px;min-width:34px;height:26px;margin:0;padding:0;border:0;border-radius:0 0 0 ", "px;background-color:transparent;color:#fff;font-size:calc(0.75rem * var(--text-scale,1));font-weight:600;white-space:nowrap;cursor:pointer;outline:none;transition:background-color 150ms ease,opacity 150ms ease;svg{flex-shrink:0;width:20px;height:20px;fill:#fff;}&:hover{background-color:color-mix(in srgb,#fff 16%,transparent);}&:focus-visible{box-shadow:inset 0 0 0 2px #fff;}"], BoxSizingStyle, BUTTON_RADIUS);
105
+ StyledApplyToAllButton.displayName = "StyledApplyToAllButton";
106
+
107
+ // The line takes the height of the buttons.
108
+ export const StyledApplyToAllLine = styled.i.withConfig({
109
+ displayName: "Styles__StyledApplyToAllLine",
95
110
  componentId: "sc-1cg2mte-14"
96
- })(["", " display:inline-flex;align-items:center;gap:4px;height:26px;margin:0;padding:0 2px 0 6px;border:0;border-radius:var(--ac-br-rounded);background-color:transparent;color:inherit;font:inherit;cursor:pointer;outline:none;svg{flex-shrink:0;width:16px;height:16px;fill:currentColor;}&:hover{color:var(--color-theme-900);}&:focus-visible{box-shadow:inset 0 0 0 2px var(--color-primary);}"], BoxSizingStyle);
97
- StyledViewSwitcherAction.displayName = "StyledViewSwitcherAction";
98
- export const StyledViewSwitcherLine = styled.i.withConfig({
99
- displayName: "Styles__StyledViewSwitcherLine",
111
+ })(["flex-shrink:0;width:1px;height:26px;margin:0 1px;background-color:color-mix(in srgb,#fff 35%,transparent);"]);
112
+ StyledApplyToAllLine.displayName = "StyledApplyToAllLine";
113
+ export const StyledApplyToAllDismiss = styled.button.withConfig({
114
+ displayName: "Styles__StyledApplyToAllDismiss",
100
115
  componentId: "sc-1cg2mte-15"
101
- })(["flex-shrink:0;width:1px;height:14px;margin:0 1px 0 6px;background-color:color-mix(in srgb,var(--color-primary) 35%,transparent);"]);
102
- StyledViewSwitcherLine.displayName = "StyledViewSwitcherLine";
103
- export const StyledViewSwitcherDismiss = styled.button.withConfig({
104
- displayName: "Styles__StyledViewSwitcherDismiss",
116
+ })(["", " display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:26px;height:26px;margin:0;padding:0 2px;border:0;border-radius:0 0 ", "px 0;background-color:transparent;cursor:pointer;outline:none;transition:background-color 150ms ease;svg{width:20px;height:20px;fill:#fff;}&:hover{background-color:color-mix(in srgb,#fff 16%,transparent);}&:focus-visible{box-shadow:inset 0 0 0 2px #fff;}"], BoxSizingStyle, BUTTON_RADIUS);
117
+ StyledApplyToAllDismiss.displayName = "StyledApplyToAllDismiss";
118
+
119
+ // The confirmation takes the place of the buttons, at the size of the tab.
120
+ export const StyledApplyToAllDone = styled.span.withConfig({
121
+ displayName: "Styles__StyledApplyToAllDone",
105
122
  componentId: "sc-1cg2mte-16"
106
- })(["", " display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:22px;height:22px;margin:0 2px 0 0;padding:0;border:0;border-radius:50%;background-color:transparent;cursor:pointer;outline:none;transition:background-color 150ms ease;svg{width:16px;height:16px;margin-left:-1px;fill:var(--color-theme-700);}&:hover{background-color:color-mix( in srgb,var(--color-theme-900) 16%,transparent );}&:focus-visible{box-shadow:inset 0 0 0 2px var(--color-primary);}"], BoxSizingStyle);
107
- StyledViewSwitcherDismiss.displayName = "StyledViewSwitcherDismiss";
108
- export const StyledViewSwitcherApplied = styled.span.withConfig({
109
- displayName: "Styles__StyledViewSwitcherApplied",
110
- componentId: "sc-1cg2mte-17"
111
- })(["position:absolute;inset:0;display:inline-flex;align-items:center;justify-content:center;gap:4px;animation:", " ", "ms ", " 60ms backwards;svg{width:16px;height:16px;fill:currentColor;animation:", " 250ms ease-out 60ms backwards;}@media (prefers-reduced-motion:reduce){animation:none;svg{animation:none;}}"], appliedIn, APPLIED_SWAP_MS, PROMPT_EASE, appliedIcon);
112
- StyledViewSwitcherApplied.displayName = "StyledViewSwitcherApplied";
123
+ })(["", " display:inline-flex;flex:1;align-items:center;justify-content:center;gap:4px;height:26px;overflow:hidden;color:#fff;font-size:calc(0.75rem * var(--text-scale,1));font-weight:600;white-space:nowrap;svg{flex-shrink:0;width:18px;height:18px;fill:currentColor;animation:", " 320ms cubic-bezier(0.34,1.56,0.64,1);}.c-apply-to-all__done-text{animation:", " 220ms ", " 80ms backwards;}@media (prefers-reduced-motion:reduce){svg,.c-apply-to-all__done-text{animation:none;}}"], BoxSizingStyle, appliedIcon, doneText, TAB_EASE);
124
+ StyledApplyToAllDone.displayName = "StyledApplyToAllDone";
113
125
  //# sourceMappingURL=Styles.js.map