@domicile-desktop/component-library 2.0.1 → 2.1.0
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/package.json +6 -5
- package/src/AnimatedBellIcon/AnimatedBellIcon.tsx +1 -1
- package/src/AnimatedSparkleIcon/AnimatedSparkleIcon.tsx +64 -0
- package/src/ContextMenu/ContextMenu.tsx +1 -34
- package/src/ContextMenu/menu-popup.ts +37 -0
- package/src/FluidItem/FluidItem.tsx +15 -2
- package/src/ListRow/ListRow.tsx +88 -41
- package/src/Menu/Menu.tsx +44 -0
- package/src/PanelHeader/PanelHeader.tsx +29 -6
- package/src/Popover/Popover.tsx +4 -1
- package/src/_icon/icon-keyframes.ts +13 -0
- package/src/_icon/phosphor-parts.ts +11 -1
- package/styled-system/patterns/aspect-ratio.mjs +2 -2
- package/styled-system/patterns/bleed.mjs +1 -2
- package/styled-system/patterns/float.mjs +5 -11
- package/styled-system/patterns/grid-item.mjs +1 -2
- package/styled-system/patterns/grid.mjs +1 -2
- package/styled-system/patterns/link-overlay.mjs +1 -1
- package/styled-system/patterns/spacer.mjs +3 -3
- package/styled-system/patterns/visually-hidden.mjs +1 -1
- package/styled-system/styles.css +2021 -1939
- package/styled-system/types/prop-type.d.ts +1 -1
|
@@ -11,28 +11,22 @@ transform(props, { map }) {
|
|
|
11
11
|
position: "absolute",
|
|
12
12
|
insetBlockStart: map(placement, (v) => {
|
|
13
13
|
const [side] = v.split("-");
|
|
14
|
-
|
|
15
|
-
return map2[side];
|
|
14
|
+
return { top: offsetY, middle: "50%", bottom: "auto" }[side];
|
|
16
15
|
}),
|
|
17
16
|
insetBlockEnd: map(placement, (v) => {
|
|
18
17
|
const [side] = v.split("-");
|
|
19
|
-
|
|
20
|
-
return map2[side];
|
|
18
|
+
return { top: "auto", middle: "50%", bottom: offsetY }[side];
|
|
21
19
|
}),
|
|
22
20
|
insetInlineStart: map(placement, (v) => {
|
|
23
21
|
const [, align] = v.split("-");
|
|
24
|
-
|
|
25
|
-
return map2[align];
|
|
22
|
+
return { start: offsetX, center: "50%", end: "auto" }[align];
|
|
26
23
|
}),
|
|
27
24
|
insetInlineEnd: map(placement, (v) => {
|
|
28
25
|
const [, align] = v.split("-");
|
|
29
|
-
|
|
30
|
-
return map2[align];
|
|
26
|
+
return { start: "auto", center: "50%", end: offsetX }[align];
|
|
31
27
|
}),
|
|
32
28
|
translate: map(placement, (v) => {
|
|
33
|
-
const [side, align] = v.split("-");
|
|
34
|
-
const mapX = { start: "-50%", center: "-50%", end: "50%" };
|
|
35
|
-
const mapY = { top: "-50%", middle: "-50%", bottom: "50%" };
|
|
29
|
+
const [side, align] = v.split("-"), mapX = { start: "-50%", center: "-50%", end: "50%" }, mapY = { top: "-50%", middle: "-50%", bottom: "50%" };
|
|
36
30
|
return `${mapX[align]} ${mapY[side]}`;
|
|
37
31
|
}),
|
|
38
32
|
...rest
|
|
@@ -3,8 +3,7 @@ import { css } from '../css/index.mjs';
|
|
|
3
3
|
|
|
4
4
|
const gridItemConfig = {
|
|
5
5
|
transform(props, { map }) {
|
|
6
|
-
const { colSpan, rowSpan, colStart, rowStart, colEnd, rowEnd, ...rest } = props
|
|
7
|
-
const spanFn = (v) => v === "auto" ? v : `span ${v}`;
|
|
6
|
+
const { colSpan, rowSpan, colStart, rowStart, colEnd, rowEnd, ...rest } = props, spanFn = (v) => v === "auto" ? v : `span ${v}`;
|
|
8
7
|
return {
|
|
9
8
|
gridColumn: colSpan != null ? map(colSpan, spanFn) : void 0,
|
|
10
9
|
gridRow: rowSpan != null ? map(rowSpan, spanFn) : void 0,
|
|
@@ -3,8 +3,7 @@ import { css } from '../css/index.mjs';
|
|
|
3
3
|
|
|
4
4
|
const gridConfig = {
|
|
5
5
|
transform(props, { map, isCssUnit }) {
|
|
6
|
-
const { columnGap, rowGap, gap, columns, minChildWidth, ...rest } = props
|
|
7
|
-
const getValue = (v) => isCssUnit(v) ? v : `token(sizes.${v}, ${v})`;
|
|
6
|
+
const { columnGap, rowGap, gap, columns, minChildWidth, ...rest } = props, getValue = (v) => isCssUnit(v) ? v : `token(sizes.${v}, ${v})`;
|
|
8
7
|
return {
|
|
9
8
|
display: "grid",
|
|
10
9
|
gridTemplateColumns: columns != null ? map(columns, (v) => `repeat(${v}, minmax(0, 1fr))`) : minChildWidth != null ? map(minChildWidth, (v) => `repeat(auto-fit, minmax(${getValue(v)}, 1fr))`) : void 0,
|
|
@@ -8,9 +8,9 @@ transform(props, { map, isCssUnit, isCssVar }) {
|
|
|
8
8
|
alignSelf: "stretch",
|
|
9
9
|
justifySelf: "stretch",
|
|
10
10
|
flex: map(size, (v) => {
|
|
11
|
-
if (v == null)
|
|
12
|
-
|
|
13
|
-
return `0 0 ${
|
|
11
|
+
if (v == null)
|
|
12
|
+
return "1";
|
|
13
|
+
return `0 0 ${isCssUnit(v) || isCssVar(v) ? v : `token(spacing.${v}, ${v})`}`;
|
|
14
14
|
}),
|
|
15
15
|
...rest
|
|
16
16
|
};
|