@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.
- package/dist/cjs/components/MainMenu/MainMenu.js +44 -40
- package/dist/cjs/components/MainMenu/MainMenu.js.map +1 -1
- package/dist/cjs/components/MainMenu/MainMenuSettings.js +112 -0
- package/dist/cjs/components/MainMenu/MainMenuSettings.js.map +1 -0
- package/dist/cjs/components/MainMenu/Styles.js +8 -3
- package/dist/cjs/components/MainMenu/Styles.js.map +1 -1
- package/dist/cjs/components/MainMenu/hooks.js +1 -9
- package/dist/cjs/components/MainMenu/hooks.js.map +1 -1
- package/dist/cjs/components/MainMenu/types.js +4 -2
- package/dist/cjs/components/MainMenu/types.js.map +1 -1
- package/dist/cjs/components/Popper/Popper.js +14 -0
- package/dist/cjs/components/Popper/Popper.js.map +1 -1
- package/dist/cjs/components/Popper/anchorMove.js +42 -0
- package/dist/cjs/components/Popper/anchorMove.js.map +1 -0
- package/dist/cjs/components/ScrollArea/ScrollArea.js +5 -3
- package/dist/cjs/components/ScrollArea/ScrollArea.js.map +1 -1
- package/dist/cjs/components/ViewSettings/Styles.js +26 -0
- package/dist/cjs/components/ViewSettings/Styles.js.map +1 -0
- package/dist/cjs/components/ViewSettings/ViewSettings.js +96 -0
- package/dist/cjs/components/ViewSettings/ViewSettings.js.map +1 -0
- package/dist/cjs/components/ViewSettings/index.js +17 -0
- package/dist/cjs/components/ViewSettings/index.js.map +1 -0
- package/dist/cjs/components/ViewSwitcher/ApplyToAllTab.js +199 -0
- package/dist/cjs/components/ViewSwitcher/ApplyToAllTab.js.map +1 -0
- package/dist/cjs/components/ViewSwitcher/Styles.js +73 -61
- package/dist/cjs/components/ViewSwitcher/Styles.js.map +1 -1
- package/dist/cjs/components/ViewSwitcher/{ViewSwitcherMenu.js → SubViewSwitcher.js} +70 -22
- package/dist/cjs/components/ViewSwitcher/SubViewSwitcher.js.map +1 -0
- package/dist/cjs/components/ViewSwitcher/ViewSwitcher.js +46 -184
- package/dist/cjs/components/ViewSwitcher/ViewSwitcher.js.map +1 -1
- package/dist/cjs/components/ViewSwitcher/index.js +4 -4
- package/dist/cjs/components/ViewSwitcher/index.js.map +1 -1
- package/dist/cjs/components/ViewSwitcher/useApplyToAllOffer.js +179 -0
- package/dist/cjs/components/ViewSwitcher/useApplyToAllOffer.js.map +1 -0
- package/dist/cjs/components/index.js +12 -0
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/presentation/shared/ActivityFeed.js +1 -2
- package/dist/cjs/presentation/shared/ActivityFeed.js.map +1 -1
- package/dist/esm/components/MainMenu/MainMenu.d.ts +6 -4
- package/dist/esm/components/MainMenu/MainMenu.d.ts.map +1 -1
- package/dist/esm/components/MainMenu/MainMenu.js +39 -40
- package/dist/esm/components/MainMenu/MainMenu.js.map +1 -1
- package/dist/esm/components/MainMenu/MainMenuSettings.d.ts +14 -0
- package/dist/esm/components/MainMenu/MainMenuSettings.d.ts.map +1 -0
- package/dist/esm/components/MainMenu/MainMenuSettings.js +84 -0
- package/dist/esm/components/MainMenu/MainMenuSettings.js.map +1 -0
- package/dist/esm/components/MainMenu/Styles.d.ts +11 -0
- package/dist/esm/components/MainMenu/Styles.d.ts.map +1 -1
- package/dist/esm/components/MainMenu/Styles.js +7 -2
- package/dist/esm/components/MainMenu/Styles.js.map +1 -1
- package/dist/esm/components/MainMenu/hooks.d.ts.map +1 -1
- package/dist/esm/components/MainMenu/hooks.js +1 -8
- package/dist/esm/components/MainMenu/hooks.js.map +1 -1
- package/dist/esm/components/MainMenu/types.d.ts +4 -2
- package/dist/esm/components/MainMenu/types.d.ts.map +1 -1
- package/dist/esm/components/MainMenu/types.js +4 -2
- package/dist/esm/components/MainMenu/types.js.map +1 -1
- package/dist/esm/components/Popper/Popper.d.ts.map +1 -1
- package/dist/esm/components/Popper/Popper.js +12 -0
- package/dist/esm/components/Popper/Popper.js.map +1 -1
- package/dist/esm/components/Popper/anchorMove.d.ts +4 -0
- package/dist/esm/components/Popper/anchorMove.d.ts.map +1 -0
- package/dist/esm/components/Popper/anchorMove.js +33 -0
- package/dist/esm/components/Popper/anchorMove.js.map +1 -0
- package/dist/esm/components/ScrollArea/ScrollArea.d.ts +2 -0
- package/dist/esm/components/ScrollArea/ScrollArea.d.ts.map +1 -1
- package/dist/esm/components/ScrollArea/ScrollArea.js +5 -3
- package/dist/esm/components/ScrollArea/ScrollArea.js.map +1 -1
- package/dist/esm/components/ViewSettings/Styles.d.ts +4 -0
- package/dist/esm/components/ViewSettings/Styles.d.ts.map +1 -0
- package/dist/esm/components/ViewSettings/Styles.js +20 -0
- package/dist/esm/components/ViewSettings/Styles.js.map +1 -0
- package/dist/esm/components/ViewSettings/ViewSettings.d.ts +20 -0
- package/dist/esm/components/ViewSettings/ViewSettings.d.ts.map +1 -0
- package/dist/esm/components/ViewSettings/ViewSettings.js +87 -0
- package/dist/esm/components/ViewSettings/ViewSettings.js.map +1 -0
- package/dist/esm/components/ViewSettings/index.d.ts +2 -0
- package/dist/esm/components/ViewSettings/index.d.ts.map +1 -0
- package/dist/esm/components/ViewSettings/index.js +2 -0
- package/dist/esm/components/ViewSettings/index.js.map +1 -0
- package/dist/esm/components/ViewSwitcher/ApplyToAllTab.d.ts +24 -0
- package/dist/esm/components/ViewSwitcher/ApplyToAllTab.d.ts.map +1 -0
- package/dist/esm/components/ViewSwitcher/ApplyToAllTab.js +179 -0
- package/dist/esm/components/ViewSwitcher/ApplyToAllTab.js.map +1 -0
- package/dist/esm/components/ViewSwitcher/Styles.d.ts +15 -15
- package/dist/esm/components/ViewSwitcher/Styles.d.ts.map +1 -1
- package/dist/esm/components/ViewSwitcher/Styles.js +72 -60
- package/dist/esm/components/ViewSwitcher/Styles.js.map +1 -1
- package/dist/esm/components/ViewSwitcher/SubViewSwitcher.d.ts +50 -0
- package/dist/esm/components/ViewSwitcher/SubViewSwitcher.d.ts.map +1 -0
- package/dist/esm/components/ViewSwitcher/SubViewSwitcher.js +149 -0
- package/dist/esm/components/ViewSwitcher/SubViewSwitcher.js.map +1 -0
- package/dist/esm/components/ViewSwitcher/ViewSwitcher.d.ts +8 -8
- package/dist/esm/components/ViewSwitcher/ViewSwitcher.d.ts.map +1 -1
- package/dist/esm/components/ViewSwitcher/ViewSwitcher.js +48 -163
- package/dist/esm/components/ViewSwitcher/ViewSwitcher.js.map +1 -1
- package/dist/esm/components/ViewSwitcher/index.d.ts +1 -1
- package/dist/esm/components/ViewSwitcher/index.d.ts.map +1 -1
- package/dist/esm/components/ViewSwitcher/index.js +1 -1
- package/dist/esm/components/ViewSwitcher/index.js.map +1 -1
- package/dist/esm/components/ViewSwitcher/useApplyToAllOffer.d.ts +27 -0
- package/dist/esm/components/ViewSwitcher/useApplyToAllOffer.d.ts.map +1 -0
- package/dist/esm/components/ViewSwitcher/useApplyToAllOffer.js +159 -0
- package/dist/esm/components/ViewSwitcher/useApplyToAllOffer.js.map +1 -0
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.d.ts.map +1 -1
- package/dist/esm/components/index.js +1 -0
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/presentation/shared/ActivityFeed.d.ts.map +1 -1
- package/dist/esm/presentation/shared/ActivityFeed.js +1 -2
- package/dist/esm/presentation/shared/ActivityFeed.js.map +1 -1
- package/dist/index.js +1679 -1174
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/components/ViewSwitcher/ViewSwitcherMenu.js.map +0 -1
- package/dist/esm/components/ViewSwitcher/ViewSwitcherMenu.d.ts +0 -39
- package/dist/esm/components/ViewSwitcher/ViewSwitcherMenu.d.ts.map +0 -1
- package/dist/esm/components/ViewSwitcher/ViewSwitcherMenu.js +0 -101
- package/dist/esm/components/ViewSwitcher/ViewSwitcherMenu.js.map +0 -1
|
@@ -3,24 +3,26 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.VIEW_SWITCHER_PROMPT_DELAY_MS = exports.VIEW_SWITCHER_OPEN_MS = exports.VIEW_SWITCHER_LEAVE_MS = exports.VIEW_SWITCHER_APPLIED_MS = exports.TAB_RING = exports.StyledViewSwitcherTrack = exports.StyledViewSwitcherPromptTitle = exports.StyledViewSwitcherOptions = exports.StyledViewSwitcherOption = exports.StyledViewSwitcher = exports.StyledSubViewSwitcherRoot = exports.StyledSubViewSwitcherOption = exports.StyledSubViewSwitcherList = exports.StyledSubViewSwitcherLabel = exports.StyledSubViewSwitcherIcon = exports.StyledSubViewSwitcherClip = exports.StyledApplyToAllTab = exports.StyledApplyToAllSlide = exports.StyledApplyToAllLine = exports.StyledApplyToAllDone = exports.StyledApplyToAllDismiss = exports.StyledApplyToAllButton = void 0;
|
|
7
7
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
8
|
+
var _layers = require("../../utils/layers");
|
|
9
|
+
var _themes = require("../../utils/themes");
|
|
8
10
|
var _BoxSizingStyle = require("../BoxSizingStyle");
|
|
9
11
|
var _List = require("../List");
|
|
10
12
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
11
13
|
var VIEW_SWITCHER_PROMPT_DELAY_MS = exports.VIEW_SWITCHER_PROMPT_DELAY_MS = 100;
|
|
12
|
-
var
|
|
13
|
-
var
|
|
14
|
+
var VIEW_SWITCHER_APPLIED_MS = exports.VIEW_SWITCHER_APPLIED_MS = 1400;
|
|
15
|
+
var VIEW_SWITCHER_OPEN_MS = exports.VIEW_SWITCHER_OPEN_MS = 3000;
|
|
14
16
|
var VIEW_SWITCHER_LEAVE_MS = exports.VIEW_SWITCHER_LEAVE_MS = 200;
|
|
15
17
|
var StyledViewSwitcher = exports.StyledViewSwitcher = _styledComponents.default.div.withConfig({
|
|
16
18
|
displayName: "Styles__StyledViewSwitcher",
|
|
17
19
|
componentId: "sc-1cg2mte-0"
|
|
18
|
-
})(["", " display:inline-flex;flex-shrink:0;"], _BoxSizingStyle.BoxSizingStyle);
|
|
20
|
+
})(["", " display:inline-flex;flex-shrink:0;isolation:isolate;"], _BoxSizingStyle.BoxSizingStyle);
|
|
19
21
|
StyledViewSwitcher.displayName = "StyledViewSwitcher";
|
|
20
22
|
var StyledViewSwitcherTrack = exports.StyledViewSwitcherTrack = _styledComponents.default.div.withConfig({
|
|
21
23
|
displayName: "Styles__StyledViewSwitcherTrack",
|
|
22
24
|
componentId: "sc-1cg2mte-1"
|
|
23
|
-
})(["", " 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.BoxSizingStyle);
|
|
25
|
+
})(["", " 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.BoxSizingStyle);
|
|
24
26
|
StyledViewSwitcherTrack.displayName = "StyledViewSwitcherTrack";
|
|
25
27
|
var StyledViewSwitcherOptions = exports.StyledViewSwitcherOptions = _styledComponents.default.div.withConfig({
|
|
26
28
|
displayName: "Styles__StyledViewSwitcherOptions",
|
|
@@ -32,11 +34,11 @@ var StyledViewSwitcherOption = exports.StyledViewSwitcherOption = _styledCompone
|
|
|
32
34
|
componentId: "sc-1cg2mte-3"
|
|
33
35
|
})(["", " 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.BoxSizingStyle);
|
|
34
36
|
StyledViewSwitcherOption.displayName = "StyledViewSwitcherOption";
|
|
35
|
-
var
|
|
36
|
-
displayName: "
|
|
37
|
+
var StyledSubViewSwitcherOption = exports.StyledSubViewSwitcherOption = _styledComponents.default.button.withConfig({
|
|
38
|
+
displayName: "Styles__StyledSubViewSwitcherOption",
|
|
37
39
|
componentId: "sc-1cg2mte-4"
|
|
38
|
-
})(["", " 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-
|
|
39
|
-
|
|
40
|
+
})(["", " 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.BoxSizingStyle);
|
|
41
|
+
StyledSubViewSwitcherOption.displayName = "StyledSubViewSwitcherOption";
|
|
40
42
|
var VIEW_SWITCHER_MENU_REVEAL_MS = 200;
|
|
41
43
|
var VIEW_SWITCHER_MENU_GAP = 8;
|
|
42
44
|
var menuReveal = (0, _styledComponents.keyframes)(["from{grid-template-columns:0fr;margin-right:-", "px;}"], VIEW_SWITCHER_MENU_GAP);
|
|
@@ -44,77 +46,87 @@ var menuConceal = (0, _styledComponents.keyframes)(["to{grid-template-columns:0f
|
|
|
44
46
|
var menuClip = (0, _styledComponents.keyframes)(["from,to{overflow:hidden;}"]);
|
|
45
47
|
|
|
46
48
|
// The width opens from nothing, so the controls beside the menu move aside with it.
|
|
47
|
-
var
|
|
48
|
-
displayName: "
|
|
49
|
+
var StyledSubViewSwitcherRoot = exports.StyledSubViewSwitcherRoot = (0, _styledComponents.default)(StyledViewSwitcher).withConfig({
|
|
50
|
+
displayName: "Styles__StyledSubViewSwitcherRoot",
|
|
49
51
|
componentId: "sc-1cg2mte-5"
|
|
50
|
-
})(["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-
|
|
51
|
-
|
|
52
|
-
var
|
|
53
|
-
displayName: "
|
|
52
|
+
})(["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);
|
|
53
|
+
StyledSubViewSwitcherRoot.displayName = "StyledSubViewSwitcherRoot";
|
|
54
|
+
var StyledSubViewSwitcherClip = exports.StyledSubViewSwitcherClip = _styledComponents.default.div.withConfig({
|
|
55
|
+
displayName: "Styles__StyledSubViewSwitcherClip",
|
|
54
56
|
componentId: "sc-1cg2mte-6"
|
|
55
57
|
})(["display:flex;min-width:0;> *{flex-shrink:0;}"]);
|
|
56
|
-
|
|
57
|
-
var
|
|
58
|
-
displayName: "
|
|
58
|
+
StyledSubViewSwitcherClip.displayName = "StyledSubViewSwitcherClip";
|
|
59
|
+
var StyledSubViewSwitcherIcon = exports.StyledSubViewSwitcherIcon = _styledComponents.default.span.withConfig({
|
|
60
|
+
displayName: "Styles__StyledSubViewSwitcherIcon",
|
|
59
61
|
componentId: "sc-1cg2mte-7"
|
|
60
62
|
})(["display:inline-flex;flex-shrink:0;margin-right:8px;fill:var(--color-theme-900);"]);
|
|
61
|
-
|
|
62
|
-
var
|
|
63
|
-
displayName: "
|
|
63
|
+
StyledSubViewSwitcherIcon.displayName = "StyledSubViewSwitcherIcon";
|
|
64
|
+
var StyledSubViewSwitcherList = exports.StyledSubViewSwitcherList = (0, _styledComponents.default)(_List.List).withConfig({
|
|
65
|
+
displayName: "Styles__StyledSubViewSwitcherList",
|
|
64
66
|
componentId: "sc-1cg2mte-8"
|
|
65
67
|
})(["padding:8px 0;"]);
|
|
66
|
-
|
|
67
|
-
var
|
|
68
|
-
displayName: "
|
|
68
|
+
StyledSubViewSwitcherList.displayName = "StyledSubViewSwitcherList";
|
|
69
|
+
var StyledSubViewSwitcherLabel = exports.StyledSubViewSwitcherLabel = _styledComponents.default.span.withConfig({
|
|
70
|
+
displayName: "Styles__StyledSubViewSwitcherLabel",
|
|
69
71
|
componentId: "sc-1cg2mte-9"
|
|
70
72
|
})(["flex:1;&[data-selected=\"true\"]{font-weight:bold;color:var(--color-primary);}"]);
|
|
71
|
-
|
|
72
|
-
var promptIn = (0, _styledComponents.keyframes)(["from{opacity:0;}"]);
|
|
73
|
-
var promptOut = (0, _styledComponents.keyframes)(["to{clip-path:inset(0 0 0 100%);}"]);
|
|
74
|
-
var appliedIn = (0, _styledComponents.keyframes)(["from{opacity:0;transform:translateY(6px);}"]);
|
|
75
|
-
var appliedIcon = (0, _styledComponents.keyframes)(["from{opacity:0;transform:scale(0.4);}60%{transform:scale(1.2);}"]);
|
|
73
|
+
StyledSubViewSwitcherLabel.displayName = "StyledSubViewSwitcherLabel";
|
|
76
74
|
var StyledViewSwitcherPromptTitle = exports.StyledViewSwitcherPromptTitle = _styledComponents.default.span.withConfig({
|
|
77
75
|
displayName: "Styles__StyledViewSwitcherPromptTitle",
|
|
78
76
|
componentId: "sc-1cg2mte-10"
|
|
79
77
|
})(["position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;"]);
|
|
80
78
|
StyledViewSwitcherPromptTitle.displayName = "StyledViewSwitcherPromptTitle";
|
|
81
|
-
var
|
|
82
|
-
|
|
79
|
+
var TAB_EASE = "cubic-bezier(0.4, 0, 0.2, 1)";
|
|
80
|
+
// The radius of a 32px control.
|
|
81
|
+
var CONTROL_RADIUS = 16;
|
|
82
|
+
// The green shows this much around the top and the sides of the control.
|
|
83
|
+
var TAB_RING = exports.TAB_RING = 2;
|
|
84
|
+
var TAB_RADIUS = CONTROL_RADIUS + TAB_RING;
|
|
85
|
+
// The buttons sit this far inside the green, so their corners follow its corners.
|
|
86
|
+
var TAB_INSET = 3;
|
|
87
|
+
var BUTTON_RADIUS = TAB_RADIUS - TAB_INSET;
|
|
88
|
+
var slideOut = (0, _styledComponents.keyframes)(["from{transform:translateY(-100%);}"]);
|
|
89
|
+
var slideIn = (0, _styledComponents.keyframes)(["to{transform:translateY(-100%);}"]);
|
|
90
|
+
var appliedIcon = (0, _styledComponents.keyframes)(["from{transform:scale(0.3);}60%{transform:scale(1.2);}"]);
|
|
91
|
+
var doneText = (0, _styledComponents.keyframes)(["from{opacity:0;transform:translateX(-4px);}"]);
|
|
83
92
|
|
|
84
|
-
// The
|
|
85
|
-
var
|
|
86
|
-
displayName: "
|
|
93
|
+
// The tab rings the control and clips its slide, which comes out from under the control.
|
|
94
|
+
var StyledApplyToAllTab = exports.StyledApplyToAllTab = _styledComponents.default.div.withConfig({
|
|
95
|
+
displayName: "Styles__StyledApplyToAllTab",
|
|
87
96
|
componentId: "sc-1cg2mte-11"
|
|
88
|
-
})(["", "
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
97
|
+
})(["", " 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.BoxSizingStyle, _layers.layers.house - 1, TAB_RADIUS, _themes.DARK_THEME_SELECTOR, slideOut, VIEW_SWITCHER_LEAVE_MS, TAB_EASE, slideIn, VIEW_SWITCHER_LEAVE_MS, TAB_EASE);
|
|
98
|
+
StyledApplyToAllTab.displayName = "StyledApplyToAllTab";
|
|
99
|
+
|
|
100
|
+
// The green part of the tab. Its top sits under the control.
|
|
101
|
+
var StyledApplyToAllSlide = exports.StyledApplyToAllSlide = _styledComponents.default.div.withConfig({
|
|
102
|
+
displayName: "Styles__StyledApplyToAllSlide",
|
|
92
103
|
componentId: "sc-1cg2mte-12"
|
|
93
|
-
})(["display:flex;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
104
|
+
})(["", " 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.BoxSizingStyle, TAB_INSET, TAB_INSET, TAB_INSET);
|
|
105
|
+
StyledApplyToAllSlide.displayName = "StyledApplyToAllSlide";
|
|
106
|
+
|
|
107
|
+
// The apply button takes the room the dismiss button leaves, and only its outer bottom corner is round.
|
|
108
|
+
var StyledApplyToAllButton = exports.StyledApplyToAllButton = _styledComponents.default.button.withConfig({
|
|
109
|
+
displayName: "Styles__StyledApplyToAllButton",
|
|
97
110
|
componentId: "sc-1cg2mte-13"
|
|
98
|
-
})(["", "
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
111
|
+
})(["", " 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.BoxSizingStyle, BUTTON_RADIUS);
|
|
112
|
+
StyledApplyToAllButton.displayName = "StyledApplyToAllButton";
|
|
113
|
+
|
|
114
|
+
// The line takes the height of the buttons.
|
|
115
|
+
var StyledApplyToAllLine = exports.StyledApplyToAllLine = _styledComponents.default.i.withConfig({
|
|
116
|
+
displayName: "Styles__StyledApplyToAllLine",
|
|
102
117
|
componentId: "sc-1cg2mte-14"
|
|
103
|
-
})(["
|
|
104
|
-
|
|
105
|
-
var
|
|
106
|
-
displayName: "
|
|
118
|
+
})(["flex-shrink:0;width:1px;height:26px;margin:0 1px;background-color:color-mix(in srgb,#fff 35%,transparent);"]);
|
|
119
|
+
StyledApplyToAllLine.displayName = "StyledApplyToAllLine";
|
|
120
|
+
var StyledApplyToAllDismiss = exports.StyledApplyToAllDismiss = _styledComponents.default.button.withConfig({
|
|
121
|
+
displayName: "Styles__StyledApplyToAllDismiss",
|
|
107
122
|
componentId: "sc-1cg2mte-15"
|
|
108
|
-
})(["flex-shrink:0;width:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
123
|
+
})(["", " 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.BoxSizingStyle, BUTTON_RADIUS);
|
|
124
|
+
StyledApplyToAllDismiss.displayName = "StyledApplyToAllDismiss";
|
|
125
|
+
|
|
126
|
+
// The confirmation takes the place of the buttons, at the size of the tab.
|
|
127
|
+
var StyledApplyToAllDone = exports.StyledApplyToAllDone = _styledComponents.default.span.withConfig({
|
|
128
|
+
displayName: "Styles__StyledApplyToAllDone",
|
|
112
129
|
componentId: "sc-1cg2mte-16"
|
|
113
|
-
})(["", " display:inline-flex;flex
|
|
114
|
-
|
|
115
|
-
var StyledViewSwitcherApplied = exports.StyledViewSwitcherApplied = _styledComponents.default.span.withConfig({
|
|
116
|
-
displayName: "Styles__StyledViewSwitcherApplied",
|
|
117
|
-
componentId: "sc-1cg2mte-17"
|
|
118
|
-
})(["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);
|
|
119
|
-
StyledViewSwitcherApplied.displayName = "StyledViewSwitcherApplied";
|
|
130
|
+
})(["", " 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.BoxSizingStyle, appliedIcon, doneText, TAB_EASE);
|
|
131
|
+
StyledApplyToAllDone.displayName = "StyledApplyToAllDone";
|
|
120
132
|
//# sourceMappingURL=Styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.js","names":["_styledComponents","_interopRequireWildcard","require","_BoxSizingStyle","_List","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","VIEW_SWITCHER_PROMPT_DELAY_MS","exports","VIEW_SWITCHER_PROMPT_MS","VIEW_SWITCHER_APPLIED_MS","VIEW_SWITCHER_LEAVE_MS","StyledViewSwitcher","styled","div","withConfig","displayName","componentId","BoxSizingStyle","StyledViewSwitcherTrack","StyledViewSwitcherOptions","StyledViewSwitcherOption","button","StyledViewSwitcherMenuOption","VIEW_SWITCHER_MENU_REVEAL_MS","VIEW_SWITCHER_MENU_GAP","menuReveal","keyframes","menuConceal","menuClip","StyledViewSwitcherMenuRoot","StyledViewSwitcherMenuClip","StyledViewSwitcherMenuIcon","span","StyledViewSwitcherMenuList","List","StyledViewSwitcherMenuLabel","promptIn","promptOut","appliedIn","appliedIcon","StyledViewSwitcherPromptTitle","PROMPT_EASE","APPLIED_SWAP_MS","StyledViewSwitcherPrompt","StyledViewSwitcherPromptClip","StyledViewSwitcherPromptPill","StyledViewSwitcherAction","StyledViewSwitcherLine","StyledViewSwitcherDismiss","StyledViewSwitcherApplied"],"sources":["../../../../src/components/ViewSwitcher/Styles.ts"],"sourcesContent":["import styled, { keyframes } from \"styled-components\";\n\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { List } from \"../List\";\n\nexport const VIEW_SWITCHER_PROMPT_DELAY_MS = 100;\nexport const VIEW_SWITCHER_PROMPT_MS = 5000;\nexport const VIEW_SWITCHER_APPLIED_MS = 900;\nexport const VIEW_SWITCHER_LEAVE_MS = 200;\n\nexport const StyledViewSwitcher = styled.div`\n ${BoxSizingStyle}\n display: inline-flex;\n flex-shrink: 0;\n`;\n\nStyledViewSwitcher.displayName = \"StyledViewSwitcher\";\n\nexport const StyledViewSwitcherTrack = styled.div`\n ${BoxSizingStyle}\n position: relative;\n display: inline-flex;\n align-items: center;\n height: 32px;\n padding: 3px;\n border-radius: var(--ac-br-rounded);\n background-color: var(--color-theme-300);\n`;\n\nStyledViewSwitcherTrack.displayName = \"StyledViewSwitcherTrack\";\n\nexport const StyledViewSwitcherOptions = styled.div`\n display: inline-flex;\n align-items: center;\n`;\n\nStyledViewSwitcherOptions.displayName = \"StyledViewSwitcherOptions\";\n\nexport const StyledViewSwitcherOption = styled.button`\n ${BoxSizingStyle}\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: 34px;\n height: 26px;\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: var(--ac-br-rounded);\n background-color: transparent;\n cursor: pointer;\n outline: none;\n transition: background-color 150ms ease, box-shadow 150ms ease;\n\n svg {\n width: 20px;\n height: 20px;\n fill: var(--color-theme-700);\n }\n\n &:hover {\n background-color: color-mix(\n in srgb,\n var(--color-theme-900) 16%,\n transparent\n );\n }\n\n &[aria-checked=\"true\"] {\n background-color: var(--page-paper-main);\n box-shadow: var(--shadow-float);\n cursor: default;\n\n svg {\n fill: var(--color-theme-900);\n }\n }\n\n &:focus-visible {\n box-shadow: 0 0 0 2px var(--color-primary);\n }\n`;\n\nStyledViewSwitcherOption.displayName = \"StyledViewSwitcherOption\";\n\nexport const StyledViewSwitcherMenuOption = styled.button`\n ${BoxSizingStyle}\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 26px;\n margin: 0;\n padding: 0 8px 0 12px;\n border: 0;\n border-radius: var(--ac-br-rounded);\n background-color: var(--page-paper-main);\n box-shadow: var(--shadow-float);\n color: var(--color-theme-900);\n font-size: calc(13px * var(--text-scale, 1));\n white-space: nowrap;\n cursor: pointer;\n outline: none;\n\n svg {\n flex-shrink: 0;\n fill: var(--color-theme-900);\n }\n\n &:has(.c-view-switcher-menu__icon) {\n padding-left: 8px;\n }\n\n .c-view-switcher-menu__values {\n display: inline-grid;\n }\n\n .c-view-switcher-menu__value {\n display: inline-flex;\n grid-area: 1 / 1;\n align-items: center;\n gap: 4px;\n visibility: hidden;\n }\n\n .c-view-switcher-menu__value[data-selected=\"true\"] {\n visibility: visible;\n }\n\n .c-view-switcher-menu__icon {\n display: inline-flex;\n flex-shrink: 0;\n }\n\n .c-view-switcher-menu__icon svg {\n width: 20px;\n height: 20px;\n }\n\n &:focus-visible {\n box-shadow: 0 0 0 2px var(--color-primary);\n }\n`;\n\nStyledViewSwitcherMenuOption.displayName = \"StyledViewSwitcherMenuOption\";\n\nconst VIEW_SWITCHER_MENU_REVEAL_MS = 200;\nconst VIEW_SWITCHER_MENU_GAP = 8;\n\nconst menuReveal = keyframes`\n from {\n grid-template-columns: 0fr;\n margin-right: -${VIEW_SWITCHER_MENU_GAP}px;\n }\n`;\n\nconst menuConceal = keyframes`\n to {\n grid-template-columns: 0fr;\n margin-right: -${VIEW_SWITCHER_MENU_GAP}px;\n }\n`;\n\nconst menuClip = keyframes`\n from,\n to {\n overflow: hidden;\n }\n`;\n\n// The width opens from nothing, so the controls beside the menu move aside with it.\nexport const StyledViewSwitcherMenuRoot = styled(StyledViewSwitcher)`\n display: inline-grid;\n grid-template-columns: 1fr;\n\n &[data-animate-in] {\n animation: ${menuReveal} ${VIEW_SWITCHER_MENU_REVEAL_MS}ms\n cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n &[data-animate-in] > .c-view-switcher-menu__clip {\n animation: ${menuClip} ${VIEW_SWITCHER_MENU_REVEAL_MS}ms;\n }\n\n &[data-leaving] {\n pointer-events: none;\n animation: ${menuConceal} ${VIEW_SWITCHER_MENU_REVEAL_MS}ms\n cubic-bezier(0.4, 0, 0.2, 1) forwards;\n }\n\n &[data-leaving] > .c-view-switcher-menu__clip {\n overflow: hidden;\n }\n\n @media (prefers-reduced-motion: reduce) {\n &[data-animate-in],\n &[data-animate-in] > .c-view-switcher-menu__clip,\n &[data-leaving] {\n animation: none;\n }\n }\n`;\n\nStyledViewSwitcherMenuRoot.displayName = \"StyledViewSwitcherMenuRoot\";\n\nexport const StyledViewSwitcherMenuClip = styled.div`\n display: flex;\n min-width: 0;\n\n > * {\n flex-shrink: 0;\n }\n`;\n\nStyledViewSwitcherMenuClip.displayName = \"StyledViewSwitcherMenuClip\";\n\nexport const StyledViewSwitcherMenuIcon = styled.span`\n display: inline-flex;\n flex-shrink: 0;\n margin-right: 8px;\n fill: var(--color-theme-900);\n`;\n\nStyledViewSwitcherMenuIcon.displayName = \"StyledViewSwitcherMenuIcon\";\n\nexport const StyledViewSwitcherMenuList = styled(List)`\n padding: 8px 0;\n`;\n\nStyledViewSwitcherMenuList.displayName = \"StyledViewSwitcherMenuList\";\n\nexport const StyledViewSwitcherMenuLabel = styled.span`\n flex: 1;\n\n &[data-selected=\"true\"] {\n font-weight: bold;\n color: var(--color-primary);\n }\n`;\n\nStyledViewSwitcherMenuLabel.displayName = \"StyledViewSwitcherMenuLabel\";\n\nconst promptIn = keyframes`\n from {\n opacity: 0;\n }\n`;\n\nconst promptOut = keyframes`\n to {\n clip-path: inset(0 0 0 100%);\n }\n`;\n\nconst appliedIn = keyframes`\n from {\n opacity: 0;\n transform: translateY(6px);\n }\n`;\n\nconst appliedIcon = keyframes`\n from {\n opacity: 0;\n transform: scale(0.4);\n }\n 60% {\n transform: scale(1.2);\n }\n`;\n\nexport const StyledViewSwitcherPromptTitle = styled.span`\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n`;\n\nStyledViewSwitcherPromptTitle.displayName = \"StyledViewSwitcherPromptTitle\";\n\nconst PROMPT_EASE = \"cubic-bezier(0.4, 0, 0.2, 1)\";\nconst APPLIED_SWAP_MS = 160;\n\n// The offer covers the buttons and keeps the width of the switcher, so nothing beside it moves.\nexport const StyledViewSwitcherPrompt = styled.div`\n ${BoxSizingStyle}\n position: absolute;\n top: 3px;\n right: 3px;\n bottom: 3px;\n z-index: 1;\n display: flex;\n min-width: calc(100% - 6px);\n animation: ${promptIn} ${VIEW_SWITCHER_LEAVE_MS}ms ${PROMPT_EASE};\n\n &[data-phase=\"applying\"],\n &[data-phase=\"applied\"] {\n pointer-events: none;\n }\n\n &[data-phase=\"applying\"] .c-view-switcher__prompt-pill {\n opacity: 0.7;\n }\n\n .c-view-switcher__action,\n .c-view-switcher__line,\n .c-view-switcher__dismiss {\n transition: opacity ${APPLIED_SWAP_MS}ms ${PROMPT_EASE},\n transform ${APPLIED_SWAP_MS}ms ${PROMPT_EASE},\n visibility 0s linear ${APPLIED_SWAP_MS}ms, background-color 150ms ease;\n }\n\n &[data-confirmed] .c-view-switcher__action,\n &[data-confirmed] .c-view-switcher__line,\n &[data-confirmed] .c-view-switcher__dismiss {\n visibility: hidden;\n opacity: 0;\n transform: translateY(-6px);\n }\n\n &[data-phase=\"leaving\"] {\n pointer-events: none;\n animation: ${promptOut} ${VIEW_SWITCHER_LEAVE_MS}ms ${PROMPT_EASE} forwards;\n }\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n\n &[data-phase=\"leaving\"] {\n animation: none;\n }\n\n .c-view-switcher__action,\n .c-view-switcher__line,\n .c-view-switcher__dismiss,\n .c-view-switcher__prompt-pill {\n transition: none;\n }\n }\n`;\n\nStyledViewSwitcherPrompt.displayName = \"StyledViewSwitcherPrompt\";\n\nexport const StyledViewSwitcherPromptClip = styled.div`\n display: flex;\n flex: 1;\n min-width: 0;\n`;\n\nStyledViewSwitcherPromptClip.displayName = \"StyledViewSwitcherPromptClip\";\n\nexport const StyledViewSwitcherPromptPill = styled.div`\n ${BoxSizingStyle}\n position: relative;\n display: inline-flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n height: 26px;\n border-radius: var(--ac-br-rounded);\n background-color: var(--color-primary-opaque-300);\n color: var(--color-primary);\n font-size: calc(0.75rem * var(--text-scale, 1));\n font-weight: 500;\n white-space: nowrap;\n transition: opacity 150ms ease;\n`;\n\nStyledViewSwitcherPromptPill.displayName = \"StyledViewSwitcherPromptPill\";\n\nexport const StyledViewSwitcherAction = styled.button`\n ${BoxSizingStyle}\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 26px;\n margin: 0;\n padding: 0 2px 0 6px;\n border: 0;\n border-radius: var(--ac-br-rounded);\n background-color: transparent;\n color: inherit;\n font: inherit;\n cursor: pointer;\n outline: none;\n\n svg {\n flex-shrink: 0;\n width: 16px;\n height: 16px;\n fill: currentColor;\n }\n\n &:hover {\n color: var(--color-theme-900);\n }\n\n &:focus-visible {\n box-shadow: inset 0 0 0 2px var(--color-primary);\n }\n`;\n\nStyledViewSwitcherAction.displayName = \"StyledViewSwitcherAction\";\n\nexport const StyledViewSwitcherLine = styled.i`\n flex-shrink: 0;\n width: 1px;\n height: 14px;\n margin: 0 1px 0 6px;\n background-color: color-mix(in srgb, var(--color-primary) 35%, transparent);\n`;\n\nStyledViewSwitcherLine.displayName = \"StyledViewSwitcherLine\";\n\nexport const StyledViewSwitcherDismiss = styled.button`\n ${BoxSizingStyle}\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n margin: 0 2px 0 0;\n padding: 0;\n border: 0;\n border-radius: 50%;\n background-color: transparent;\n cursor: pointer;\n outline: none;\n transition: background-color 150ms ease;\n\n svg {\n width: 16px;\n height: 16px;\n margin-left: -1px;\n fill: var(--color-theme-700);\n }\n\n &:hover {\n background-color: color-mix(\n in srgb,\n var(--color-theme-900) 16%,\n transparent\n );\n }\n\n &:focus-visible {\n box-shadow: inset 0 0 0 2px var(--color-primary);\n }\n`;\n\nStyledViewSwitcherDismiss.displayName = \"StyledViewSwitcherDismiss\";\n\nexport const StyledViewSwitcherApplied = styled.span`\n position: absolute;\n inset: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n animation: ${appliedIn} ${APPLIED_SWAP_MS}ms ${PROMPT_EASE} 60ms backwards;\n\n svg {\n width: 16px;\n height: 16px;\n fill: currentColor;\n animation: ${appliedIcon} 250ms ease-out 60ms backwards;\n }\n\n @media (prefers-reduced-motion: reduce) {\n animation: none;\n\n svg {\n animation: none;\n }\n }\n`;\n\nStyledViewSwitcherApplied.displayName = \"StyledViewSwitcherApplied\";\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AAA+B,SAAAD,wBAAAI,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAN,uBAAA,YAAAA,wBAAAI,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA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_layers","_themes","_BoxSizingStyle","_List","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","VIEW_SWITCHER_PROMPT_DELAY_MS","exports","VIEW_SWITCHER_APPLIED_MS","VIEW_SWITCHER_OPEN_MS","VIEW_SWITCHER_LEAVE_MS","StyledViewSwitcher","styled","div","withConfig","displayName","componentId","BoxSizingStyle","StyledViewSwitcherTrack","StyledViewSwitcherOptions","StyledViewSwitcherOption","button","StyledSubViewSwitcherOption","VIEW_SWITCHER_MENU_REVEAL_MS","VIEW_SWITCHER_MENU_GAP","menuReveal","keyframes","menuConceal","menuClip","StyledSubViewSwitcherRoot","StyledSubViewSwitcherClip","StyledSubViewSwitcherIcon","span","StyledSubViewSwitcherList","List","StyledSubViewSwitcherLabel","StyledViewSwitcherPromptTitle","TAB_EASE","CONTROL_RADIUS","TAB_RING","TAB_RADIUS","TAB_INSET","BUTTON_RADIUS","slideOut","slideIn","appliedIcon","doneText","StyledApplyToAllTab","layers","house","DARK_THEME_SELECTOR","StyledApplyToAllSlide","StyledApplyToAllButton","StyledApplyToAllLine","StyledApplyToAllDismiss","StyledApplyToAllDone"],"sources":["../../../../src/components/ViewSwitcher/Styles.ts"],"sourcesContent":["import styled, { keyframes } from \"styled-components\";\n\nimport { layers } from \"../../utils/layers\";\nimport { DARK_THEME_SELECTOR } from \"../../utils/themes\";\nimport { BoxSizingStyle } from \"../BoxSizingStyle\";\nimport { List } from \"../List\";\n\nexport const VIEW_SWITCHER_PROMPT_DELAY_MS = 100;\nexport const VIEW_SWITCHER_APPLIED_MS = 1400;\nexport const VIEW_SWITCHER_OPEN_MS = 3000;\nexport const VIEW_SWITCHER_LEAVE_MS = 200;\n\nexport const StyledViewSwitcher = styled.div`\n ${BoxSizingStyle}\n display: inline-flex;\n flex-shrink: 0;\n isolation: isolate;\n`;\n\nStyledViewSwitcher.displayName = \"StyledViewSwitcher\";\n\nexport const StyledViewSwitcherTrack = styled.div`\n ${BoxSizingStyle}\n position: relative;\n display: inline-flex;\n align-items: center;\n height: 32px;\n padding: 3px;\n border-radius: var(--ac-br-rounded);\n background-color: var(--color-theme-300);\n z-index: 1;\n`;\n\nStyledViewSwitcherTrack.displayName = \"StyledViewSwitcherTrack\";\n\nexport const StyledViewSwitcherOptions = styled.div`\n display: inline-flex;\n align-items: center;\n`;\n\nStyledViewSwitcherOptions.displayName = \"StyledViewSwitcherOptions\";\n\nexport const StyledViewSwitcherOption = styled.button`\n ${BoxSizingStyle}\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: 34px;\n height: 26px;\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: var(--ac-br-rounded);\n background-color: transparent;\n cursor: pointer;\n outline: none;\n transition: background-color 150ms ease, box-shadow 150ms ease;\n\n svg {\n width: 20px;\n height: 20px;\n fill: var(--color-theme-700);\n }\n\n &:hover {\n background-color: color-mix(\n in srgb,\n var(--color-theme-900) 16%,\n transparent\n );\n }\n\n &[aria-checked=\"true\"] {\n background-color: var(--page-paper-main);\n box-shadow: var(--shadow-float);\n cursor: default;\n\n svg {\n fill: var(--color-theme-900);\n }\n }\n\n &:focus-visible {\n box-shadow: 0 0 0 2px var(--color-primary);\n }\n`;\n\nStyledViewSwitcherOption.displayName = \"StyledViewSwitcherOption\";\n\nexport const StyledSubViewSwitcherOption = styled.button`\n ${BoxSizingStyle}\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 26px;\n margin: 0;\n padding: 0 8px 0 12px;\n border: 0;\n border-radius: var(--ac-br-rounded);\n background-color: var(--page-paper-main);\n box-shadow: var(--shadow-float);\n color: var(--color-theme-900);\n font-size: calc(13px * var(--text-scale, 1));\n white-space: nowrap;\n cursor: pointer;\n outline: none;\n\n svg {\n flex-shrink: 0;\n fill: var(--color-theme-900);\n }\n\n &:has(.c-sub-view-switcher__icon) {\n padding-left: 8px;\n }\n\n .c-sub-view-switcher__values {\n display: inline-grid;\n }\n\n .c-sub-view-switcher__value {\n display: inline-flex;\n grid-area: 1 / 1;\n align-items: center;\n gap: 4px;\n visibility: hidden;\n }\n\n .c-sub-view-switcher__value[data-selected=\"true\"] {\n visibility: visible;\n }\n\n .c-sub-view-switcher__icon {\n display: inline-flex;\n flex-shrink: 0;\n }\n\n .c-sub-view-switcher__icon svg {\n width: 20px;\n height: 20px;\n }\n\n &:focus-visible {\n box-shadow: 0 0 0 2px var(--color-primary);\n }\n`;\n\nStyledSubViewSwitcherOption.displayName = \"StyledSubViewSwitcherOption\";\n\nconst VIEW_SWITCHER_MENU_REVEAL_MS = 200;\nconst VIEW_SWITCHER_MENU_GAP = 8;\n\nconst menuReveal = keyframes`\n from {\n grid-template-columns: 0fr;\n margin-right: -${VIEW_SWITCHER_MENU_GAP}px;\n }\n`;\n\nconst menuConceal = keyframes`\n to {\n grid-template-columns: 0fr;\n margin-right: -${VIEW_SWITCHER_MENU_GAP}px;\n }\n`;\n\nconst menuClip = keyframes`\n from,\n to {\n overflow: hidden;\n }\n`;\n\n// The width opens from nothing, so the controls beside the menu move aside with it.\nexport const StyledSubViewSwitcherRoot = styled(StyledViewSwitcher)`\n display: inline-grid;\n grid-template-columns: 1fr;\n\n &[data-animate-in] {\n animation: ${menuReveal} ${VIEW_SWITCHER_MENU_REVEAL_MS}ms\n cubic-bezier(0.4, 0, 0.2, 1);\n }\n\n &[data-animate-in] > .c-sub-view-switcher__clip {\n animation: ${menuClip} ${VIEW_SWITCHER_MENU_REVEAL_MS}ms;\n }\n\n &[data-leaving] {\n pointer-events: none;\n animation: ${menuConceal} ${VIEW_SWITCHER_MENU_REVEAL_MS}ms\n cubic-bezier(0.4, 0, 0.2, 1) forwards;\n }\n\n &[data-leaving] > .c-sub-view-switcher__clip {\n overflow: hidden;\n }\n\n @media (prefers-reduced-motion: reduce) {\n &[data-animate-in],\n &[data-animate-in] > .c-sub-view-switcher__clip,\n &[data-leaving] {\n animation: none;\n }\n }\n`;\n\nStyledSubViewSwitcherRoot.displayName = \"StyledSubViewSwitcherRoot\";\n\nexport const StyledSubViewSwitcherClip = styled.div`\n display: flex;\n min-width: 0;\n\n > * {\n flex-shrink: 0;\n }\n`;\n\nStyledSubViewSwitcherClip.displayName = \"StyledSubViewSwitcherClip\";\n\nexport const StyledSubViewSwitcherIcon = styled.span`\n display: inline-flex;\n flex-shrink: 0;\n margin-right: 8px;\n fill: var(--color-theme-900);\n`;\n\nStyledSubViewSwitcherIcon.displayName = \"StyledSubViewSwitcherIcon\";\n\nexport const StyledSubViewSwitcherList = styled(List)`\n padding: 8px 0;\n`;\n\nStyledSubViewSwitcherList.displayName = \"StyledSubViewSwitcherList\";\n\nexport const StyledSubViewSwitcherLabel = styled.span`\n flex: 1;\n\n &[data-selected=\"true\"] {\n font-weight: bold;\n color: var(--color-primary);\n }\n`;\n\nStyledSubViewSwitcherLabel.displayName = \"StyledSubViewSwitcherLabel\";\n\nexport const StyledViewSwitcherPromptTitle = styled.span`\n position: absolute;\n width: 1px;\n height: 1px;\n overflow: hidden;\n clip-path: inset(50%);\n white-space: nowrap;\n`;\n\nStyledViewSwitcherPromptTitle.displayName = \"StyledViewSwitcherPromptTitle\";\n\nconst TAB_EASE = \"cubic-bezier(0.4, 0, 0.2, 1)\";\n// The radius of a 32px control.\nconst CONTROL_RADIUS = 16;\n// The green shows this much around the top and the sides of the control.\nexport const TAB_RING = 2;\nconst TAB_RADIUS = CONTROL_RADIUS + TAB_RING;\n// The buttons sit this far inside the green, so their corners follow its corners.\nconst TAB_INSET = 3;\nconst BUTTON_RADIUS = TAB_RADIUS - TAB_INSET;\n\nconst slideOut = keyframes`\n from {\n transform: translateY(-100%);\n }\n`;\n\nconst slideIn = keyframes`\n to {\n transform: translateY(-100%);\n }\n`;\n\nconst appliedIcon = keyframes`\n from {\n transform: scale(0.3);\n }\n 60% {\n transform: scale(1.2);\n }\n`;\n\nconst doneText = keyframes`\n from {\n opacity: 0;\n transform: translateX(-4px);\n }\n`;\n\n// The tab rings the control and clips its slide, which comes out from under the control.\nexport const StyledApplyToAllTab = styled.div`\n ${BoxSizingStyle}\n z-index: ${layers.house - 1};\n overflow: hidden;\n border-radius: ${TAB_RADIUS}px;\n /* One green per theme kind, with enough contrast for the white check. */\n --apply-to-all-fill: #1f9d5a;\n\n ${DARK_THEME_SELECTOR} & {\n --apply-to-all-fill: #2f8f5e;\n }\n\n &[data-phase=\"applying\"],\n &[data-phase=\"applied\"],\n &[data-phase=\"leaving\"] {\n pointer-events: none;\n }\n\n &[data-phase=\"applying\"] .c-apply-to-all__button {\n opacity: 0.7;\n }\n\n .c-apply-to-all__slide {\n animation: ${slideOut} ${VIEW_SWITCHER_LEAVE_MS}ms ${TAB_EASE};\n }\n\n &[data-phase=\"leaving\"] .c-apply-to-all__slide {\n animation: ${slideIn} ${VIEW_SWITCHER_LEAVE_MS}ms ${TAB_EASE} forwards;\n }\n\n .c-apply-to-all__label {\n display: none;\n }\n\n /* A wide tab has room for the text of the apply button and of its confirmation. */\n &[data-labeled] .c-apply-to-all__label {\n display: inline;\n }\n\n &:not([data-labeled]) .c-apply-to-all__done-text {\n display: none;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .c-apply-to-all__slide,\n &[data-phase=\"leaving\"] .c-apply-to-all__slide {\n animation: none;\n }\n }\n`;\n\nStyledApplyToAllTab.displayName = \"StyledApplyToAllTab\";\n\n// The green part of the tab. Its top sits under the control.\nexport const StyledApplyToAllSlide = styled.div`\n ${BoxSizingStyle}\n display: flex;\n align-items: center;\n padding: calc(var(--apply-to-all-tuck) + ${TAB_INSET}px) ${TAB_INSET}px\n ${TAB_INSET}px;\n border-radius: inherit;\n background-color: var(--apply-to-all-fill);\n`;\n\nStyledApplyToAllSlide.displayName = \"StyledApplyToAllSlide\";\n\n// The apply button takes the room the dismiss button leaves, and only its outer bottom corner is round.\nexport const StyledApplyToAllButton = styled.button`\n ${BoxSizingStyle}\n display: inline-flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n gap: 4px;\n min-width: 34px;\n height: 26px;\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: 0 0 0 ${BUTTON_RADIUS}px;\n background-color: transparent;\n color: #fff;\n font-size: calc(0.75rem * var(--text-scale, 1));\n font-weight: 600;\n white-space: nowrap;\n cursor: pointer;\n outline: none;\n transition: background-color 150ms ease, opacity 150ms ease;\n\n svg {\n flex-shrink: 0;\n width: 20px;\n height: 20px;\n fill: #fff;\n }\n\n &:hover {\n background-color: color-mix(in srgb, #fff 16%, transparent);\n }\n\n &:focus-visible {\n box-shadow: inset 0 0 0 2px #fff;\n }\n`;\n\nStyledApplyToAllButton.displayName = \"StyledApplyToAllButton\";\n\n// The line takes the height of the buttons.\nexport const StyledApplyToAllLine = styled.i`\n flex-shrink: 0;\n width: 1px;\n height: 26px;\n margin: 0 1px;\n background-color: color-mix(in srgb, #fff 35%, transparent);\n`;\n\nStyledApplyToAllLine.displayName = \"StyledApplyToAllLine\";\n\nexport const StyledApplyToAllDismiss = styled.button`\n ${BoxSizingStyle}\n display: inline-flex;\n flex-shrink: 0;\n align-items: center;\n justify-content: center;\n width: 26px;\n height: 26px;\n margin: 0;\n padding: 0 2px;\n border: 0;\n border-radius: 0 0 ${BUTTON_RADIUS}px 0;\n background-color: transparent;\n cursor: pointer;\n outline: none;\n transition: background-color 150ms ease;\n\n /* The same size as the check. */\n svg {\n width: 20px;\n height: 20px;\n fill: #fff;\n }\n\n &:hover {\n background-color: color-mix(in srgb, #fff 16%, transparent);\n }\n\n &:focus-visible {\n box-shadow: inset 0 0 0 2px #fff;\n }\n`;\n\nStyledApplyToAllDismiss.displayName = \"StyledApplyToAllDismiss\";\n\n// The confirmation takes the place of the buttons, at the size of the tab.\nexport const StyledApplyToAllDone = styled.span`\n ${BoxSizingStyle}\n display: inline-flex;\n flex: 1;\n align-items: center;\n justify-content: center;\n gap: 4px;\n height: 26px;\n overflow: hidden;\n color: #fff;\n font-size: calc(0.75rem * var(--text-scale, 1));\n font-weight: 600;\n white-space: nowrap;\n\n svg {\n flex-shrink: 0;\n width: 18px;\n height: 18px;\n fill: currentColor;\n animation: ${appliedIcon} 320ms cubic-bezier(0.34, 1.56, 0.64, 1);\n }\n\n .c-apply-to-all__done-text {\n animation: ${doneText} 220ms ${TAB_EASE} 80ms backwards;\n }\n\n @media (prefers-reduced-motion: reduce) {\n svg,\n .c-apply-to-all__done-text {\n animation: none;\n }\n }\n`;\n\nStyledApplyToAllDone.displayName = \"StyledApplyToAllDone\";\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AAA+B,SAAAD,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,wBAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,cAAAM,EAAA,IAAAd,CAAA,gBAAAc,EAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,EAAA,OAAAP,CAAA,IAAAD,CAAA,GAAAW,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAnB,CAAA,EAAAc,EAAA,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,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,4KAC3CC,8BAAc,EAG2BwB,SAAS,EAAOA,SAAS,EAChEA,SAAS,CAGd;AAEDU,qBAAqB,CAACpC,WAAW,GAAG,uBAAuB;;AAE3D;AACO,IAAMqC,sBAAsB,GAAA7C,OAAA,CAAA6C,sBAAA,GAAGxC,yBAAM,CAACS,MAAM,CAAAP,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,miBAC/CC,8BAAc,EAWOyB,aAAa,CAwBrC;AAEDU,sBAAsB,CAACrC,WAAW,GAAG,wBAAwB;;AAE7D;AACO,IAAMsC,oBAAoB,GAAA9C,OAAA,CAAA8C,oBAAA,GAAGzC,yBAAM,CAACnB,CAAC,CAAAqB,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,kHAM3C;AAEDqC,oBAAoB,CAACtC,WAAW,GAAG,sBAAsB;AAElD,IAAMuC,uBAAuB,GAAA/C,OAAA,CAAA+C,uBAAA,GAAG1C,yBAAM,CAACS,MAAM,CAAAP,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,qaAChDC,8BAAc,EAUKyB,aAAa,CAoBnC;AAEDY,uBAAuB,CAACvC,WAAW,GAAG,yBAAyB;;AAE/D;AACO,IAAMwC,oBAAoB,GAAAhD,OAAA,CAAAgD,oBAAA,GAAG3C,yBAAM,CAACoB,IAAI,CAAAlB,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,+dAC3CC,8BAAc,EAkBD4B,WAAW,EAIXC,QAAQ,EAAUT,QAAQ,CAS1C;AAEDkB,oBAAoB,CAACxC,WAAW,GAAG,sBAAsB","ignoreList":[]}
|
|
@@ -3,14 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.SubViewSwitcher = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
9
|
+
var _ApplyToAllTab = require("./ApplyToAllTab");
|
|
9
10
|
var _Styles = require("./Styles");
|
|
11
|
+
var _useApplyToAllOffer = require("./useApplyToAllOffer");
|
|
12
|
+
var _useForkRef = _interopRequireDefault(require("../../utils/useForkRef"));
|
|
10
13
|
var _Icons = require("../Icons");
|
|
11
14
|
var _List = require("../List");
|
|
12
15
|
var _Menu = require("../Menu");
|
|
13
|
-
var _excluded = ["options", "value", "onChange", "aria-label", "animateIn", "leaving", "className"];
|
|
16
|
+
var _excluded = ["options", "value", "onChange", "aria-label", "animateIn", "leaving", "onApplyToAll", "applyToAllTitle", "appliedLabel", "applyToAllLabel", "dismissLabel", "className", "onKeyDown", "onBlur"];
|
|
14
17
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
18
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
16
19
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
@@ -23,14 +26,15 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
23
26
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
24
27
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
25
28
|
/**
|
|
26
|
-
* @component
|
|
29
|
+
* @component SubViewSwitcher
|
|
27
30
|
* @description
|
|
28
|
-
*
|
|
31
|
+
* The sub view switcher, the second level of the main ViewSwitcher: a dropdown with the look of the checked option. It
|
|
29
32
|
* shows the icon and the name of the selected option and lists all options with their icons. Its width
|
|
30
|
-
* fits the widest option, so a new selection does not move the controls around it.
|
|
33
|
+
* fits the widest option, so a new selection does not move the controls around it. With onApplyToAll, a
|
|
34
|
+
* choice slides a check button out from under its right end, the same as in ViewSwitcher.
|
|
31
35
|
*
|
|
32
36
|
* @example
|
|
33
|
-
* <
|
|
37
|
+
* <SubViewSwitcher
|
|
34
38
|
* aria-label="Group by"
|
|
35
39
|
* options={[
|
|
36
40
|
* { id: "start_date", label: "Start Date", icon: <ClockIcon /> },
|
|
@@ -40,7 +44,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
40
44
|
* onChange={setView}
|
|
41
45
|
* />
|
|
42
46
|
*/
|
|
43
|
-
var
|
|
47
|
+
var SubViewSwitcher = exports.SubViewSwitcher = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
44
48
|
var _options$find;
|
|
45
49
|
var options = _ref.options,
|
|
46
50
|
value = _ref.value,
|
|
@@ -50,7 +54,18 @@ var ViewSwitcherMenu = exports.ViewSwitcherMenu = /*#__PURE__*/(0, _react.forwar
|
|
|
50
54
|
animateIn = _ref$animateIn === void 0 ? false : _ref$animateIn,
|
|
51
55
|
_ref$leaving = _ref.leaving,
|
|
52
56
|
leaving = _ref$leaving === void 0 ? false : _ref$leaving,
|
|
57
|
+
onApplyToAll = _ref.onApplyToAll,
|
|
58
|
+
_ref$applyToAllTitle = _ref.applyToAllTitle,
|
|
59
|
+
applyToAllTitle = _ref$applyToAllTitle === void 0 ? "Apply to All Projects" : _ref$applyToAllTitle,
|
|
60
|
+
_ref$appliedLabel = _ref.appliedLabel,
|
|
61
|
+
appliedLabel = _ref$appliedLabel === void 0 ? "Applied" : _ref$appliedLabel,
|
|
62
|
+
_ref$applyToAllLabel = _ref.applyToAllLabel,
|
|
63
|
+
applyToAllLabel = _ref$applyToAllLabel === void 0 ? "All Projects?" : _ref$applyToAllLabel,
|
|
64
|
+
_ref$dismissLabel = _ref.dismissLabel,
|
|
65
|
+
dismissLabel = _ref$dismissLabel === void 0 ? "Dismiss" : _ref$dismissLabel,
|
|
53
66
|
className = _ref.className,
|
|
67
|
+
_onKeyDown = _ref.onKeyDown,
|
|
68
|
+
_onBlur = _ref.onBlur,
|
|
54
69
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
55
70
|
var _useState = (0, _react.useState)(false),
|
|
56
71
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -60,13 +75,33 @@ var ViewSwitcherMenu = exports.ViewSwitcherMenu = /*#__PURE__*/(0, _react.forwar
|
|
|
60
75
|
var id = _ref2.id;
|
|
61
76
|
return id === value;
|
|
62
77
|
})) !== null && _options$find !== void 0 ? _options$find : options[0];
|
|
63
|
-
|
|
64
|
-
|
|
78
|
+
var rootRef = (0, _react.useRef)(null);
|
|
79
|
+
var handleRootRef = (0, _useForkRef.default)(rootRef, ref);
|
|
80
|
+
var triggerRef = (0, _react.useRef)(null);
|
|
81
|
+
var focusTrigger = (0, _react.useCallback)(function () {
|
|
82
|
+
var _triggerRef$current;
|
|
83
|
+
return (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : _triggerRef$current.focus();
|
|
84
|
+
}, []);
|
|
85
|
+
var offer = (0, _useApplyToAllOffer.useApplyToAllOffer)({
|
|
86
|
+
rootRef,
|
|
87
|
+
onApplyToAll,
|
|
88
|
+
onRestoreFocus: focusTrigger
|
|
89
|
+
});
|
|
90
|
+
return /*#__PURE__*/_react.default.createElement(_Styles.StyledSubViewSwitcherRoot, _extends({
|
|
91
|
+
ref: handleRootRef,
|
|
65
92
|
"data-animate-in": animateIn || undefined,
|
|
66
93
|
"data-leaving": leaving || undefined,
|
|
67
|
-
className: (0, _classnames.default)("c-view-switcher
|
|
68
|
-
|
|
69
|
-
|
|
94
|
+
className: (0, _classnames.default)("c-sub-view-switcher", className),
|
|
95
|
+
onKeyDown: function onKeyDown(event) {
|
|
96
|
+
_onKeyDown === null || _onKeyDown === void 0 || _onKeyDown(event);
|
|
97
|
+
offer.handleKeyDown(event);
|
|
98
|
+
},
|
|
99
|
+
onBlur: function onBlur(event) {
|
|
100
|
+
_onBlur === null || _onBlur === void 0 || _onBlur(event);
|
|
101
|
+
offer.handleBlur(event);
|
|
102
|
+
}
|
|
103
|
+
}, rest), /*#__PURE__*/_react.default.createElement(_Styles.StyledSubViewSwitcherClip, {
|
|
104
|
+
className: "c-sub-view-switcher__clip"
|
|
70
105
|
}, /*#__PURE__*/_react.default.createElement(_Menu.Menu, {
|
|
71
106
|
open: open,
|
|
72
107
|
onOpen: function onOpen() {
|
|
@@ -78,14 +113,15 @@ var ViewSwitcherMenu = exports.ViewSwitcherMenu = /*#__PURE__*/(0, _react.forwar
|
|
|
78
113
|
position: "bottom-end",
|
|
79
114
|
target: /*#__PURE__*/_react.default.createElement(_Styles.StyledViewSwitcherTrack, {
|
|
80
115
|
className: "c-view-switcher__track"
|
|
81
|
-
}, /*#__PURE__*/_react.default.createElement(_Styles.
|
|
116
|
+
}, /*#__PURE__*/_react.default.createElement(_Styles.StyledSubViewSwitcherOption, {
|
|
117
|
+
ref: triggerRef,
|
|
82
118
|
type: "button",
|
|
83
119
|
"aria-haspopup": "menu",
|
|
84
120
|
"aria-expanded": open,
|
|
85
121
|
"aria-label": ariaLabel ? "".concat(ariaLabel, ": ").concat(selected === null || selected === void 0 ? void 0 : selected.label) : selected === null || selected === void 0 ? void 0 : selected.label,
|
|
86
|
-
className: "c-view-
|
|
122
|
+
className: "c-sub-view-switcher__trigger"
|
|
87
123
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
88
|
-
className: "c-view-
|
|
124
|
+
className: "c-sub-view-switcher__values"
|
|
89
125
|
}, options.map(function (_ref3) {
|
|
90
126
|
var id = _ref3.id,
|
|
91
127
|
label = _ref3.label,
|
|
@@ -94,12 +130,12 @@ var ViewSwitcherMenu = exports.ViewSwitcherMenu = /*#__PURE__*/(0, _react.forwar
|
|
|
94
130
|
key: id,
|
|
95
131
|
"aria-hidden": id !== (selected === null || selected === void 0 ? void 0 : selected.id),
|
|
96
132
|
"data-selected": id === (selected === null || selected === void 0 ? void 0 : selected.id),
|
|
97
|
-
className: "c-view-
|
|
133
|
+
className: "c-sub-view-switcher__value"
|
|
98
134
|
}, icon ? /*#__PURE__*/_react.default.createElement("span", {
|
|
99
|
-
className: "c-view-
|
|
135
|
+
className: "c-sub-view-switcher__icon"
|
|
100
136
|
}, icon) : null, label);
|
|
101
137
|
})), /*#__PURE__*/_react.default.createElement(_Icons.ArrowDownSmallIcon, null)))
|
|
102
|
-
}, /*#__PURE__*/_react.default.createElement(_Styles.
|
|
138
|
+
}, /*#__PURE__*/_react.default.createElement(_Styles.StyledSubViewSwitcherList, null, options.map(function (_ref4) {
|
|
103
139
|
var id = _ref4.id,
|
|
104
140
|
label = _ref4.label,
|
|
105
141
|
icon = _ref4.icon;
|
|
@@ -110,12 +146,24 @@ var ViewSwitcherMenu = exports.ViewSwitcherMenu = /*#__PURE__*/(0, _react.forwar
|
|
|
110
146
|
setOpen(false);
|
|
111
147
|
if (id !== value) {
|
|
112
148
|
onChange(id);
|
|
149
|
+
offer.show(id);
|
|
113
150
|
}
|
|
114
151
|
}
|
|
115
|
-
}, icon ? /*#__PURE__*/_react.default.createElement(_Styles.
|
|
152
|
+
}, icon ? /*#__PURE__*/_react.default.createElement(_Styles.StyledSubViewSwitcherIcon, null, icon) : null, /*#__PURE__*/_react.default.createElement(_Styles.StyledSubViewSwitcherLabel, {
|
|
116
153
|
"data-selected": id === (selected === null || selected === void 0 ? void 0 : selected.id)
|
|
117
154
|
}, label));
|
|
118
|
-
})))
|
|
155
|
+
}))), offer.isShown ? /*#__PURE__*/_react.default.createElement(_ApplyToAllTab.ApplyToAllTab, {
|
|
156
|
+
ref: offer.tabRef,
|
|
157
|
+
phase: offer.phase,
|
|
158
|
+
isConfirmed: offer.isConfirmed,
|
|
159
|
+
title: applyToAllTitle,
|
|
160
|
+
appliedLabel: appliedLabel,
|
|
161
|
+
onApply: offer.apply,
|
|
162
|
+
onDismiss: offer.leave,
|
|
163
|
+
onHold: offer.hold,
|
|
164
|
+
dismissLabel: dismissLabel,
|
|
165
|
+
applyToAllLabel: applyToAllLabel
|
|
166
|
+
}) : null));
|
|
119
167
|
});
|
|
120
|
-
|
|
121
|
-
//# sourceMappingURL=
|
|
168
|
+
SubViewSwitcher.displayName = "SubViewSwitcher";
|
|
169
|
+
//# sourceMappingURL=SubViewSwitcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SubViewSwitcher.js","names":["_react","_interopRequireWildcard","require","_classnames","_interopRequireDefault","_ApplyToAllTab","_Styles","_useApplyToAllOffer","_useForkRef","_Icons","_List","_Menu","_excluded","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_extends","assign","bind","arguments","length","apply","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","a","_arrayLikeToArray","toString","slice","constructor","name","Array","from","test","l","Symbol","iterator","u","next","done","push","value","return","isArray","_objectWithoutProperties","_objectWithoutPropertiesLoose","getOwnPropertySymbols","indexOf","propertyIsEnumerable","SubViewSwitcher","exports","forwardRef","_ref","ref","_options$find","options","onChange","ariaLabel","_ref$animateIn","animateIn","_ref$leaving","leaving","onApplyToAll","_ref$applyToAllTitle","applyToAllTitle","_ref$appliedLabel","appliedLabel","_ref$applyToAllLabel","applyToAllLabel","_ref$dismissLabel","dismissLabel","className","onKeyDown","onBlur","rest","_useState","useState","_useState2","open","setOpen","selected","find","_ref2","id","rootRef","useRef","handleRootRef","useForkRef","triggerRef","focusTrigger","useCallback","_triggerRef$current","current","focus","offer","useApplyToAllOffer","onRestoreFocus","createElement","StyledSubViewSwitcherRoot","undefined","classnames","event","handleKeyDown","handleBlur","StyledSubViewSwitcherClip","Menu","onOpen","onClose","position","target","StyledViewSwitcherTrack","StyledSubViewSwitcherOption","type","concat","label","map","_ref3","icon","key","ArrowDownSmallIcon","StyledSubViewSwitcherList","_ref4","ListItem","onClick","show","StyledSubViewSwitcherIcon","StyledSubViewSwitcherLabel","isShown","ApplyToAllTab","tabRef","phase","isConfirmed","title","onApply","onDismiss","leave","onHold","hold","displayName"],"sources":["../../../../src/components/ViewSwitcher/SubViewSwitcher.tsx"],"sourcesContent":["import React, {\n FocusEvent,\n forwardRef,\n HTMLAttributes,\n KeyboardEvent,\n ReactNode,\n useCallback,\n useRef,\n useState,\n} from \"react\";\n\nimport classnames from \"classnames\";\n\nimport { ApplyToAllTab } from \"./ApplyToAllTab\";\nimport {\n StyledSubViewSwitcherClip,\n StyledSubViewSwitcherIcon,\n StyledSubViewSwitcherLabel,\n StyledSubViewSwitcherList,\n StyledSubViewSwitcherOption,\n StyledSubViewSwitcherRoot,\n StyledViewSwitcherTrack,\n} from \"./Styles\";\nimport { useApplyToAllOffer } from \"./useApplyToAllOffer\";\nimport useForkRef from \"../../utils/useForkRef\";\nimport { ArrowDownSmallIcon } from \"../Icons\";\nimport { ListItem } from \"../List\";\nimport { Menu } from \"../Menu\";\n\nexport interface SubViewSwitcherOption {\n id: string;\n label: string;\n /** DS icon element. */\n icon?: ReactNode;\n}\n\nexport interface SubViewSwitcherProps\n extends Omit<HTMLAttributes<HTMLDivElement>, \"onChange\"> {\n options: SubViewSwitcherOption[];\n /** Id of the selected option. */\n value?: string;\n onChange: (id: string) => void;\n /** Accessible name of the trigger. The selected option follows it. */\n \"aria-label\"?: string;\n /** Opens with a clip from zero width when it mounts, and pushes the controls beside it aside. */\n animateIn?: boolean;\n /** Closes with the same clip. The parent removes the menu after it, 200 ms later. */\n leaving?: boolean;\n /** Turns on the check button that slides out after a choice. A result of false shows no confirmation. */\n onApplyToAll?: (id: string) => unknown;\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/**\n * @component SubViewSwitcher\n * @description\n * The sub view switcher, the second level of the main ViewSwitcher: a dropdown with the look of the checked option. It\n * shows the icon and the name of the selected option and lists all options with their icons. Its width\n * fits the widest option, so a new selection does not move the controls around it. With onApplyToAll, a\n * choice slides a check button out from under its right end, the same as in ViewSwitcher.\n *\n * @example\n * <SubViewSwitcher\n * aria-label=\"Group by\"\n * options={[\n * { id: \"start_date\", label: \"Start Date\", icon: <ClockIcon /> },\n * { id: \"date\", label: \"Due Date\", icon: <CalendarIcon /> },\n * ]}\n * value={view}\n * onChange={setView}\n * />\n */\nexport const SubViewSwitcher = forwardRef<HTMLDivElement, SubViewSwitcherProps>(\n (\n {\n options,\n value,\n onChange,\n \"aria-label\": ariaLabel,\n animateIn = false,\n leaving = false,\n onApplyToAll,\n applyToAllTitle = \"Apply to All Projects\",\n appliedLabel = \"Applied\",\n applyToAllLabel = \"All Projects?\",\n dismissLabel = \"Dismiss\",\n className,\n onKeyDown,\n onBlur,\n ...rest\n },\n ref\n ) => {\n const [open, setOpen] = useState(false);\n const selected = options.find(({ id }) => id === value) ?? options[0];\n const rootRef = useRef<HTMLDivElement | null>(null);\n const handleRootRef = useForkRef(rootRef, ref);\n const triggerRef = useRef<HTMLButtonElement | null>(null);\n const focusTrigger = useCallback(() => triggerRef.current?.focus(), []);\n const offer = useApplyToAllOffer<string>({\n rootRef,\n onApplyToAll,\n onRestoreFocus: focusTrigger,\n });\n\n return (\n <StyledSubViewSwitcherRoot\n ref={handleRootRef}\n data-animate-in={animateIn || undefined}\n data-leaving={leaving || undefined}\n className={classnames(\"c-sub-view-switcher\", className)}\n onKeyDown={(event: KeyboardEvent<HTMLDivElement>) => {\n onKeyDown?.(event);\n offer.handleKeyDown(event);\n }}\n onBlur={(event: FocusEvent<HTMLDivElement>) => {\n onBlur?.(event);\n offer.handleBlur(event);\n }}\n {...rest}\n >\n <StyledSubViewSwitcherClip className=\"c-sub-view-switcher__clip\">\n <Menu\n open={open}\n onOpen={() => setOpen(true)}\n onClose={() => setOpen(false)}\n position=\"bottom-end\"\n target={\n <StyledViewSwitcherTrack className=\"c-view-switcher__track\">\n <StyledSubViewSwitcherOption\n ref={triggerRef}\n type=\"button\"\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-label={\n ariaLabel\n ? `${ariaLabel}: ${selected?.label}`\n : selected?.label\n }\n className=\"c-sub-view-switcher__trigger\"\n >\n <span className=\"c-sub-view-switcher__values\">\n {options.map(({ id, label, icon }) => (\n <span\n key={id}\n aria-hidden={id !== selected?.id}\n data-selected={id === selected?.id}\n className=\"c-sub-view-switcher__value\"\n >\n {icon ? (\n <span className=\"c-sub-view-switcher__icon\">\n {icon}\n </span>\n ) : null}\n {label}\n </span>\n ))}\n </span>\n <ArrowDownSmallIcon />\n </StyledSubViewSwitcherOption>\n </StyledViewSwitcherTrack>\n }\n >\n <StyledSubViewSwitcherList>\n {options.map(({ id, label, icon }) => (\n <ListItem\n key={id}\n aria-selected={id === selected?.id}\n onClick={() => {\n setOpen(false);\n\n if (id !== value) {\n onChange(id);\n offer.show(id);\n }\n }}\n >\n {icon ? (\n <StyledSubViewSwitcherIcon>\n {icon}\n </StyledSubViewSwitcherIcon>\n ) : null}\n <StyledSubViewSwitcherLabel\n data-selected={id === selected?.id}\n >\n {label}\n </StyledSubViewSwitcherLabel>\n </ListItem>\n ))}\n </StyledSubViewSwitcherList>\n </Menu>\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 </StyledSubViewSwitcherClip>\n </StyledSubViewSwitcherRoot>\n );\n }\n);\n\nSubViewSwitcher.displayName = \"SubViewSwitcher\";\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAWA,IAAAC,WAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AASA,IAAAK,mBAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAR,OAAA;AACA,IAAAS,KAAA,GAAAT,OAAA;AAA+B,IAAAU,SAAA;AAAA,SAAAR,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAZ,wBAAAY,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAhB,uBAAA,YAAAA,wBAAAY,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CA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