@guardian/stand 0.0.71 → 0.0.72

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 (43) hide show
  1. package/dist/ToggleSwitch.cjs +5 -0
  2. package/dist/ToggleSwitch.d.cts +5 -0
  3. package/dist/ToggleSwitch.d.ts +5 -0
  4. package/dist/ToggleSwitch.js +3 -0
  5. package/dist/components/ToggleSwitch/ToggleSwitch.cjs +41 -0
  6. package/dist/components/ToggleSwitch/ToggleSwitch.d.cts +5 -0
  7. package/dist/components/ToggleSwitch/ToggleSwitch.d.ts +5 -0
  8. package/dist/components/ToggleSwitch/ToggleSwitch.js +41 -0
  9. package/dist/components/ToggleSwitch/styles.cjs +70 -0
  10. package/dist/components/ToggleSwitch/styles.d.cts +10 -0
  11. package/dist/components/ToggleSwitch/styles.d.ts +10 -0
  12. package/dist/components/ToggleSwitch/styles.js +64 -0
  13. package/dist/components/ToggleSwitch/types.d.cts +17 -0
  14. package/dist/components/ToggleSwitch/types.d.ts +17 -0
  15. package/dist/index.cjs +2 -0
  16. package/dist/index.d.cts +2 -1
  17. package/dist/index.d.ts +2 -1
  18. package/dist/index.js +2 -1
  19. package/dist/styleD/build/css/component/checkbox.css +1 -1
  20. package/dist/styleD/build/css/component/radioGroup.css +1 -1
  21. package/dist/styleD/build/css/component/sidebarStepperNavigation.css +1 -1
  22. package/dist/styleD/build/css/component/toggleSwitch.css +55 -0
  23. package/dist/styleD/build/css/semantic/colors.css +15 -3
  24. package/dist/styleD/build/css/semantic/sizing.css +1 -0
  25. package/dist/styleD/build/typescript/component/checkbox.cjs +1 -1
  26. package/dist/styleD/build/typescript/component/checkbox.js +1 -1
  27. package/dist/styleD/build/typescript/component/radioGroup.cjs +1 -1
  28. package/dist/styleD/build/typescript/component/radioGroup.js +1 -1
  29. package/dist/styleD/build/typescript/component/sidebarStepperNavigation.cjs +1 -1
  30. package/dist/styleD/build/typescript/component/sidebarStepperNavigation.js +1 -1
  31. package/dist/styleD/build/typescript/component/toggleSwitch.cjs +86 -0
  32. package/dist/styleD/build/typescript/component/toggleSwitch.d.cts +93 -0
  33. package/dist/styleD/build/typescript/component/toggleSwitch.d.ts +93 -0
  34. package/dist/styleD/build/typescript/component/toggleSwitch.js +86 -0
  35. package/dist/styleD/build/typescript/semantic/colors.cjs +16 -4
  36. package/dist/styleD/build/typescript/semantic/colors.d.cts +15 -3
  37. package/dist/styleD/build/typescript/semantic/colors.d.ts +15 -3
  38. package/dist/styleD/build/typescript/semantic/colors.js +16 -4
  39. package/dist/styleD/build/typescript/semantic/sizing.cjs +1 -0
  40. package/dist/styleD/build/typescript/semantic/sizing.d.cts +1 -0
  41. package/dist/styleD/build/typescript/semantic/sizing.d.ts +1 -0
  42. package/dist/styleD/build/typescript/semantic/sizing.js +1 -0
  43. package/package.json +15 -1
