@guardian/stand 0.0.66 → 0.0.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/dist/SidebarStepperNavigation.cjs +7 -0
  2. package/dist/SidebarStepperNavigation.d.cts +5 -0
  3. package/dist/SidebarStepperNavigation.d.ts +5 -0
  4. package/dist/SidebarStepperNavigation.js +4 -0
  5. package/dist/_virtual/_rolldown/runtime.cjs +1 -1
  6. package/dist/components/Avatar/Avatar.cjs +4 -2
  7. package/dist/components/Avatar/Avatar.js +4 -2
  8. package/dist/components/AvatarButton/AvatarButton.cjs +2 -1
  9. package/dist/components/AvatarButton/AvatarButton.js +2 -1
  10. package/dist/components/AvatarLink/AvatarLink.cjs +2 -1
  11. package/dist/components/AvatarLink/AvatarLink.js +2 -1
  12. package/dist/components/Badge/Badge.cjs +2 -1
  13. package/dist/components/Badge/Badge.js +2 -1
  14. package/dist/components/Byline/Byline.cjs +4 -2
  15. package/dist/components/Byline/Byline.js +4 -2
  16. package/dist/components/Byline/Preview.cjs +13 -11
  17. package/dist/components/Byline/Preview.js +13 -11
  18. package/dist/components/Grid/Grid.cjs +4 -2
  19. package/dist/components/Grid/Grid.js +4 -2
  20. package/dist/components/HtmlPreviewLoader/styles.cjs +4 -3
  21. package/dist/components/HtmlPreviewLoader/styles.js +4 -3
  22. package/dist/components/Layout/Layout.cjs +4 -2
  23. package/dist/components/Layout/Layout.js +4 -2
  24. package/dist/components/Menu/Menu.cjs +4 -2
  25. package/dist/components/Menu/Menu.js +4 -2
  26. package/dist/components/Modal/Modal.cjs +6 -3
  27. package/dist/components/Modal/Modal.js +6 -3
  28. package/dist/components/SidebarStepperNavigation/SidebarStepperNavigation.cjs +161 -0
  29. package/dist/components/SidebarStepperNavigation/SidebarStepperNavigation.d.cts +5 -0
  30. package/dist/components/SidebarStepperNavigation/SidebarStepperNavigation.d.ts +5 -0
  31. package/dist/components/SidebarStepperNavigation/SidebarStepperNavigation.js +161 -0
  32. package/dist/components/SidebarStepperNavigation/styles.cjs +96 -0
  33. package/dist/components/SidebarStepperNavigation/styles.d.cts +8 -0
  34. package/dist/components/SidebarStepperNavigation/styles.d.ts +8 -0
  35. package/dist/components/SidebarStepperNavigation/styles.js +88 -0
  36. package/dist/components/SidebarStepperNavigation/types.cjs +9 -0
  37. package/dist/components/SidebarStepperNavigation/types.d.cts +26 -0
  38. package/dist/components/SidebarStepperNavigation/types.d.ts +26 -0
  39. package/dist/components/SidebarStepperNavigation/types.js +9 -0
  40. package/dist/components/Tabs/Tabs.cjs +2 -1
  41. package/dist/components/Tabs/Tabs.js +2 -1
  42. package/dist/components/TagPicker/styles.cjs +4 -2
  43. package/dist/components/TagPicker/styles.js +4 -2
  44. package/dist/components/TagTable/styles.cjs +2 -1
  45. package/dist/components/TagTable/styles.js +2 -1
  46. package/dist/components/TopBar/TopBarItem/TopBarItem.cjs +2 -1
  47. package/dist/components/TopBar/TopBarItem/TopBarItem.js +2 -1
  48. package/dist/components/Typography/Typography.cjs +2 -1
  49. package/dist/components/Typography/Typography.js +2 -1
  50. package/dist/components/Typography/types.d.cts +4 -2
  51. package/dist/components/Typography/types.d.ts +4 -2
  52. package/dist/index.cjs +2 -0
  53. package/dist/index.d.cts +2 -1
  54. package/dist/index.d.ts +2 -1
  55. package/dist/index.js +2 -1
  56. package/dist/styleD/build/css/component/sidebarStepperNavigation.css +51 -0
  57. package/dist/styleD/build/typescript/component/sidebarStepperNavigation.cjs +68 -0
  58. package/dist/styleD/build/typescript/component/sidebarStepperNavigation.d.cts +85 -0
  59. package/dist/styleD/build/typescript/component/sidebarStepperNavigation.d.ts +85 -0
  60. package/dist/styleD/build/typescript/component/sidebarStepperNavigation.js +68 -0
  61. package/dist/util/useId.cjs +16 -0
  62. package/dist/util/useId.js +14 -0
  63. package/package.json +34 -19
