@elliemae/ds-form-toggle 3.53.0-alpha.1 → 3.53.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ControlledToggle.js +75 -73
- package/dist/cjs/ControlledToggle.js.map +2 -2
- package/dist/cjs/config/useDSControlledToggle.js +25 -2
- package/dist/cjs/config/useDSControlledToggle.js.map +2 -2
- package/dist/cjs/{parts/AddTooltipOnReadOnly.js → config/useGetButtonProps.js} +30 -10
- package/dist/cjs/config/useGetButtonProps.js.map +7 -0
- package/dist/cjs/{DSFormToggleDefinitions.js → config/useGetWidestLabelWidth.js} +40 -6
- package/dist/cjs/config/useGetWidestLabelWidth.js.map +7 -0
- package/dist/cjs/constants/index.js +16 -3
- package/dist/cjs/constants/index.js.map +2 -2
- package/dist/cjs/index.js +11 -2
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/react-desc-prop-types.js +12 -17
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/styles.js +49 -35
- package/dist/cjs/styles.js.map +2 -2
- package/dist/cjs/utils/styleHelpers.js +12 -13
- package/dist/cjs/utils/styleHelpers.js.map +2 -2
- package/dist/esm/ControlledToggle.js +81 -79
- package/dist/esm/ControlledToggle.js.map +2 -2
- package/dist/esm/config/useDSControlledToggle.js +25 -2
- package/dist/esm/config/useDSControlledToggle.js.map +2 -2
- package/dist/esm/config/useGetButtonProps.js +31 -0
- package/dist/esm/config/useGetButtonProps.js.map +7 -0
- package/dist/esm/config/useGetWidestLabelWidth.js +40 -0
- package/dist/esm/config/useGetWidestLabelWidth.js.map +7 -0
- package/dist/esm/constants/index.js +16 -3
- package/dist/esm/constants/index.js.map +2 -2
- package/dist/esm/index.js +7 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/react-desc-prop-types.js +12 -17
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/styles.js +50 -36
- package/dist/esm/styles.js.map +2 -2
- package/dist/esm/utils/styleHelpers.js +12 -13
- package/dist/esm/utils/styleHelpers.js.map +2 -2
- package/dist/types/config/useDSControlledToggle.d.ts +190 -193
- package/dist/types/config/useGetButtonProps.d.ts +10 -0
- package/dist/types/config/useGetWidestLabelWidth.d.ts +14 -0
- package/dist/types/constants/index.d.ts +15 -2
- package/dist/types/index.d.ts +2 -1
- package/dist/types/react-desc-prop-types.d.ts +39 -15
- package/dist/types/styles.d.ts +31 -31
- package/dist/types/tests/DSControlledToggle.app-sdk-compatibility.test.d.ts +1 -0
- package/dist/types/tests/DSControlledToggle.data-testId.test.d.ts +1 -0
- package/dist/types/utils/styleHelpers.d.ts +9 -9
- package/package.json +10 -13
- package/dist/cjs/DSFormToggleDefinitions.js.map +0 -7
- package/dist/cjs/parts/AddTooltipOnReadOnly.js.map +0 -7
- package/dist/esm/DSFormToggleDefinitions.js +0 -6
- package/dist/esm/DSFormToggleDefinitions.js.map +0 -7
- package/dist/esm/parts/AddTooltipOnReadOnly.js +0 -11
- package/dist/esm/parts/AddTooltipOnReadOnly.js.map +0 -7
- package/dist/types/DSFormToggleDefinitions.d.ts +0 -1
- package/dist/types/parts/AddTooltipOnReadOnly.d.ts +0 -5
package/dist/types/styles.d.ts
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { DSControlledToggleT } from './react-desc-prop-types.js';
|
|
3
2
|
interface StyledContainerT {
|
|
4
|
-
size: DSControlledToggleT.ToggleSize;
|
|
3
|
+
$size: DSControlledToggleT.ToggleSize;
|
|
5
4
|
disabled: boolean;
|
|
6
5
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
export declare const StyledContainer: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StyledContainerT & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
7
|
+
interface StyledRadiusShapeT {
|
|
8
|
+
$width: number;
|
|
9
|
+
$size: DSControlledToggleT.ToggleSize;
|
|
11
10
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
htmlFor: string;
|
|
11
|
+
export declare const StyledRadiusShape: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StyledRadiusShapeT & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
12
|
+
interface StyledButtonContentWrapperT {
|
|
13
|
+
$checked: boolean;
|
|
14
|
+
$size: DSControlledToggleT.ToggleSize;
|
|
15
|
+
$disabled: boolean;
|
|
16
|
+
$applyAriaDisabled: boolean;
|
|
17
|
+
$readOnly: boolean;
|
|
20
18
|
}
|
|
19
|
+
export declare const StyledButtonContentWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StyledButtonContentWrapperT & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
21
20
|
interface StyledCircleT {
|
|
22
|
-
size: DSControlledToggleT.ToggleSize;
|
|
23
|
-
readOnly: boolean;
|
|
24
|
-
|
|
25
|
-
disabled: boolean;
|
|
21
|
+
$size: DSControlledToggleT.ToggleSize;
|
|
22
|
+
$readOnly: boolean;
|
|
23
|
+
$applyAriaDisabled: boolean;
|
|
26
24
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
size: DSControlledToggleT.ToggleSize;
|
|
30
|
-
|
|
31
|
-
disabled: boolean;
|
|
32
|
-
applyAriaDisabled: boolean;
|
|
25
|
+
export declare const StyledCircle: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StyledCircleT & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
26
|
+
interface StyledTextWrapperT {
|
|
27
|
+
$size: DSControlledToggleT.ToggleSize;
|
|
28
|
+
$disabled: boolean;
|
|
33
29
|
}
|
|
30
|
+
export declare const StyledTextWrapper: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, StyledTextWrapperT & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
31
|
+
export declare const StyledButton: import("styled-components").StyledComponent<import("react").ComponentType<import("@elliemae/ds-button-v2").DSButtonV3T.Props>, import("@elliemae/ds-system").Theme, object & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<import("react").ComponentType<import("@elliemae/ds-button-v2").DSButtonV3T.Props>>, never>;
|
|
34
32
|
interface SetLabelWidthT {
|
|
35
|
-
size: DSControlledToggleT.ToggleSize;
|
|
33
|
+
$size: DSControlledToggleT.ToggleSize;
|
|
36
34
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
35
|
+
/**
|
|
36
|
+
* This should not be required, we are doing this to keep the wcagViolationLabelOn/wcagViolationLabelOff working
|
|
37
|
+
* this calculates the width of the widest custom label and sets the width of both labels to that width to avoid layout shift on toggle
|
|
38
|
+
*
|
|
39
|
+
* ---
|
|
40
|
+
*
|
|
41
|
+
* this can be safely removed in favor of a sensible default min-width for the accessible ON/OFF labels when we can actually kill the wcagViolationLabelOn/wcagViolationLabelOff props
|
|
42
|
+
*/
|
|
43
43
|
export declare const SetLabelWidth: import("styled-components").StyledComponent<"div", import("@elliemae/ds-system").Theme, SetLabelWidthT & import("@elliemae/ds-system").OwnerInterface & import("@elliemae/ds-system").InnerRefInterface<"div">, never>;
|
|
44
44
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -25,17 +25,17 @@ export declare const borderRadius: {
|
|
|
25
25
|
m: string;
|
|
26
26
|
l: string;
|
|
27
27
|
};
|
|
28
|
-
export declare const handleFontSize: (size: DSControlledToggleT.ToggleSize, { fontSizes }: PropsWithTheme[
|
|
28
|
+
export declare const handleFontSize: (size: DSControlledToggleT.ToggleSize, { fontSizes }: PropsWithTheme["theme"]) => string;
|
|
29
29
|
export declare const getInterpolatedBgDsToggleColorByProps: (props: PropsWithTheme<{
|
|
30
|
-
checked: boolean;
|
|
31
|
-
disabled: boolean;
|
|
32
|
-
applyAriaDisabled: boolean;
|
|
33
|
-
readOnly: boolean;
|
|
30
|
+
$checked: boolean;
|
|
31
|
+
$disabled: boolean;
|
|
32
|
+
$applyAriaDisabled: boolean;
|
|
33
|
+
$readOnly: boolean;
|
|
34
34
|
}>) => string;
|
|
35
35
|
export declare const getInterpolatedBorderDsToggleColorByProps: (props: PropsWithTheme<{
|
|
36
|
-
checked: boolean;
|
|
37
|
-
disabled: boolean;
|
|
38
|
-
applyAriaDisabled: boolean;
|
|
39
|
-
readOnly: boolean;
|
|
36
|
+
$checked: boolean;
|
|
37
|
+
$disabled: boolean;
|
|
38
|
+
$applyAriaDisabled: boolean;
|
|
39
|
+
$readOnly: boolean;
|
|
40
40
|
}>) => string;
|
|
41
41
|
export declare const handleCursors: (disabled: boolean, applyAriaDisabled: boolean, readOnly: boolean) => string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-form-toggle",
|
|
3
|
-
"version": "3.53.0-alpha.
|
|
3
|
+
"version": "3.53.0-alpha.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Controlled Form Toggle",
|
|
6
6
|
"files": [
|
|
@@ -38,25 +38,22 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"lodash-es": "^4.17.21",
|
|
40
40
|
"styled-components": "~5.3.9",
|
|
41
|
-
"uid": "
|
|
42
|
-
"@elliemae/ds-button-v2": "3.53.0-alpha.
|
|
43
|
-
"@elliemae/ds-
|
|
44
|
-
"@elliemae/ds-
|
|
45
|
-
"@elliemae/ds-tooltip-v3": "3.53.0-alpha.1"
|
|
41
|
+
"uid": "^2.0.2",
|
|
42
|
+
"@elliemae/ds-button-v2": "3.53.0-alpha.3",
|
|
43
|
+
"@elliemae/ds-props-helpers": "3.53.0-alpha.3",
|
|
44
|
+
"@elliemae/ds-system": "3.53.0-alpha.3"
|
|
46
45
|
},
|
|
47
46
|
"devDependencies": {
|
|
48
|
-
"@elliemae/pui-cli": "9.0.0-next.
|
|
49
|
-
"@elliemae/pui-theme": "~2.
|
|
47
|
+
"@elliemae/pui-cli": "9.0.0-next.65",
|
|
48
|
+
"@elliemae/pui-theme": "~2.13.0",
|
|
50
49
|
"jest": "~29.7.0",
|
|
51
|
-
"
|
|
52
|
-
"@elliemae/ds-
|
|
50
|
+
"@elliemae/ds-monorepo-devops": "3.53.0-alpha.3",
|
|
51
|
+
"@elliemae/ds-test-utils": "3.53.0-alpha.3"
|
|
53
52
|
},
|
|
54
53
|
"peerDependencies": {
|
|
55
|
-
"@elliemae/pui-theme": "~2.
|
|
56
|
-
"lodash-es": "^4.17.21",
|
|
54
|
+
"@elliemae/pui-theme": "~2.13.0",
|
|
57
55
|
"react": "^18.3.1",
|
|
58
56
|
"react-dom": "^18.3.1",
|
|
59
|
-
"styled-components": "~5.3.9",
|
|
60
57
|
"styled-system": "^5.1.5"
|
|
61
58
|
},
|
|
62
59
|
"publishConfig": {
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/DSFormToggleDefinitions.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["export const DSFormToggleName = 'DSFormToggle';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,mBAAmB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/parts/AddTooltipOnReadOnly.tsx", "../../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import React from 'react';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip-v3';\n\nexport const AddTooltipOnReadOnly = ({ readOnly, children }: { readOnly: boolean; children: React.ReactNode }) => {\n if (readOnly) return <DSTooltipV3 text=\"Read Only\">{children}</DSTooltipV3>;\n return children;\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADIA;AAHvB,2BAA4B;AAErB,MAAM,uBAAuB,CAAC,EAAE,UAAU,SAAS,MAAwD;AAChH,MAAI,SAAU,QAAO,4CAAC,oCAAY,MAAK,aAAa,UAAS;AAC7D,SAAO;AACT;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/DSFormToggleDefinitions.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const DSFormToggleName = 'DSFormToggle';\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,mBAAmB;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { DSTooltipV3 } from "@elliemae/ds-tooltip-v3";
|
|
4
|
-
const AddTooltipOnReadOnly = ({ readOnly, children }) => {
|
|
5
|
-
if (readOnly) return /* @__PURE__ */ jsx(DSTooltipV3, { text: "Read Only", children });
|
|
6
|
-
return children;
|
|
7
|
-
};
|
|
8
|
-
export {
|
|
9
|
-
AddTooltipOnReadOnly
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=AddTooltipOnReadOnly.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/parts/AddTooltipOnReadOnly.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React from 'react';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip-v3';\n\nexport const AddTooltipOnReadOnly = ({ readOnly, children }: { readOnly: boolean; children: React.ReactNode }) => {\n if (readOnly) return <DSTooltipV3 text=\"Read Only\">{children}</DSTooltipV3>;\n return children;\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACIA;AAHvB,SAAS,mBAAmB;AAErB,MAAM,uBAAuB,CAAC,EAAE,UAAU,SAAS,MAAwD;AAChH,MAAI,SAAU,QAAO,oBAAC,eAAY,MAAK,aAAa,UAAS;AAC7D,SAAO;AACT;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DSFormToggleName = "DSFormToggle";
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export declare const AddTooltipOnReadOnly: ({ readOnly, children }: {
|
|
3
|
-
readOnly: boolean;
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
}) => string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|