@@ -0,0 +1,5 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_toggleSwitch = require("./styleD/build/typescript/component/toggleSwitch.cjs");
3
+ const require_ToggleSwitch = require("./components/ToggleSwitch/ToggleSwitch.cjs");
4
+ exports.ToggleSwitch = require_ToggleSwitch.ToggleSwitch;
5
+ exports.componentToggleSwitch = require_toggleSwitch.componentToggleSwitch;
@@ -0,0 +1,5 @@
1
+ import { ComponentToggleSwitch, componentToggleSwitch } from "./styleD/build/typescript/component/toggleSwitch.cjs";
2
+ import { PartialToggleSwitchTheme } from "./components/ToggleSwitch/styles.cjs";
3
+ import { ToggleSwitchProps } from "./components/ToggleSwitch/types.cjs";
4
+ import { ToggleSwitch } from "./components/ToggleSwitch/ToggleSwitch.cjs";
5
+ export { type ComponentToggleSwitch, ToggleSwitch, type ToggleSwitchProps, type PartialToggleSwitchTheme as ToggleSwitchTheme, componentToggleSwitch };
@@ -0,0 +1,5 @@
1
+ import { ComponentToggleSwitch, componentToggleSwitch } from "./styleD/build/typescript/component/toggleSwitch.js";
2
+ import { PartialToggleSwitchTheme } from "./components/ToggleSwitch/styles.js";
3
+ import { ToggleSwitchProps } from "./components/ToggleSwitch/types.js";
4
+ import { ToggleSwitch } from "./components/ToggleSwitch/ToggleSwitch.js";
5
+ export { type ComponentToggleSwitch, ToggleSwitch, type ToggleSwitchProps, type PartialToggleSwitchTheme as ToggleSwitchTheme, componentToggleSwitch };
@@ -0,0 +1,3 @@
1
+ import { componentToggleSwitch } from "./styleD/build/typescript/component/toggleSwitch.js";
2
+ import { ToggleSwitch } from "./components/ToggleSwitch/ToggleSwitch.js";
3
+ export { ToggleSwitch, componentToggleSwitch };
@@ -0,0 +1,41 @@
1
+ const require_mergeDeep = require("../../util/mergeDeep.cjs");
2
+ const require_Icon = require("../Icon/Icon.cjs");
3
+ const require_styles = require("./styles.cjs");
4
+ let _emotion_react_jsx_runtime = require("@emotion/react/jsx-runtime");
5
+ let react_aria_components = require("react-aria-components");
6
+ //#region src/components/ToggleSwitch/ToggleSwitch.tsx
7
+ function ToggleSwitch({ children, description, size = "md", theme = {}, cssOverrides, ...props }) {
8
+ const mergedTheme = require_mergeDeep.mergeDeep(require_styles.defaultToggleSwitchTheme, theme);
9
+ return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(react_aria_components.Switch, {
10
+ css: [require_styles.toggleSwitchStyles(mergedTheme, { size }), cssOverrides],
11
+ ...props,
12
+ children: ({ isSelected, isDisabled, isFocusVisible }) => /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsxs)(_emotion_react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("div", {
13
+ css: require_styles.toggleSwitchTrackStyles(mergedTheme, {
14
+ size,
15
+ isSelected,
16
+ isDisabled,
17
+ isFocusVisible
18
+ }),
19
+ children: /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("div", {
20
+ css: require_styles.toggleSwitchThumbStyles(mergedTheme, {
21
+ size,
22
+ isSelected,
23
+ isDisabled
24
+ }),
25
+ children: /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(require_Icon.Icon, {
26
+ symbol: "check",
27
+ size: size === "sm" ? "sm" : "md",
28
+ cssOverrides: require_styles.toggleSwitchIconStyles(isSelected)
29
+ })
30
+ })
31
+ }), children && /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsxs)("span", {
32
+ css: require_styles.toggleSwitchLabelStyles(mergedTheme),
33
+ children: [/* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("span", { children }), description && /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)("span", {
34
+ css: require_styles.toggleSwitchDescriptionStyles(mergedTheme),
35
+ children: description
36
+ })]
37
+ })] })
38
+ });
39
+ }
40
+ //#endregion
41
+ exports.ToggleSwitch = ToggleSwitch;
@@ -0,0 +1,5 @@
1
+ import { ToggleSwitchProps } from "./types.cjs";
2
+ //#region src/components/ToggleSwitch/ToggleSwitch.d.ts
3
+ declare function ToggleSwitch({ children, description, size, theme, cssOverrides, ...props }: ToggleSwitchProps): import("@emotion/react/jsx-runtime").JSX.Element;
4
+ //#endregion
5
+ export { ToggleSwitch };
@@ -0,0 +1,5 @@
1
+ import { ToggleSwitchProps } from "./types.js";
2
+ //#region src/components/ToggleSwitch/ToggleSwitch.d.ts
3
+ declare function ToggleSwitch({ children, description, size, theme, cssOverrides, ...props }: ToggleSwitchProps): import("@emotion/react/jsx-runtime").JSX.Element;
4
+ //#endregion
5
+ export { ToggleSwitch };
@@ -0,0 +1,41 @@
1
+ import { mergeDeep } from "../../util/mergeDeep.js";
2
+ import { Icon } from "../Icon/Icon.js";
3
+ import { defaultToggleSwitchTheme, toggleSwitchDescriptionStyles, toggleSwitchIconStyles, toggleSwitchLabelStyles, toggleSwitchStyles, toggleSwitchThumbStyles, toggleSwitchTrackStyles } from "./styles.js";
4
+ import { Fragment, jsx, jsxs } from "@emotion/react/jsx-runtime";
5
+ import { Switch } from "react-aria-components";
6
+ //#region src/components/ToggleSwitch/ToggleSwitch.tsx
7
+ function ToggleSwitch({ children, description, size = "md", theme = {}, cssOverrides, ...props }) {
8
+ const mergedTheme = mergeDeep(defaultToggleSwitchTheme, theme);
9
+ return /* @__PURE__ */ jsx(Switch, {
10
+ css: [toggleSwitchStyles(mergedTheme, { size }), cssOverrides],
11
+ ...props,
12
+ children: ({ isSelected, isDisabled, isFocusVisible }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
13
+ css: toggleSwitchTrackStyles(mergedTheme, {
14
+ size,
15
+ isSelected,
16
+ isDisabled,
17
+ isFocusVisible
18
+ }),
19
+ children: /* @__PURE__ */ jsx("div", {
20
+ css: toggleSwitchThumbStyles(mergedTheme, {
21
+ size,
22
+ isSelected,
23
+ isDisabled
24
+ }),
25
+ children: /* @__PURE__ */ jsx(Icon, {
26
+ symbol: "check",
27
+ size: size === "sm" ? "sm" : "md",
28
+ cssOverrides: toggleSwitchIconStyles(isSelected)
29
+ })
30
+ })
31
+ }), children && /* @__PURE__ */ jsxs("span", {
32
+ css: toggleSwitchLabelStyles(mergedTheme),
33
+ children: [/* @__PURE__ */ jsx("span", { children }), description && /* @__PURE__ */ jsx("span", {
34
+ css: toggleSwitchDescriptionStyles(mergedTheme),
35
+ children: description
36
+ })]
37
+ })] })
38
+ });
39
+ }
40
+ //#endregion
41
+ export { ToggleSwitch };
@@ -0,0 +1,70 @@
1
+ const require_typography = require("../../styleD/utils/semantic/typography.cjs");
2
+ const require_toggleSwitch = require("../../styleD/build/typescript/component/toggleSwitch.cjs");
3
+ let _emotion_react = require("@emotion/react");
4
+ //#region src/components/ToggleSwitch/styles.ts
5
+ const defaultToggleSwitchTheme = require_toggleSwitch.componentToggleSwitch;
6
+ const toggleSwitchStyles = (theme, { size }) => _emotion_react.css`
7
+ display: ${theme.shared.display};
8
+ align-items: ${theme.shared.alignItems};
9
+ gap: ${theme.shared.gap};
10
+ cursor: ${theme.shared.cursor};
11
+ ${require_typography.convertTypographyToEmotionStringStyle(theme[size].typography)}
12
+ color: ${theme.shared.color};
13
+
14
+ &[data-disabled] {
15
+ color: ${theme.shared.disabled.color};
16
+ cursor: ${theme.shared.disabled.cursor};
17
+ }
18
+ `;
19
+ const toggleSwitchLabelStyles = (theme) => _emotion_react.css`
20
+ display: ${theme.shared.label.display};
21
+ flex-direction: ${theme.shared.label.flexDirection};
22
+ align-items: ${theme.shared.label.alignItems};
23
+ padding-block: ${theme.shared.label.paddingBlock};
24
+ `;
25
+ const toggleSwitchDescriptionStyles = (theme) => _emotion_react.css`
26
+ ${require_typography.convertTypographyToEmotionStringStyle(theme.shared.description.typography)}
27
+ color: ${theme.shared.description.color};
28
+ `;
29
+ const toggleSwitchTrackStyles = (theme, { size, isSelected, isDisabled, isFocusVisible }) => {
30
+ let backgroundColor = theme.shared.track.backgroundColor;
31
+ if (isSelected) backgroundColor = theme.shared.track.selected.backgroundColor;
32
+ if (isDisabled) backgroundColor = theme.shared.track.disabled.backgroundColor;
33
+ return _emotion_react.css`
34
+ display: ${theme.shared.track.display};
35
+ align-items: ${theme.shared.track.alignItems};
36
+ width: ${theme[size].track.width};
37
+ height: ${theme[size].track.height};
38
+ padding: ${theme.shared.track.padding};
39
+ border-radius: ${theme.shared.track.borderRadius};
40
+ background-color: ${backgroundColor};
41
+ transition: ${theme.shared.track.transition};
42
+ ${isFocusVisible && _emotion_react.css`
43
+ outline: ${theme.shared.track.focusVisible.outline};
44
+ outline-offset: ${theme.shared.track.focusVisible.outlineOffset};
45
+ `}
46
+ `;
47
+ };
48
+ const toggleSwitchThumbStyles = (theme, { size, isSelected, isDisabled }) => _emotion_react.css`
49
+ display: flex;
50
+ align-items: center;
51
+ justify-content: center;
52
+ width: ${theme[size].thumb.size};
53
+ height: ${theme[size].thumb.size};
54
+ border-radius: ${theme.shared.thumb.borderRadius};
55
+ background-color: ${theme.shared.thumb.backgroundColor};
56
+ color: ${isDisabled ? theme.shared.thumb.disabled.color : theme.shared.thumb.color};
57
+ transform: ${isSelected ? `translateX(${theme[size].thumb.translateX})` : "none"};
58
+ transition: ${theme.shared.thumb.transition};
59
+ `;
60
+ const toggleSwitchIconStyles = (isSelected) => _emotion_react.css`
61
+ opacity: ${isSelected ? 1 : 0};
62
+ `;
63
+ //#endregion
64
+ exports.defaultToggleSwitchTheme = defaultToggleSwitchTheme;
65
+ exports.toggleSwitchDescriptionStyles = toggleSwitchDescriptionStyles;
66
+ exports.toggleSwitchIconStyles = toggleSwitchIconStyles;
67
+ exports.toggleSwitchLabelStyles = toggleSwitchLabelStyles;
68
+ exports.toggleSwitchStyles = toggleSwitchStyles;
69
+ exports.toggleSwitchThumbStyles = toggleSwitchThumbStyles;
70
+ exports.toggleSwitchTrackStyles = toggleSwitchTrackStyles;
@@ -0,0 +1,10 @@
1
+ import { DeepPartial, Prettify } from "../../util/types.cjs";
2
+ import { ComponentToggleSwitch } from "../../styleD/build/typescript/component/toggleSwitch.cjs";
3
+ import "./types.cjs";
4
+ import { SerializedStyles } from "@emotion/react";
5
+ import "react-aria-components";
6
+ //#region src/components/ToggleSwitch/styles.d.ts
7
+ type ToggleSwitchTheme = Prettify<ComponentToggleSwitch>;
8
+ type PartialToggleSwitchTheme = Prettify<DeepPartial<ToggleSwitchTheme>>;
9
+ //#endregion
10
+ export { PartialToggleSwitchTheme, ToggleSwitchTheme };
@@ -0,0 +1,10 @@
1
+ import { DeepPartial, Prettify } from "../../util/types.js";
2
+ import { ComponentToggleSwitch } from "../../styleD/build/typescript/component/toggleSwitch.js";
3
+ import "./types.js";
4
+ import { SerializedStyles } from "@emotion/react";
5
+ import "react-aria-components";
6
+ //#region src/components/ToggleSwitch/styles.d.ts
7
+ type ToggleSwitchTheme = Prettify<ComponentToggleSwitch>;
8
+ type PartialToggleSwitchTheme = Prettify<DeepPartial<ToggleSwitchTheme>>;
9
+ //#endregion
10
+ export { PartialToggleSwitchTheme, ToggleSwitchTheme };
@@ -0,0 +1,64 @@
1
+ import { convertTypographyToEmotionStringStyle } from "../../styleD/utils/semantic/typography.js";
2
+ import { componentToggleSwitch } from "../../styleD/build/typescript/component/toggleSwitch.js";
3
+ import { css } from "@emotion/react";
4
+ //#region src/components/ToggleSwitch/styles.ts
5
+ const defaultToggleSwitchTheme = componentToggleSwitch;
6
+ const toggleSwitchStyles = (theme, { size }) => css`
7
+ display: ${theme.shared.display};
8
+ align-items: ${theme.shared.alignItems};
9
+ gap: ${theme.shared.gap};
10
+ cursor: ${theme.shared.cursor};
11
+ ${convertTypographyToEmotionStringStyle(theme[size].typography)}
12
+ color: ${theme.shared.color};
13
+
14
+ &[data-disabled] {
15
+ color: ${theme.shared.disabled.color};
16
+ cursor: ${theme.shared.disabled.cursor};
17
+ }
18
+ `;
19
+ const toggleSwitchLabelStyles = (theme) => css`
20
+ display: ${theme.shared.label.display};
21
+ flex-direction: ${theme.shared.label.flexDirection};
22
+ align-items: ${theme.shared.label.alignItems};
23
+ padding-block: ${theme.shared.label.paddingBlock};
24
+ `;
25
+ const toggleSwitchDescriptionStyles = (theme) => css`
26
+ ${convertTypographyToEmotionStringStyle(theme.shared.description.typography)}
27
+ color: ${theme.shared.description.color};
28
+ `;
29
+ const toggleSwitchTrackStyles = (theme, { size, isSelected, isDisabled, isFocusVisible }) => {
30
+ let backgroundColor = theme.shared.track.backgroundColor;
31
+ if (isSelected) backgroundColor = theme.shared.track.selected.backgroundColor;
32
+ if (isDisabled) backgroundColor = theme.shared.track.disabled.backgroundColor;
33
+ return css`
34
+ display: ${theme.shared.track.display};
35
+ align-items: ${theme.shared.track.alignItems};
36
+ width: ${theme[size].track.width};
37
+ height: ${theme[size].track.height};
38
+ padding: ${theme.shared.track.padding};
39
+ border-radius: ${theme.shared.track.borderRadius};
40
+ background-color: ${backgroundColor};
41
+ transition: ${theme.shared.track.transition};
42
+ ${isFocusVisible && css`
43
+ outline: ${theme.shared.track.focusVisible.outline};
44
+ outline-offset: ${theme.shared.track.focusVisible.outlineOffset};
45
+ `}
46
+ `;
47
+ };
48
+ const toggleSwitchThumbStyles = (theme, { size, isSelected, isDisabled }) => css`
49
+ display: flex;
50
+ align-items: center;
51
+ justify-content: center;
52
+ width: ${theme[size].thumb.size};
53
+ height: ${theme[size].thumb.size};
54
+ border-radius: ${theme.shared.thumb.borderRadius};
55
+ background-color: ${theme.shared.thumb.backgroundColor};
56
+ color: ${isDisabled ? theme.shared.thumb.disabled.color : theme.shared.thumb.color};
57
+ transform: ${isSelected ? `translateX(${theme[size].thumb.translateX})` : "none"};
58
+ transition: ${theme.shared.thumb.transition};
59
+ `;
60
+ const toggleSwitchIconStyles = (isSelected) => css`
61
+ opacity: ${isSelected ? 1 : 0};
62
+ `;
63
+ //#endregion
64
+ export { defaultToggleSwitchTheme, toggleSwitchDescriptionStyles, toggleSwitchIconStyles, toggleSwitchLabelStyles, toggleSwitchStyles, toggleSwitchThumbStyles, toggleSwitchTrackStyles };
@@ -0,0 +1,17 @@
1
+ import { DefaultPropsWithChildren } from "../../util/types.cjs";
2
+ import { ToggleSwitchTheme } from "./styles.cjs";
3
+ import { SwitchProps } from "react-aria-components";
4
+ //#region src/components/ToggleSwitch/types.d.ts
5
+ interface ToggleSwitchProps extends DefaultPropsWithChildren<ToggleSwitchTheme, SwitchProps['className']>, Omit<SwitchProps, 'children'> {
6
+ /**
7
+ * Size variant of the ToggleSwitch.
8
+ * @default 'md'
9
+ */
10
+ size?: keyof Omit<ToggleSwitchTheme, 'shared'>;
11
+ /**
12
+ * Supporting text rendered below the switch label.
13
+ */
14
+ description?: React.ReactNode;
15
+ }
16
+ //#endregion
17
+ export { ToggleSwitchProps };
@@ -0,0 +1,17 @@
1
+ import { DefaultPropsWithChildren } from "../../util/types.js";
2
+ import { ToggleSwitchTheme } from "./styles.js";
3
+ import { SwitchProps } from "react-aria-components";
4
+ //#region src/components/ToggleSwitch/types.d.ts
5
+ interface ToggleSwitchProps extends DefaultPropsWithChildren<ToggleSwitchTheme, SwitchProps['className']>, Omit<SwitchProps, 'children'> {
6
+ /**
7
+ * Size variant of the ToggleSwitch.
8
+ * @default 'md'
9
+ */
10
+ size?: keyof Omit<ToggleSwitchTheme, 'shared'>;
11
+ /**
12
+ * Supporting text rendered below the switch label.
13
+ */
14
+ description?: React.ReactNode;
15
+ }
16
+ //#endregion
17
+ export { ToggleSwitchProps };
package/dist/index.cjs CHANGED
@@ -12,6 +12,7 @@ const require_autocomplete = require("./styleD/build/typescript/component/autoco
12
12
  const require_tagTable = require("./styleD/build/typescript/component/tagTable.cjs");
13
13
  const require_userMenu = require("./styleD/build/typescript/component/userMenu.cjs");
14
14
  const require_intendedAudienceSignifier = require("./styleD/build/typescript/component/intendedAudienceSignifier.cjs");
15
+ const require_toggleSwitch = require("./styleD/build/typescript/component/toggleSwitch.cjs");
15
16
  const require_favicon = require("./styleD/build/typescript/component/favicon.cjs");
16
17
  const require_datePicker = require("./styleD/build/typescript/component/datePicker.cjs");
17
18
  const require_grid = require("./styleD/build/typescript/component/grid.cjs");
@@ -78,6 +79,7 @@ exports.componentTagTable = require_tagTable.componentTagTable;
78
79
  exports.componentTextArea = require_textArea.componentTextArea;
79
80
  exports.componentTextInput = require_textInput.componentTextInput;
80
81
  exports.componentTextListInput = require_textListInput.componentTextListInput;
82
+ exports.componentToggleSwitch = require_toggleSwitch.componentToggleSwitch;
81
83
  exports.componentTooltip = require_tooltip.componentTooltip;
82
84
  exports.componentTopBar = require_topBar.componentTopBar;
83
85
  exports.componentTypography = require_typography.componentTypography;
package/dist/index.d.cts CHANGED
@@ -29,6 +29,7 @@ import { ComponentTagTable, componentTagTable } from "./styleD/build/typescript/
29
29
  import { ComponentTextArea, componentTextArea } from "./styleD/build/typescript/component/textArea.cjs";
30
30
  import { ComponentTextInput, componentTextInput } from "./styleD/build/typescript/component/textInput.cjs";
31
31
  import { ComponentTextListInput, componentTextListInput } from "./styleD/build/typescript/component/textListInput.cjs";
32
+ import { ComponentToggleSwitch, componentToggleSwitch } from "./styleD/build/typescript/component/toggleSwitch.cjs";
32
33
  import { ComponentTooltip, componentTooltip } from "./styleD/build/typescript/component/tooltip.cjs";
33
34
  import { ComponentTopBar, componentTopBar } from "./styleD/build/typescript/component/topBar.cjs";
34
35
  import { ComponentUserFeedbackSummary, componentUserFeedbackSummary } from "./styleD/build/typescript/component/userFeedbackSummary.cjs";
@@ -44,4 +45,4 @@ import { SemanticSizing, semanticSizing } from "./styleD/build/typescript/semant
44
45
  import { SemanticShadow, semanticShadow } from "./styleD/build/typescript/semantic/shadow.cjs";
45
46
  import { SemanticRadius, semanticRadius } from "./styleD/build/typescript/semantic/radius.cjs";
46
47
  import { SemanticSpacing, semanticSpacing } from "./styleD/build/typescript/semantic/spacing.cjs";
47
- export { type BaseColors, type BaseRadius, type BaseSizing, type BaseSpacing, type BaseTypography, type ComponentAlertBanner, type ComponentAutocomplete, type ComponentAvatar, type ComponentBadge, type ComponentButton, type ComponentButtonGroup, type ComponentByline, type ComponentCheckbox, type ComponentDatePicker, type ComponentFavicon, type ComponentForm, type ComponentGrid, type ComponentIcon, type ComponentInlineMessage, type ComponentIntendedAudienceSignifier, type ComponentLayout, type ComponentLink, type ComponentMenu, type ComponentModal, type ComponentRadioGroup, type ComponentSelect, type ComponentSidebarStepperNavigation, type ComponentTable, type ComponentTabs, type ComponentTagTable, type ComponentTextArea, type ComponentTextInput, type ComponentTextListInput, type ComponentTooltip, type ComponentTopBar, type ComponentTypography, type ComponentUserFeedbackSummary, type ComponentUserMenu, type SemanticBreakpoints, type SemanticColors, type SemanticGrid, type SemanticRadius, type SemanticShadow, type SemanticSizing, type SemanticSpacing, type SemanticTypography, baseColors, baseRadius, baseSizing, baseSpacing, baseTypography, componentAlertBanner, componentAutocomplete, componentAvatar, componentBadge, componentButton, componentButtonGroup, componentByline, componentCheckbox, componentDatePicker, componentFavicon, componentForm, componentGrid, componentIcon, componentInlineMessage, componentIntendedAudienceSignifier, componentLayout, componentLink, componentMenu, componentModal, componentRadioGroup, componentSelect, componentSidebarStepperNavigation, componentTable, componentTabs, componentTagTable, componentTextArea, componentTextInput, componentTextListInput, componentTooltip, componentTopBar, componentTypography, componentUserFeedbackSummary, componentUserMenu, semanticBreakpoints, semanticColors, semanticGrid, semanticRadius, semanticShadow, semanticSizing, semanticSpacing, semanticTypography };
48
+ export { type BaseColors, type BaseRadius, type BaseSizing, type BaseSpacing, type BaseTypography, type ComponentAlertBanner, type ComponentAutocomplete, type ComponentAvatar, type ComponentBadge, type ComponentButton, type ComponentButtonGroup, type ComponentByline, type ComponentCheckbox, type ComponentDatePicker, type ComponentFavicon, type ComponentForm, type ComponentGrid, type ComponentIcon, type ComponentInlineMessage, type ComponentIntendedAudienceSignifier, type ComponentLayout, type ComponentLink, type ComponentMenu, type ComponentModal, type ComponentRadioGroup, type ComponentSelect, type ComponentSidebarStepperNavigation, type ComponentTable, type ComponentTabs, type ComponentTagTable, type ComponentTextArea, type ComponentTextInput, type ComponentTextListInput, type ComponentToggleSwitch, type ComponentTooltip, type ComponentTopBar, type ComponentTypography, type ComponentUserFeedbackSummary, type ComponentUserMenu, type SemanticBreakpoints, type SemanticColors, type SemanticGrid, type SemanticRadius, type SemanticShadow, type SemanticSizing, type SemanticSpacing, type SemanticTypography, baseColors, baseRadius, baseSizing, baseSpacing, baseTypography, componentAlertBanner, componentAutocomplete, componentAvatar, componentBadge, componentButton, componentButtonGroup, componentByline, componentCheckbox, componentDatePicker, componentFavicon, componentForm, componentGrid, componentIcon, componentInlineMessage, componentIntendedAudienceSignifier, componentLayout, componentLink, componentMenu, componentModal, componentRadioGroup, componentSelect, componentSidebarStepperNavigation, componentTable, componentTabs, componentTagTable, componentTextArea, componentTextInput, componentTextListInput, componentToggleSwitch, componentTooltip, componentTopBar, componentTypography, componentUserFeedbackSummary, componentUserMenu, semanticBreakpoints, semanticColors, semanticGrid, semanticRadius, semanticShadow, semanticSizing, semanticSpacing, semanticTypography };
package/dist/index.d.ts CHANGED
@@ -29,6 +29,7 @@ import { ComponentTagTable, componentTagTable } from "./styleD/build/typescript/
29
29
  import { ComponentTextArea, componentTextArea } from "./styleD/build/typescript/component/textArea.js";
30
30
  import { ComponentTextInput, componentTextInput } from "./styleD/build/typescript/component/textInput.js";
31
31
  import { ComponentTextListInput, componentTextListInput } from "./styleD/build/typescript/component/textListInput.js";
32
+ import { ComponentToggleSwitch, componentToggleSwitch } from "./styleD/build/typescript/component/toggleSwitch.js";
32
33
  import { ComponentTooltip, componentTooltip } from "./styleD/build/typescript/component/tooltip.js";
33
34
  import { ComponentTopBar, componentTopBar } from "./styleD/build/typescript/component/topBar.js";
34
35
  import { ComponentUserFeedbackSummary, componentUserFeedbackSummary } from "./styleD/build/typescript/component/userFeedbackSummary.js";
@@ -44,4 +45,4 @@ import { SemanticSizing, semanticSizing } from "./styleD/build/typescript/semant
44
45
  import { SemanticShadow, semanticShadow } from "./styleD/build/typescript/semantic/shadow.js";
45
46
  import { SemanticRadius, semanticRadius } from "./styleD/build/typescript/semantic/radius.js";
46
47
  import { SemanticSpacing, semanticSpacing } from "./styleD/build/typescript/semantic/spacing.js";
47
- export { type BaseColors, type BaseRadius, type BaseSizing, type BaseSpacing, type BaseTypography, type ComponentAlertBanner, type ComponentAutocomplete, type ComponentAvatar, type ComponentBadge, type ComponentButton, type ComponentButtonGroup, type ComponentByline, type ComponentCheckbox, type ComponentDatePicker, type ComponentFavicon, type ComponentForm, type ComponentGrid, type ComponentIcon, type ComponentInlineMessage, type ComponentIntendedAudienceSignifier, type ComponentLayout, type ComponentLink, type ComponentMenu, type ComponentModal, type ComponentRadioGroup, type ComponentSelect, type ComponentSidebarStepperNavigation, type ComponentTable, type ComponentTabs, type ComponentTagTable, type ComponentTextArea, type ComponentTextInput, type ComponentTextListInput, type ComponentTooltip, type ComponentTopBar, type ComponentTypography, type ComponentUserFeedbackSummary, type ComponentUserMenu, type SemanticBreakpoints, type SemanticColors, type SemanticGrid, type SemanticRadius, type SemanticShadow, type SemanticSizing, type SemanticSpacing, type SemanticTypography, baseColors, baseRadius, baseSizing, baseSpacing, baseTypography, componentAlertBanner, componentAutocomplete, componentAvatar, componentBadge, componentButton, componentButtonGroup, componentByline, componentCheckbox, componentDatePicker, componentFavicon, componentForm, componentGrid, componentIcon, componentInlineMessage, componentIntendedAudienceSignifier, componentLayout, componentLink, componentMenu, componentModal, componentRadioGroup, componentSelect, componentSidebarStepperNavigation, componentTable, componentTabs, componentTagTable, componentTextArea, componentTextInput, componentTextListInput, componentTooltip, componentTopBar, componentTypography, componentUserFeedbackSummary, componentUserMenu, semanticBreakpoints, semanticColors, semanticGrid, semanticRadius, semanticShadow, semanticSizing, semanticSpacing, semanticTypography };
48
+ export { type BaseColors, type BaseRadius, type BaseSizing, type BaseSpacing, type BaseTypography, type ComponentAlertBanner, type ComponentAutocomplete, type ComponentAvatar, type ComponentBadge, type ComponentButton, type ComponentButtonGroup, type ComponentByline, type ComponentCheckbox, type ComponentDatePicker, type ComponentFavicon, type ComponentForm, type ComponentGrid, type ComponentIcon, type ComponentInlineMessage, type ComponentIntendedAudienceSignifier, type ComponentLayout, type ComponentLink, type ComponentMenu, type ComponentModal, type ComponentRadioGroup, type ComponentSelect, type ComponentSidebarStepperNavigation, type ComponentTable, type ComponentTabs, type ComponentTagTable, type ComponentTextArea, type ComponentTextInput, type ComponentTextListInput, type ComponentToggleSwitch, type ComponentTooltip, type ComponentTopBar, type ComponentTypography, type ComponentUserFeedbackSummary, type ComponentUserMenu, type SemanticBreakpoints, type SemanticColors, type SemanticGrid, type SemanticRadius, type SemanticShadow, type SemanticSizing, type SemanticSpacing, type SemanticTypography, baseColors, baseRadius, baseSizing, baseSpacing, baseTypography, componentAlertBanner, componentAutocomplete, componentAvatar, componentBadge, componentButton, componentButtonGroup, componentByline, componentCheckbox, componentDatePicker, componentFavicon, componentForm, componentGrid, componentIcon, componentInlineMessage, componentIntendedAudienceSignifier, componentLayout, componentLink, componentMenu, componentModal, componentRadioGroup, componentSelect, componentSidebarStepperNavigation, componentTable, componentTabs, componentTagTable, componentTextArea, componentTextInput, componentTextListInput, componentToggleSwitch, componentTooltip, componentTopBar, componentTypography, componentUserFeedbackSummary, componentUserMenu, semanticBreakpoints, semanticColors, semanticGrid, semanticRadius, semanticShadow, semanticSizing, semanticSpacing, semanticTypography };
package/dist/index.js CHANGED
@@ -11,6 +11,7 @@ import { componentAutocomplete } from "./styleD/build/typescript/component/autoc
11
11
  import { componentTagTable } from "./styleD/build/typescript/component/tagTable.js";
12
12
  import { componentUserMenu } from "./styleD/build/typescript/component/userMenu.js";
13
13
  import { componentIntendedAudienceSignifier } from "./styleD/build/typescript/component/intendedAudienceSignifier.js";
14
+ import { componentToggleSwitch } from "./styleD/build/typescript/component/toggleSwitch.js";
14
15
  import { componentFavicon } from "./styleD/build/typescript/component/favicon.js";
15
16
  import { componentDatePicker } from "./styleD/build/typescript/component/datePicker.js";
16
17
  import { componentGrid } from "./styleD/build/typescript/component/grid.js";
@@ -44,4 +45,4 @@ import { semanticSizing } from "./styleD/build/typescript/semantic/sizing.js";
44
45
  import { semanticShadow } from "./styleD/build/typescript/semantic/shadow.js";
45
46
  import { semanticRadius } from "./styleD/build/typescript/semantic/radius.js";
46
47
  import { semanticSpacing } from "./styleD/build/typescript/semantic/spacing.js";
47
- export { baseColors, baseRadius, baseSizing, baseSpacing, baseTypography, componentAlertBanner, componentAutocomplete, componentAvatar, componentBadge, componentButton, componentButtonGroup, componentByline, componentCheckbox, componentDatePicker, componentFavicon, componentForm, componentGrid, componentIcon, componentInlineMessage, componentIntendedAudienceSignifier, componentLayout, componentLink, componentMenu, componentModal, componentRadioGroup, componentSelect, componentSidebarStepperNavigation, componentTable, componentTabs, componentTagTable, componentTextArea, componentTextInput, componentTextListInput, componentTooltip, componentTopBar, componentTypography, componentUserFeedbackSummary, componentUserMenu, semanticBreakpoints, semanticColors, semanticGrid, semanticRadius, semanticShadow, semanticSizing, semanticSpacing, semanticTypography };
48
+ export { baseColors, baseRadius, baseSizing, baseSpacing, baseTypography, componentAlertBanner, componentAutocomplete, componentAvatar, componentBadge, componentButton, componentButtonGroup, componentByline, componentCheckbox, componentDatePicker, componentFavicon, componentForm, componentGrid, componentIcon, componentInlineMessage, componentIntendedAudienceSignifier, componentLayout, componentLink, componentMenu, componentModal, componentRadioGroup, componentSelect, componentSidebarStepperNavigation, componentTable, componentTabs, componentTagTable, componentTextArea, componentTextInput, componentTextListInput, componentToggleSwitch, componentTooltip, componentTopBar, componentTypography, componentUserFeedbackSummary, componentUserMenu, semanticBreakpoints, semanticColors, semanticGrid, semanticRadius, semanticShadow, semanticSizing, semanticSpacing, semanticTypography };
@@ -21,7 +21,7 @@
21
21
  --component-checkbox-input-shared-indicator-check-height: 20px;
22
22
  --component-checkbox-input-shared-indicator-indeterminate-width: 12px;
23
23
  --component-checkbox-input-shared-indicator-indeterminate-height: 2px;
24
- --component-checkbox-input-shared-indicator-selected-background-color: #005d8b;
24
+ --component-checkbox-input-shared-indicator-selected-background-color: #0072a9;
25
25
  --component-checkbox-input-shared-indicator-selected-border: 0.0625rem solid
26
26
  #0072a9;
27
27
  --component-checkbox-input-shared-indicator-selected-svg-fill: #ffffff;
@@ -28,7 +28,7 @@
28
28
  --component-radio-group-shared-indicator-invalid-after-background-color: #b42a19;
29
29
  --component-radio-group-shared-indicator-disabled-border: 0.0625rem solid
30
30
  #dcdcdc;
31
- --component-radio-group-shared-indicator-selected-after-background-color: #005d8b;
31
+ --component-radio-group-shared-indicator-selected-after-background-color: #0072a9;
32
32
  --component-radio-group-shared-indicator-selected-after-scale: 0.6;
33
33
  --component-radio-group-shared-indicator-selected-border: 0.125rem solid
34
34
  #0072a9;
@@ -39,7 +39,7 @@
39
39
  --component-sidebar-stepper-navigation-step-shared-text-inverse-color: #ffffff;
40
40
  --component-sidebar-stepper-navigation-step-shared-number-column-width: 2rem;
41
41
  --component-sidebar-stepper-navigation-step-number-shared-height: 100%;
42
- --component-sidebar-stepper-navigation-step-number-shared-background-color: #005d8b;
42
+ --component-sidebar-stepper-navigation-step-number-shared-background-color: #0072a9;
43
43
  --component-sidebar-stepper-navigation-step-number-shared-display: flex;
44
44
  --component-sidebar-stepper-navigation-step-number-shared-align-items: center;
45
45
  --component-sidebar-stepper-navigation-step-number-shared-justify-content: center;
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Do not edit directly, this file was auto-generated.
3
+ */
4
+
5
+ :root {
6
+ --component-toggle-switch-shared-display: flex;
7
+ --component-toggle-switch-shared-align-items: center;
8
+ --component-toggle-switch-shared-gap: 0.5rem;
9
+ --component-toggle-switch-shared-cursor: pointer;
10
+ --component-toggle-switch-shared-color: #000000;
11
+ --component-toggle-switch-shared-label-display: flex;
12
+ --component-toggle-switch-shared-label-flex-direction: column;
13
+ --component-toggle-switch-shared-label-align-items: flex-start;
14
+ --component-toggle-switch-shared-label-padding-block: 0.125rem;
15
+ --component-toggle-switch-shared-description-color: #545454;
16
+ --component-toggle-switch-shared-description-typography-font: normal 460
17
+ 0.75rem/1.3 'Open Sans';
18
+ --component-toggle-switch-shared-description-typography-letter-spacing: 0rem;
19
+ --component-toggle-switch-shared-description-typography-font-width: 95;
20
+ --component-toggle-switch-shared-track-display: flex;
21
+ --component-toggle-switch-shared-track-align-items: center;
22
+ --component-toggle-switch-shared-track-padding: 0.25rem;
23
+ --component-toggle-switch-shared-track-border-radius: 100px;
24
+ --component-toggle-switch-shared-track-background-color: #666666;
25
+ --component-toggle-switch-shared-track-transition: background-color 200ms;
26
+ --component-toggle-switch-shared-track-selected-background-color: #0072a9;
27
+ --component-toggle-switch-shared-track-disabled-background-color: #dcdcdc;
28
+ --component-toggle-switch-shared-track-focus-visible-outline: 0.125rem solid
29
+ #0072a9;
30
+ --component-toggle-switch-shared-track-focus-visible-outline-offset: 0.125rem;
31
+ --component-toggle-switch-shared-thumb-border-radius: 50%;
32
+ --component-toggle-switch-shared-thumb-background-color: #ffffff;
33
+ --component-toggle-switch-shared-thumb-color: #0072a9;
34
+ --component-toggle-switch-shared-thumb-disabled-color: #dcdcdc;
35
+ --component-toggle-switch-shared-thumb-transition: transform 200ms;
36
+ --component-toggle-switch-shared-disabled-color: #999999;
37
+ --component-toggle-switch-shared-disabled-cursor: not-allowed;
38
+ --component-toggle-switch-sm-typography-font: normal 460 0.875rem/1.3
39
+ 'Open Sans';
40
+ --component-toggle-switch-sm-typography-letter-spacing: 0rem;
41
+ --component-toggle-switch-sm-typography-font-width: 95;
42
+ --component-toggle-switch-sm-track-width: 2.75rem;
43
+ --component-toggle-switch-sm-track-height: 1.5rem;
44
+ --component-toggle-switch-sm-thumb-size: 1.125rem;
45
+ --component-toggle-switch-sm-thumb-translate-x: 1.25rem;
46
+ --component-toggle-switch-sm-thumb-icon-size: 1rem;
47
+ --component-toggle-switch-md-typography-font: normal 460 1rem/1.3 'Open Sans';
48
+ --component-toggle-switch-md-typography-letter-spacing: 0rem;
49
+ --component-toggle-switch-md-typography-font-width: 95;
50
+ --component-toggle-switch-md-track-width: 3.75rem;
51
+ --component-toggle-switch-md-track-height: 2rem;
52
+ --component-toggle-switch-md-thumb-size: 1.5rem;
53
+ --component-toggle-switch-md-thumb-translate-x: 1.75rem;
54
+ --component-toggle-switch-md-thumb-icon-size: 1.25rem;
55
+ }
@@ -72,13 +72,24 @@
72
72
  --semantic-colors-fill-orange-weak: #fcddc6;
73
73
  --semantic-colors-fill-orange-medium: #fac7a1;
74
74
  --semantic-colors-fill-yellow-weak: #ffedac;
75
- --semantic-colors-fill-selected: #005d8b;
75
+ --semantic-colors-fill-unselected-strong: #ffffff;
76
+ --semantic-colors-fill-unselected-hover-strong: #005d8b;
77
+ --semantic-colors-fill-unselected-pressed-strong: #00496c;
78
+ --semantic-colors-fill-selected-strong: #0072a9;
79
+ --semantic-colors-fill-selected-hover-strong: #00496c;
80
+ --semantic-colors-fill-selected-pressed-strong: #00344e;
76
81
  --semantic-colors-fill-selected-weaker: #e6f1f6;
77
- --semantic-colors-fill-selected-weak: #c5dfec;
78
82
  --semantic-colors-fill-selected-hover-weaker: #c5dfec;
79
- --semantic-colors-fill-selected-hover-weak: #8abed7;
80
83
  --semantic-colors-fill-selected-pressed-weaker: #8abed7;
84
+ --semantic-colors-fill-unselected-weaker: #ffffff;
85
+ --semantic-colors-fill-unselected-hover-weaker: #e6f1f6;
86
+ --semantic-colors-fill-unselected-pressed-weaker: #c5dfec;
87
+ --semantic-colors-fill-selected-weak: #c5dfec;
88
+ --semantic-colors-fill-selected-hover-weak: #8abed7;
81
89
  --semantic-colors-fill-selected-pressed-weak: #5ca5c8;
90
+ --semantic-colors-fill-unselected-weak: #ffffff;
91
+ --semantic-colors-fill-unselected-hover-weak: #c5dfec;
92
+ --semantic-colors-fill-unselected-pressed-weak: #8abed7;
82
93
  --semantic-colors-fill-draft-strong: #f1c21b;
83
94
  --semantic-colors-fill-live-weak: #aed2a6;
84
95
  --semantic-colors-fill-warning-weak: #ffedac;
@@ -90,4 +101,5 @@
90
101
  --semantic-colors-fill-success-weak: #cde4c9;
91
102
  --semantic-colors-fill-success-strong: #326528;
92
103
  --semantic-colors-fill-neutral-weak: #ededed;
104
+ --semantic-colors-fill-neutral-medium: #666666;
93
105
  }
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  :root {
6
+ --semantic-sizing-height-xxxxs: 1rem;
6
7
  --semantic-sizing-height-xxxs: 1.125rem;
7
8
  --semantic-sizing-height-xxs: 1.25rem;
8
9
  --semantic-sizing-height-xs: 1.5rem;
@@ -29,7 +29,7 @@ const componentCheckbox = {
29
29
  height: "2px"
30
30
  },
31
31
  selected: {
32
- backgroundColor: "#005d8b",
32
+ backgroundColor: "#0072a9",
33
33
  border: "0.0625rem solid #0072a9",
34
34
  svg: { fill: "#ffffff" }
35
35
  },
@@ -29,7 +29,7 @@ const componentCheckbox = {
29
29
  height: "2px"
30
30
  },
31
31
  selected: {
32
- backgroundColor: "#005d8b",
32
+ backgroundColor: "#0072a9",
33
33
  border: "0.0625rem solid #0072a9",
34
34
  svg: { fill: "#ffffff" }
35
35
  },
@@ -39,7 +39,7 @@ const componentRadioGroup = {
39
39
  disabled: { border: "0.0625rem solid #dcdcdc" },
40
40
  selected: {
41
41
  after: {
42
- backgroundColor: "#005d8b",
42
+ backgroundColor: "#0072a9",
43
43
  scale: .6
44
44
  },
45
45
  border: "0.125rem solid #0072a9",
@@ -39,7 +39,7 @@ const componentRadioGroup = {
39
39
  disabled: { border: "0.0625rem solid #dcdcdc" },
40
40
  selected: {
41
41
  after: {
42
- backgroundColor: "#005d8b",
42
+ backgroundColor: "#0072a9",
43
43
  scale: .6
44
44
  },
45
45
  border: "0.125rem solid #0072a9",
@@ -51,7 +51,7 @@ const componentSidebarStepperNavigation = {
51
51
  } },
52
52
  stepNumber: { shared: {
53
53
  height: "100%",
54
- backgroundColor: "#005d8b",
54
+ backgroundColor: "#0072a9",
55
55
  display: "flex",
56
56
  alignItems: "center",
57
57
  justifyContent: "center"
@@ -51,7 +51,7 @@ const componentSidebarStepperNavigation = {
51
51
  } },
52
52
  stepNumber: { shared: {
53
53
  height: "100%",
54
- backgroundColor: "#005d8b",
54
+ backgroundColor: "#0072a9",
55
55
  display: "flex",
56
56
  alignItems: "center",
57
57
  justifyContent: "center"
@@ -0,0 +1,86 @@
1
+ //#region src/styleD/build/typescript/component/toggleSwitch.ts
2
+ /**
3
+ * Do not edit directly, this file was auto-generated.
4
+ */
5
+ const componentToggleSwitch = {
6
+ shared: {
7
+ display: "flex",
8
+ alignItems: "center",
9
+ gap: "0.5rem",
10
+ cursor: "pointer",
11
+ color: "#000000",
12
+ label: {
13
+ display: "flex",
14
+ flexDirection: "column",
15
+ alignItems: "flex-start",
16
+ paddingBlock: "0.125rem"
17
+ },
18
+ description: {
19
+ color: "#545454",
20
+ typography: {
21
+ font: "normal 460 0.75rem/1.3 Open Sans",
22
+ letterSpacing: "0rem",
23
+ fontWidth: 95
24
+ }
25
+ },
26
+ track: {
27
+ display: "flex",
28
+ alignItems: "center",
29
+ padding: "0.25rem",
30
+ borderRadius: "100px",
31
+ backgroundColor: "#666666",
32
+ transition: "background-color 200ms",
33
+ selected: { backgroundColor: "#0072a9" },
34
+ disabled: { backgroundColor: "#dcdcdc" },
35
+ focusVisible: {
36
+ outline: "0.125rem solid #0072a9",
37
+ outlineOffset: "0.125rem"
38
+ }
39
+ },
40
+ thumb: {
41
+ borderRadius: "50%",
42
+ backgroundColor: "#ffffff",
43
+ color: "#0072a9",
44
+ disabled: { color: "#dcdcdc" },
45
+ transition: "transform 200ms"
46
+ },
47
+ disabled: {
48
+ color: "#999999",
49
+ cursor: "not-allowed"
50
+ }
51
+ },
52
+ sm: {
53
+ typography: {
54
+ font: "normal 460 0.875rem/1.3 Open Sans",
55
+ letterSpacing: "0rem",
56
+ fontWidth: 95
57
+ },
58
+ track: {
59
+ width: "2.75rem",
60
+ height: "1.5rem"
61
+ },
62
+ thumb: {
63
+ size: "1.125rem",
64
+ translateX: "1.25rem",
65
+ iconSize: "1rem"
66
+ }
67
+ },
68
+ md: {
69
+ typography: {
70
+ font: "normal 460 1rem/1.3 Open Sans",
71
+ letterSpacing: "0rem",
72
+ fontWidth: 95
73
+ },
74
+ track: {
75
+ width: "3.75rem",
76
+ height: "2rem"
77
+ },
78
+ thumb: {
79
+ size: "1.5rem",
80
+ translateX: "1.75rem",
81
+ iconSize: "1.25rem"
82
+ }
83
+ }
84
+ };
85
+ //#endregion
86
+ exports.componentToggleSwitch = componentToggleSwitch;
@@ -0,0 +1,93 @@
1
+ //#region src/styleD/build/typescript/component/toggleSwitch.d.ts
2
+ /**
3
+ * Do not edit directly, this file was auto-generated.
4
+ */
5
+ declare const componentToggleSwitch: {
6
+ shared: {
7
+ display: string;
8
+ alignItems: string;
9
+ gap: string;
10
+ cursor: string;
11
+ color: string;
12
+ label: {
13
+ display: string;
14
+ flexDirection: string;
15
+ alignItems: string;
16
+ paddingBlock: string;
17
+ };
18
+ description: {
19
+ color: string;
20
+ typography: {
21
+ font: string;
22
+ letterSpacing: string;
23
+ fontWidth: number;
24
+ };
25
+ };
26
+ track: {
27
+ display: string;
28
+ alignItems: string;
29
+ padding: string;
30
+ borderRadius: string;
31
+ backgroundColor: string;
32
+ transition: string;
33
+ selected: {
34
+ backgroundColor: string;
35
+ };
36
+ disabled: {
37
+ backgroundColor: string;
38
+ };
39
+ focusVisible: {
40
+ outline: string;
41
+ outlineOffset: string;
42
+ };
43
+ };
44
+ thumb: {
45
+ borderRadius: string;
46
+ backgroundColor: string;
47
+ color: string;
48
+ disabled: {
49
+ color: string;
50
+ };
51
+ transition: string;
52
+ };
53
+ disabled: {
54
+ color: string;
55
+ cursor: string;
56
+ };
57
+ };
58
+ sm: {
59
+ typography: {
60
+ font: string;
61
+ letterSpacing: string;
62
+ fontWidth: number;
63
+ };
64
+ track: {
65
+ width: string;
66
+ height: string;
67
+ };
68
+ thumb: {
69
+ size: string;
70
+ translateX: string;
71
+ iconSize: string;
72
+ };
73
+ };
74
+ md: {
75
+ typography: {
76
+ font: string;
77
+ letterSpacing: string;
78
+ fontWidth: number;
79
+ };
80
+ track: {
81
+ width: string;
82
+ height: string;
83
+ };
84
+ thumb: {
85
+ size: string;
86
+ translateX: string;
87
+ iconSize: string;
88
+ };
89
+ };
90
+ };
91
+ type ComponentToggleSwitch = typeof componentToggleSwitch;
92
+ //#endregion
93
+ export { ComponentToggleSwitch, componentToggleSwitch };
@@ -0,0 +1,93 @@
1
+ //#region src/styleD/build/typescript/component/toggleSwitch.d.ts
2
+ /**
3
+ * Do not edit directly, this file was auto-generated.
4
+ */
5
+ declare const componentToggleSwitch: {
6
+ shared: {
7
+ display: string;
8
+ alignItems: string;
9
+ gap: string;
10
+ cursor: string;
11
+ color: string;
12
+ label: {
13
+ display: string;
14
+ flexDirection: string;
15
+ alignItems: string;
16
+ paddingBlock: string;
17
+ };
18
+ description: {
19
+ color: string;
20
+ typography: {
21
+ font: string;
22
+ letterSpacing: string;
23
+ fontWidth: number;
24
+ };
25
+ };
26
+ track: {
27
+ display: string;
28
+ alignItems: string;
29
+ padding: string;
30
+ borderRadius: string;
31
+ backgroundColor: string;
32
+ transition: string;
33
+ selected: {
34
+ backgroundColor: string;
35
+ };
36
+ disabled: {
37
+ backgroundColor: string;
38
+ };
39
+ focusVisible: {
40
+ outline: string;
41
+ outlineOffset: string;
42
+ };
43
+ };
44
+ thumb: {
45
+ borderRadius: string;
46
+ backgroundColor: string;
47
+ color: string;
48
+ disabled: {
49
+ color: string;
50
+ };
51
+ transition: string;
52
+ };
53
+ disabled: {
54
+ color: string;
55
+ cursor: string;
56
+ };
57
+ };
58
+ sm: {
59
+ typography: {
60
+ font: string;
61
+ letterSpacing: string;
62
+ fontWidth: number;
63
+ };
64
+ track: {
65
+ width: string;
66
+ height: string;
67
+ };
68
+ thumb: {
69
+ size: string;
70
+ translateX: string;
71
+ iconSize: string;
72
+ };
73
+ };
74
+ md: {
75
+ typography: {
76
+ font: string;
77
+ letterSpacing: string;
78
+ fontWidth: number;
79
+ };
80
+ track: {
81
+ width: string;
82
+ height: string;
83
+ };
84
+ thumb: {
85
+ size: string;
86
+ translateX: string;
87
+ iconSize: string;
88
+ };
89
+ };
90
+ };
91
+ type ComponentToggleSwitch = typeof componentToggleSwitch;
92
+ //#endregion
93
+ export { ComponentToggleSwitch, componentToggleSwitch };
@@ -0,0 +1,86 @@
1
+ //#region src/styleD/build/typescript/component/toggleSwitch.ts
2
+ /**
3
+ * Do not edit directly, this file was auto-generated.
4
+ */
5
+ const componentToggleSwitch = {
6
+ shared: {
7
+ display: "flex",
8
+ alignItems: "center",
9
+ gap: "0.5rem",
10
+ cursor: "pointer",
11
+ color: "#000000",
12
+ label: {
13
+ display: "flex",
14
+ flexDirection: "column",
15
+ alignItems: "flex-start",
16
+ paddingBlock: "0.125rem"
17
+ },
18
+ description: {
19
+ color: "#545454",
20
+ typography: {
21
+ font: "normal 460 0.75rem/1.3 Open Sans",
22
+ letterSpacing: "0rem",
23
+ fontWidth: 95
24
+ }
25
+ },
26
+ track: {
27
+ display: "flex",
28
+ alignItems: "center",
29
+ padding: "0.25rem",
30
+ borderRadius: "100px",
31
+ backgroundColor: "#666666",
32
+ transition: "background-color 200ms",
33
+ selected: { backgroundColor: "#0072a9" },
34
+ disabled: { backgroundColor: "#dcdcdc" },
35
+ focusVisible: {
36
+ outline: "0.125rem solid #0072a9",
37
+ outlineOffset: "0.125rem"
38
+ }
39
+ },
40
+ thumb: {
41
+ borderRadius: "50%",
42
+ backgroundColor: "#ffffff",
43
+ color: "#0072a9",
44
+ disabled: { color: "#dcdcdc" },
45
+ transition: "transform 200ms"
46
+ },
47
+ disabled: {
48
+ color: "#999999",
49
+ cursor: "not-allowed"
50
+ }
51
+ },
52
+ sm: {
53
+ typography: {
54
+ font: "normal 460 0.875rem/1.3 Open Sans",
55
+ letterSpacing: "0rem",
56
+ fontWidth: 95
57
+ },
58
+ track: {
59
+ width: "2.75rem",
60
+ height: "1.5rem"
61
+ },
62
+ thumb: {
63
+ size: "1.125rem",
64
+ translateX: "1.25rem",
65
+ iconSize: "1rem"
66
+ }
67
+ },
68
+ md: {
69
+ typography: {
70
+ font: "normal 460 1rem/1.3 Open Sans",
71
+ letterSpacing: "0rem",
72
+ fontWidth: 95
73
+ },
74
+ track: {
75
+ width: "3.75rem",
76
+ height: "2rem"
77
+ },
78
+ thumb: {
79
+ size: "1.5rem",
80
+ translateX: "1.75rem",
81
+ iconSize: "1.25rem"
82
+ }
83
+ }
84
+ };
85
+ //#endregion
86
+ export { componentToggleSwitch };
@@ -79,13 +79,24 @@ const semanticColors = {
79
79
  orangeWeak: "#fcddc6",
80
80
  orangeMedium: "#fac7a1",
81
81
  yellowWeak: "#ffedac",
82
- selected: "#005d8b",
82
+ unselectedStrong: "#ffffff",
83
+ unselectedHoverStrong: "#005d8b",
84
+ unselectedPressedStrong: "#00496c",
85
+ selectedStrong: "#0072a9",
86
+ selectedHoverStrong: "#00496c",
87
+ selectedPressedStrong: "#00344e",
83
88
  selectedWeaker: "#e6f1f6",
84
- selectedWeak: "#c5dfec",
85
89
  selectedHoverWeaker: "#c5dfec",
86
- selectedHoverWeak: "#8abed7",
87
90
  selectedPressedWeaker: "#8abed7",
91
+ unselectedWeaker: "#ffffff",
92
+ unselectedHoverWeaker: "#e6f1f6",
93
+ unselectedPressedWeaker: "#c5dfec",
94
+ selectedWeak: "#c5dfec",
95
+ selectedHoverWeak: "#8abed7",
88
96
  selectedPressedWeak: "#5ca5c8",
97
+ unselectedWeak: "#ffffff",
98
+ unselectedHoverWeak: "#c5dfec",
99
+ unselectedPressedWeak: "#8abed7",
89
100
  draftStrong: "#f1c21b",
90
101
  liveWeak: "#aed2a6",
91
102
  warningWeak: "#ffedac",
@@ -96,7 +107,8 @@ const semanticColors = {
96
107
  errorStrong: "#b42a19",
97
108
  successWeak: "#cde4c9",
98
109
  successStrong: "#326528",
99
- neutralWeak: "#ededed"
110
+ neutralWeak: "#ededed",
111
+ neutralMedium: "#666666"
100
112
  }
101
113
  };
102
114
  //#endregion
@@ -79,13 +79,24 @@ declare const semanticColors: {
79
79
  orangeWeak: string;
80
80
  orangeMedium: string;
81
81
  yellowWeak: string;
82
- selected: string;
82
+ unselectedStrong: string;
83
+ unselectedHoverStrong: string;
84
+ unselectedPressedStrong: string;
85
+ selectedStrong: string;
86
+ selectedHoverStrong: string;
87
+ selectedPressedStrong: string;
83
88
  selectedWeaker: string;
84
- selectedWeak: string;
85
89
  selectedHoverWeaker: string;
86
- selectedHoverWeak: string;
87
90
  selectedPressedWeaker: string;
91
+ unselectedWeaker: string;
92
+ unselectedHoverWeaker: string;
93
+ unselectedPressedWeaker: string;
94
+ selectedWeak: string;
95
+ selectedHoverWeak: string;
88
96
  selectedPressedWeak: string;
97
+ unselectedWeak: string;
98
+ unselectedHoverWeak: string;
99
+ unselectedPressedWeak: string;
89
100
  draftStrong: string;
90
101
  liveWeak: string;
91
102
  warningWeak: string;
@@ -97,6 +108,7 @@ declare const semanticColors: {
97
108
  successWeak: string;
98
109
  successStrong: string;
99
110
  neutralWeak: string;
111
+ neutralMedium: string;
100
112
  };
101
113
  };
102
114
  type SemanticColors = typeof semanticColors;
@@ -79,13 +79,24 @@ declare const semanticColors: {
79
79
  orangeWeak: string;
80
80
  orangeMedium: string;
81
81
  yellowWeak: string;
82
- selected: string;
82
+ unselectedStrong: string;
83
+ unselectedHoverStrong: string;
84
+ unselectedPressedStrong: string;
85
+ selectedStrong: string;
86
+ selectedHoverStrong: string;
87
+ selectedPressedStrong: string;
83
88
  selectedWeaker: string;
84
- selectedWeak: string;
85
89
  selectedHoverWeaker: string;
86
- selectedHoverWeak: string;
87
90
  selectedPressedWeaker: string;
91
+ unselectedWeaker: string;
92
+ unselectedHoverWeaker: string;
93
+ unselectedPressedWeaker: string;
94
+ selectedWeak: string;
95
+ selectedHoverWeak: string;
88
96
  selectedPressedWeak: string;
97
+ unselectedWeak: string;
98
+ unselectedHoverWeak: string;
99
+ unselectedPressedWeak: string;
89
100
  draftStrong: string;
90
101
  liveWeak: string;
91
102
  warningWeak: string;
@@ -97,6 +108,7 @@ declare const semanticColors: {
97
108
  successWeak: string;
98
109
  successStrong: string;
99
110
  neutralWeak: string;
111
+ neutralMedium: string;
100
112
  };
101
113
  };
102
114
  type SemanticColors = typeof semanticColors;
@@ -79,13 +79,24 @@ const semanticColors = {
79
79
  orangeWeak: "#fcddc6",
80
80
  orangeMedium: "#fac7a1",
81
81
  yellowWeak: "#ffedac",
82
- selected: "#005d8b",
82
+ unselectedStrong: "#ffffff",
83
+ unselectedHoverStrong: "#005d8b",
84
+ unselectedPressedStrong: "#00496c",
85
+ selectedStrong: "#0072a9",
86
+ selectedHoverStrong: "#00496c",
87
+ selectedPressedStrong: "#00344e",
83
88
  selectedWeaker: "#e6f1f6",
84
- selectedWeak: "#c5dfec",
85
89
  selectedHoverWeaker: "#c5dfec",
86
- selectedHoverWeak: "#8abed7",
87
90
  selectedPressedWeaker: "#8abed7",
91
+ unselectedWeaker: "#ffffff",
92
+ unselectedHoverWeaker: "#e6f1f6",
93
+ unselectedPressedWeaker: "#c5dfec",
94
+ selectedWeak: "#c5dfec",
95
+ selectedHoverWeak: "#8abed7",
88
96
  selectedPressedWeak: "#5ca5c8",
97
+ unselectedWeak: "#ffffff",
98
+ unselectedHoverWeak: "#c5dfec",
99
+ unselectedPressedWeak: "#8abed7",
89
100
  draftStrong: "#f1c21b",
90
101
  liveWeak: "#aed2a6",
91
102
  warningWeak: "#ffedac",
@@ -96,7 +107,8 @@ const semanticColors = {
96
107
  errorStrong: "#b42a19",
97
108
  successWeak: "#cde4c9",
98
109
  successStrong: "#326528",
99
- neutralWeak: "#ededed"
110
+ neutralWeak: "#ededed",
111
+ neutralMedium: "#666666"
100
112
  }
101
113
  };
102
114
  //#endregion
@@ -4,6 +4,7 @@
4
4
  */
5
5
  const semanticSizing = {
6
6
  height: {
7
+ xxxxs: "1rem",
7
8
  xxxs: "1.125rem",
8
9
  xxs: "1.25rem",
9
10
  xs: "1.5rem",
@@ -4,6 +4,7 @@
4
4
  */
5
5
  declare const semanticSizing: {
6
6
  height: {
7
+ xxxxs: string;
7
8
  xxxs: string;
8
9
  xxs: string;
9
10
  xs: string;
@@ -4,6 +4,7 @@
4
4
  */
5
5
  declare const semanticSizing: {
6
6
  height: {
7
+ xxxxs: string;
7
8
  xxxs: string;
8
9
  xxs: string;
9
10
  xs: string;
@@ -4,6 +4,7 @@
4
4
  */
5
5
  const semanticSizing = {
6
6
  height: {
7
+ xxxxs: "1rem",
7
8
  xxxs: "1.125rem",
8
9
  xxs: "1.25rem",
9
10
  xs: "1.5rem",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guardian/stand",
3
- "version": "0.0.71",
3
+ "version": "0.0.72",
4
4
  "repository": {
5
5
  "url": "https://github.com/guardian/stand"
6
6
  },
@@ -217,6 +217,16 @@
217
217
  "default": "./dist/Checkbox.cjs"
218
218
  }
219
219
  },
220
+ "./ToggleSwitch": {
221
+ "import": {
222
+ "types": "./dist/ToggleSwitch.d.ts",
223
+ "default": "./dist/ToggleSwitch.js"
224
+ },
225
+ "require": {
226
+ "types": "./dist/ToggleSwitch.d.cts",
227
+ "default": "./dist/ToggleSwitch.cjs"
228
+ }
229
+ },
220
230
  "./TextArea": {
221
231
  "import": {
222
232
  "types": "./dist/TextArea.d.ts",
@@ -444,6 +454,7 @@
444
454
  "./component/textInput.css": "./dist/styleD/build/css/component/textInput.css",
445
455
  "./component/radioGroup.css": "./dist/styleD/build/css/component/radioGroup.css",
446
456
  "./component/checkbox.css": "./dist/styleD/build/css/component/checkbox.css",
457
+ "./component/toggleSwitch.css": "./dist/styleD/build/css/component/toggleSwitch.css",
447
458
  "./component/textArea.css": "./dist/styleD/build/css/component/textArea.css",
448
459
  "./component/alertBanner.css": "./dist/styleD/build/css/component/alertBanner.css",
449
460
  "./component/datePicker.css": "./dist/styleD/build/css/component/datePicker.css",
@@ -539,6 +550,9 @@
539
550
  "Checkbox": [
540
551
  "./dist/Checkbox.d.ts"
541
552
  ],
553
+ "ToggleSwitch": [
554
+ "./dist/ToggleSwitch.d.ts"
555
+ ],
542
556
  "TextArea": [
543
557
  "./dist/TextArea.d.ts"
544
558
  ],