@carto/meridian-ds 1.5.0 → 1.5.1
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/CHANGELOG.md
CHANGED
|
@@ -108,6 +108,9 @@ const ButtonGroup = material.styled(material.ButtonGroup)(({ theme, size }) => (
|
|
|
108
108
|
}));
|
|
109
109
|
function SplitButton({
|
|
110
110
|
options,
|
|
111
|
+
disabled,
|
|
112
|
+
loading,
|
|
113
|
+
loadingPosition,
|
|
111
114
|
onClick,
|
|
112
115
|
variant,
|
|
113
116
|
size,
|
|
@@ -146,8 +149,17 @@ function SplitButton({
|
|
|
146
149
|
color,
|
|
147
150
|
...otherProps,
|
|
148
151
|
children: [
|
|
149
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
150
|
-
|
|
152
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
153
|
+
Button,
|
|
154
|
+
{
|
|
155
|
+
disabled,
|
|
156
|
+
loading,
|
|
157
|
+
loadingPosition,
|
|
158
|
+
onClick: handleClick,
|
|
159
|
+
children: (_a = options[selectedIndex]) == null ? void 0 : _a.label
|
|
160
|
+
}
|
|
161
|
+
),
|
|
162
|
+
/* @__PURE__ */ jsxRuntime.jsx(Button, { disabled: loading || disabled, onClick: handleToggle, children: open ? /* @__PURE__ */ jsxRuntime.jsx(OpenDiagonallyRight.ArrowUp, {}) : /* @__PURE__ */ jsxRuntime.jsx(ArrowDown.ArrowDown, {}) })
|
|
151
163
|
]
|
|
152
164
|
}
|
|
153
165
|
),
|
package/dist/components/index.js
CHANGED
|
@@ -107,6 +107,9 @@ const ButtonGroup = styled(ButtonGroup$1)(({ theme, size }) => ({
|
|
|
107
107
|
}));
|
|
108
108
|
function SplitButton({
|
|
109
109
|
options,
|
|
110
|
+
disabled,
|
|
111
|
+
loading,
|
|
112
|
+
loadingPosition,
|
|
110
113
|
onClick,
|
|
111
114
|
variant,
|
|
112
115
|
size,
|
|
@@ -145,8 +148,17 @@ function SplitButton({
|
|
|
145
148
|
color,
|
|
146
149
|
...otherProps,
|
|
147
150
|
children: [
|
|
148
|
-
/* @__PURE__ */ jsx(
|
|
149
|
-
|
|
151
|
+
/* @__PURE__ */ jsx(
|
|
152
|
+
Button,
|
|
153
|
+
{
|
|
154
|
+
disabled,
|
|
155
|
+
loading,
|
|
156
|
+
loadingPosition,
|
|
157
|
+
onClick: handleClick,
|
|
158
|
+
children: (_a = options[selectedIndex]) == null ? void 0 : _a.label
|
|
159
|
+
}
|
|
160
|
+
),
|
|
161
|
+
/* @__PURE__ */ jsx(Button, { disabled: loading || disabled, onClick: handleToggle, children: open ? /* @__PURE__ */ jsx(ArrowUp, {}) : /* @__PURE__ */ jsx(ArrowDown, {}) })
|
|
150
162
|
]
|
|
151
163
|
}
|
|
152
164
|
),
|
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import { ButtonProps } from '
|
|
1
|
+
import { ButtonProps } from './Button';
|
|
2
2
|
type SplitButtonOption = {
|
|
3
3
|
label: string;
|
|
4
4
|
disabled?: boolean;
|
|
5
|
+
[key: string]: any;
|
|
5
6
|
};
|
|
6
|
-
export type SplitButtonProps = {
|
|
7
|
-
options:
|
|
8
|
-
onClick: (option:
|
|
7
|
+
export type SplitButtonProps<T extends SplitButtonOption = SplitButtonOption> = {
|
|
8
|
+
options: T[];
|
|
9
|
+
onClick: (option: T) => void;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
loadingPosition?: ButtonProps['loadingPosition'];
|
|
12
|
+
disabled?: boolean;
|
|
9
13
|
variant?: ButtonProps['variant'];
|
|
10
14
|
size?: ButtonProps['size'];
|
|
11
15
|
color?: ButtonProps['color'];
|
|
12
16
|
'data-testid'?: string;
|
|
13
17
|
'aria-label'?: string;
|
|
14
18
|
};
|
|
15
|
-
export default function SplitButton({ options, onClick, variant, size, color, ...otherProps }: SplitButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export default function SplitButton<T extends SplitButtonOption = SplitButtonOption>({ options, disabled, loading, loadingPosition, onClick, variant, size, color, ...otherProps }: SplitButtonProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
16
20
|
export {};
|
|
17
21
|
//# sourceMappingURL=SplitButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplitButton.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/SplitButton.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SplitButton.d.ts","sourceRoot":"","sources":["../../../../src/components/atoms/SplitButton.tsx"],"names":[],"mappings":"AAWA,OAAe,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAe9C,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CACnB,CAAA;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB,IAC1E;IACE,OAAO,EAAE,CAAC,EAAE,CAAA;IACZ,OAAO,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAA;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,eAAe,CAAC,EAAE,WAAW,CAAC,iBAAiB,CAAC,CAAA;IAChD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;IAChC,IAAI,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAA;IAC1B,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB,CAAA;AAEH,MAAM,CAAC,OAAO,UAAU,WAAW,CACjC,CAAC,SAAS,iBAAiB,GAAG,iBAAiB,EAC/C,EACA,OAAO,EACP,QAAQ,EACR,OAAO,EACP,eAAe,EACf,OAAO,EACP,OAAO,EACP,IAAI,EACJ,KAAK,EACL,GAAG,UAAU,EACd,EAAE,gBAAgB,CAAC,CAAC,CAAC,2CAyFrB"}
|