@@ -0,0 +1,161 @@
1
+ const require_mergeDeep = require("../../util/mergeDeep.cjs");
2
+ const require_Icon = require("../Icon/Icon.cjs");
3
+ const require_Typography = require("../Typography/Typography.cjs");
4
+ const require_useId = require("../../util/useId.cjs");
5
+ const require_styles = require("./styles.cjs");
6
+ let react = require("react");
7
+ let _emotion_react_jsx_runtime = require("@emotion/react/jsx-runtime");
8
+ let react_aria_components = require("react-aria-components");
9
+ //#region src/components/SidebarStepperNavigation/SidebarStepperNavigation.tsx
10
+ function StatusRow({ label, icon, iconColor, isDisabled, theme }) {
11
+ return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsxs)("div", {
12
+ css: require_styles.statusRowStyles(theme),
13
+ children: [/* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(require_Typography.Typography, {
14
+ variant: "bodySm",
15
+ element: "span",
16
+ theme: { color: isDisabled ? theme.statusRow.shared.text.disabledColor : theme.statusRow.shared.text.color },
17
+ children: label
18
+ }), /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(require_Icon.Icon, {
19
+ fill: isDisabled ? theme.statusRow.shared.text.disabledColor : iconColor,
20
+ size: "sm",
21
+ theme: { sm: { size: theme.statusRow.shared.icon.size } },
22
+ symbol: icon
23
+ })]
24
+ });
25
+ }
26
+ function CompletionCaption({ status, isDisabled, theme }) {
27
+ switch (status) {
28
+ case "no-fields": return null;
29
+ case "optional": return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(StatusRow, {
30
+ label: "Optional",
31
+ isDisabled,
32
+ iconColor: theme.statusRow.shared.icon.optionalColor,
33
+ icon: "circle",
34
+ theme
35
+ });
36
+ case "complete": return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(StatusRow, {
37
+ label: "Complete",
38
+ isDisabled,
39
+ iconColor: theme.statusRow.shared.icon.completeColor,
40
+ icon: "check_circle",
41
+ theme
42
+ });
43
+ case "incomplete": return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(StatusRow, {
44
+ label: "Incomplete",
45
+ isDisabled,
46
+ iconColor: theme.statusRow.shared.icon.incompleteColor,
47
+ icon: "warning",
48
+ theme
49
+ });
50
+ }
51
+ }
52
+ function buildStepAriaLabel(description, isCurrent, status) {
53
+ return [
54
+ description,
55
+ (() => {
56
+ switch (status) {
57
+ case "complete": return "complete";
58
+ case "incomplete": return "incomplete";
59
+ case "optional": return "optional";
60
+ default: return;
61
+ }
62
+ })(),
63
+ isCurrent ? "current step" : void 0
64
+ ].filter(Boolean).join(", ");
65
+ }
66
+ function getStepNumberColor(theme, isHovered, isCurrent, isDisabled) {
67
+ if (isHovered || isCurrent) return theme.step.shared.text.inverseColor;
68
+ if (isDisabled) return theme.step.shared.text.disabledColor;
69
+ return theme.step.shared.text.color;
70
+ }
71
+ function StepNumber({ stepNumber, isHovered, isCurrent, isDisabled, theme }) {
72
+ return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(require_Typography.Typography, {
73
+ element: "div",
74
+ theme: { color: getStepNumberColor(theme, isHovered, isCurrent, isDisabled) },
75
+ cssOverrides: require_styles.stepNumberStyles(theme, isHovered, isCurrent),
76
+ children: stepNumber
77
+ });
78
+ }
79
+ function Step({ isDisabled, isCurrent, stepNumber, stepStatus, onPress, ariaLabel, description, theme }) {
80
+ const descriptionTypographyColor = isCurrent || !isDisabled ? theme.step.shared.text.color : theme.step.shared.text.disabledColor;
81
+ return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(react_aria_components.Button, {
82
+ css: [require_styles.buttonStyleReset, require_styles.stepButtonStyles(theme, isCurrent, isDisabled)],
83
+ isDisabled,
84
+ "aria-label": ariaLabel,
85
+ "aria-current": isCurrent ? "step" : void 0,
86
+ onPress,
87
+ children: ({ isHovered }) => /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsxs)(_emotion_react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(StepNumber, {
88
+ stepNumber,
89
+ isHovered,
90
+ isCurrent,
91
+ isDisabled,
92
+ theme
93
+ }), /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsxs)("div", {
94
+ css: require_styles.stepContentStyles(theme),
95
+ children: [/* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(require_Typography.Typography, {
96
+ element: "div",
97
+ theme: { color: descriptionTypographyColor },
98
+ variant: "headingMd",
99
+ children: description
100
+ }), stepStatus !== void 0 && /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(CompletionCaption, {
101
+ status: stepStatus,
102
+ isDisabled: isDisabled && !isCurrent,
103
+ theme
104
+ })]
105
+ })] })
106
+ });
107
+ }
108
+ function SidebarStepperNavigation({ currentStepId, stepNavConfig, onPress, stepNavTitle = "Steps", theme = {}, cssOverrides, className }) {
109
+ const mergedTheme = require_mergeDeep.mergeDeep(require_styles.defaultSidebarStepperNavigationTheme, theme);
110
+ const [isOpen, setIsOpen] = (0, react.useState)(false);
111
+ const stepNavId = require_useId.useId("sidebar-stepper-navigation");
112
+ const currentStep = stepNavConfig.steps.find((step) => step.id === currentStepId);
113
+ const visibleSteps = stepNavConfig.steps.filter((step) => !step.parentStepId && step.stepVisible !== false);
114
+ const isCurrent = (step) => step.id === currentStep?.id || step.id === currentStep?.parentStepId;
115
+ const canNavigateTo = (step) => Boolean(!currentStep || currentStep.canSkipFrom && stepNavConfig.isNonLinear && step.canSkipTo && !isCurrent(step));
116
+ const currentStepLabel = currentStep?.label ?? currentStep?.id;
117
+ const mobileToggleLabel = currentStepLabel ? `${stepNavTitle} / ${currentStepLabel}` : stepNavTitle;
118
+ return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsxs)(_emotion_react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsxs)(react_aria_components.Button, {
119
+ onPress: () => setIsOpen((open) => !open),
120
+ "aria-expanded": isOpen,
121
+ "aria-controls": stepNavId,
122
+ css: [require_styles.buttonStyleReset, require_styles.mobileToggleStyles(mergedTheme)],
123
+ children: [/* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(require_Typography.Typography, {
124
+ element: "div",
125
+ variant: "bodyBoldSm",
126
+ children: mobileToggleLabel
127
+ }), /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(require_Icon.Icon, {
128
+ size: "md",
129
+ symbol: isOpen ? "keyboard_arrow_up" : "keyboard_arrow_down"
130
+ })]
131
+ }), /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("nav", {
132
+ css: [require_styles.navigationStyles(mergedTheme, isOpen), cssOverrides],
133
+ "aria-label": stepNavTitle,
134
+ id: stepNavId,
135
+ className,
136
+ children: /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("ol", {
137
+ css: require_styles.listStyles,
138
+ children: visibleSteps.map((step, index) => {
139
+ const stepStatus = step.stepStatus;
140
+ const description = step.label ?? step.id;
141
+ const stepIsCurrent = isCurrent(step);
142
+ const stepIsDisabled = !stepIsCurrent && !canNavigateTo(step);
143
+ const onStepPress = () => {
144
+ if (!stepIsDisabled && !stepIsCurrent) onPress(step.id);
145
+ };
146
+ return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(Step, {
147
+ isDisabled: stepIsDisabled,
148
+ onPress: onStepPress,
149
+ stepNumber: index + 1,
150
+ isCurrent: stepIsCurrent,
151
+ stepStatus,
152
+ theme: mergedTheme,
153
+ ariaLabel: buildStepAriaLabel(description, stepIsCurrent, stepStatus),
154
+ description
155
+ }) }, step.id);
156
+ })
157
+ })
158
+ })] });
159
+ }
160
+ //#endregion
161
+ exports.SidebarStepperNavigation = SidebarStepperNavigation;
@@ -0,0 +1,5 @@
1
+ import { SidebarStepperNavigationProps } from "./types.cjs";
2
+ //#region src/components/SidebarStepperNavigation/SidebarStepperNavigation.d.ts
3
+ declare function SidebarStepperNavigation({ currentStepId, stepNavConfig, onPress, stepNavTitle, theme, cssOverrides, className }: SidebarStepperNavigationProps): import("@emotion/react/jsx-runtime").JSX.Element;
4
+ //#endregion
5
+ export { SidebarStepperNavigation };
@@ -0,0 +1,5 @@
1
+ import { SidebarStepperNavigationProps } from "./types.js";
2
+ //#region src/components/SidebarStepperNavigation/SidebarStepperNavigation.d.ts
3
+ declare function SidebarStepperNavigation({ currentStepId, stepNavConfig, onPress, stepNavTitle, theme, cssOverrides, className }: SidebarStepperNavigationProps): import("@emotion/react/jsx-runtime").JSX.Element;
4
+ //#endregion
5
+ export { SidebarStepperNavigation };
@@ -0,0 +1,161 @@
1
+ import { mergeDeep } from "../../util/mergeDeep.js";
2
+ import { Icon } from "../Icon/Icon.js";
3
+ import { Typography } from "../Typography/Typography.js";
4
+ import { useId } from "../../util/useId.js";
5
+ import { buttonStyleReset, defaultSidebarStepperNavigationTheme, listStyles, mobileToggleStyles, navigationStyles, statusRowStyles, stepButtonStyles, stepContentStyles, stepNumberStyles } from "./styles.js";
6
+ import { useState } from "react";
7
+ import { Fragment, jsx, jsxs } from "@emotion/react/jsx-runtime";
8
+ import { Button } from "react-aria-components";
9
+ //#region src/components/SidebarStepperNavigation/SidebarStepperNavigation.tsx
10
+ function StatusRow({ label, icon, iconColor, isDisabled, theme }) {
11
+ return /* @__PURE__ */ jsxs("div", {
12
+ css: statusRowStyles(theme),
13
+ children: [/* @__PURE__ */ jsx(Typography, {
14
+ variant: "bodySm",
15
+ element: "span",
16
+ theme: { color: isDisabled ? theme.statusRow.shared.text.disabledColor : theme.statusRow.shared.text.color },
17
+ children: label
18
+ }), /* @__PURE__ */ jsx(Icon, {
19
+ fill: isDisabled ? theme.statusRow.shared.text.disabledColor : iconColor,
20
+ size: "sm",
21
+ theme: { sm: { size: theme.statusRow.shared.icon.size } },
22
+ symbol: icon
23
+ })]
24
+ });
25
+ }
26
+ function CompletionCaption({ status, isDisabled, theme }) {
27
+ switch (status) {
28
+ case "no-fields": return null;
29
+ case "optional": return /* @__PURE__ */ jsx(StatusRow, {
30
+ label: "Optional",
31
+ isDisabled,
32
+ iconColor: theme.statusRow.shared.icon.optionalColor,
33
+ icon: "circle",
34
+ theme
35
+ });
36
+ case "complete": return /* @__PURE__ */ jsx(StatusRow, {
37
+ label: "Complete",
38
+ isDisabled,
39
+ iconColor: theme.statusRow.shared.icon.completeColor,
40
+ icon: "check_circle",
41
+ theme
42
+ });
43
+ case "incomplete": return /* @__PURE__ */ jsx(StatusRow, {
44
+ label: "Incomplete",
45
+ isDisabled,
46
+ iconColor: theme.statusRow.shared.icon.incompleteColor,
47
+ icon: "warning",
48
+ theme
49
+ });
50
+ }
51
+ }
52
+ function buildStepAriaLabel(description, isCurrent, status) {
53
+ return [
54
+ description,
55
+ (() => {
56
+ switch (status) {
57
+ case "complete": return "complete";
58
+ case "incomplete": return "incomplete";
59
+ case "optional": return "optional";
60
+ default: return;
61
+ }
62
+ })(),
63
+ isCurrent ? "current step" : void 0
64
+ ].filter(Boolean).join(", ");
65
+ }
66
+ function getStepNumberColor(theme, isHovered, isCurrent, isDisabled) {
67
+ if (isHovered || isCurrent) return theme.step.shared.text.inverseColor;
68
+ if (isDisabled) return theme.step.shared.text.disabledColor;
69
+ return theme.step.shared.text.color;
70
+ }
71
+ function StepNumber({ stepNumber, isHovered, isCurrent, isDisabled, theme }) {
72
+ return /* @__PURE__ */ jsx(Typography, {
73
+ element: "div",
74
+ theme: { color: getStepNumberColor(theme, isHovered, isCurrent, isDisabled) },
75
+ cssOverrides: stepNumberStyles(theme, isHovered, isCurrent),
76
+ children: stepNumber
77
+ });
78
+ }
79
+ function Step({ isDisabled, isCurrent, stepNumber, stepStatus, onPress, ariaLabel, description, theme }) {
80
+ const descriptionTypographyColor = isCurrent || !isDisabled ? theme.step.shared.text.color : theme.step.shared.text.disabledColor;
81
+ return /* @__PURE__ */ jsx(Button, {
82
+ css: [buttonStyleReset, stepButtonStyles(theme, isCurrent, isDisabled)],
83
+ isDisabled,
84
+ "aria-label": ariaLabel,
85
+ "aria-current": isCurrent ? "step" : void 0,
86
+ onPress,
87
+ children: ({ isHovered }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(StepNumber, {
88
+ stepNumber,
89
+ isHovered,
90
+ isCurrent,
91
+ isDisabled,
92
+ theme
93
+ }), /* @__PURE__ */ jsxs("div", {
94
+ css: stepContentStyles(theme),
95
+ children: [/* @__PURE__ */ jsx(Typography, {
96
+ element: "div",
97
+ theme: { color: descriptionTypographyColor },
98
+ variant: "headingMd",
99
+ children: description
100
+ }), stepStatus !== void 0 && /* @__PURE__ */ jsx(CompletionCaption, {
101
+ status: stepStatus,
102
+ isDisabled: isDisabled && !isCurrent,
103
+ theme
104
+ })]
105
+ })] })
106
+ });
107
+ }
108
+ function SidebarStepperNavigation({ currentStepId, stepNavConfig, onPress, stepNavTitle = "Steps", theme = {}, cssOverrides, className }) {
109
+ const mergedTheme = mergeDeep(defaultSidebarStepperNavigationTheme, theme);
110
+ const [isOpen, setIsOpen] = useState(false);
111
+ const stepNavId = useId("sidebar-stepper-navigation");
112
+ const currentStep = stepNavConfig.steps.find((step) => step.id === currentStepId);
113
+ const visibleSteps = stepNavConfig.steps.filter((step) => !step.parentStepId && step.stepVisible !== false);
114
+ const isCurrent = (step) => step.id === currentStep?.id || step.id === currentStep?.parentStepId;
115
+ const canNavigateTo = (step) => Boolean(!currentStep || currentStep.canSkipFrom && stepNavConfig.isNonLinear && step.canSkipTo && !isCurrent(step));
116
+ const currentStepLabel = currentStep?.label ?? currentStep?.id;
117
+ const mobileToggleLabel = currentStepLabel ? `${stepNavTitle} / ${currentStepLabel}` : stepNavTitle;
118
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(Button, {
119
+ onPress: () => setIsOpen((open) => !open),
120
+ "aria-expanded": isOpen,
121
+ "aria-controls": stepNavId,
122
+ css: [buttonStyleReset, mobileToggleStyles(mergedTheme)],
123
+ children: [/* @__PURE__ */ jsx(Typography, {
124
+ element: "div",
125
+ variant: "bodyBoldSm",
126
+ children: mobileToggleLabel
127
+ }), /* @__PURE__ */ jsx(Icon, {
128
+ size: "md",
129
+ symbol: isOpen ? "keyboard_arrow_up" : "keyboard_arrow_down"
130
+ })]
131
+ }), /* @__PURE__ */ jsx("nav", {
132
+ css: [navigationStyles(mergedTheme, isOpen), cssOverrides],
133
+ "aria-label": stepNavTitle,
134
+ id: stepNavId,
135
+ className,
136
+ children: /* @__PURE__ */ jsx("ol", {
137
+ css: listStyles,
138
+ children: visibleSteps.map((step, index) => {
139
+ const stepStatus = step.stepStatus;
140
+ const description = step.label ?? step.id;
141
+ const stepIsCurrent = isCurrent(step);
142
+ const stepIsDisabled = !stepIsCurrent && !canNavigateTo(step);
143
+ const onStepPress = () => {
144
+ if (!stepIsDisabled && !stepIsCurrent) onPress(step.id);
145
+ };
146
+ return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(Step, {
147
+ isDisabled: stepIsDisabled,
148
+ onPress: onStepPress,
149
+ stepNumber: index + 1,
150
+ isCurrent: stepIsCurrent,
151
+ stepStatus,
152
+ theme: mergedTheme,
153
+ ariaLabel: buildStepAriaLabel(description, stepIsCurrent, stepStatus),
154
+ description
155
+ }) }, step.id);
156
+ })
157
+ })
158
+ })] });
159
+ }
160
+ //#endregion
161
+ export { SidebarStepperNavigation };
@@ -0,0 +1,96 @@
1
+ const require_mq = require("../../styleD/utils/semantic/mq.cjs");
2
+ const require_sidebarStepperNavigation = require("../../styleD/build/typescript/component/sidebarStepperNavigation.cjs");
3
+ let _emotion_react = require("@emotion/react");
4
+ //#region src/components/SidebarStepperNavigation/styles.ts
5
+ const defaultSidebarStepperNavigationTheme = require_sidebarStepperNavigation.componentSidebarStepperNavigation;
6
+ const buttonStyleReset = _emotion_react.css`
7
+ appearance: none;
8
+ -webkit-appearance: none;
9
+ background-color: transparent;
10
+ font: inherit;
11
+ color: inherit;
12
+ border: none;
13
+ padding: 0;
14
+ margin: 0;
15
+ `;
16
+ const mobileToggleStyles = (theme) => _emotion_react.css`
17
+ border-bottom: ${theme.mobileToggle.shared.border};
18
+ display: ${theme.mobileToggle.shared.display};
19
+ align-items: ${theme.mobileToggle.shared.alignItems};
20
+ justify-content: ${theme.mobileToggle.shared.justifyContent};
21
+ height: ${theme.mobileToggle.shared.height};
22
+ padding: 0 ${theme.mobileToggle.shared.paddingInline};
23
+ width: ${theme.mobileToggle.shared.width};
24
+ background-color: ${theme.mobileToggle.shared.backgroundColor};
25
+
26
+ ${require_mq.from.md} {
27
+ display: none;
28
+ }
29
+
30
+ &[data-hovered] {
31
+ background-color: ${theme.mobileToggle.shared.hovered.backgroundColor};
32
+ }
33
+
34
+ &[data-pressed] {
35
+ background-color: ${theme.mobileToggle.shared.pressed.backgroundColor};
36
+ }
37
+ `;
38
+ const navigationStyles = (theme, isOpen) => _emotion_react.css`
39
+ border-right: ${theme.navigation.shared.border};
40
+ display: ${isOpen ? "flex" : "none"};
41
+ flex-direction: ${theme.navigation.shared.flexDirection};
42
+ height: ${theme.navigation.shared.height};
43
+
44
+ ${require_mq.from.md} {
45
+ display: flex;
46
+ }
47
+ `;
48
+ const listStyles = _emotion_react.css`
49
+ list-style: none;
50
+ padding: 0;
51
+ margin: 0;
52
+ `;
53
+ const statusRowStyles = (theme) => _emotion_react.css`
54
+ display: ${theme.statusRow.shared.display};
55
+ gap: ${theme.statusRow.shared.gap};
56
+ align-items: ${theme.statusRow.shared.alignItems};
57
+ `;
58
+ const stepNumberStyles = (theme, isHovered, isCurrent) => _emotion_react.css`
59
+ width: ${theme.step.shared.numberColumnWidth};
60
+ height: ${theme.stepNumber.shared.height};
61
+ background-color: ${isCurrent || isHovered ? theme.stepNumber.shared.backgroundColor : "transparent"};
62
+ display: ${theme.stepNumber.shared.display};
63
+ align-items: ${theme.stepNumber.shared.alignItems};
64
+ justify-content: ${theme.stepNumber.shared.justifyContent};
65
+ `;
66
+ const stepButtonStyles = (theme, isCurrent, isDisabled) => _emotion_react.css`
67
+ background-color: ${isCurrent ? theme.step.shared.currentBackgroundColor : theme.step.shared.backgroundColor};
68
+ height: ${theme.step.shared.height};
69
+ cursor: ${isDisabled ? theme.step.shared.disabledCursor : theme.step.shared.cursor};
70
+ border-bottom: ${theme.step.shared.border};
71
+ display: grid;
72
+ grid-template-columns: ${theme.step.shared.numberColumnWidth} 1fr;
73
+ text-align: left;
74
+ width: 100%;
75
+
76
+ &[data-pressed] {
77
+ background-color: ${theme.step.shared.currentBackgroundColor};
78
+ }
79
+ `;
80
+ const stepContentStyles = (theme) => _emotion_react.css`
81
+ gap: ${theme.stepContent.shared.gap};
82
+ display: ${theme.stepContent.shared.display};
83
+ flex-direction: ${theme.stepContent.shared.flexDirection};
84
+ justify-content: ${theme.stepContent.shared.justifyContent};
85
+ margin-left: ${theme.stepContent.shared.marginLeft};
86
+ `;
87
+ //#endregion
88
+ exports.buttonStyleReset = buttonStyleReset;
89
+ exports.defaultSidebarStepperNavigationTheme = defaultSidebarStepperNavigationTheme;
90
+ exports.listStyles = listStyles;
91
+ exports.mobileToggleStyles = mobileToggleStyles;
92
+ exports.navigationStyles = navigationStyles;
93
+ exports.statusRowStyles = statusRowStyles;
94
+ exports.stepButtonStyles = stepButtonStyles;
95
+ exports.stepContentStyles = stepContentStyles;
96
+ exports.stepNumberStyles = stepNumberStyles;
@@ -0,0 +1,8 @@
1
+ import { DeepPartial, Prettify } from "../../util/types.cjs";
2
+ import { ComponentSidebarStepperNavigation } from "../../styleD/build/typescript/component/sidebarStepperNavigation.cjs";
3
+ import { SerializedStyles } from "@emotion/react";
4
+ //#region src/components/SidebarStepperNavigation/styles.d.ts
5
+ type SidebarStepperNavigationTheme = Prettify<ComponentSidebarStepperNavigation>;
6
+ type PartialSidebarStepperNavigationTheme = Prettify<DeepPartial<SidebarStepperNavigationTheme>>;
7
+ //#endregion
8
+ export { PartialSidebarStepperNavigationTheme, SidebarStepperNavigationTheme };
@@ -0,0 +1,8 @@
1
+ import { DeepPartial, Prettify } from "../../util/types.js";
2
+ import { ComponentSidebarStepperNavigation } from "../../styleD/build/typescript/component/sidebarStepperNavigation.js";
3
+ import { SerializedStyles } from "@emotion/react";
4
+ //#region src/components/SidebarStepperNavigation/styles.d.ts
5
+ type SidebarStepperNavigationTheme = Prettify<ComponentSidebarStepperNavigation>;
6
+ type PartialSidebarStepperNavigationTheme = Prettify<DeepPartial<SidebarStepperNavigationTheme>>;
7
+ //#endregion
8
+ export { PartialSidebarStepperNavigationTheme, SidebarStepperNavigationTheme };
@@ -0,0 +1,88 @@
1
+ import { from } from "../../styleD/utils/semantic/mq.js";
2
+ import { componentSidebarStepperNavigation } from "../../styleD/build/typescript/component/sidebarStepperNavigation.js";
3
+ import { css } from "@emotion/react";
4
+ //#region src/components/SidebarStepperNavigation/styles.ts
5
+ const defaultSidebarStepperNavigationTheme = componentSidebarStepperNavigation;
6
+ const buttonStyleReset = css`
7
+ appearance: none;
8
+ -webkit-appearance: none;
9
+ background-color: transparent;
10
+ font: inherit;
11
+ color: inherit;
12
+ border: none;
13
+ padding: 0;
14
+ margin: 0;
15
+ `;
16
+ const mobileToggleStyles = (theme) => css`
17
+ border-bottom: ${theme.mobileToggle.shared.border};
18
+ display: ${theme.mobileToggle.shared.display};
19
+ align-items: ${theme.mobileToggle.shared.alignItems};
20
+ justify-content: ${theme.mobileToggle.shared.justifyContent};
21
+ height: ${theme.mobileToggle.shared.height};
22
+ padding: 0 ${theme.mobileToggle.shared.paddingInline};
23
+ width: ${theme.mobileToggle.shared.width};
24
+ background-color: ${theme.mobileToggle.shared.backgroundColor};
25
+
26
+ ${from.md} {
27
+ display: none;
28
+ }
29
+
30
+ &[data-hovered] {
31
+ background-color: ${theme.mobileToggle.shared.hovered.backgroundColor};
32
+ }
33
+
34
+ &[data-pressed] {
35
+ background-color: ${theme.mobileToggle.shared.pressed.backgroundColor};
36
+ }
37
+ `;
38
+ const navigationStyles = (theme, isOpen) => css`
39
+ border-right: ${theme.navigation.shared.border};
40
+ display: ${isOpen ? "flex" : "none"};
41
+ flex-direction: ${theme.navigation.shared.flexDirection};
42
+ height: ${theme.navigation.shared.height};
43
+
44
+ ${from.md} {
45
+ display: flex;
46
+ }
47
+ `;
48
+ const listStyles = css`
49
+ list-style: none;
50
+ padding: 0;
51
+ margin: 0;
52
+ `;
53
+ const statusRowStyles = (theme) => css`
54
+ display: ${theme.statusRow.shared.display};
55
+ gap: ${theme.statusRow.shared.gap};
56
+ align-items: ${theme.statusRow.shared.alignItems};
57
+ `;
58
+ const stepNumberStyles = (theme, isHovered, isCurrent) => css`
59
+ width: ${theme.step.shared.numberColumnWidth};
60
+ height: ${theme.stepNumber.shared.height};
61
+ background-color: ${isCurrent || isHovered ? theme.stepNumber.shared.backgroundColor : "transparent"};
62
+ display: ${theme.stepNumber.shared.display};
63
+ align-items: ${theme.stepNumber.shared.alignItems};
64
+ justify-content: ${theme.stepNumber.shared.justifyContent};
65
+ `;
66
+ const stepButtonStyles = (theme, isCurrent, isDisabled) => css`
67
+ background-color: ${isCurrent ? theme.step.shared.currentBackgroundColor : theme.step.shared.backgroundColor};
68
+ height: ${theme.step.shared.height};
69
+ cursor: ${isDisabled ? theme.step.shared.disabledCursor : theme.step.shared.cursor};
70
+ border-bottom: ${theme.step.shared.border};
71
+ display: grid;
72
+ grid-template-columns: ${theme.step.shared.numberColumnWidth} 1fr;
73
+ text-align: left;
74
+ width: 100%;
75
+
76
+ &[data-pressed] {
77
+ background-color: ${theme.step.shared.currentBackgroundColor};
78
+ }
79
+ `;
80
+ const stepContentStyles = (theme) => css`
81
+ gap: ${theme.stepContent.shared.gap};
82
+ display: ${theme.stepContent.shared.display};
83
+ flex-direction: ${theme.stepContent.shared.flexDirection};
84
+ justify-content: ${theme.stepContent.shared.justifyContent};
85
+ margin-left: ${theme.stepContent.shared.marginLeft};
86
+ `;
87
+ //#endregion
88
+ export { buttonStyleReset, defaultSidebarStepperNavigationTheme, listStyles, mobileToggleStyles, navigationStyles, statusRowStyles, stepButtonStyles, stepContentStyles, stepNumberStyles };
@@ -0,0 +1,9 @@
1
+ //#region src/components/SidebarStepperNavigation/types.ts
2
+ const StepStatus = [
3
+ "complete",
4
+ "incomplete",
5
+ "optional",
6
+ "no-fields"
7
+ ];
8
+ //#endregion
9
+ exports.StepStatus = StepStatus;
@@ -0,0 +1,26 @@
1
+ import { DefaultProps } from "../../util/types.cjs";
2
+ import { SidebarStepperNavigationTheme } from "./styles.cjs";
3
+ //#region src/components/SidebarStepperNavigation/types.d.ts
4
+ declare const StepStatus: readonly ["complete", "incomplete", "optional", "no-fields"];
5
+ type StepStatus = (typeof StepStatus)[number];
6
+ type StepNavStep = {
7
+ id: string;
8
+ label?: string;
9
+ parentStepId?: string;
10
+ canSkipTo?: boolean;
11
+ canSkipFrom?: boolean;
12
+ stepStatus?: StepStatus;
13
+ stepVisible?: boolean;
14
+ };
15
+ type StepNavConfig = {
16
+ steps: StepNavStep[];
17
+ isNonLinear: boolean;
18
+ };
19
+ interface SidebarStepperNavigationProps extends DefaultProps<SidebarStepperNavigationTheme> {
20
+ currentStepId?: string;
21
+ stepNavConfig: StepNavConfig;
22
+ onPress: (stepId: string) => void;
23
+ stepNavTitle?: string;
24
+ }
25
+ //#endregion
26
+ export { SidebarStepperNavigationProps, StepNavConfig, StepNavStep, StepStatus };
@@ -0,0 +1,26 @@
1
+ import { DefaultProps } from "../../util/types.js";
2
+ import { SidebarStepperNavigationTheme } from "./styles.js";
3
+ //#region src/components/SidebarStepperNavigation/types.d.ts
4
+ declare const StepStatus: readonly ["complete", "incomplete", "optional", "no-fields"];
5
+ type StepStatus = (typeof StepStatus)[number];
6
+ type StepNavStep = {
7
+ id: string;
8
+ label?: string;
9
+ parentStepId?: string;
10
+ canSkipTo?: boolean;
11
+ canSkipFrom?: boolean;
12
+ stepStatus?: StepStatus;
13
+ stepVisible?: boolean;
14
+ };
15
+ type StepNavConfig = {
16
+ steps: StepNavStep[];
17
+ isNonLinear: boolean;
18
+ };
19
+ interface SidebarStepperNavigationProps extends DefaultProps<SidebarStepperNavigationTheme> {
20
+ currentStepId?: string;
21
+ stepNavConfig: StepNavConfig;
22
+ onPress: (stepId: string) => void;
23
+ stepNavTitle?: string;
24
+ }
25
+ //#endregion
26
+ export { SidebarStepperNavigationProps, StepNavConfig, StepNavStep, StepStatus };
@@ -0,0 +1,9 @@
1
+ //#region src/components/SidebarStepperNavigation/types.ts
2
+ const StepStatus = [
3
+ "complete",
4
+ "incomplete",
5
+ "optional",
6
+ "no-fields"
7
+ ];
8
+ //#endregion
9
+ export { StepStatus };
@@ -72,8 +72,9 @@ function TabPanels({ children, theme = {}, cssOverrides, ...props }) {
72
72
  });
