@cloudscape-design/components-themeable 3.0.1064 → 3.0.1066
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/lib/internal/manifest.json +1 -1
- package/lib/internal/scss/checkbox/styles.scss +11 -1
- package/lib/internal/scss/internal/generated/custom-css-properties/index.scss +1 -1
- package/lib/internal/scss/radio-group/styles.scss +11 -1
- package/lib/internal/scss/toggle/styles.scss +11 -1
- package/lib/internal/template/checkbox/interfaces.d.ts +45 -0
- package/lib/internal/template/checkbox/interfaces.d.ts.map +1 -1
- package/lib/internal/template/checkbox/interfaces.js.map +1 -1
- package/lib/internal/template/checkbox/internal.d.ts.map +1 -1
- package/lib/internal/template/checkbox/internal.js +3 -2
- package/lib/internal/template/checkbox/internal.js.map +1 -1
- package/lib/internal/template/checkbox/style.d.ts +4 -0
- package/lib/internal/template/checkbox/style.d.ts.map +1 -0
- package/lib/internal/template/checkbox/style.js +41 -0
- package/lib/internal/template/checkbox/style.js.map +1 -0
- package/lib/internal/template/checkbox/styles.css.js +3 -3
- package/lib/internal/template/checkbox/styles.scoped.css +11 -10
- package/lib/internal/template/checkbox/styles.selectors.js +3 -3
- package/lib/internal/template/internal/base-component/styles.scoped.css +1 -1
- package/lib/internal/template/internal/components/abstract-switch/index.d.ts +17 -1
- package/lib/internal/template/internal/components/abstract-switch/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/abstract-switch/index.js +10 -4
- package/lib/internal/template/internal/components/abstract-switch/index.js.map +1 -1
- package/lib/internal/template/internal/components/checkbox-icon/index.d.ts +10 -1
- package/lib/internal/template/internal/components/checkbox-icon/index.d.ts.map +1 -1
- package/lib/internal/template/internal/components/checkbox-icon/index.js +4 -3
- package/lib/internal/template/internal/components/checkbox-icon/index.js.map +1 -1
- package/lib/internal/template/internal/environment.js +2 -2
- package/lib/internal/template/internal/environment.json +2 -2
- package/lib/internal/template/internal/hooks/use-intersection-observer/index.d.ts.map +1 -1
- package/lib/internal/template/internal/hooks/use-intersection-observer/index.js +9 -1
- package/lib/internal/template/internal/hooks/use-intersection-observer/index.js.map +1 -1
- package/lib/internal/template/internal/utils/style.d.ts +2 -0
- package/lib/internal/template/internal/utils/style.d.ts.map +1 -0
- package/lib/internal/template/internal/utils/style.js +22 -0
- package/lib/internal/template/internal/utils/style.js.map +1 -0
- package/lib/internal/template/radio-group/interfaces.d.ts +48 -0
- package/lib/internal/template/radio-group/interfaces.d.ts.map +1 -1
- package/lib/internal/template/radio-group/interfaces.js.map +1 -1
- package/lib/internal/template/radio-group/internal.d.ts.map +1 -1
- package/lib/internal/template/radio-group/internal.js +2 -2
- package/lib/internal/template/radio-group/internal.js.map +1 -1
- package/lib/internal/template/radio-group/radio-button.d.ts +1 -0
- package/lib/internal/template/radio-group/radio-button.d.ts.map +1 -1
- package/lib/internal/template/radio-group/radio-button.js +5 -4
- package/lib/internal/template/radio-group/radio-button.js.map +1 -1
- package/lib/internal/template/radio-group/style.d.ts +11 -0
- package/lib/internal/template/radio-group/style.d.ts.map +1 -0
- package/lib/internal/template/radio-group/style.js +50 -0
- package/lib/internal/template/radio-group/style.js.map +1 -0
- package/lib/internal/template/radio-group/styles.css.js +10 -10
- package/lib/internal/template/radio-group/styles.scoped.css +22 -21
- package/lib/internal/template/radio-group/styles.selectors.js +10 -10
- package/lib/internal/template/toggle/interfaces.d.ts +36 -0
- package/lib/internal/template/toggle/interfaces.d.ts.map +1 -1
- package/lib/internal/template/toggle/interfaces.js.map +1 -1
- package/lib/internal/template/toggle/internal.d.ts.map +1 -1
- package/lib/internal/template/toggle/internal.js +3 -2
- package/lib/internal/template/toggle/internal.js.map +1 -1
- package/lib/internal/template/toggle/style.d.ts +4 -0
- package/lib/internal/template/toggle/style.d.ts.map +1 -0
- package/lib/internal/template/toggle/style.js +37 -0
- package/lib/internal/template/toggle/style.js.map +1 -0
- package/lib/internal/template/toggle/styles.css.js +10 -10
- package/lib/internal/template/toggle/styles.scoped.css +23 -22
- package/lib/internal/template/toggle/styles.selectors.js +10 -10
- package/package.json +1 -1
|
@@ -8,6 +8,11 @@ export interface ToggleProps extends BaseCheckboxProps {
|
|
|
8
8
|
*/
|
|
9
9
|
children?: React.ReactNode;
|
|
10
10
|
onChange?: NonCancelableEventHandler<ToggleProps.ChangeDetail>;
|
|
11
|
+
/**
|
|
12
|
+
* Specifies an object of selectors and properties that are used to apply custom styles.
|
|
13
|
+
* @awsuiSystem core
|
|
14
|
+
*/
|
|
15
|
+
style?: ToggleProps.Style;
|
|
11
16
|
}
|
|
12
17
|
export declare namespace ToggleProps {
|
|
13
18
|
interface Ref {
|
|
@@ -19,5 +24,36 @@ export declare namespace ToggleProps {
|
|
|
19
24
|
interface ChangeDetail {
|
|
20
25
|
checked: boolean;
|
|
21
26
|
}
|
|
27
|
+
interface Style {
|
|
28
|
+
input: {
|
|
29
|
+
background?: {
|
|
30
|
+
checked?: string;
|
|
31
|
+
default?: string;
|
|
32
|
+
disabled?: string;
|
|
33
|
+
readOnly?: string;
|
|
34
|
+
};
|
|
35
|
+
handle?: {
|
|
36
|
+
background?: {
|
|
37
|
+
checked?: string;
|
|
38
|
+
default?: string;
|
|
39
|
+
disabled?: string;
|
|
40
|
+
readOnly?: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
focusRing?: {
|
|
44
|
+
borderColor?: string;
|
|
45
|
+
borderRadius?: string;
|
|
46
|
+
borderWidth?: string;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
label?: {
|
|
50
|
+
color?: {
|
|
51
|
+
checked?: string;
|
|
52
|
+
default?: string;
|
|
53
|
+
disabled?: string;
|
|
54
|
+
readOnly?: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
}
|
|
22
58
|
}
|
|
23
59
|
//# sourceMappingURL=interfaces.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/toggle/interfaces.ts"],"names":[],"mappings":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AAE,MAAM,CAAC;oBACjB,OAAO,CAAC,EAAE,MAAM,CAAC;oBACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;oBAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;iBACnB,CAAC;aACH,CAAC;YACF,SAAS,CAAC,EAAE;gBACV,WAAW,CAAC,EAAE,MAAM,CAAC;gBACrB,YAAY,CAAC,EAAE,MAAM,CAAC;gBACtB,WAAW,CAAC,EAAE,MAAM,CAAC;aACtB,CAAC;SACH,CAAC;QACF,KAAK,CAAC,EAAE;YACN,KAAK,CAAC,EAAE;gBACN,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,OAAO,CAAC,EAAE,MAAM,CAAC;gBACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;gBAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;aACnB,CAAC;SACH,CAAC;KACH;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/toggle/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseCheckboxProps } from '../checkbox/base-checkbox';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface ToggleProps extends BaseCheckboxProps {\n /**\n * The control's label that's displayed next to the toggle. Clicking this will invoke a state change.\n * @displayname label\n */\n children?: React.ReactNode;\n\n /*\n * Called when the user changes their selection.\n * The event `detail` contains the current value for the `checked` property.\n */\n onChange?: NonCancelableEventHandler<ToggleProps.ChangeDetail>;\n}\n\nexport namespace ToggleProps {\n export interface Ref {\n /**\n * Sets input focus onto the UI control.\n */\n focus(): void;\n }\n\n export interface ChangeDetail {\n checked: boolean;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/toggle/interfaces.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React from 'react';\n\nimport { BaseCheckboxProps } from '../checkbox/base-checkbox';\nimport { NonCancelableEventHandler } from '../internal/events';\n\nexport interface ToggleProps extends BaseCheckboxProps {\n /**\n * The control's label that's displayed next to the toggle. Clicking this will invoke a state change.\n * @displayname label\n */\n children?: React.ReactNode;\n\n /*\n * Called when the user changes their selection.\n * The event `detail` contains the current value for the `checked` property.\n */\n onChange?: NonCancelableEventHandler<ToggleProps.ChangeDetail>;\n\n /**\n * Specifies an object of selectors and properties that are used to apply custom styles.\n * @awsuiSystem core\n */\n style?: ToggleProps.Style;\n}\n\nexport namespace ToggleProps {\n export interface Ref {\n /**\n * Sets input focus onto the UI control.\n */\n focus(): void;\n }\n\n export interface ChangeDetail {\n checked: boolean;\n }\n\n export interface Style {\n input: {\n background?: {\n checked?: string;\n default?: string;\n disabled?: string;\n readOnly?: string;\n };\n handle?: {\n background?: {\n checked?: string;\n default?: string;\n disabled?: string;\n readOnly?: string;\n };\n };\n focusRing?: {\n borderColor?: string;\n borderRadius?: string;\n borderWidth?: string;\n };\n };\n label?: {\n color?: {\n checked?: string;\n default?: string;\n disabled?: string;\n readOnly?: string;\n };\n };\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/toggle/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAatC,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../../src/toggle/internal.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAiB,MAAM,OAAO,CAAC;AAatC,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAElF,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAK3C,UAAU,mBAAoB,SAAQ,WAAW,EAAE,0BAA0B;IAC3E,kCAAkC,CAAC,EAAE,OAAO,CAAC;CAC9C;AAED,QAAA,MAAM,cAAc,6FAmGnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -9,9 +9,10 @@ import AbstractSwitch from '../internal/components/abstract-switch';
|
|
|
9
9
|
import { useFormFieldContext } from '../internal/context/form-field-context';
|
|
10
10
|
import { fireNonCancelableEvent } from '../internal/events';
|
|
11
11
|
import useForwardFocus from '../internal/hooks/forward-focus';
|
|
12
|
+
import { getAbstractSwitchStyles, getStyledControlStyle } from './style';
|
|
12
13
|
import styles from './styles.css.js';
|
|
13
14
|
const InternalToggle = React.forwardRef((_a, ref) => {
|
|
14
|
-
var { controlId, checked, name, disabled, readOnly, children, description, ariaLabel, ariaControls, onFocus, onBlur, onChange, __internalRootRef = null, __injectAnalyticsComponentMetadata } = _a, rest = __rest(_a, ["controlId", "checked", "name", "disabled", "readOnly", "children", "description", "ariaLabel", "ariaControls", "onFocus", "onBlur", "onChange", "__internalRootRef", "__injectAnalyticsComponentMetadata"]);
|
|
15
|
+
var { controlId, checked, name, disabled, readOnly, children, description, ariaLabel, ariaControls, onFocus, onBlur, onChange, style, __internalRootRef = null, __injectAnalyticsComponentMetadata } = _a, rest = __rest(_a, ["controlId", "checked", "name", "disabled", "readOnly", "children", "description", "ariaLabel", "ariaControls", "onFocus", "onBlur", "onChange", "style", "__internalRootRef", "__injectAnalyticsComponentMetadata"]);
|
|
15
16
|
const { ariaDescribedby, ariaLabelledby } = useFormFieldContext(rest);
|
|
16
17
|
const baseProps = getBaseProps(rest);
|
|
17
18
|
const checkboxRef = useRef(null);
|
|
@@ -46,7 +47,7 @@ const InternalToggle = React.forwardRef((_a, ref) => {
|
|
|
46
47
|
[styles['toggle-handle-checked']]: checked,
|
|
47
48
|
[styles['toggle-handle-disabled']]: disabled,
|
|
48
49
|
[styles['toggle-handle-readonly']]: readOnly,
|
|
49
|
-
}) }), __internalRootRef: __internalRootRef }, getAnalyticsMetadataAttribute(analyticsMetadata))));
|
|
50
|
+
}), style: getStyledControlStyle(style, checked, disabled, readOnly) }), style: getAbstractSwitchStyles(style, checked, disabled, readOnly), __internalRootRef: __internalRootRef }, getAnalyticsMetadataAttribute(analyticsMetadata))));
|
|
50
51
|
});
|
|
51
52
|
export default InternalToggle;
|
|
52
53
|
//# sourceMappingURL=internal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/toggle/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAEL,6BAA6B,GAC9B,MAAM,kEAAkE,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,cAAc,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,eAAe,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"internal.js","sourceRoot":"","sources":["../../../src/toggle/internal.tsx"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAEL,6BAA6B,GAC9B,MAAM,kEAAkE,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,cAAc,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,sBAAsB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,CAAC,EACD,aAAa;QACX,yCAAyC;QACzC,8BACE,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE;gBACvC,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,EAAE,OAAO;gBAC1C,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC,EAAE,QAAQ;gBAC5C,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC,EAAE,QAAQ;aAC7C,CAAC,EACF,KAAK,EAAE,qBAAqB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,GAChE,EAEJ,KAAK,EAAE,uBAAuB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAClE,iBAAiB,EAAE,iBAAiB,IAChC,6BAA6B,CAAC,iBAAiB,CAAC,EACpD,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport React, { useRef } from 'react';\nimport clsx from 'clsx';\n\nimport {\n GeneratedAnalyticsMetadataFragment,\n getAnalyticsMetadataAttribute,\n} from '@cloudscape-design/component-toolkit/internal/analytics-metadata';\n\nimport { getBaseProps } from '../internal/base-component';\nimport AbstractSwitch from '../internal/components/abstract-switch';\nimport { useFormFieldContext } from '../internal/context/form-field-context';\nimport { fireNonCancelableEvent } from '../internal/events';\nimport useForwardFocus from '../internal/hooks/forward-focus';\nimport { InternalBaseComponentProps } from '../internal/hooks/use-base-component';\nimport { GeneratedAnalyticsMetadataToggleComponent } from './analytics-metadata/interfaces';\nimport { ToggleProps } from './interfaces';\nimport { getAbstractSwitchStyles, getStyledControlStyle } from './style';\n\nimport styles from './styles.css.js';\n\ninterface InternalToggleProps extends ToggleProps, InternalBaseComponentProps {\n __injectAnalyticsComponentMetadata?: boolean;\n}\n\nconst InternalToggle = React.forwardRef<ToggleProps.Ref, InternalToggleProps>(\n (\n {\n controlId,\n checked,\n name,\n disabled,\n readOnly,\n children,\n description,\n ariaLabel,\n ariaControls,\n onFocus,\n onBlur,\n onChange,\n style,\n __internalRootRef = null,\n __injectAnalyticsComponentMetadata,\n ...rest\n },\n ref\n ) => {\n const { ariaDescribedby, ariaLabelledby } = useFormFieldContext(rest);\n const baseProps = getBaseProps(rest);\n const checkboxRef = useRef<HTMLInputElement>(null);\n\n const analyticsMetadata: GeneratedAnalyticsMetadataFragment = {};\n const analyticsComponentMetadata: GeneratedAnalyticsMetadataToggleComponent = {\n name: 'awsui.Toggle',\n label: { root: 'self' },\n properties: {\n checked: `${!!checked}`,\n },\n };\n\n if (__injectAnalyticsComponentMetadata) {\n analyticsMetadata.component = analyticsComponentMetadata;\n }\n\n if (!disabled && !readOnly) {\n analyticsMetadata.action = !checked ? 'select' : 'deselect';\n }\n useForwardFocus(ref, checkboxRef);\n\n return (\n <AbstractSwitch\n {...baseProps}\n className={clsx(styles.root, baseProps.className)}\n controlClassName={clsx(styles['toggle-control'], {\n [styles['toggle-control-checked']]: checked,\n [styles['toggle-control-disabled']]: disabled,\n [styles['toggle-control-readonly']]: readOnly,\n })}\n outlineClassName={styles.outline}\n controlId={controlId}\n disabled={disabled}\n readOnly={readOnly}\n label={children}\n description={description}\n descriptionBottomPadding={true}\n ariaLabel={ariaLabel}\n ariaLabelledby={ariaLabelledby}\n ariaDescribedby={ariaDescribedby}\n ariaControls={ariaControls}\n nativeControl={nativeControlProps => (\n <input\n {...nativeControlProps}\n ref={checkboxRef}\n type=\"checkbox\"\n checked={checked}\n name={name}\n aria-disabled={readOnly && !disabled ? 'true' : undefined}\n onFocus={() => fireNonCancelableEvent(onFocus)}\n onBlur={() => fireNonCancelableEvent(onBlur)}\n // empty handler to suppress React controllability warning\n onChange={() => {}}\n />\n )}\n onClick={() => {\n checkboxRef.current?.focus();\n fireNonCancelableEvent(onChange, { checked: !checked });\n }}\n styledControl={\n /*Using span, not div for HTML validity*/\n <span\n className={clsx(styles['toggle-handle'], {\n [styles['toggle-handle-checked']]: checked,\n [styles['toggle-handle-disabled']]: disabled,\n [styles['toggle-handle-readonly']]: readOnly,\n })}\n style={getStyledControlStyle(style, checked, disabled, readOnly)}\n />\n }\n style={getAbstractSwitchStyles(style, checked, disabled, readOnly)}\n __internalRootRef={__internalRootRef}\n {...getAnalyticsMetadataAttribute(analyticsMetadata)}\n />\n );\n }\n);\n\nexport default InternalToggle;\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ToggleProps } from './interfaces';
|
|
2
|
+
export declare function getAbstractSwitchStyles(style: ToggleProps.Style | undefined, checked: boolean | undefined, disabled: boolean | undefined, readOnly: boolean | undefined): {};
|
|
3
|
+
export declare function getStyledControlStyle(style: ToggleProps.Style | undefined, checked: boolean | undefined, disabled: boolean | undefined, readOnly: boolean | undefined): {};
|
|
4
|
+
//# sourceMappingURL=style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../src/toggle/style.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,wBAAgB,uBAAuB,CACrC,KAAK,EAAE,WAAW,CAAC,KAAK,GAAG,SAAS,EACpC,OAAO,EAAE,OAAO,GAAG,SAAS,EAC5B,QAAQ,EAAE,OAAO,GAAG,SAAS,EAC7B,QAAQ,EAAE,OAAO,GAAG,SAAS,MAwB9B;AAED,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,WAAW,CAAC,KAAK,GAAG,SAAS,EACpC,OAAO,EAAE,OAAO,GAAG,SAAS,EAC5B,QAAQ,EAAE,OAAO,GAAG,SAAS,EAC7B,QAAQ,EAAE,OAAO,GAAG,SAAS,MAa9B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { SYSTEM } from '../internal/environment';
|
|
4
|
+
import { getComputedAbstractSwitchState } from '../internal/utils/style';
|
|
5
|
+
export function getAbstractSwitchStyles(style, checked, disabled, readOnly) {
|
|
6
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
7
|
+
let properties = {};
|
|
8
|
+
if (SYSTEM === 'core' && ((style === null || style === void 0 ? void 0 : style.input) || (style === null || style === void 0 ? void 0 : style.label))) {
|
|
9
|
+
const computedState = getComputedAbstractSwitchState(checked, disabled, readOnly, false);
|
|
10
|
+
properties = {
|
|
11
|
+
control: {
|
|
12
|
+
background: ((_a = style === null || style === void 0 ? void 0 : style.input) === null || _a === void 0 ? void 0 : _a.background) && style.input.background[computedState],
|
|
13
|
+
},
|
|
14
|
+
label: {
|
|
15
|
+
color: ((_b = style === null || style === void 0 ? void 0 : style.label) === null || _b === void 0 ? void 0 : _b.color) && style.label.color[computedState],
|
|
16
|
+
},
|
|
17
|
+
focusRing: {
|
|
18
|
+
borderColor: (_d = (_c = style === null || style === void 0 ? void 0 : style.input) === null || _c === void 0 ? void 0 : _c.focusRing) === null || _d === void 0 ? void 0 : _d.borderColor,
|
|
19
|
+
borderRadius: (_f = (_e = style === null || style === void 0 ? void 0 : style.input) === null || _e === void 0 ? void 0 : _e.focusRing) === null || _f === void 0 ? void 0 : _f.borderRadius,
|
|
20
|
+
borderWidth: (_h = (_g = style === null || style === void 0 ? void 0 : style.input) === null || _g === void 0 ? void 0 : _g.focusRing) === null || _h === void 0 ? void 0 : _h.borderWidth,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
return properties;
|
|
25
|
+
}
|
|
26
|
+
export function getStyledControlStyle(style, checked, disabled, readOnly) {
|
|
27
|
+
var _a, _b;
|
|
28
|
+
let properties = {};
|
|
29
|
+
if (SYSTEM === 'core' && ((_b = (_a = style === null || style === void 0 ? void 0 : style.input) === null || _a === void 0 ? void 0 : _a.handle) === null || _b === void 0 ? void 0 : _b.background)) {
|
|
30
|
+
const computedState = getComputedAbstractSwitchState(checked, disabled, readOnly, undefined);
|
|
31
|
+
properties = {
|
|
32
|
+
background: style.input.handle.background[computedState],
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
return properties;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/toggle/style.tsx"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,sCAAsC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC;AAGzE,MAAM,UAAU,uBAAuB,CACrC,KAAoC,EACpC,OAA4B,EAC5B,QAA6B,EAC7B,QAA6B;;IAE7B,IAAI,UAAU,GAAG,EAAE,CAAC;IAEpB,IAAI,MAAM,KAAK,MAAM,IAAI,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,MAAI,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,CAAA,CAAC,EAAE;QACvD,MAAM,aAAa,GAAG,8BAA8B,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;QAEzF,UAAU,GAAG;YACX,OAAO,EAAE;gBACP,UAAU,EACR,CAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,0CAAE,UAAU,KAAI,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,aAAoD,CAAC;aAC3G;YACD,KAAK,EAAE;gBACL,KAAK,EAAE,CAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,0CAAE,KAAK,KAAI,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,aAA+C,CAAC;aACjG;YACD,SAAS,EAAE;gBACT,WAAW,EAAE,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,0CAAE,SAAS,0CAAE,WAAW;gBACjD,YAAY,EAAE,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,0CAAE,SAAS,0CAAE,YAAY;gBACnD,WAAW,EAAE,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,0CAAE,SAAS,0CAAE,WAAW;aAClD;SACF,CAAC;KACH;IAED,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,qBAAqB,CACnC,KAAoC,EACpC,OAA4B,EAC5B,QAA6B,EAC7B,QAA6B;;IAE7B,IAAI,UAAU,GAAG,EAAE,CAAC;IAEpB,IAAI,MAAM,KAAK,MAAM,KAAI,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,0CAAE,MAAM,0CAAE,UAAU,CAAA,EAAE;QACzD,MAAM,aAAa,GAAG,8BAA8B,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;QAE7F,UAAU,GAAG;YACX,UAAU,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,aAA2D,CAAC;SACvG,CAAC;KACH;IAED,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n// SPDX-License-Identifier: Apache-2.0\nimport { SYSTEM } from '../internal/environment';\nimport { getComputedAbstractSwitchState } from '../internal/utils/style';\nimport { ToggleProps } from './interfaces';\n\nexport function getAbstractSwitchStyles(\n style: ToggleProps.Style | undefined,\n checked: boolean | undefined,\n disabled: boolean | undefined,\n readOnly: boolean | undefined\n) {\n let properties = {};\n\n if (SYSTEM === 'core' && (style?.input || style?.label)) {\n const computedState = getComputedAbstractSwitchState(checked, disabled, readOnly, false);\n\n properties = {\n control: {\n background:\n style?.input?.background && style.input.background[computedState as keyof typeof style.input.background],\n },\n label: {\n color: style?.label?.color && style.label.color[computedState as keyof typeof style.label.color],\n },\n focusRing: {\n borderColor: style?.input?.focusRing?.borderColor,\n borderRadius: style?.input?.focusRing?.borderRadius,\n borderWidth: style?.input?.focusRing?.borderWidth,\n },\n };\n }\n\n return properties;\n}\n\nexport function getStyledControlStyle(\n style: ToggleProps.Style | undefined,\n checked: boolean | undefined,\n disabled: boolean | undefined,\n readOnly: boolean | undefined\n) {\n let properties = {};\n\n if (SYSTEM === 'core' && style?.input?.handle?.background) {\n const computedState = getComputedAbstractSwitchState(checked, disabled, readOnly, undefined);\n\n properties = {\n background: style.input.handle.background[computedState as keyof typeof style.input.handle.background],\n };\n }\n\n return properties;\n}\n"]}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
|
|
2
2
|
import './styles.scoped.css';
|
|
3
3
|
export default {
|
|
4
|
-
"root": "
|
|
5
|
-
"outline": "
|
|
6
|
-
"toggle-control": "awsui_toggle-
|
|
7
|
-
"toggle-control-checked": "awsui_toggle-control-
|
|
8
|
-
"toggle-control-disabled": "awsui_toggle-control-
|
|
9
|
-
"toggle-control-readonly": "awsui_toggle-control-
|
|
10
|
-
"toggle-handle": "awsui_toggle-
|
|
11
|
-
"toggle-handle-checked": "awsui_toggle-handle-
|
|
12
|
-
"toggle-handle-disabled": "awsui_toggle-handle-
|
|
13
|
-
"toggle-handle-readonly": "awsui_toggle-handle-
|
|
4
|
+
"root": "awsui_root_4yi2u_1g46u_145",
|
|
5
|
+
"outline": "awsui_outline_4yi2u_1g46u_178",
|
|
6
|
+
"toggle-control": "awsui_toggle-control_4yi2u_1g46u_201",
|
|
7
|
+
"toggle-control-checked": "awsui_toggle-control-checked_4yi2u_1g46u_214",
|
|
8
|
+
"toggle-control-disabled": "awsui_toggle-control-disabled_4yi2u_1g46u_217",
|
|
9
|
+
"toggle-control-readonly": "awsui_toggle-control-readonly_4yi2u_1g46u_223",
|
|
10
|
+
"toggle-handle": "awsui_toggle-handle_4yi2u_1g46u_227",
|
|
11
|
+
"toggle-handle-checked": "awsui_toggle-handle-checked_4yi2u_1g46u_252",
|
|
12
|
+
"toggle-handle-disabled": "awsui_toggle-handle-disabled_4yi2u_1g46u_259",
|
|
13
|
+
"toggle-handle-readonly": "awsui_toggle-handle-readonly_4yi2u_1g46u_263"
|
|
14
14
|
};
|
|
15
15
|
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
*/
|
|
143
143
|
/* Style used for links in slots/components that are text heavy, to help links stand out among
|
|
144
144
|
surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F73#description */
|
|
145
|
-
.
|
|
145
|
+
.awsui_root_4yi2u_1g46u_145:not(#\9) {
|
|
146
146
|
border-collapse: separate;
|
|
147
147
|
border-spacing: 0;
|
|
148
148
|
box-sizing: border-box;
|
|
@@ -175,14 +175,15 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
175
175
|
display: flex;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
.
|
|
178
|
+
.awsui_outline_4yi2u_1g46u_178:not(#\9) {
|
|
179
|
+
--awsui-style-focus-ring-box-shadow-kcc2gu: 0 0 0 var(--awsui-style-focus-ring-border-width-kcc2gu, 2px) var(--awsui-style-focus-ring-border-color-kcc2gu, var(--color-border-item-focused-r5f6xl, #0073bb));
|
|
179
180
|
position: relative;
|
|
180
181
|
}
|
|
181
|
-
.
|
|
182
|
+
.awsui_outline_4yi2u_1g46u_178:not(#\9) {
|
|
182
183
|
outline: 2px dotted transparent;
|
|
183
184
|
outline-offset: calc(2px - 1px);
|
|
184
185
|
}
|
|
185
|
-
.
|
|
186
|
+
.awsui_outline_4yi2u_1g46u_178:not(#\9)::before {
|
|
186
187
|
content: " ";
|
|
187
188
|
display: block;
|
|
188
189
|
position: absolute;
|
|
@@ -190,14 +191,14 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
190
191
|
inset-block-start: calc(-1 * 2px);
|
|
191
192
|
inline-size: calc(100% + 2px + 2px);
|
|
192
193
|
block-size: calc(100% + 2px + 2px);
|
|
193
|
-
border-start-start-radius: var(--border-radius-control-default-focus-ring-9xsko1, 2px);
|
|
194
|
-
border-start-end-radius: var(--border-radius-control-default-focus-ring-9xsko1, 2px);
|
|
195
|
-
border-end-start-radius: var(--border-radius-control-default-focus-ring-9xsko1, 2px);
|
|
196
|
-
border-end-end-radius: var(--border-radius-control-default-focus-ring-9xsko1, 2px);
|
|
197
|
-
box-shadow:
|
|
194
|
+
border-start-start-radius: var(--awsui-style-focus-ring-border-radius-kcc2gu, var(--border-radius-control-default-focus-ring-9xsko1, 2px));
|
|
195
|
+
border-start-end-radius: var(--awsui-style-focus-ring-border-radius-kcc2gu, var(--border-radius-control-default-focus-ring-9xsko1, 2px));
|
|
196
|
+
border-end-start-radius: var(--awsui-style-focus-ring-border-radius-kcc2gu, var(--border-radius-control-default-focus-ring-9xsko1, 2px));
|
|
197
|
+
border-end-end-radius: var(--awsui-style-focus-ring-border-radius-kcc2gu, var(--border-radius-control-default-focus-ring-9xsko1, 2px));
|
|
198
|
+
box-shadow: var(--awsui-style-focus-ring-box-shadow-kcc2gu);
|
|
198
199
|
}
|
|
199
200
|
|
|
200
|
-
.awsui_toggle-
|
|
201
|
+
.awsui_toggle-control_4yi2u_1g46u_201:not(#\9) {
|
|
201
202
|
forced-color-adjust: none;
|
|
202
203
|
margin-block-start: calc((var(--line-height-body-m-bedeoh, 22px) - 16px) / 2);
|
|
203
204
|
min-block-size: 16px;
|
|
@@ -210,20 +211,20 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
210
211
|
border-end-start-radius: 8px;
|
|
211
212
|
border-end-end-radius: 8px;
|
|
212
213
|
}
|
|
213
|
-
.awsui_toggle-control-
|
|
214
|
+
.awsui_toggle-control-checked_4yi2u_1g46u_214:not(#\9) {
|
|
214
215
|
background: var(--color-background-control-checked-se0x0e, #0073bb);
|
|
215
216
|
}
|
|
216
|
-
.awsui_toggle-control-
|
|
217
|
+
.awsui_toggle-control-disabled_4yi2u_1g46u_217:not(#\9) {
|
|
217
218
|
background: var(--color-background-control-disabled-2ixett, #d5dbdb);
|
|
218
219
|
}
|
|
219
|
-
.awsui_toggle-control-
|
|
220
|
+
.awsui_toggle-control-disabled_4yi2u_1g46u_217.awsui_toggle-control-checked_4yi2u_1g46u_214:not(#\9) {
|
|
220
221
|
background: var(--color-background-toggle-checked-disabled-i9a3za, #99cbe4);
|
|
221
222
|
}
|
|
222
|
-
.awsui_toggle-control-
|
|
223
|
+
.awsui_toggle-control-readonly_4yi2u_1g46u_223:not(#\9) {
|
|
223
224
|
background: var(--color-background-control-disabled-2ixett, #d5dbdb);
|
|
224
225
|
}
|
|
225
226
|
|
|
226
|
-
.awsui_toggle-
|
|
227
|
+
.awsui_toggle-handle_4yi2u_1g46u_227:not(#\9) {
|
|
227
228
|
display: block;
|
|
228
229
|
position: absolute;
|
|
229
230
|
border-start-start-radius: 6px;
|
|
@@ -239,29 +240,29 @@ surrounding text. (WCAG F73) https://www.w3.org/WAI/WCAG21/Techniques/failures/F
|
|
|
239
240
|
transition: transform var(--motion-duration-fast-okdxjh, 90ms) var(--motion-easing-ease-out-quart-x9fbvw, cubic-bezier(0.165, 0.84, 0.44, 1)), background-color var(--motion-duration-fast-okdxjh, 90ms) var(--motion-easing-ease-out-quart-x9fbvw, cubic-bezier(0.165, 0.84, 0.44, 1));
|
|
240
241
|
}
|
|
241
242
|
@media (prefers-reduced-motion: reduce) {
|
|
242
|
-
.awsui_toggle-
|
|
243
|
+
.awsui_toggle-handle_4yi2u_1g46u_227:not(#\9) {
|
|
243
244
|
animation: none;
|
|
244
245
|
transition: none;
|
|
245
246
|
}
|
|
246
247
|
}
|
|
247
|
-
.awsui-motion-disabled .awsui_toggle-
|
|
248
|
+
.awsui-motion-disabled .awsui_toggle-handle_4yi2u_1g46u_227:not(#\9), .awsui-mode-entering .awsui_toggle-handle_4yi2u_1g46u_227:not(#\9) {
|
|
248
249
|
animation: none;
|
|
249
250
|
transition: none;
|
|
250
251
|
}
|
|
251
|
-
.awsui_toggle-handle-
|
|
252
|
+
.awsui_toggle-handle-checked_4yi2u_1g46u_252:not(#\9) {
|
|
252
253
|
transform: translateX(8px);
|
|
253
254
|
/* stylelint-disable-next-line plugin/no-unsupported-browser-features */
|
|
254
255
|
}
|
|
255
|
-
.awsui_toggle-handle-
|
|
256
|
+
.awsui_toggle-handle-checked_4yi2u_1g46u_252:not(#\9):dir(rtl) {
|
|
256
257
|
transform: translateX(-8px);
|
|
257
258
|
}
|
|
258
|
-
.awsui_toggle-handle-
|
|
259
|
+
.awsui_toggle-handle-disabled_4yi2u_1g46u_259:not(#\9) {
|
|
259
260
|
background: var(--color-foreground-control-disabled-kj751b, #ffffff);
|
|
260
261
|
box-shadow: none;
|
|
261
262
|
}
|
|
262
|
-
.awsui_toggle-handle-
|
|
263
|
+
.awsui_toggle-handle-readonly_4yi2u_1g46u_263:not(#\9):not(.awsui_toggle-handle-disabled_4yi2u_1g46u_259) {
|
|
263
264
|
box-shadow: none;
|
|
264
265
|
}
|
|
265
|
-
.awsui_toggle-handle-
|
|
266
|
+
.awsui_toggle-handle-readonly_4yi2u_1g46u_263:not(#\9):not(.awsui_toggle-handle-disabled_4yi2u_1g46u_259).awsui_toggle-handle-checked_4yi2u_1g46u_252 {
|
|
266
267
|
background: var(--color-foreground-control-read-only-cgy3yn, #687078);
|
|
267
268
|
}
|
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
// es-module interop with Babel and Typescript
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
module.exports.default = {
|
|
5
|
-
"root": "
|
|
6
|
-
"outline": "
|
|
7
|
-
"toggle-control": "awsui_toggle-
|
|
8
|
-
"toggle-control-checked": "awsui_toggle-control-
|
|
9
|
-
"toggle-control-disabled": "awsui_toggle-control-
|
|
10
|
-
"toggle-control-readonly": "awsui_toggle-control-
|
|
11
|
-
"toggle-handle": "awsui_toggle-
|
|
12
|
-
"toggle-handle-checked": "awsui_toggle-handle-
|
|
13
|
-
"toggle-handle-disabled": "awsui_toggle-handle-
|
|
14
|
-
"toggle-handle-readonly": "awsui_toggle-handle-
|
|
5
|
+
"root": "awsui_root_4yi2u_1g46u_145",
|
|
6
|
+
"outline": "awsui_outline_4yi2u_1g46u_178",
|
|
7
|
+
"toggle-control": "awsui_toggle-control_4yi2u_1g46u_201",
|
|
8
|
+
"toggle-control-checked": "awsui_toggle-control-checked_4yi2u_1g46u_214",
|
|
9
|
+
"toggle-control-disabled": "awsui_toggle-control-disabled_4yi2u_1g46u_217",
|
|
10
|
+
"toggle-control-readonly": "awsui_toggle-control-readonly_4yi2u_1g46u_223",
|
|
11
|
+
"toggle-handle": "awsui_toggle-handle_4yi2u_1g46u_227",
|
|
12
|
+
"toggle-handle-checked": "awsui_toggle-handle-checked_4yi2u_1g46u_252",
|
|
13
|
+
"toggle-handle-disabled": "awsui_toggle-handle-disabled_4yi2u_1g46u_259",
|
|
14
|
+
"toggle-handle-readonly": "awsui_toggle-handle-readonly_4yi2u_1g46u_263"
|
|
15
15
|
};
|
|
16
16
|
|