@appquality/unguess-design-system 2.12.58 → 2.12.60
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 +29 -0
- package/build/index.js +12 -3
- package/build/stories/dropdowns/countermultiselect/_types.d.ts +2 -1
- package/build/stories/dropdowns/countermultiselect/index.d.ts +1 -1
- package/build/stories/dropdowns/countermultiselect/index.stories.d.ts +1 -1
- package/build/stories/theme/components.d.ts +14 -0
- package/build/stories/theme/index.d.ts +14 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
# v2.12.60 (Wed Jan 25 2023)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- Change icon button backgrounds, improve types [#186](https://github.com/AppQuality/unguess-design-system/pull/186) ([@cannarocks](https://github.com/cannarocks) [@d-beezee](https://github.com/d-beezee) [@marcbon](https://github.com/marcbon))
|
|
6
|
+
- feat(countermulti): Allow string as id in counter multiselect [#185](https://github.com/AppQuality/unguess-design-system/pull/185) ([@d-beezee](https://github.com/d-beezee))
|
|
7
|
+
- feat(icon-button): add white background to default iconbutton [#182](https://github.com/AppQuality/unguess-design-system/pull/182) ([@cannarocks](https://github.com/cannarocks))
|
|
8
|
+
|
|
9
|
+
#### Authors: 3
|
|
10
|
+
|
|
11
|
+
- [@d-beezee](https://github.com/d-beezee)
|
|
12
|
+
- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
|
|
13
|
+
- Marco Bonomo ([@marcbon](https://github.com/marcbon))
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# v2.12.59 (Thu Jan 19 2023)
|
|
18
|
+
|
|
19
|
+
#### 🐛 Bug Fix
|
|
20
|
+
|
|
21
|
+
- Allow isCompact on counter multiselect [#181](https://github.com/AppQuality/unguess-design-system/pull/181) ([@d-beezee](https://github.com/d-beezee))
|
|
22
|
+
- feat(countermulti): Allow isCompact [#180](https://github.com/AppQuality/unguess-design-system/pull/180) ([@d-beezee](https://github.com/d-beezee))
|
|
23
|
+
|
|
24
|
+
#### Authors: 1
|
|
25
|
+
|
|
26
|
+
- [@d-beezee](https://github.com/d-beezee)
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
1
30
|
# v2.12.58 (Tue Jan 17 2023)
|
|
2
31
|
|
|
3
32
|
#### 🐛 Bug Fix
|
package/build/index.js
CHANGED
|
@@ -302,6 +302,15 @@ const components = Object.assign(Object.assign({}, reactTheming.DEFAULT_THEME.co
|
|
|
302
302
|
: {})), { "&:hover": {
|
|
303
303
|
backgroundColor: palette.kale[100],
|
|
304
304
|
} });
|
|
305
|
+
}, "buttons.icon_button": ({ isDanger, isPrimary, isHovered, isNeutral, }) => {
|
|
306
|
+
if (isDanger || isPrimary || isNeutral)
|
|
307
|
+
return {};
|
|
308
|
+
return {
|
|
309
|
+
backgroundColor: palette.white,
|
|
310
|
+
"&:hover": {
|
|
311
|
+
backgroundColor: palette.kale[100],
|
|
312
|
+
},
|
|
313
|
+
};
|
|
305
314
|
} });
|
|
306
315
|
|
|
307
316
|
const theme = Object.assign(Object.assign({}, reactTheming.DEFAULT_THEME), { breakpoints: Object.assign(Object.assign({}, reactTheming.DEFAULT_THEME.breakpoints), { xxl: "1440px" }), colors, palette: palette, fonts: Object.assign(Object.assign({}, reactTheming.DEFAULT_THEME.fonts), { system: '"Poppins",sans-serif,Helvetica,Arial,sans-serif' }), fontWeights: fontWeights, gradients: gradients, borderRadii: Object.assign(Object.assign({}, reactTheming.DEFAULT_THEME.borderRadii), { lg: "8px", xl: "16px", xxl: "32px" }), lineHeights: Object.assign(Object.assign({}, reactTheming.DEFAULT_THEME.lineHeights), { xs: "16px" }), components: components, shadows: Object.assign(Object.assign({}, reactTheming.DEFAULT_THEME.shadows), { boxShadow: boxShadow }), levels: {
|
|
@@ -1818,7 +1827,7 @@ const StyledAutocomplete = styled__default["default"](reactDropdowns.Autocomplet
|
|
|
1818
1827
|
}
|
|
1819
1828
|
`}
|
|
1820
1829
|
`;
|
|
1821
|
-
const CounterMultiselect = ({ options, label, i18n, onChange, }) => {
|
|
1830
|
+
const CounterMultiselect = ({ options, label, i18n, onChange, isCompact, }) => {
|
|
1822
1831
|
var _a, _b;
|
|
1823
1832
|
const [selectedItems, setSelectedItems] = React.useState(options.filter((o) => o.selected));
|
|
1824
1833
|
const [inputValue, setInputValue] = React.useState("");
|
|
@@ -1841,11 +1850,11 @@ const CounterMultiselect = ({ options, label, i18n, onChange, }) => {
|
|
|
1841
1850
|
}
|
|
1842
1851
|
}, downshiftProps: {
|
|
1843
1852
|
itemToString: (item) => item && item.id,
|
|
1844
|
-
}, onInputValueChange: (value) => setInputValue(value) }, { children: [jsxRuntime.jsxs(reactDropdowns.Field, { children: [label && jsxRuntime.jsx(reactDropdowns.Label, { children: label }), jsxRuntime.jsx(StyledAutocomplete, Object.assign({ hasSelectedItems: hasSelectedItems }, { children: hasSelectedItems
|
|
1853
|
+
}, onInputValueChange: (value) => setInputValue(value) }, { children: [jsxRuntime.jsxs(reactDropdowns.Field, { children: [label && jsxRuntime.jsx(reactDropdowns.Label, { children: label }), jsxRuntime.jsx(StyledAutocomplete, Object.assign({ isCompact: isCompact, hasSelectedItems: hasSelectedItems }, { children: hasSelectedItems
|
|
1845
1854
|
? (i18n === null || i18n === void 0 ? void 0 : i18n.counterText)
|
|
1846
1855
|
? i18n.counterText(selectedItems.length)
|
|
1847
1856
|
: `Items (${selectedItems.length})`
|
|
1848
|
-
: (_a = i18n === null || i18n === void 0 ? void 0 : i18n.noItems) !== null && _a !== void 0 ? _a : "No items" }))] }), jsxRuntime.jsx(reactDropdowns.Menu, { children: matchingOptions.length === 0 ? (jsxRuntime.jsx(reactDropdowns.Item, Object.assign({ disabled: true }, { children: (_b = i18n === null || i18n === void 0 ? void 0 : i18n.noMatches) !== null && _b !== void 0 ? _b : "No matches found" }))) : (matchingOptions.map((option) => (jsxRuntime.jsx(reactDropdowns.Item, Object.assign({ value: option }, { children: jsxRuntime.jsx("span", { children: option.label }) }), option.id)))) })] })) }));
|
|
1857
|
+
: (_a = i18n === null || i18n === void 0 ? void 0 : i18n.noItems) !== null && _a !== void 0 ? _a : "No items" }))] }), jsxRuntime.jsx(reactDropdowns.Menu, Object.assign({ isCompact: isCompact }, { children: matchingOptions.length === 0 ? (jsxRuntime.jsx(reactDropdowns.Item, Object.assign({ disabled: true }, { children: (_b = i18n === null || i18n === void 0 ? void 0 : i18n.noMatches) !== null && _b !== void 0 ? _b : "No matches found" }))) : (matchingOptions.map((option) => (jsxRuntime.jsx(reactDropdowns.Item, Object.assign({ value: option }, { children: jsxRuntime.jsx("span", { children: option.label }) }), option.id)))) }))] })) }));
|
|
1849
1858
|
};
|
|
1850
1859
|
|
|
1851
1860
|
const UgSelect = styled__default["default"](reactDropdowns.Select) `
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export interface CounterMultiselectArgs {
|
|
3
3
|
options: {
|
|
4
|
-
id: number;
|
|
4
|
+
id: number | string;
|
|
5
5
|
label: string;
|
|
6
6
|
selected?: boolean;
|
|
7
7
|
}[];
|
|
8
|
+
isCompact?: boolean;
|
|
8
9
|
label?: React.ReactNode;
|
|
9
10
|
onChange?: (selectedItems: CounterMultiselectArgs["options"]) => void;
|
|
10
11
|
i18n?: {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CounterMultiselectArgs } from "./_types";
|
|
2
|
-
declare const CounterMultiselect: ({ options, label, i18n, onChange, }: CounterMultiselectArgs) => JSX.Element;
|
|
2
|
+
declare const CounterMultiselect: ({ options, label, i18n, onChange, isCompact, }: CounterMultiselectArgs) => JSX.Element;
|
|
3
3
|
export { CounterMultiselect };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentMeta, Story } from "@storybook/react";
|
|
2
2
|
import { CounterMultiselectArgs } from "./_types";
|
|
3
3
|
export declare const Default: Story<CounterMultiselectArgs>;
|
|
4
|
-
declare const _default: ComponentMeta<({ options, label, i18n, onChange, }: CounterMultiselectArgs) => JSX.Element>;
|
|
4
|
+
declare const _default: ComponentMeta<({ options, label, i18n, onChange, isCompact, }: CounterMultiselectArgs) => JSX.Element>;
|
|
5
5
|
export default _default;
|
|
@@ -28,4 +28,18 @@ export declare const components: {
|
|
|
28
28
|
color?: string | undefined;
|
|
29
29
|
cursor?: string | undefined;
|
|
30
30
|
};
|
|
31
|
+
"buttons.icon_button": ({ isDanger, isPrimary, isHovered, isNeutral, }: {
|
|
32
|
+
isDanger: boolean;
|
|
33
|
+
isPrimary: boolean;
|
|
34
|
+
isHovered: boolean;
|
|
35
|
+
isNeutral: boolean;
|
|
36
|
+
}) => {
|
|
37
|
+
backgroundColor?: undefined;
|
|
38
|
+
"&:hover"?: undefined;
|
|
39
|
+
} | {
|
|
40
|
+
backgroundColor: string;
|
|
41
|
+
"&:hover": {
|
|
42
|
+
backgroundColor: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
31
45
|
};
|
|
@@ -233,6 +233,20 @@ declare const theme: {
|
|
|
233
233
|
color?: string | undefined;
|
|
234
234
|
cursor?: string | undefined;
|
|
235
235
|
};
|
|
236
|
+
"buttons.icon_button": ({ isDanger, isPrimary, isHovered, isNeutral, }: {
|
|
237
|
+
isDanger: boolean;
|
|
238
|
+
isPrimary: boolean;
|
|
239
|
+
isHovered: boolean;
|
|
240
|
+
isNeutral: boolean;
|
|
241
|
+
}) => {
|
|
242
|
+
backgroundColor?: undefined;
|
|
243
|
+
"&:hover"?: undefined;
|
|
244
|
+
} | {
|
|
245
|
+
backgroundColor: string;
|
|
246
|
+
"&:hover": {
|
|
247
|
+
backgroundColor: string;
|
|
248
|
+
};
|
|
249
|
+
};
|
|
236
250
|
};
|
|
237
251
|
shadows: {
|
|
238
252
|
boxShadow: (theme: import("@zendeskgarden/react-theming").IGardenTheme) => string;
|