73
73
  }
74
74
  function TabPanel({ children, theme = {}, cssOverrides, ...props }) {
75
+ const mergedTheme = require_mergeDeep.mergeDeep(require_styles.defaultTabPanelTheme, theme);
75
76
  return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(react_aria_components.TabPanel, {
76
- css: [require_styles.tabPanelStyles(require_mergeDeep.mergeDeep(require_styles.defaultTabPanelTheme, theme)), cssOverrides],
77
+ css: [require_styles.tabPanelStyles(mergedTheme), cssOverrides],
77
78
  ...props,
78
79
  children
79
80
  });
@@ -70,8 +70,9 @@ function TabPanels$1({ children, theme = {}, cssOverrides, ...props }) {
70
70
  });
71
71
  }
72
72
  function TabPanel$1({ children, theme = {}, cssOverrides, ...props }) {
73
+ const mergedTheme = mergeDeep(defaultTabPanelTheme, theme);
73
74
  return /* @__PURE__ */ jsx(TabPanel, {
74
- css: [tabPanelStyles(mergeDeep(defaultTabPanelTheme, theme)), cssOverrides],
75
+ css: [tabPanelStyles(mergedTheme), cssOverrides],
75
76
  ...props,
76
77
  children
77
78
  });
@@ -94,10 +94,11 @@ const tagPickerStyles = (partialTheme = {}) => {
94
94
  `;
95
95
  };
96
96
  const offlineSectionStyles = (partialTheme = {}) => {
97
+ const theme = require_mergeDeep.mergeDeep(require_tagPicker.componentTagPicker, partialTheme);
97
98
  return _emotion_react.css`
98
99
  display: flex;
99
100
  flex-direction: column;
100
- gap: ${require_mergeDeep.mergeDeep(require_tagPicker.componentTagPicker, partialTheme).offlineSection.gap};
101
+ gap: ${theme.offlineSection.gap};
101
102
  `;
102
103
  };
103
104
  const tagSearchWithFilterStyles = (partialTheme = {}) => {
@@ -109,8 +110,9 @@ const tagSearchWithFilterStyles = (partialTheme = {}) => {
109
110
  `;
110
111
  };
111
112
  const filterSelectCssOverrides = (partialTheme = {}) => {
113
+ const theme = require_mergeDeep.mergeDeep(require_tagPicker.componentTagPicker, partialTheme);
112
114
  return _emotion_react.css`
113
- flex-basis: ${require_mergeDeep.mergeDeep(require_tagPicker.componentTagPicker, partialTheme).select.flexBasis};
115
+ flex-basis: ${theme.select.flexBasis};
114
116
  display: flex;
115
117
  button {
116
118
  height: 100%;