@rango-dev/ui 0.29.1-next.13 → 0.29.1-next.14
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/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/dist/widget/ui/src/components/ListItem/ListItem.types.d.ts +2 -0
- package/dist/widget/ui/src/components/ListItem/ListItem.types.d.ts.map +1 -1
- package/dist/widget/ui/src/components/ListItemButton/ListItemButton.d.ts.map +1 -1
- package/dist/widget/ui/src/components/ListItemButton/ListItemButton.styles.d.ts +2 -2
- package/dist/widget/ui/src/components/ListItemButton/ListItemButton.styles.d.ts.map +1 -1
- package/dist/widget/ui/src/components/ListItemButton/ListItemButton.types.d.ts +0 -1
- package/dist/widget/ui/src/components/ListItemButton/ListItemButton.types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/ListItem/ListItem.types.ts +2 -0
- package/src/components/ListItemButton/ListItemButton.styles.ts +14 -30
- package/src/components/ListItemButton/ListItemButton.tsx +10 -8
- package/src/components/ListItemButton/ListItemButton.types.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ListItem/ListItem.types.ts"],"names":[],"mappings":";AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;IAC1C,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,EAAE,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ListItem.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ListItem/ListItem.types.ts"],"names":[],"mappings":";AAAA,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;IAC1C,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,EAAE,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,aAAa,CAAC,CAAC;IACpD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemButton.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ListItemButton/ListItemButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ListItemButton.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ListItemButton/ListItemButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAElE,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,iBAAS,cAAc,CAAC,KAAK,EAAE,mBAAmB,qBAoBjD;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { ListItem } from '../ListItem/ListItem';
|
|
2
|
+
export declare const BaseListItemButton: import("@stitches/react/types/styled-component").StyledComponent<typeof ListItem, {
|
|
3
3
|
selected?: boolean | "true" | "false" | undefined;
|
|
4
4
|
}, {
|
|
5
5
|
xs: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemButton.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ListItemButton/ListItemButton.styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ListItemButton.styles.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ListItemButton/ListItemButton.styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DA+B7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemButton.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ListItemButton/ListItemButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,GAAG;IACjE,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,
|
|
1
|
+
{"version":3,"file":"ListItemButton.types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/ListItemButton/ListItemButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC,GAAG;IACjE,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,26 +1,10 @@
|
|
|
1
1
|
import { darkTheme, styled } from '../../theme';
|
|
2
|
+
import { ListItem } from '../ListItem/ListItem';
|
|
2
3
|
|
|
3
|
-
export const BaseListItemButton = styled(
|
|
4
|
+
export const BaseListItemButton = styled(ListItem, {
|
|
4
5
|
transition: 'all 0.35s',
|
|
5
|
-
border: 0,
|
|
6
|
-
width: '100%',
|
|
7
|
-
backgroundColor: 'transparent',
|
|
8
|
-
fontFamily: 'inherit',
|
|
9
|
-
padding: 'unset',
|
|
10
|
-
'&:focus-visible': {
|
|
11
|
-
borderRadius: '$xs',
|
|
12
|
-
|
|
13
|
-
outline: 0,
|
|
14
|
-
$$color: '$colors$info100',
|
|
15
|
-
[`.${darkTheme} &`]: {
|
|
16
|
-
$$color: '$colors$info700',
|
|
17
|
-
},
|
|
18
|
-
backgroundColor: '$$color',
|
|
19
|
-
},
|
|
20
6
|
'&:hover': {
|
|
21
7
|
$$color: '$colors$info100',
|
|
22
|
-
borderRadius: '$xs',
|
|
23
|
-
|
|
24
8
|
[`.${darkTheme} &`]: {
|
|
25
9
|
$$color: '$colors$neutral100',
|
|
26
10
|
},
|
|
@@ -30,19 +14,19 @@ export const BaseListItemButton = styled('button', {
|
|
|
30
14
|
'&:active': {
|
|
31
15
|
transform: 'scale(0.99)',
|
|
32
16
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
borderColor: '$$color',
|
|
42
|
-
borderBottomRightRadius: 0,
|
|
43
|
-
borderBottomLeftRadius: 0,
|
|
44
|
-
},
|
|
17
|
+
|
|
18
|
+
'&:focus-visible': {
|
|
19
|
+
borderRadius: '$xs',
|
|
20
|
+
|
|
21
|
+
outline: 0,
|
|
22
|
+
$$color: '$colors$info100',
|
|
23
|
+
[`.${darkTheme} &`]: {
|
|
24
|
+
$$color: '$colors$info700',
|
|
45
25
|
},
|
|
26
|
+
backgroundColor: '$$color',
|
|
27
|
+
},
|
|
28
|
+
|
|
29
|
+
variants: {
|
|
46
30
|
selected: {
|
|
47
31
|
true: { outline: '1px solid $secondary500' },
|
|
48
32
|
false: { outline: 0 },
|
|
@@ -2,25 +2,27 @@ import type { ListItemButtonProps } from './ListItemButton.types';
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
|
-
import { ListItem } from '../ListItem/ListItem';
|
|
6
|
-
|
|
7
5
|
import { BaseListItemButton } from './ListItemButton.styles';
|
|
8
6
|
|
|
9
7
|
function ListItemButton(props: ListItemButtonProps) {
|
|
10
|
-
const { onClick, id,
|
|
8
|
+
const { onClick, id, selected, ...restProps } = props;
|
|
11
9
|
const onClickWithKey = () => {
|
|
12
10
|
if (onClick) {
|
|
13
11
|
onClick(id);
|
|
14
12
|
}
|
|
15
13
|
};
|
|
14
|
+
|
|
16
15
|
return (
|
|
17
16
|
<BaseListItemButton
|
|
18
|
-
hasDivider={hasDivider}
|
|
19
|
-
selected={selected}
|
|
20
17
|
onClick={onClickWithKey}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
aria-label="button"
|
|
19
|
+
selected={selected}
|
|
20
|
+
onKeyUp={(e: { key: string }) => {
|
|
21
|
+
e.key === 'Enter' && onClickWithKey();
|
|
22
|
+
}}
|
|
23
|
+
tabIndex={0}
|
|
24
|
+
{...restProps}
|
|
25
|
+
/>
|
|
24
26
|
);
|
|
25
27
|
}
|
|
26
28
|
|