@dmsi/wedgekit-react 0.0.47 → 0.0.49
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/{chunk-SGQWENE2.js → chunk-LP6AZST2.js} +1 -1
- package/dist/{chunk-KXUUKAQM.js → chunk-OW3SZEU5.js} +9 -0
- package/dist/{chunk-INYI65WW.js → chunk-S3CQ5VFT.js} +7 -1
- package/dist/{chunk-XIEG2XMD.js → chunk-VKMJ63WV.js} +2 -2
- package/dist/components/AccessChangerTabItem.cjs +329 -0
- package/dist/components/AccessChangerTabItem.js +72 -0
- package/dist/components/ContentTab.cjs +7 -1
- package/dist/components/ContentTab.js +1 -1
- package/dist/components/ContentTabs.cjs +9 -2
- package/dist/components/ContentTabs.js +3 -2
- package/dist/components/DataGrid.cjs +1 -1
- package/dist/components/DataGrid.js +12 -12
- package/dist/components/DataGridCell.cjs +1 -1
- package/dist/components/DataGridCell.js +4 -4
- package/dist/components/FilterGroup.cjs +1 -1
- package/dist/components/FilterGroup.js +5 -5
- package/dist/components/MenuOption.js +2 -2
- package/dist/components/MobileDataGrid.cjs +9 -0
- package/dist/components/MobileDataGrid.js +4 -4
- package/dist/components/Modal.js +3 -3
- package/dist/components/NestedMenu.js +2 -2
- package/dist/components/Notification.cjs +9 -0
- package/dist/components/Notification.js +4 -4
- package/dist/components/Search.cjs +1 -1
- package/dist/components/Search.js +1 -1
- package/dist/components/SideMenuGroup.cjs +9 -0
- package/dist/components/SideMenuGroup.js +1 -1
- package/dist/components/SideMenuItem.cjs +9 -0
- package/dist/components/SideMenuItem.js +1 -1
- package/dist/components/Stack.cjs +9 -0
- package/dist/components/Stack.js +1 -1
- package/dist/components/Swatch.cjs +9 -0
- package/dist/components/Swatch.js +1 -1
- package/dist/components/Time.cjs +9 -0
- package/dist/components/Time.js +1 -1
- package/dist/components/Toast.js +3 -3
- package/dist/index.css +24 -0
- package/package.json +1 -1
- package/src/components/AccessChangerTabItem.tsx +56 -0
- package/src/components/ContentTab.tsx +7 -1
- package/src/components/ContentTabs.tsx +3 -1
- package/src/components/Search.tsx +1 -1
- package/src/components/Stack.tsx +17 -0
- package/dist/{chunk-S46RZBT4.js → chunk-T22EH3MG.js} +3 -3
package/dist/index.css
CHANGED
|
@@ -692,6 +692,10 @@
|
|
|
692
692
|
width: calc(var(--spacing) * 10) !important;
|
|
693
693
|
height: calc(var(--spacing) * 10) !important;
|
|
694
694
|
}
|
|
695
|
+
.size-2 {
|
|
696
|
+
width: calc(var(--spacing) * 2);
|
|
697
|
+
height: calc(var(--spacing) * 2);
|
|
698
|
+
}
|
|
695
699
|
.size-3 {
|
|
696
700
|
width: calc(var(--spacing) * 3);
|
|
697
701
|
height: calc(var(--spacing) * 3);
|
|
@@ -978,6 +982,9 @@
|
|
|
978
982
|
.justify-start {
|
|
979
983
|
justify-content: flex-start;
|
|
980
984
|
}
|
|
985
|
+
.gap-0\.5 {
|
|
986
|
+
gap: calc(var(--spacing) * 0.5);
|
|
987
|
+
}
|
|
981
988
|
.gap-1 {
|
|
982
989
|
gap: calc(var(--spacing) * 1);
|
|
983
990
|
}
|
|
@@ -1805,6 +1812,9 @@
|
|
|
1805
1812
|
.py-4 {
|
|
1806
1813
|
padding-block: calc(var(--spacing) * 4);
|
|
1807
1814
|
}
|
|
1815
|
+
.py-\[15px\] {
|
|
1816
|
+
padding-block: 15px;
|
|
1817
|
+
}
|
|
1808
1818
|
.py-\[calc\(var\(--spacing-mobile-component-padding\)_\+_3px\)\] {
|
|
1809
1819
|
padding-block: calc(var(--spacing-mobile-component-padding) + 3px);
|
|
1810
1820
|
}
|
|
@@ -1868,6 +1878,9 @@
|
|
|
1868
1878
|
.text-\[0\.6rem\] {
|
|
1869
1879
|
font-size: 0.6rem;
|
|
1870
1880
|
}
|
|
1881
|
+
.text-\[13px\] {
|
|
1882
|
+
font-size: 13px;
|
|
1883
|
+
}
|
|
1871
1884
|
.text-\[14px\] {
|
|
1872
1885
|
font-size: 14px;
|
|
1873
1886
|
}
|
|
@@ -1905,6 +1918,10 @@
|
|
|
1905
1918
|
--tw-leading: calc(var(--spacing) * 6) !important;
|
|
1906
1919
|
line-height: calc(var(--spacing) * 6) !important;
|
|
1907
1920
|
}
|
|
1921
|
+
.leading-\[1\.38462\] {
|
|
1922
|
+
--tw-leading: 1.38462;
|
|
1923
|
+
line-height: 1.38462;
|
|
1924
|
+
}
|
|
1908
1925
|
.leading-\[1\] {
|
|
1909
1926
|
--tw-leading: 1;
|
|
1910
1927
|
line-height: 1;
|
|
@@ -2855,6 +2872,13 @@
|
|
|
2855
2872
|
}
|
|
2856
2873
|
}
|
|
2857
2874
|
}
|
|
2875
|
+
.hover\:text-text-action-primary-normal {
|
|
2876
|
+
&:hover {
|
|
2877
|
+
@media (hover: hover) {
|
|
2878
|
+
color: var(--color-text-action-primary-normal);
|
|
2879
|
+
}
|
|
2880
|
+
}
|
|
2881
|
+
}
|
|
2858
2882
|
.hover\:text-text-link-hover {
|
|
2859
2883
|
&:hover {
|
|
2860
2884
|
@media (hover: hover) {
|
package/package.json
CHANGED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import clsx from "clsx";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
import { Subheader } from "./Subheader";
|
|
4
|
+
import { Icon } from "./Icon";
|
|
5
|
+
|
|
6
|
+
export function AccessChangerTabItem(props: ComponentProps<"div"> & { selected?: boolean, loading?: boolean, disabled?: boolean, additionalText?: string, borderTop?: boolean, borderBottom?: boolean }) {
|
|
7
|
+
const {
|
|
8
|
+
additionalText,
|
|
9
|
+
borderTop,
|
|
10
|
+
borderBottom,
|
|
11
|
+
selected,
|
|
12
|
+
children,
|
|
13
|
+
loading,
|
|
14
|
+
disabled,
|
|
15
|
+
onClick,
|
|
16
|
+
...rest
|
|
17
|
+
} = props;
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<div
|
|
21
|
+
className={clsx(
|
|
22
|
+
"flex items-center justify-between",
|
|
23
|
+
"py-[15px] px-4 gap-4",
|
|
24
|
+
"bg-background-grouped-primary-normal cursor-pointer",
|
|
25
|
+
borderTop && 'border-t',
|
|
26
|
+
borderBottom && 'border-b',
|
|
27
|
+
borderTop || borderBottom ? "border-border-primary-normal" : "border-transparent",
|
|
28
|
+
selected ? "text-text-action-primary-normal" : "text-text-primary-normal hover:text-text-action-primary-normal",
|
|
29
|
+
)}
|
|
30
|
+
onClick={(e) => {
|
|
31
|
+
if (selected || loading || disabled) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
onClick?.(e);
|
|
36
|
+
}}
|
|
37
|
+
{...rest}
|
|
38
|
+
>
|
|
39
|
+
<div className="flex flex-col gap-0.5">
|
|
40
|
+
<Subheader>{children}</Subheader>
|
|
41
|
+
{additionalText && <p className="text-text-primary-normal text-[13px] leading-[1.38462] font-normal">{additionalText}</p>}
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
{loading && !selected && (
|
|
45
|
+
<Icon name="cached" size={16} />
|
|
46
|
+
)}
|
|
47
|
+
|
|
48
|
+
{selected && (
|
|
49
|
+
<div className="flex items-center gap-1">
|
|
50
|
+
<div className="rounded-full size-2 bg-text-action-primary-normal"></div>
|
|
51
|
+
<Subheader>Active</Subheader>
|
|
52
|
+
</div>
|
|
53
|
+
)}
|
|
54
|
+
</div>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
@@ -9,6 +9,7 @@ export type ContentTabProps = {
|
|
|
9
9
|
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
10
10
|
selected?: boolean;
|
|
11
11
|
className?: string;
|
|
12
|
+
fullWidth?: boolean;
|
|
12
13
|
id?: string;
|
|
13
14
|
} & Omit<ComponentPropsWithRef<"button">, "id">;
|
|
14
15
|
|
|
@@ -19,6 +20,7 @@ export const ContentTab = ({
|
|
|
19
20
|
disabled = false,
|
|
20
21
|
onClick,
|
|
21
22
|
ref,
|
|
23
|
+
fullWidth,
|
|
22
24
|
id,
|
|
23
25
|
...props
|
|
24
26
|
}: ContentTabProps) => {
|
|
@@ -45,9 +47,13 @@ export const ContentTab = ({
|
|
|
45
47
|
);
|
|
46
48
|
|
|
47
49
|
return (
|
|
48
|
-
<div id={id} className=
|
|
50
|
+
<div id={id} className={clsx(
|
|
51
|
+
"relative",
|
|
52
|
+
fullWidth && "flex-1"
|
|
53
|
+
)}>
|
|
49
54
|
<Button
|
|
50
55
|
id={id ? `${id}-button` : undefined}
|
|
56
|
+
block={fullWidth}
|
|
51
57
|
ref={ref}
|
|
52
58
|
variant="tertiary"
|
|
53
59
|
disabled={disabled}
|
|
@@ -12,13 +12,14 @@ type Tab = {
|
|
|
12
12
|
export type ContentTabsProps = {
|
|
13
13
|
tabs: Tab[];
|
|
14
14
|
onTabChange?: (tabId: string) => void;
|
|
15
|
+
fullWidthTabs?: boolean;
|
|
15
16
|
id?: string;
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
const afterClasses =
|
|
19
20
|
"after:absolute after:bottom-0 after:left-0 after:w-full after:h-0.5 after:bg-border-primary-normal z-0";
|
|
20
21
|
|
|
21
|
-
export const ContentTabs = ({ tabs, onTabChange, id }: ContentTabsProps) => {
|
|
22
|
+
export const ContentTabs = ({ tabs, onTabChange, fullWidthTabs, id }: ContentTabsProps) => {
|
|
22
23
|
const [selectedTab, setSelectedTab] = useState<string>(tabs[0]?.id || "");
|
|
23
24
|
const [focusedTabIndex, setFocusedTabIndex] = useState<number>(0);
|
|
24
25
|
const tabRefs = useRef<(HTMLButtonElement | null)[]>([]);
|
|
@@ -66,6 +67,7 @@ export const ContentTabs = ({ tabs, onTabChange, id }: ContentTabsProps) => {
|
|
|
66
67
|
const isSelected = selectedTab === tab.id;
|
|
67
68
|
return (
|
|
68
69
|
<ContentTab
|
|
70
|
+
fullWidth={fullWidthTabs}
|
|
69
71
|
key={tab.id}
|
|
70
72
|
id={id ? `${id}-tab-${tab.id}` : undefined}
|
|
71
73
|
label={tab.label}
|
package/src/components/Stack.tsx
CHANGED
|
@@ -15,6 +15,7 @@ type StackProps = {
|
|
|
15
15
|
horizontalMobile?: boolean;
|
|
16
16
|
padding?: boolean;
|
|
17
17
|
paddingX?: boolean;
|
|
18
|
+
paddingY?: boolean;
|
|
18
19
|
margin?: boolean;
|
|
19
20
|
marginX?: boolean;
|
|
20
21
|
marginY?: boolean;
|
|
@@ -28,6 +29,7 @@ type StackProps = {
|
|
|
28
29
|
maxWidth?: number;
|
|
29
30
|
minWidth?: number;
|
|
30
31
|
height?: number | "full";
|
|
32
|
+
minHeight?: number;
|
|
31
33
|
maxHeight?: number;
|
|
32
34
|
borderColor?: BorderColorTokens;
|
|
33
35
|
backgroundColor?: BackgroundColorTokens;
|
|
@@ -89,6 +91,7 @@ export const Stack = ({
|
|
|
89
91
|
grow,
|
|
90
92
|
padding,
|
|
91
93
|
paddingX,
|
|
94
|
+
paddingY,
|
|
92
95
|
margin,
|
|
93
96
|
marginX,
|
|
94
97
|
marginY,
|
|
@@ -98,6 +101,7 @@ export const Stack = ({
|
|
|
98
101
|
rounded,
|
|
99
102
|
centered,
|
|
100
103
|
width,
|
|
104
|
+
minHeight,
|
|
101
105
|
maxWidth,
|
|
102
106
|
minWidth,
|
|
103
107
|
height,
|
|
@@ -133,6 +137,7 @@ export const Stack = ({
|
|
|
133
137
|
? `${height}px`
|
|
134
138
|
: undefined,
|
|
135
139
|
maxHeight: maxHeight !== undefined ? `${maxHeight}px` : undefined,
|
|
140
|
+
minHeight: minHeight !== undefined ? `${minHeight}px` : undefined,
|
|
136
141
|
maxWidth: maxWidth !== undefined ? `${maxWidth}px` : undefined,
|
|
137
142
|
width:
|
|
138
143
|
width !== undefined && typeof width === "number"
|
|
@@ -188,6 +193,18 @@ export const Stack = ({
|
|
|
188
193
|
paddingX &&
|
|
189
194
|
sizing === "component" &&
|
|
190
195
|
"px-mobile-component-padding desktop:px-desktop-component-padding compact:px-desktop-compact-component-padding",
|
|
196
|
+
paddingY &&
|
|
197
|
+
sizing === "container" &&
|
|
198
|
+
"py-mobile-container-padding desktop:py-desktop-container-padding compact:py-desktop-compact-container-padding",
|
|
199
|
+
paddingY &&
|
|
200
|
+
sizing === "layout" &&
|
|
201
|
+
"py-mobile-layout-padding desktop:py-desktop-layout-padding compact:py-desktop-compact-layout-padding",
|
|
202
|
+
paddingY &&
|
|
203
|
+
sizing === "layout-group" &&
|
|
204
|
+
"py-mobile-layout-group-padding desktop:py-desktop-layout-group-padding compact:py-desktop-compact-layout-group-padding",
|
|
205
|
+
paddingY &&
|
|
206
|
+
sizing === "component" &&
|
|
207
|
+
"py-mobile-component-padding desktop:py-desktop-component-padding compact:py-desktop-compact-component-padding",
|
|
191
208
|
margin &&
|
|
192
209
|
sizing === "container" &&
|
|
193
210
|
"m-mobile-container-padding desktop:m-desktop-container-padding compact:m-compact-container-padding",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useMatchesMobile
|
|
3
3
|
} from "./chunk-SEKKGFM6.js";
|
|
4
|
-
import {
|
|
5
|
-
Label
|
|
6
|
-
} from "./chunk-S5K22XTH.js";
|
|
7
4
|
import {
|
|
8
5
|
Paragraph
|
|
9
6
|
} from "./chunk-VG4EPHJA.js";
|
|
7
|
+
import {
|
|
8
|
+
Label
|
|
9
|
+
} from "./chunk-S5K22XTH.js";
|
|
10
10
|
import {
|
|
11
11
|
Icon
|
|
12
12
|
} from "./chunk-IGQVA7SC.js";
|