@activecollab/components 2.0.509 → 2.0.511
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/CaretButton/CaretButton.js +2 -4
- package/dist/cjs/components/CaretButton/CaretButton.js.map +1 -1
- package/dist/cjs/components/CaretButton/Styles.js +7 -1
- package/dist/cjs/components/CaretButton/Styles.js.map +1 -1
- package/dist/cjs/components/CounterButton/CounterButton.js +1 -2
- package/dist/cjs/components/CounterButton/CounterButton.js.map +1 -1
- package/dist/cjs/components/EditableHours/EditableHours.js +1 -3
- package/dist/cjs/components/EditableHours/EditableHours.js.map +1 -1
- package/dist/cjs/components/Filter/Filter.js +9 -2
- package/dist/cjs/components/Filter/Filter.js.map +1 -1
- package/dist/cjs/components/Filter/Styles.js +13 -1
- package/dist/cjs/components/Filter/Styles.js.map +1 -1
- package/dist/cjs/components/FilterInput/FilterInput.js +6 -1
- package/dist/cjs/components/FilterInput/FilterInput.js.map +1 -1
- package/dist/cjs/components/FilterInput/FilterInput.styles.js +5 -2
- package/dist/cjs/components/FilterInput/FilterInput.styles.js.map +1 -1
- package/dist/cjs/components/Header/Styles.js +1 -1
- package/dist/cjs/components/Header/Styles.js.map +1 -1
- package/dist/cjs/components/Icons/collection/ArrowRestore.js +1 -0
- package/dist/cjs/components/Icons/collection/ArrowRestore.js.map +1 -1
- package/dist/cjs/components/Icons/collection/CalendarDay.js +64 -0
- package/dist/cjs/components/Icons/collection/CalendarDay.js.map +1 -0
- package/dist/cjs/components/Icons/collection/CalendarMonth.js +64 -0
- package/dist/cjs/components/Icons/collection/CalendarMonth.js.map +1 -0
- package/dist/cjs/components/Icons/collection/CalendarWeek.js +64 -0
- package/dist/cjs/components/Icons/collection/CalendarWeek.js.map +1 -0
- package/dist/cjs/components/Icons/collection/Notebook.js +1 -0
- package/dist/cjs/components/Icons/collection/Notebook.js.map +1 -1
- package/dist/cjs/components/Icons/collection/Pencil.js +1 -0
- package/dist/cjs/components/Icons/collection/Pencil.js.map +1 -1
- package/dist/cjs/components/Icons/collection/index.js +21 -0
- package/dist/cjs/components/Icons/collection/index.js.map +1 -1
- package/dist/cjs/components/MultiAvatar/MultiAvatar.js +1 -3
- package/dist/cjs/components/MultiAvatar/MultiAvatar.js.map +1 -1
- package/dist/cjs/components/MultiAvatar/Styles.js +8 -3
- package/dist/cjs/components/MultiAvatar/Styles.js.map +1 -1
- package/dist/cjs/components/Steppers/DateStepper/DateStepper.js +219 -35
- package/dist/cjs/components/Steppers/DateStepper/DateStepper.js.map +1 -1
- package/dist/cjs/components/Steppers/DateStepper/Styles.js +74 -4
- package/dist/cjs/components/Steppers/DateStepper/Styles.js.map +1 -1
- package/dist/cjs/components/Stopwatch/Stopwatch.js +2 -13
- package/dist/cjs/components/Stopwatch/Stopwatch.js.map +1 -1
- package/dist/cjs/components/Wizard/Step.js +1 -2
- package/dist/cjs/components/Wizard/Step.js.map +1 -1
- package/dist/cjs/components/Wizard/Styles.js +6 -1
- package/dist/cjs/components/Wizard/Styles.js.map +1 -1
- package/dist/cjs/utils/layers.js +16 -1
- package/dist/cjs/utils/layers.js.map +1 -1
- package/dist/cjs/utils/layers.test.js +34 -0
- package/dist/cjs/utils/layers.test.js.map +1 -0
- package/dist/esm/components/CaretButton/CaretButton.d.ts.map +1 -1
- package/dist/esm/components/CaretButton/CaretButton.js +3 -5
- package/dist/esm/components/CaretButton/CaretButton.js.map +1 -1
- package/dist/esm/components/CaretButton/Styles.d.ts +3 -0
- package/dist/esm/components/CaretButton/Styles.d.ts.map +1 -1
- package/dist/esm/components/CaretButton/Styles.js +6 -0
- package/dist/esm/components/CaretButton/Styles.js.map +1 -1
- package/dist/esm/components/CounterButton/CounterButton.d.ts.map +1 -1
- package/dist/esm/components/CounterButton/CounterButton.js +1 -2
- package/dist/esm/components/CounterButton/CounterButton.js.map +1 -1
- package/dist/esm/components/EditableHours/EditableHours.js +1 -3
- package/dist/esm/components/EditableHours/EditableHours.js.map +1 -1
- package/dist/esm/components/Filter/Filter.d.ts +3 -0
- package/dist/esm/components/Filter/Filter.d.ts.map +1 -1
- package/dist/esm/components/Filter/Filter.js +10 -3
- package/dist/esm/components/Filter/Filter.js.map +1 -1
- package/dist/esm/components/Filter/Styles.d.ts +2 -0
- package/dist/esm/components/Filter/Styles.d.ts.map +1 -1
- package/dist/esm/components/Filter/Styles.js +12 -0
- package/dist/esm/components/Filter/Styles.js.map +1 -1
- package/dist/esm/components/FilterInput/FilterInput.d.ts.map +1 -1
- package/dist/esm/components/FilterInput/FilterInput.js +6 -2
- package/dist/esm/components/FilterInput/FilterInput.js.map +1 -1
- package/dist/esm/components/FilterInput/FilterInput.styles.d.ts.map +1 -1
- package/dist/esm/components/FilterInput/FilterInput.styles.js +5 -2
- package/dist/esm/components/FilterInput/FilterInput.styles.js.map +1 -1
- package/dist/esm/components/Header/Styles.js +1 -1
- package/dist/esm/components/Header/Styles.js.map +1 -1
- package/dist/esm/components/Icons/collection/ArrowRestore.d.ts.map +1 -1
- package/dist/esm/components/Icons/collection/ArrowRestore.js +1 -0
- package/dist/esm/components/Icons/collection/ArrowRestore.js.map +1 -1
- package/dist/esm/components/Icons/collection/CalendarDay.d.ts +32 -0
- package/dist/esm/components/Icons/collection/CalendarDay.d.ts.map +1 -0
- package/dist/esm/components/Icons/collection/CalendarDay.js +57 -0
- package/dist/esm/components/Icons/collection/CalendarDay.js.map +1 -0
- package/dist/esm/components/Icons/collection/CalendarMonth.d.ts +32 -0
- package/dist/esm/components/Icons/collection/CalendarMonth.d.ts.map +1 -0
- package/dist/esm/components/Icons/collection/CalendarMonth.js +57 -0
- package/dist/esm/components/Icons/collection/CalendarMonth.js.map +1 -0
- package/dist/esm/components/Icons/collection/CalendarWeek.d.ts +32 -0
- package/dist/esm/components/Icons/collection/CalendarWeek.d.ts.map +1 -0
- package/dist/esm/components/Icons/collection/CalendarWeek.js +57 -0
- package/dist/esm/components/Icons/collection/CalendarWeek.js.map +1 -0
- package/dist/esm/components/Icons/collection/Notebook.d.ts.map +1 -1
- package/dist/esm/components/Icons/collection/Notebook.js +1 -0
- package/dist/esm/components/Icons/collection/Notebook.js.map +1 -1
- package/dist/esm/components/Icons/collection/Pencil.d.ts.map +1 -1
- package/dist/esm/components/Icons/collection/Pencil.js +1 -0
- package/dist/esm/components/Icons/collection/Pencil.js.map +1 -1
- package/dist/esm/components/Icons/collection/index.d.ts +3 -0
- package/dist/esm/components/Icons/collection/index.d.ts.map +1 -1
- package/dist/esm/components/Icons/collection/index.js +3 -0
- package/dist/esm/components/Icons/collection/index.js.map +1 -1
- package/dist/esm/components/MultiAvatar/MultiAvatar.d.ts.map +1 -1
- package/dist/esm/components/MultiAvatar/MultiAvatar.js +2 -4
- package/dist/esm/components/MultiAvatar/MultiAvatar.js.map +1 -1
- package/dist/esm/components/MultiAvatar/Styles.d.ts +1 -0
- package/dist/esm/components/MultiAvatar/Styles.d.ts.map +1 -1
- package/dist/esm/components/MultiAvatar/Styles.js +7 -2
- package/dist/esm/components/MultiAvatar/Styles.js.map +1 -1
- package/dist/esm/components/Steppers/DateStepper/DateStepper.d.ts +25 -2
- package/dist/esm/components/Steppers/DateStepper/DateStepper.d.ts.map +1 -1
- package/dist/esm/components/Steppers/DateStepper/DateStepper.js +194 -31
- package/dist/esm/components/Steppers/DateStepper/DateStepper.js.map +1 -1
- package/dist/esm/components/Steppers/DateStepper/Styles.d.ts +15 -0
- package/dist/esm/components/Steppers/DateStepper/Styles.d.ts.map +1 -1
- package/dist/esm/components/Steppers/DateStepper/Styles.js +73 -3
- package/dist/esm/components/Steppers/DateStepper/Styles.js.map +1 -1
- package/dist/esm/components/Stopwatch/Stopwatch.d.ts.map +1 -1
- package/dist/esm/components/Stopwatch/Stopwatch.js +2 -12
- package/dist/esm/components/Stopwatch/Stopwatch.js.map +1 -1
- package/dist/esm/components/Wizard/Step.d.ts.map +1 -1
- package/dist/esm/components/Wizard/Step.js +2 -3
- package/dist/esm/components/Wizard/Step.js.map +1 -1
- package/dist/esm/components/Wizard/Styles.d.ts +3 -0
- package/dist/esm/components/Wizard/Styles.d.ts.map +1 -1
- package/dist/esm/components/Wizard/Styles.js +5 -0
- package/dist/esm/components/Wizard/Styles.js.map +1 -1
- package/dist/esm/utils/layers.d.ts +7 -0
- package/dist/esm/utils/layers.d.ts.map +1 -1
- package/dist/esm/utils/layers.js +13 -0
- package/dist/esm/utils/layers.js.map +1 -1
- package/dist/esm/utils/layers.test.d.ts +2 -0
- package/dist/esm/utils/layers.test.d.ts.map +1 -0
- package/dist/esm/utils/layers.test.js +32 -0
- package/dist/esm/utils/layers.test.js.map +1 -0
- package/dist/index.js +727 -262
- 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
|
@@ -17,5 +17,20 @@ export declare const StyledDiv: import("styled-components").StyledComponent<"div
|
|
|
17
17
|
export declare const StyledControl: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../..").IconButtonProps & {
|
|
18
18
|
children?: import("react").ReactNode | undefined;
|
|
19
19
|
} & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
20
|
+
export declare const StyledStepValue: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
21
|
+
export declare const StyledDateValue: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
22
|
+
export declare const StyledStepOptionIcon: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
23
|
+
export declare const StyledPill: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
24
|
+
export declare const StyledPillArrow: import("styled-components").StyledComponent<"button", any, {
|
|
25
|
+
$side: "start" | "end";
|
|
26
|
+
}, never>;
|
|
27
|
+
export declare const StyledPillButton: import("styled-components").StyledComponent<"button", any, {
|
|
28
|
+
$compact?: boolean;
|
|
29
|
+
}, never>;
|
|
30
|
+
export declare const StyledPillLabel: import("styled-components").StyledComponent<"span", any, {
|
|
31
|
+
$withBadge?: boolean;
|
|
32
|
+
}, never>;
|
|
33
|
+
export declare const StyledPillBadge: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
34
|
+
export declare const StyledPillDivider: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
20
35
|
export {};
|
|
21
36
|
//# sourceMappingURL=Styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Steppers/DateStepper/Styles.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,YAAY;WAA0B,MAAM;SAwDxD,CAAC;AAEF,eAAO,MAAM,UAAU,wGAOtB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;
|
|
1
|
+
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Steppers/DateStepper/Styles.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,YAAY;WAA0B,MAAM;SAwDxD,CAAC;AAEF,eAAO,MAAM,UAAU,wGAOtB,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;mEAa7B,CAAC;AAEF,eAAO,MAAM,UAAU,qEAGtB,CAAC;AAEF,UAAU,SAAS;IACjB,aAAa,EAAE,OAAO,CAAC;IACvB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,SAAS,2EA+FrB,CAAC;AAEF,eAAO,MAAM,aAAa;;sEAgBzB,CAAC;AAEF,eAAO,MAAM,eAAe,qEAgB3B,CAAC;AAGF,eAAO,MAAM,eAAe,qEAW3B,CAAC;AAIF,eAAO,MAAM,oBAAoB,qEAShC,CAAC;AAKF,eAAO,MAAM,UAAU,oEAgBtB,CAAC;AA8BF,eAAO,MAAM,eAAe;WAA0B,OAAO,GAAG,KAAK;SAqBpE,CAAC;AAEF,eAAO,MAAM,gBAAgB;eAA8B,OAAO;SAuBjE,CAAC;AAGF,eAAO,MAAM,eAAe;iBAA8B,OAAO;SAIhE,CAAC;AAEF,eAAO,MAAM,eAAe,qEAc3B,CAAC;AAEF,eAAO,MAAM,iBAAiB,qEAG7B,CAAC"}
|
|
@@ -36,7 +36,7 @@ export const StyledMenu = styled(Menu).withConfig({
|
|
|
36
36
|
export const StyledButtonGroup = styled(ButtonGroup).withConfig({
|
|
37
37
|
displayName: "Styles__StyledButtonGroup",
|
|
38
38
|
componentId: "sc-1v8h7mt-2"
|
|
39
|
-
})(["", " ", " button:hover{position:relative;z-index:1;}"], FontStyle, BoxSizingStyle);
|
|
39
|
+
})(["", " ", " button:hover{position:relative;z-index:1;}> button:first-child + div{margin-left:-1px;}"], FontStyle, BoxSizingStyle);
|
|
40
40
|
export const StyledSpan = styled.span.withConfig({
|
|
41
41
|
displayName: "Styles__StyledSpan",
|
|
42
42
|
componentId: "sc-1v8h7mt-3"
|
|
@@ -66,11 +66,81 @@ export const StyledDiv = styled.div.withConfig({
|
|
|
66
66
|
"textDecorationLine": "none",
|
|
67
67
|
"WebkitFontSmoothing": "antialiased",
|
|
68
68
|
"MozOsxFontSmoothing": "grayscale"
|
|
69
|
-
}, props => props.$mode !== "flat" && css(["border:1px solid var(--color-theme-
|
|
69
|
+
}, props => props.$mode !== "flat" && css(["border:1px solid var(--color-theme-600);"]), props => !props.$alwaysShowDate && css(["@media (max-width:768px){display:none;}"]), props => props.$mode !== "flat" && css(["border-color:var(--color-primary);"]), props => props.$mode !== "flat" && css(["border-color:var(--color-primary);background-color:var(--color-primary-200);"]));
|
|
70
70
|
export const StyledControl = styled(IconButton).withConfig({
|
|
71
71
|
displayName: "Styles__StyledControl",
|
|
72
72
|
componentId: "sc-1v8h7mt-5"
|
|
73
|
-
})(["border-radius:var(--ac-br-8);"]);
|
|
73
|
+
})(["border-radius:var(--ac-br-8);&&:not(:hover):not(:active){border-color:var(--color-theme-600);}&&:disabled{opacity:1;svg{opacity:0.5;}}"]);
|
|
74
|
+
export const StyledStepValue = styled.span.withConfig({
|
|
75
|
+
displayName: "Styles__StyledStepValue",
|
|
76
|
+
componentId: "sc-1v8h7mt-6"
|
|
77
|
+
})(["display:inline-flex;align-items:center;justify-content:center;gap:2px;margin-right:-4px;white-space:nowrap;&& svg{width:16px;height:16px;flex-shrink:0;color:inherit;fill:currentColor;}"]);
|
|
78
|
+
|
|
79
|
+
/* the label keeps the middle of the button and the caret stands at its right edge */
|
|
80
|
+
export const StyledDateValue = styled(StyledStepValue).withConfig({
|
|
81
|
+
displayName: "Styles__StyledDateValue",
|
|
82
|
+
componentId: "sc-1v8h7mt-7"
|
|
83
|
+
})(["display:flex;width:calc(100% + 6px);margin-right:-6px;gap:4px;> span{flex:1 1 0;min-width:0;text-align:center;}"]);
|
|
84
|
+
StyledDateValue.displayName = "StyledDateValue";
|
|
85
|
+
/* an icon in the list of steps keeps the default icon color, as in every other menu */
|
|
86
|
+
export const StyledStepOptionIcon = styled.span.withConfig({
|
|
87
|
+
displayName: "Styles__StyledStepOptionIcon",
|
|
88
|
+
componentId: "sc-1v8h7mt-8"
|
|
89
|
+
})(["display:inline-flex;margin-right:8px;vertical-align:middle;&& svg{width:20px;height:20px;}"]);
|
|
90
|
+
StyledStepOptionIcon.displayName = "StyledStepOptionIcon";
|
|
91
|
+
StyledStepValue.displayName = "StyledStepValue";
|
|
92
|
+
/* The pill appearance: one soft filled pill, with no borders. The paper shows as the line before the step picker. */
|
|
93
|
+
export const StyledPill = styled.div.withConfig({
|
|
94
|
+
displayName: "Styles__StyledPill",
|
|
95
|
+
componentId: "sc-1v8h7mt-9"
|
|
96
|
+
})(["", " ", " --c-date-stepper-height:32px;--c-date-stepper-arrow:24px;display:inline-flex;align-items:stretch;height:var(--c-date-stepper-height);border-radius:16px;background-color:color-mix(in srgb,var(--color-theme-900) 8%,transparent);&.c-date-stepper--small{--c-date-stepper-height:30px;--c-date-stepper-arrow:20px;}"], FontStyle, BoxSizingStyle);
|
|
97
|
+
const pillPart = css(["display:inline-flex;align-items:center;justify-content:center;height:var(--c-date-stepper-height);margin:0;border:0;background:none;color:var(--color-theme-800);font:inherit;cursor:pointer;svg{flex-shrink:0;color:inherit;fill:currentColor;}&:focus{outline:none;}&:focus-visible{outline:2px solid var(--color-primary);outline-offset:-2px;}"]);
|
|
98
|
+
export const StyledPillArrow = styled.button.withConfig({
|
|
99
|
+
displayName: "Styles__StyledPillArrow",
|
|
100
|
+
componentId: "sc-1v8h7mt-10"
|
|
101
|
+
})(["", " padding:", ";border-radius:", ";color:var(--color-theme-900);svg{width:var(--c-date-stepper-arrow);height:var(--c-date-stepper-arrow);}&:hover:not(:disabled){color:var(--color-primary);}&:disabled{cursor:default;color:var(--color-theme-500);}"], pillPart, _ref => {
|
|
102
|
+
let $side = _ref.$side;
|
|
103
|
+
return $side === "start" ? "0 4px 0 6px" : "0 6px 0 4px";
|
|
104
|
+
}, _ref2 => {
|
|
105
|
+
let $side = _ref2.$side;
|
|
106
|
+
return $side === "start" ? "16px 0 0 16px" : "0 16px 16px 0";
|
|
107
|
+
});
|
|
108
|
+
export const StyledPillButton = styled.button.withConfig({
|
|
109
|
+
displayName: "Styles__StyledPillButton",
|
|
110
|
+
componentId: "sc-1v8h7mt-11"
|
|
111
|
+
})(["", " gap:", "px;padding:", ";font-size:14px;font-weight:500;line-height:1;white-space:nowrap;svg{width:16px;height:16px;color:var(--color-theme-700);}&:hover,&[aria-expanded=\"true\"]{color:var(--color-primary);svg{color:var(--color-primary);}}"], pillPart, _ref3 => {
|
|
112
|
+
let $compact = _ref3.$compact;
|
|
113
|
+
return $compact ? 0 : 6;
|
|
114
|
+
}, _ref4 => {
|
|
115
|
+
let $compact = _ref4.$compact;
|
|
116
|
+
return $compact ? "0 6px" : "0 4px 0 6px";
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
/* next to a badge the text ends at the badge, so the distance between the two never changes */
|
|
120
|
+
export const StyledPillLabel = styled.span.withConfig({
|
|
121
|
+
displayName: "Styles__StyledPillLabel",
|
|
122
|
+
componentId: "sc-1v8h7mt-12"
|
|
123
|
+
})(["display:inline-block;text-align:", ";margin-right:", "px;"], _ref5 => {
|
|
124
|
+
let $withBadge = _ref5.$withBadge;
|
|
125
|
+
return $withBadge ? "right" : "center";
|
|
126
|
+
}, _ref6 => {
|
|
127
|
+
let $withBadge = _ref6.$withBadge;
|
|
128
|
+
return $withBadge ? -2 : 0;
|
|
129
|
+
});
|
|
130
|
+
export const StyledPillBadge = styled.span.withConfig({
|
|
131
|
+
displayName: "Styles__StyledPillBadge",
|
|
132
|
+
componentId: "sc-1v8h7mt-13"
|
|
133
|
+
})(["display:inline-flex;align-items:center;justify-content:center;min-width:34px;height:18px;padding:0 6px;border-radius:9px;border:1px solid color-mix(in srgb,var(--page-paper-main) 50%,transparent);background-color:transparent;color:var(--color-theme-700);font-size:11px;font-variant-numeric:tabular-nums;box-sizing:border-box;"]);
|
|
134
|
+
export const StyledPillDivider = styled.span.withConfig({
|
|
135
|
+
displayName: "Styles__StyledPillDivider",
|
|
136
|
+
componentId: "sc-1v8h7mt-14"
|
|
137
|
+
})(["flex:0 0 1px;background-color:var(--page-paper-main);"]);
|
|
138
|
+
StyledPill.displayName = "StyledPill";
|
|
139
|
+
StyledPillArrow.displayName = "StyledPillArrow";
|
|
140
|
+
StyledPillButton.displayName = "StyledPillButton";
|
|
141
|
+
StyledPillLabel.displayName = "StyledPillLabel";
|
|
142
|
+
StyledPillBadge.displayName = "StyledPillBadge";
|
|
143
|
+
StyledPillDivider.displayName = "StyledPillDivider";
|
|
74
144
|
StyledButtonGroup.displayName = "StyledButtonGroup";
|
|
75
145
|
StyledSpan.displayName = "StyledSpan";
|
|
76
146
|
StyledDiv.displayName = "StyledDiv";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.js","names":["styled","css","BoxSizingStyle","ButtonGroup","FontStyle","IconButton","Menu","StyledButton","button","withConfig","displayName","componentId","props","$step","StyledMenu","StyledButtonGroup","StyledSpan","span","StyledDiv","div","$isTargetable","$isRounded","$mode","$alwaysShowDate","StyledControl"],"sources":["../../../../../src/components/Steppers/DateStepper/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport tw from \"twin.macro\";\n\nimport { BoxSizingStyle } from \"../../BoxSizingStyle\";\nimport { ButtonGroup } from \"../../ButtonGroup\";\nimport { FontStyle } from \"../../FontStyle\";\nimport { IconButton } from \"../../IconButton\";\nimport { Menu } from \"../../Menu\";\n\nexport const StyledButton = styled.button<{ $step: string }>`\n ${FontStyle}\n ${BoxSizingStyle}\n ${(props) =>\n props.$step === \"range\" &&\n css`\n padding: 0 12px !important;\n `}\n\n ${tw`\n tw-relative\n tw-antialiased\n tw-align-middle\n tw-font-medium\n tw-inline-block\n tw-leading-none\n tw-m-0\n tw-no-underline\n tw-text-sm\n tw-select-none\n tw-cursor-pointer\n tw-text-center\n `}\n\n color: var(--color-theme-700);\n margin: 0;\n padding: 0;\n background: none;\n width: 100%;\n height: auto;\n border: none;\n height: 30px;\n line-height: 1;\n transition: all 0.3s ease;\n\n svg {\n fill: currentColor;\n }\n\n &::-moz-focus-inner {\n border: 0;\n }\n\n &:focus {\n outline: none;\n }\n\n &:hover {\n text-decoration: none;\n }\n\n &:disabled {\n cursor: default;\n opacity: 50%;\n pointer-events: none;\n }\n`;\n\nexport const StyledMenu = styled(Menu)`\n ${tw`\n tw-w-auto\n tw-h-auto\n tw-py-4\n tw-px-2\n `}\n`;\n\nexport const StyledButtonGroup = styled(ButtonGroup)`\n ${FontStyle}\n ${BoxSizingStyle}\n\n button:hover {\n position: relative;\n z-index: 1;\n }\n`;\n\nexport const StyledSpan = styled.span`\n line-height: 30px;\n color: var(--color-theme-700);\n`;\n\ninterface StyledDiv {\n $isTargetable: boolean;\n $isRounded: boolean;\n $mode: string;\n $alwaysShowDate: boolean;\n}\n\nexport const StyledDiv = styled.div<StyledDiv>`\n ${(props) =>\n props.$isTargetable &&\n css`\n ${tw`tw-pointer-events-none`}\n `}\n\n ${(props) =>\n props.$isRounded &&\n css`\n border-radius: var(--ac-br-8);\n padding: 0 12px !important;\n `}\n\n ${(props) =>\n props.$mode !== \"flat\"\n ? tw`\n tw-border\n tw-border-solid\n `\n : tw`tw-border-0`}\n\n ${tw`\n tw-relative\n tw-text-center\n tw-p-0\n tw-antialiased\n tw-align-middle\n tw-font-medium\n tw-inline-block\n tw-leading-none\n tw-m-0\n tw-no-underline\n tw-text-sm\n tw-select-none\n tw-cursor-pointer\n `}\n\n height: 32px;\n transition: all 0.3s ease;\n background-color: transparent;\n ${(props) =>\n props.$mode !== \"flat\" &&\n css`\n border: 1px solid var(--color-theme-700);\n `}\n\n color: var(--color-theme-700);\n margin-right: -1px;\n display: block;\n\n ${(props) =>\n !props.$alwaysShowDate &&\n css`\n @media (max-width: 768px) {\n display: none;\n }\n `}\n svg {\n fill: currentColor;\n }\n\n &::-moz-focus-inner {\n border: 0;\n }\n\n &:focus {\n outline: none;\n }\n\n &:disabled {\n cursor: default;\n opacity: 50%;\n pointer-events: none;\n }\n\n &:hover {\n ${(props) =>\n props.$mode !== \"flat\" &&\n css`\n border-color: var(--color-primary);\n `}\n color: var(--color-primary);\n text-decoration: none;\n }\n\n &:active {\n ${(props) =>\n props.$mode !== \"flat\" &&\n css`\n border-color: var(--color-primary);\n background-color: var(--color-primary-200);\n `}\n color: var(--color-primary);\n }\n`;\n\nexport const StyledControl = styled(IconButton)`\n border-radius: var(--ac-br-8);\n`;\n\nStyledButtonGroup.displayName = \"StyledButtonGroup\";\nStyledSpan.displayName = \"StyledSpan\";\nStyledDiv.displayName = \"StyledDiv\";\nStyledMenu.displayName = \"StyledMenu\";\nStyledButton.displayName = \"StyledButton\";\nStyledControl.displayName = \"StyledControl\";\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAG/C,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,IAAI,QAAQ,YAAY;AAEjC,OA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,CAACA,KAAK,CAACW,eAAe,IACtBtB,GAAG,6CAIF,EAoBEW,KAAK,IACNA,KAAK,CAACU,KAAK,KAAK,MAAM,IACtBrB,GAAG,wCAEF,EAMAW,KAAK,IACNA,KAAK,CAACU,KAAK,KAAK,MAAM,IACtBrB,GAAG,kFAGF,CAGN;AAED,OAAO,MAAMuB,aAAa,GAAGxB,MAAM,CAACK,UAAU,CAAC,CAAAI,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,qCAE9C;AAEDI,iBAAiB,CAACL,WAAW,GAAG,mBAAmB;AACnDM,UAAU,CAACN,WAAW,GAAG,YAAY;AACrCQ,SAAS,CAACR,WAAW,GAAG,WAAW;AACnCI,UAAU,CAACJ,WAAW,GAAG,YAAY;AACrCH,YAAY,CAACG,WAAW,GAAG,cAAc;AACzCc,aAAa,CAACd,WAAW,GAAG,eAAe","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"Styles.js","names":["styled","css","BoxSizingStyle","ButtonGroup","FontStyle","IconButton","Menu","StyledButton","button","withConfig","displayName","componentId","props","$step","StyledMenu","StyledButtonGroup","StyledSpan","span","StyledDiv","div","$isTargetable","$isRounded","$mode","$alwaysShowDate","StyledControl","StyledStepValue","StyledDateValue","StyledStepOptionIcon","StyledPill","pillPart","StyledPillArrow","_ref","$side","_ref2","StyledPillButton","_ref3","$compact","_ref4","StyledPillLabel","_ref5","$withBadge","_ref6","StyledPillBadge","StyledPillDivider"],"sources":["../../../../../src/components/Steppers/DateStepper/Styles.ts"],"sourcesContent":["import styled, { css } from \"styled-components\";\nimport tw from \"twin.macro\";\n\nimport { BoxSizingStyle } from \"../../BoxSizingStyle\";\nimport { ButtonGroup } from \"../../ButtonGroup\";\nimport { FontStyle } from \"../../FontStyle\";\nimport { IconButton } from \"../../IconButton\";\nimport { Menu } from \"../../Menu\";\n\nexport const StyledButton = styled.button<{ $step: string }>`\n ${FontStyle}\n ${BoxSizingStyle}\n ${(props) =>\n props.$step === \"range\" &&\n css`\n padding: 0 12px !important;\n `}\n\n ${tw`\n tw-relative\n tw-antialiased\n tw-align-middle\n tw-font-medium\n tw-inline-block\n tw-leading-none\n tw-m-0\n tw-no-underline\n tw-text-sm\n tw-select-none\n tw-cursor-pointer\n tw-text-center\n `}\n\n color: var(--color-theme-700);\n margin: 0;\n padding: 0;\n background: none;\n width: 100%;\n height: auto;\n border: none;\n height: 30px;\n line-height: 1;\n transition: all 0.3s ease;\n\n svg {\n fill: currentColor;\n }\n\n &::-moz-focus-inner {\n border: 0;\n }\n\n &:focus {\n outline: none;\n }\n\n &:hover {\n text-decoration: none;\n }\n\n &:disabled {\n cursor: default;\n opacity: 50%;\n pointer-events: none;\n }\n`;\n\nexport const StyledMenu = styled(Menu)`\n ${tw`\n tw-w-auto\n tw-h-auto\n tw-py-4\n tw-px-2\n `}\n`;\n\nexport const StyledButtonGroup = styled(ButtonGroup)`\n ${FontStyle}\n ${BoxSizingStyle}\n\n button:hover {\n position: relative;\n z-index: 1;\n }\n\n /* the segment after the back arrow shares its left border with the arrow */\n > button:first-child + div {\n margin-left: -1px;\n }\n`;\n\nexport const StyledSpan = styled.span`\n line-height: 30px;\n color: var(--color-theme-700);\n`;\n\ninterface StyledDiv {\n $isTargetable: boolean;\n $isRounded: boolean;\n $mode: string;\n $alwaysShowDate: boolean;\n}\n\nexport const StyledDiv = styled.div<StyledDiv>`\n ${(props) =>\n props.$isTargetable &&\n css`\n ${tw`tw-pointer-events-none`}\n `}\n\n ${(props) =>\n props.$isRounded &&\n css`\n border-radius: var(--ac-br-8);\n padding: 0 12px !important;\n `}\n\n ${(props) =>\n props.$mode !== \"flat\"\n ? tw`\n tw-border\n tw-border-solid\n `\n : tw`tw-border-0`}\n\n ${tw`\n tw-relative\n tw-text-center\n tw-p-0\n tw-antialiased\n tw-align-middle\n tw-font-medium\n tw-inline-block\n tw-leading-none\n tw-m-0\n tw-no-underline\n tw-text-sm\n tw-select-none\n tw-cursor-pointer\n `}\n\n height: 32px;\n transition: all 0.3s ease;\n background-color: transparent;\n ${(props) =>\n props.$mode !== \"flat\" &&\n css`\n border: 1px solid var(--color-theme-600);\n `}\n\n color: var(--color-theme-700);\n margin-right: -1px;\n display: block;\n\n ${(props) =>\n !props.$alwaysShowDate &&\n css`\n @media (max-width: 768px) {\n display: none;\n }\n `}\n svg {\n fill: currentColor;\n }\n\n &::-moz-focus-inner {\n border: 0;\n }\n\n &:focus {\n outline: none;\n }\n\n &:disabled {\n cursor: default;\n opacity: 50%;\n pointer-events: none;\n }\n\n &:hover {\n ${(props) =>\n props.$mode !== \"flat\" &&\n css`\n border-color: var(--color-primary);\n `}\n color: var(--color-primary);\n text-decoration: none;\n }\n\n &:active {\n ${(props) =>\n props.$mode !== \"flat\" &&\n css`\n border-color: var(--color-primary);\n background-color: var(--color-primary-200);\n `}\n color: var(--color-primary);\n }\n`;\n\nexport const StyledControl = styled(IconButton)`\n border-radius: var(--ac-br-8);\n\n /* one step closer to the paper than the text, in every theme */\n &&:not(:hover):not(:active) {\n border-color: var(--color-theme-600);\n }\n\n /* a disabled arrow dims, its border stays whole so the stepper keeps one outline */\n &&:disabled {\n opacity: 1;\n\n svg {\n opacity: 0.5;\n }\n }\n`;\n\nexport const StyledStepValue = styled.span`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 2px;\n margin-right: -4px;\n white-space: nowrap;\n\n /* the icon takes the color of the date text beside it, also on hover */\n && svg {\n width: 16px;\n height: 16px;\n flex-shrink: 0;\n color: inherit;\n fill: currentColor;\n }\n`;\n\n/* the label keeps the middle of the button and the caret stands at its right edge */\nexport const StyledDateValue = styled(StyledStepValue)`\n display: flex;\n width: calc(100% + 6px);\n margin-right: -6px;\n gap: 4px;\n\n > span {\n flex: 1 1 0;\n min-width: 0;\n text-align: center;\n }\n`;\n\nStyledDateValue.displayName = \"StyledDateValue\";\n/* an icon in the list of steps keeps the default icon color, as in every other menu */\nexport const StyledStepOptionIcon = styled.span`\n display: inline-flex;\n margin-right: 8px;\n vertical-align: middle;\n\n && svg {\n width: 20px;\n height: 20px;\n }\n`;\n\nStyledStepOptionIcon.displayName = \"StyledStepOptionIcon\";\nStyledStepValue.displayName = \"StyledStepValue\";\n/* The pill appearance: one soft filled pill, with no borders. The paper shows as the line before the step picker. */\nexport const StyledPill = styled.div`\n ${FontStyle}\n ${BoxSizingStyle}\n --c-date-stepper-height: 32px;\n --c-date-stepper-arrow: 24px;\n display: inline-flex;\n align-items: stretch;\n height: var(--c-date-stepper-height);\n border-radius: 16px;\n background-color: color-mix(in srgb, var(--color-theme-900) 8%, transparent);\n\n /* the height of a search field */\n &.c-date-stepper--small {\n --c-date-stepper-height: 30px;\n --c-date-stepper-arrow: 20px;\n }\n`;\n\nconst pillPart = css`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: var(--c-date-stepper-height);\n margin: 0;\n border: 0;\n background: none;\n color: var(--color-theme-800);\n font: inherit;\n cursor: pointer;\n\n svg {\n flex-shrink: 0;\n color: inherit;\n fill: currentColor;\n }\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: -2px;\n }\n`;\n\nexport const StyledPillArrow = styled.button<{ $side: \"start\" | \"end\" }>`\n ${pillPart}\n padding: ${({ $side }) =>\n $side === \"start\" ? \"0 4px 0 6px\" : \"0 6px 0 4px\"};\n border-radius: ${({ $side }) =>\n $side === \"start\" ? \"16px 0 0 16px\" : \"0 16px 16px 0\"};\n color: var(--color-theme-900);\n\n svg {\n width: var(--c-date-stepper-arrow);\n height: var(--c-date-stepper-arrow);\n }\n\n &:hover:not(:disabled) {\n color: var(--color-primary);\n }\n\n &:disabled {\n cursor: default;\n color: var(--color-theme-500);\n }\n`;\n\nexport const StyledPillButton = styled.button<{ $compact?: boolean }>`\n ${pillPart}\n gap: ${({ $compact }) => ($compact ? 0 : 6)}px;\n padding: ${({ $compact }) => ($compact ? \"0 6px\" : \"0 4px 0 6px\")};\n font-size: 14px;\n font-weight: 500;\n line-height: 1;\n white-space: nowrap;\n\n svg {\n width: 16px;\n height: 16px;\n color: var(--color-theme-700);\n }\n\n &:hover,\n &[aria-expanded=\"true\"] {\n color: var(--color-primary);\n\n svg {\n color: var(--color-primary);\n }\n }\n`;\n\n/* next to a badge the text ends at the badge, so the distance between the two never changes */\nexport const StyledPillLabel = styled.span<{ $withBadge?: boolean }>`\n display: inline-block;\n text-align: ${({ $withBadge }) => ($withBadge ? \"right\" : \"center\")};\n margin-right: ${({ $withBadge }) => ($withBadge ? -2 : 0)}px;\n`;\n\nexport const StyledPillBadge = styled.span`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 34px;\n height: 18px;\n padding: 0 6px;\n border-radius: 9px;\n border: 1px solid color-mix(in srgb, var(--page-paper-main) 50%, transparent);\n background-color: transparent;\n color: var(--color-theme-700);\n font-size: 11px;\n font-variant-numeric: tabular-nums;\n box-sizing: border-box;\n`;\n\nexport const StyledPillDivider = styled.span`\n flex: 0 0 1px;\n background-color: var(--page-paper-main);\n`;\n\nStyledPill.displayName = \"StyledPill\";\nStyledPillArrow.displayName = \"StyledPillArrow\";\nStyledPillButton.displayName = \"StyledPillButton\";\nStyledPillLabel.displayName = \"StyledPillLabel\";\nStyledPillBadge.displayName = \"StyledPillBadge\";\nStyledPillDivider.displayName = \"StyledPillDivider\";\nStyledButtonGroup.displayName = \"StyledButtonGroup\";\nStyledSpan.displayName = \"StyledSpan\";\nStyledDiv.displayName = \"StyledDiv\";\nStyledMenu.displayName = \"StyledMenu\";\nStyledButton.displayName = \"StyledButton\";\nStyledControl.displayName = \"StyledControl\";\n"],"mappings":"AAAA,OAAOA,MAAM,IAAIC,GAAG,QAAQ,mBAAmB;AAG/C,SAASC,cAAc,QAAQ,sBAAsB;AACrD,SAASC,WAAW,QAAQ,mBAAmB;AAC/C,SAASC,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,IAAI,QAAQ,YAAY;AAEjC,OAAO,MAAMC,YAAY,GAAGP,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AG,mBAAmB;AACnDK,iBAAiB,CAACL,WAAW,GAAG,mBAAmB;AACnDM,UAAU,CAACN,WAAW,GAAG,YAAY;AACrCQ,SAAS,CAACR,WAAW,GAAG,WAAW;AACnCI,UAAU,CAACJ,WAAW,GAAG,YAAY;AACrCH,YAAY,CAACG,WAAW,GAAG,cAAc;AACzCc,aAAa,CAACd,WAAW,GAAG,eAAe","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stopwatch.d.ts","sourceRoot":"","sources":["../../../../src/components/Stopwatch/Stopwatch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Stopwatch.d.ts","sourceRoot":"","sources":["../../../../src/components/Stopwatch/Stopwatch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAiBxC,eAAO,MAAM,SAAS;;;CAwBrB,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
-
import classNames from "classnames";
|
|
3
2
|
import { StyledStopwatch, StyledStopwatchCenterWrapper, StyledTrigger } from "./Stopwatch.style";
|
|
4
3
|
import { EditableHours } from "../EditableHours";
|
|
5
4
|
import { IconButton } from "../IconButton";
|
|
@@ -8,17 +7,8 @@ export const Stopwatch = () => {
|
|
|
8
7
|
const _useState = useState(false),
|
|
9
8
|
isActive = _useState[0],
|
|
10
9
|
setIsActive = _useState[1];
|
|
11
|
-
return /*#__PURE__*/React.createElement(StyledStopwatch, {
|
|
12
|
-
|
|
13
|
-
"tw-bg-red-100": isActive,
|
|
14
|
-
"tw-bg-gray-100": !isActive
|
|
15
|
-
})
|
|
16
|
-
}, /*#__PURE__*/React.createElement(IconButton, {
|
|
17
|
-
onClick: () => setIsActive(!isActive),
|
|
18
|
-
className: classNames("tw-shadow-none hover:tw-shadow-none", {
|
|
19
|
-
"tw-bg-red-400 hover:bg-red-500": isActive,
|
|
20
|
-
"tw-bg-indigo-400 hover:bg-indigo-400": !isActive
|
|
21
|
-
})
|
|
10
|
+
return /*#__PURE__*/React.createElement(StyledStopwatch, null, /*#__PURE__*/React.createElement(IconButton, {
|
|
11
|
+
onClick: () => setIsActive(!isActive)
|
|
22
12
|
}, !isActive ? /*#__PURE__*/React.createElement(PlaySmallIcon, null) : /*#__PURE__*/React.createElement(PauseSmallIcon, null)), /*#__PURE__*/React.createElement(StyledStopwatchCenterWrapper, null, /*#__PURE__*/React.createElement(EditableHours, {
|
|
23
13
|
value: "00:00"
|
|
24
14
|
}), /*#__PURE__*/React.createElement(IconButton, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Stopwatch.js","names":["React","useState","
|
|
1
|
+
{"version":3,"file":"Stopwatch.js","names":["React","useState","StyledStopwatch","StyledStopwatchCenterWrapper","StyledTrigger","EditableHours","IconButton","CloseIcon","NoteIcon","PauseSmallIcon","PlaySmallIcon","UploadIcon","Stopwatch","_useState","isActive","setIsActive","createElement","onClick","value","size","variant","width","displayName"],"sources":["../../../../src/components/Stopwatch/Stopwatch.tsx"],"sourcesContent":["import React, { useState } from \"react\";\n\nimport {\n StyledStopwatch,\n StyledStopwatchCenterWrapper,\n StyledTrigger,\n} from \"./Stopwatch.style\";\nimport { EditableHours } from \"../EditableHours\";\nimport { IconButton } from \"../IconButton\";\nimport {\n CloseIcon,\n NoteIcon,\n PauseSmallIcon,\n PlaySmallIcon,\n UploadIcon,\n} from \"../Icons\";\n\nexport const Stopwatch = () => {\n const [isActive, setIsActive] = useState<boolean>(false);\n\n return (\n <StyledStopwatch>\n <IconButton onClick={() => setIsActive(!isActive)}>\n {!isActive ? <PlaySmallIcon /> : <PauseSmallIcon />}\n </IconButton>\n <StyledStopwatchCenterWrapper>\n <EditableHours value=\"00:00\" />\n <IconButton size=\"small\" variant=\"tertiary\">\n <NoteIcon width={20} />\n </IconButton>\n {true && (\n <IconButton size=\"small\" variant=\"tertiary\">\n <CloseIcon width={20} />\n </IconButton>\n )}\n </StyledStopwatchCenterWrapper>\n <StyledTrigger onClick={() => setIsActive(!isActive)}>\n <UploadIcon />\n </StyledTrigger>\n </StyledStopwatch>\n );\n};\n\nStopwatch.displayName = \"Stopwatch\";\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AAEvC,SACEC,eAAe,EACfC,4BAA4B,EAC5BC,aAAa,QACR,mBAAmB;AAC1B,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,UAAU,QAAQ,eAAe;AAC1C,SACEC,SAAS,EACTC,QAAQ,EACRC,cAAc,EACdC,aAAa,EACbC,UAAU,QACL,UAAU;AAEjB,OAAO,MAAMC,SAAS,GAAGA,CAAA,KAAM;EAC7B,MAAAC,SAAA,GAAgCZ,QAAQ,CAAU,KAAK,CAAC;IAAjDa,QAAQ,GAAAD,SAAA;IAAEE,WAAW,GAAAF,SAAA;EAE5B,oBACEb,KAAA,CAAAgB,aAAA,CAACd,eAAe,qBACdF,KAAA,CAAAgB,aAAA,CAACV,UAAU;IAACW,OAAO,EAAEA,CAAA,KAAMF,WAAW,CAAC,CAACD,QAAQ;EAAE,GAC/C,CAACA,QAAQ,gBAAGd,KAAA,CAAAgB,aAAA,CAACN,aAAa,MAAE,CAAC,gBAAGV,KAAA,CAAAgB,aAAA,CAACP,cAAc,MAAE,CACxC,CAAC,eACbT,KAAA,CAAAgB,aAAA,CAACb,4BAA4B,qBAC3BH,KAAA,CAAAgB,aAAA,CAACX,aAAa;IAACa,KAAK,EAAC;EAAO,CAAE,CAAC,eAC/BlB,KAAA,CAAAgB,aAAA,CAACV,UAAU;IAACa,IAAI,EAAC,OAAO;IAACC,OAAO,EAAC;EAAU,gBACzCpB,KAAA,CAAAgB,aAAA,CAACR,QAAQ;IAACa,KAAK,EAAE;EAAG,CAAE,CACZ,CAAC,EACZ,IAAI,iBACHrB,KAAA,CAAAgB,aAAA,CAACV,UAAU;IAACa,IAAI,EAAC,OAAO;IAACC,OAAO,EAAC;EAAU,gBACzCpB,KAAA,CAAAgB,aAAA,CAACT,SAAS;IAACc,KAAK,EAAE;EAAG,CAAE,CACb,CAEc,CAAC,eAC/BrB,KAAA,CAAAgB,aAAA,CAACZ,aAAa;IAACa,OAAO,EAAEA,CAAA,KAAMF,WAAW,CAAC,CAACD,QAAQ;EAAE,gBACnDd,KAAA,CAAAgB,aAAA,CAACL,UAAU,MAAE,CACA,CACA,CAAC;AAEtB,CAAC;AAEDC,SAAS,CAACU,WAAW,GAAG,WAAW","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Step.d.ts","sourceRoot":"","sources":["../../../../src/components/Wizard/Step.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,SAAS,EAAe,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Step.d.ts","sourceRoot":"","sources":["../../../../src/components/Wizard/Step.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,SAAS,EAAe,MAAM,OAAO,CAAC;AAY1D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAK9C,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mEAAmE;IACnE,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,KAAK,CA2E1B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useCallback } from "react";
|
|
2
2
|
import { StepActionButton } from "./StepActionButton";
|
|
3
|
-
import { StyledStepTitle, StyledStepHeaderLeft, StyledStepHeader, StyledCustomStep } from "./Styles";
|
|
3
|
+
import { StyledStepTitle, StyledStepHeaderLeft, StyledStepHeader, StyledCustomStep, StyledStepBackButton } from "./Styles";
|
|
4
4
|
import { Dialog } from "../Dialog";
|
|
5
5
|
import { useDialogClose } from "../Dialog/DialogContext";
|
|
6
6
|
import { IconButton } from "../IconButton";
|
|
@@ -34,10 +34,9 @@ export const Step = _ref => {
|
|
|
34
34
|
}
|
|
35
35
|
return onNextButtonClick && onNextButtonClick();
|
|
36
36
|
}, [isLast, onClose, onNextButtonClick]);
|
|
37
|
-
return !skip ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledStepHeader, null, /*#__PURE__*/React.createElement(StyledStepHeaderLeft, null, !disableBackButton && index && index > 0 ? /*#__PURE__*/React.createElement(
|
|
37
|
+
return !skip ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledStepHeader, null, /*#__PURE__*/React.createElement(StyledStepHeaderLeft, null, !disableBackButton && index && index > 0 ? /*#__PURE__*/React.createElement(StyledStepBackButton, {
|
|
38
38
|
onClick: onPreviousButtonClick,
|
|
39
39
|
variant: "text gray",
|
|
40
|
-
className: "tw--ml-3 tw-mr-2",
|
|
41
40
|
disabled: changingStepInProgress
|
|
42
41
|
}, /*#__PURE__*/React.createElement(ArrowBackMobileIcon, null)) : null, /*#__PURE__*/React.createElement(StyledStepTitle, null, /*#__PURE__*/React.createElement(Caption2, null, title), /*#__PURE__*/React.createElement(Header3, null, subtitle))), customRightHeader ? customRightHeader : /*#__PURE__*/React.createElement(IconButton, {
|
|
43
42
|
onClick: closeDialog,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Step.js","names":["React","useCallback","StepActionButton","StyledStepTitle","StyledStepHeaderLeft","StyledStepHeader","StyledCustomStep","Dialog","useDialogClose","IconButton","ArrowBackMobileIcon","CancelCrossIcon","Caption2","Header3","Step","_ref","index","isLast","subtitle","title","onNextButtonClick","onPreviousButtonClick","onClose","children","_ref$actionLabel","actionLabel","_ref$shouldRenderNext","shouldRenderNextButton","_ref$changingStepInPr","changingStepInProgress","_ref$disableBackButto","disableBackButton","customRightHeader","_ref$skip","skip","closeDialog","onActionButtonClick","createElement","Fragment","onClick","variant","
|
|
1
|
+
{"version":3,"file":"Step.js","names":["React","useCallback","StepActionButton","StyledStepTitle","StyledStepHeaderLeft","StyledStepHeader","StyledCustomStep","StyledStepBackButton","Dialog","useDialogClose","IconButton","ArrowBackMobileIcon","CancelCrossIcon","Caption2","Header3","Step","_ref","index","isLast","subtitle","title","onNextButtonClick","onPreviousButtonClick","onClose","children","_ref$actionLabel","actionLabel","_ref$shouldRenderNext","shouldRenderNextButton","_ref$changingStepInPr","changingStepInProgress","_ref$disableBackButto","disableBackButton","customRightHeader","_ref$skip","skip","closeDialog","onActionButtonClick","createElement","Fragment","onClick","variant","disabled","ContentDivider","Content","Actions","displayName"],"sources":["../../../../src/components/Wizard/Step.tsx"],"sourcesContent":["import React, { FC, ReactNode, useCallback } from \"react\";\n\nimport { StepActionButton } from \"./StepActionButton\";\nimport {\n StyledStepTitle,\n StyledStepHeaderLeft,\n StyledStepHeader,\n StyledCustomStep,\n StyledStepBackButton,\n} from \"./Styles\";\nimport { Dialog } from \"../Dialog\";\nimport { useDialogClose } from \"../Dialog/DialogContext\";\nimport { DialogSize } from \"../Dialog/Styles\";\nimport { IconButton } from \"../IconButton\";\nimport { ArrowBackMobileIcon, CancelCrossIcon } from \"../Icons\";\nimport { Caption2, Header3 } from \"../Typography\";\n\nexport interface IStep {\n index?: number;\n isLast?: boolean;\n subtitle: string;\n title?: string;\n onNextButtonClick?: () => void;\n onPreviousButtonClick?: () => void;\n onClose?: () => void;\n children: ReactNode;\n actionLabel?: string;\n shouldRenderNextButton?: boolean;\n changingStepInProgress?: boolean;\n disableBackButton?: boolean;\n customRightHeader?: ReactNode;\n skip?: boolean;\n /** Read by Wizard off the active step and passed to the dialog. */\n size?: DialogSize;\n height?: string;\n}\n\nexport const Step: FC<IStep> = ({\n index,\n isLast,\n subtitle,\n title,\n onNextButtonClick,\n onPreviousButtonClick,\n onClose,\n children,\n actionLabel = \"Proceed\",\n shouldRenderNextButton = true,\n changingStepInProgress = false,\n disableBackButton = false,\n customRightHeader,\n skip = false,\n}) => {\n // The close button goes through the dialog so the exit transition runs before the caller unmounts.\n const closeDialog = useDialogClose(onClose);\n\n const onActionButtonClick = useCallback(() => {\n if (isLast && onClose) {\n return onClose();\n }\n\n return onNextButtonClick && onNextButtonClick();\n }, [isLast, onClose, onNextButtonClick]);\n\n return !skip ? (\n <>\n <StyledStepHeader>\n <StyledStepHeaderLeft>\n {!disableBackButton && index && index > 0 ? (\n <StyledStepBackButton\n onClick={onPreviousButtonClick}\n variant=\"text gray\"\n disabled={changingStepInProgress}\n >\n <ArrowBackMobileIcon />\n </StyledStepBackButton>\n ) : null}\n <StyledStepTitle>\n <Caption2>{title}</Caption2>\n <Header3>{subtitle}</Header3>\n </StyledStepTitle>\n </StyledStepHeaderLeft>\n {customRightHeader ? (\n customRightHeader\n ) : (\n <IconButton\n onClick={closeDialog}\n variant=\"text gray\"\n disabled={changingStepInProgress}\n >\n <CancelCrossIcon />\n </IconButton>\n )}\n </StyledStepHeader>\n <Dialog.ContentDivider />\n {shouldRenderNextButton ? (\n <>\n <Dialog.Content>{children}</Dialog.Content>\n <Dialog.ContentDivider />\n <Dialog.Actions>\n <StepActionButton\n isLast={isLast}\n actionLabel={actionLabel}\n onNextButtonClick={onActionButtonClick}\n />\n </Dialog.Actions>\n </>\n ) : (\n <StyledCustomStep>{children}</StyledCustomStep>\n )}\n </>\n ) : null;\n};\n\nStep.displayName = \"Step\";\n"],"mappings":"AAAA,OAAOA,KAAK,IAAmBC,WAAW,QAAQ,OAAO;AAEzD,SAASC,gBAAgB,QAAQ,oBAAoB;AACrD,SACEC,eAAe,EACfC,oBAAoB,EACpBC,gBAAgB,EAChBC,gBAAgB,EAChBC,oBAAoB,QACf,UAAU;AACjB,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,cAAc,QAAQ,yBAAyB;AAExD,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,mBAAmB,EAAEC,eAAe,QAAQ,UAAU;AAC/D,SAASC,QAAQ,EAAEC,OAAO,QAAQ,eAAe;AAsBjD,OAAO,MAAMC,IAAe,GAAGC,IAAA,IAezB;EAAA,IAdJC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,MAAM,GAAAF,IAAA,CAANE,MAAM;IACNC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IACRC,KAAK,GAAAJ,IAAA,CAALI,KAAK;IACLC,iBAAiB,GAAAL,IAAA,CAAjBK,iBAAiB;IACjBC,qBAAqB,GAAAN,IAAA,CAArBM,qBAAqB;IACrBC,OAAO,GAAAP,IAAA,CAAPO,OAAO;IACPC,QAAQ,GAAAR,IAAA,CAARQ,QAAQ;IAAAC,gBAAA,GAAAT,IAAA,CACRU,WAAW;IAAXA,WAAW,GAAAD,gBAAA,cAAG,SAAS,GAAAA,gBAAA;IAAAE,qBAAA,GAAAX,IAAA,CACvBY,sBAAsB;IAAtBA,sBAAsB,GAAAD,qBAAA,cAAG,IAAI,GAAAA,qBAAA;IAAAE,qBAAA,GAAAb,IAAA,CAC7Bc,sBAAsB;IAAtBA,sBAAsB,GAAAD,qBAAA,cAAG,KAAK,GAAAA,qBAAA;IAAAE,qBAAA,GAAAf,IAAA,CAC9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,WAAY;IACrBK,OAAO,EAAC,WAAW;IACnBC,QAAQ,EAAEZ;EAAuB,gBAEjC9B,KAAA,CAAAsC,aAAA,CAAC1B,eAAe,MAAE,CACR,CAEE,CAAC,eACnBZ,KAAA,CAAAsC,aAAA,CAAC9B,MAAM,CAACmC,cAAc,MAAE,CAAC,EACxBf,sBAAsB,gBACrB5B,KAAA,CAAAsC,aAAA,CAAAtC,KAAA,CAAAuC,QAAA,qBACEvC,KAAA,CAAAsC,aAAA,CAAC9B,MAAM,CAACoC,OAAO,QAAEpB,QAAyB,CAAC,eAC3CxB,KAAA,CAAAsC,aAAA,CAAC9B,MAAM,CAACmC,cAAc,MAAE,CAAC,eACzB3C,KAAA,CAAAsC,aAAA,CAAC9B,MAAM,CAACqC,OAAO,qBACb7C,KAAA,CAAAsC,aAAA,CAACpC,gBAAgB;IACfgB,MAAM,EAAEA,MAAO;IACfQ,WAAW,EAAEA,WAAY;IACzBL,iBAAiB,EAAEgB;EAAoB,CACxC,CACa,CAChB,CAAC,gBAEHrC,KAAA,CAAAsC,aAAA,CAAChC,gBAAgB,QAAEkB,QAA2B,CAEhD,CAAC,GACD,IAAI;AACV,CAAC;AAEDT,IAAI,CAAC+B,WAAW,GAAG,MAAM","ignoreList":[]}
|
|
@@ -2,4 +2,7 @@ export declare const StyledStepHeader: import("styled-components").StyledCompone
|
|
|
2
2
|
export declare const StyledStepTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
3
|
export declare const StyledStepHeaderLeft: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
4
|
export declare const StyledCustomStep: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
+
export declare const StyledStepBackButton: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("..").IconButtonProps & {
|
|
6
|
+
children?: import("react").ReactNode | undefined;
|
|
7
|
+
} & import("react").RefAttributes<HTMLButtonElement>>, any, {}, never>;
|
|
5
8
|
//# sourceMappingURL=Styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Wizard/Styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Wizard/Styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB,oEAI5B,CAAC;AAEF,eAAO,MAAM,eAAe,oEAI3B,CAAC;AAEF,eAAO,MAAM,oBAAoB,oEAEhC,CAAC;AAIF,eAAO,MAAM,gBAAgB,oEAM5B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;sEAKhC,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
|
+
import { IconButton } from "../IconButton";
|
|
2
3
|
export const StyledStepHeader = styled.div.withConfig({
|
|
3
4
|
displayName: "Styles__StyledStepHeader",
|
|
4
5
|
componentId: "sc-88drbd-0"
|
|
@@ -18,4 +19,8 @@ export const StyledCustomStep = styled.div.withConfig({
|
|
|
18
19
|
displayName: "Styles__StyledCustomStep",
|
|
19
20
|
componentId: "sc-88drbd-3"
|
|
20
21
|
})(["display:flex;flex:1 1 auto;flex-direction:column;min-height:0;overflow:hidden;"]);
|
|
22
|
+
export const StyledStepBackButton = styled(IconButton).withConfig({
|
|
23
|
+
displayName: "Styles__StyledStepBackButton",
|
|
24
|
+
componentId: "sc-88drbd-4"
|
|
25
|
+
})(["&&{margin-left:-0.75rem;margin-right:0.5rem;}"]);
|
|
21
26
|
//# sourceMappingURL=Styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Styles.js","names":["styled","StyledStepHeader","div","withConfig","displayName","componentId","StyledStepTitle","StyledStepHeaderLeft","StyledCustomStep"],"sources":["../../../../src/components/Wizard/Styles.ts"],"sourcesContent":["import styled from \"styled-components\";\n\nexport const StyledStepHeader = styled.div`\n display: flex;\n padding: 12px 12px 12px 32px;\n justify-content: space-between;\n`;\n\nexport const StyledStepTitle = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n`;\n\nexport const StyledStepHeaderLeft = styled.div`\n display: flex;\n`;\n\n/* A step with its own footer holds Dialog.Content and Dialog.Actions, so it must\n fill the dialog and let the content scroll, not the step. */\nexport const StyledCustomStep = styled.div`\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n min-height: 0;\n overflow: hidden;\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AAEtC,OAAO,MAAMC,gBAAgB,
|
|
1
|
+
{"version":3,"file":"Styles.js","names":["styled","IconButton","StyledStepHeader","div","withConfig","displayName","componentId","StyledStepTitle","StyledStepHeaderLeft","StyledCustomStep","StyledStepBackButton"],"sources":["../../../../src/components/Wizard/Styles.ts"],"sourcesContent":["import styled from \"styled-components\";\n\nimport { IconButton } from \"../IconButton\";\n\nexport const StyledStepHeader = styled.div`\n display: flex;\n padding: 12px 12px 12px 32px;\n justify-content: space-between;\n`;\n\nexport const StyledStepTitle = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: center;\n`;\n\nexport const StyledStepHeaderLeft = styled.div`\n display: flex;\n`;\n\n/* A step with its own footer holds Dialog.Content and Dialog.Actions, so it must\n fill the dialog and let the content scroll, not the step. */\nexport const StyledCustomStep = styled.div`\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n min-height: 0;\n overflow: hidden;\n`;\n\nexport const StyledStepBackButton = styled(IconButton)`\n && {\n margin-left: -0.75rem;\n margin-right: 0.5rem;\n }\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AAEtC,SAASC,UAAU,QAAQ,eAAe;AAE1C,OAAO,MAAMC,gBAAgB,GAAGF,MAAM,CAACG,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,+EAIzC;AAED,OAAO,MAAMC,eAAe,GAAGP,MAAM,CAACG,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,kEAIxC;AAED,OAAO,MAAME,oBAAoB,GAAGR,MAAM,CAACG,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,qBAE7C;;AAED;AACA;AACA,OAAO,MAAMG,gBAAgB,GAAGT,MAAM,CAACG,GAAG,CAAAC,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,sFAMzC;AAED,OAAO,MAAMI,oBAAoB,GAAGV,MAAM,CAACC,UAAU,CAAC,CAAAG,UAAA;EAAAC,WAAA;EAAAC,WAAA;AAAA,qDAKrD","ignoreList":[]}
|
|
@@ -4,4 +4,11 @@ export declare const layers: {
|
|
|
4
4
|
tower: number;
|
|
5
5
|
house: number;
|
|
6
6
|
};
|
|
7
|
+
/** The layer in front: the last open window, or null when the page itself is in front. */
|
|
8
|
+
export declare const getTopLayer: () => HTMLElement | null;
|
|
9
|
+
/**
|
|
10
|
+
* True when the layer of the element is in front. A handler of a global shortcut asks this first, so the shortcut
|
|
11
|
+
* goes to the layer the user works in and never to a page or a window under it.
|
|
12
|
+
*/
|
|
13
|
+
export declare const isInTopLayer: (element: Element | null | undefined) => boolean;
|
|
7
14
|
//# sourceMappingURL=layers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layers.d.ts","sourceRoot":"","sources":["../../../src/utils/layers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;CAKlB,CAAC"}
|
|
1
|
+
{"version":3,"file":"layers.d.ts","sourceRoot":"","sources":["../../../src/utils/layers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;CAKlB,CAAC;AAIF,0FAA0F;AAC1F,eAAO,MAAM,WAAW,QAAO,WAAW,GAAG,IAI5C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,GAAI,SAAS,OAAO,GAAG,IAAI,GAAG,SAAS,YACK,CAAC"}
|
package/dist/esm/utils/layers.js
CHANGED
|
@@ -4,4 +4,17 @@ export const layers = {
|
|
|
4
4
|
tower: 1200,
|
|
5
5
|
house: 1000
|
|
6
6
|
};
|
|
7
|
+
const LAYER_SELECTOR = ".c-window";
|
|
8
|
+
|
|
9
|
+
/** The layer in front: the last open window, or null when the page itself is in front. */
|
|
10
|
+
export const getTopLayer = () => {
|
|
11
|
+
const windows = document.querySelectorAll(LAYER_SELECTOR);
|
|
12
|
+
return windows.length ? windows[windows.length - 1] : null;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* True when the layer of the element is in front. A handler of a global shortcut asks this first, so the shortcut
|
|
17
|
+
* goes to the layer the user works in and never to a page or a window under it.
|
|
18
|
+
*/
|
|
19
|
+
export const isInTopLayer = element => element ? element.closest(LAYER_SELECTOR) === getTopLayer() : false;
|
|
7
20
|
//# sourceMappingURL=layers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layers.js","names":["layers","cloud","skyscraper","tower","house"],"sources":["../../../src/utils/layers.ts"],"sourcesContent":["export const layers = {\n cloud: 100000,\n skyscraper: 1300,\n tower: 1200,\n house: 1000,\n};\n"],"mappings":"AAAA,OAAO,MAAMA,MAAM,GAAG;EACpBC,KAAK,EAAE,MAAM;EACbC,UAAU,EAAE,IAAI;EAChBC,KAAK,EAAE,IAAI;EACXC,KAAK,EAAE;AACT,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"layers.js","names":["layers","cloud","skyscraper","tower","house","LAYER_SELECTOR","getTopLayer","windows","document","querySelectorAll","length","isInTopLayer","element","closest"],"sources":["../../../src/utils/layers.ts"],"sourcesContent":["export const layers = {\n cloud: 100000,\n skyscraper: 1300,\n tower: 1200,\n house: 1000,\n};\n\nconst LAYER_SELECTOR = \".c-window\";\n\n/** The layer in front: the last open window, or null when the page itself is in front. */\nexport const getTopLayer = (): HTMLElement | null => {\n const windows = document.querySelectorAll<HTMLElement>(LAYER_SELECTOR);\n\n return windows.length ? windows[windows.length - 1] : null;\n};\n\n/**\n * True when the layer of the element is in front. A handler of a global shortcut asks this first, so the shortcut\n * goes to the layer the user works in and never to a page or a window under it.\n */\nexport const isInTopLayer = (element: Element | null | undefined) =>\n element ? element.closest(LAYER_SELECTOR) === getTopLayer() : false;\n"],"mappings":"AAAA,OAAO,MAAMA,MAAM,GAAG;EACpBC,KAAK,EAAE,MAAM;EACbC,UAAU,EAAE,IAAI;EAChBC,KAAK,EAAE,IAAI;EACXC,KAAK,EAAE;AACT,CAAC;AAED,MAAMC,cAAc,GAAG,WAAW;;AAElC;AACA,OAAO,MAAMC,WAAW,GAAGA,CAAA,KAA0B;EACnD,MAAMC,OAAO,GAAGC,QAAQ,CAACC,gBAAgB,CAAcJ,cAAc,CAAC;EAEtE,OAAOE,OAAO,CAACG,MAAM,GAAGH,OAAO,CAACA,OAAO,CAACG,MAAM,GAAG,CAAC,CAAC,GAAG,IAAI;AAC5D,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,GAAIC,OAAmC,IAC9DA,OAAO,GAAGA,OAAO,CAACC,OAAO,CAACR,cAAc,CAAC,KAAKC,WAAW,CAAC,CAAC,GAAG,KAAK","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layers.test.d.ts","sourceRoot":"","sources":["../../../src/utils/layers.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { getTopLayer, isInTopLayer } from "./layers";
|
|
2
|
+
const addWindow = () => {
|
|
3
|
+
const node = document.createElement("div");
|
|
4
|
+
node.className = "c-window";
|
|
5
|
+
document.body.appendChild(node);
|
|
6
|
+
return node;
|
|
7
|
+
};
|
|
8
|
+
describe("layers", () => {
|
|
9
|
+
afterEach(() => {
|
|
10
|
+
document.body.innerHTML = "";
|
|
11
|
+
});
|
|
12
|
+
it("has the page in front when no window is open", () => {
|
|
13
|
+
const onPage = document.body.appendChild(document.createElement("input"));
|
|
14
|
+
expect(getTopLayer()).toBeNull();
|
|
15
|
+
expect(isInTopLayer(onPage)).toBe(true);
|
|
16
|
+
});
|
|
17
|
+
it("has the last open window in front, and not the page or a window under it", () => {
|
|
18
|
+
const onPage = document.body.appendChild(document.createElement("input"));
|
|
19
|
+
const under = addWindow();
|
|
20
|
+
const inUnder = under.appendChild(document.createElement("input"));
|
|
21
|
+
const front = addWindow();
|
|
22
|
+
const inFront = front.appendChild(document.createElement("input"));
|
|
23
|
+
expect(getTopLayer()).toBe(front);
|
|
24
|
+
expect(isInTopLayer(inFront)).toBe(true);
|
|
25
|
+
expect(isInTopLayer(inUnder)).toBe(false);
|
|
26
|
+
expect(isInTopLayer(onPage)).toBe(false);
|
|
27
|
+
});
|
|
28
|
+
it("is false for no element", () => {
|
|
29
|
+
expect(isInTopLayer(null)).toBe(false);
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=layers.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layers.test.js","names":["getTopLayer","isInTopLayer","addWindow","node","document","createElement","className","body","appendChild","describe","afterEach","innerHTML","it","onPage","expect","toBeNull","toBe","under","inUnder","front","inFront"],"sources":["../../../src/utils/layers.test.ts"],"sourcesContent":["import { getTopLayer, isInTopLayer } from \"./layers\";\n\nconst addWindow = () => {\n const node = document.createElement(\"div\");\n node.className = \"c-window\";\n document.body.appendChild(node);\n\n return node;\n};\n\ndescribe(\"layers\", () => {\n afterEach(() => {\n document.body.innerHTML = \"\";\n });\n\n it(\"has the page in front when no window is open\", () => {\n const onPage = document.body.appendChild(document.createElement(\"input\"));\n\n expect(getTopLayer()).toBeNull();\n expect(isInTopLayer(onPage)).toBe(true);\n });\n\n it(\"has the last open window in front, and not the page or a window under it\", () => {\n const onPage = document.body.appendChild(document.createElement(\"input\"));\n const under = addWindow();\n const inUnder = under.appendChild(document.createElement(\"input\"));\n const front = addWindow();\n const inFront = front.appendChild(document.createElement(\"input\"));\n\n expect(getTopLayer()).toBe(front);\n expect(isInTopLayer(inFront)).toBe(true);\n expect(isInTopLayer(inUnder)).toBe(false);\n expect(isInTopLayer(onPage)).toBe(false);\n });\n\n it(\"is false for no element\", () => {\n expect(isInTopLayer(null)).toBe(false);\n });\n});\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,YAAY,QAAQ,UAAU;AAEpD,MAAMC,SAAS,GAAGA,CAAA,KAAM;EACtB,MAAMC,IAAI,GAAGC,QAAQ,CAACC,aAAa,CAAC,KAAK,CAAC;EAC1CF,IAAI,CAACG,SAAS,GAAG,UAAU;EAC3BF,QAAQ,CAACG,IAAI,CAACC,WAAW,CAACL,IAAI,CAAC;EAE/B,OAAOA,IAAI;AACb,CAAC;AAEDM,QAAQ,CAAC,QAAQ,EAAE,MAAM;EACvBC,SAAS,CAAC,MAAM;IACdN,QAAQ,CAACG,IAAI,CAACI,SAAS,GAAG,EAAE;EAC9B,CAAC,CAAC;EAEFC,EAAE,CAAC,8CAA8C,EAAE,MAAM;IACvD,MAAMC,MAAM,GAAGT,QAAQ,CAACG,IAAI,CAACC,WAAW,CAACJ,QAAQ,CAACC,aAAa,CAAC,OAAO,CAAC,CAAC;IAEzES,MAAM,CAACd,WAAW,CAAC,CAAC,CAAC,CAACe,QAAQ,CAAC,CAAC;IAChCD,MAAM,CAACb,YAAY,CAACY,MAAM,CAAC,CAAC,CAACG,IAAI,CAAC,IAAI,CAAC;EACzC,CAAC,CAAC;EAEFJ,EAAE,CAAC,0EAA0E,EAAE,MAAM;IACnF,MAAMC,MAAM,GAAGT,QAAQ,CAACG,IAAI,CAACC,WAAW,CAACJ,QAAQ,CAACC,aAAa,CAAC,OAAO,CAAC,CAAC;IACzE,MAAMY,KAAK,GAAGf,SAAS,CAAC,CAAC;IACzB,MAAMgB,OAAO,GAAGD,KAAK,CAACT,WAAW,CAACJ,QAAQ,CAACC,aAAa,CAAC,OAAO,CAAC,CAAC;IAClE,MAAMc,KAAK,GAAGjB,SAAS,CAAC,CAAC;IACzB,MAAMkB,OAAO,GAAGD,KAAK,C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