@dmsi/wedgekit-react 0.0.551 → 0.0.552
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 +2 -3
- package/src/brand.css +0 -125
- package/src/classNames.ts +0 -174
- package/src/components/AccessChangerTabItem.tsx +0 -71
- package/src/components/Accordion.tsx +0 -108
- package/src/components/Alert.tsx +0 -81
- package/src/components/Breadcrumbs.tsx +0 -142
- package/src/components/Button.tsx +0 -216
- package/src/components/CalendarRange.tsx +0 -628
- package/src/components/Caption.tsx +0 -144
- package/src/components/Card.tsx +0 -88
- package/src/components/Checkbox.tsx +0 -206
- package/src/components/CompactImagesPreview.tsx +0 -135
- package/src/components/ContentTab.tsx +0 -84
- package/src/components/ContentTabs.tsx +0 -136
- package/src/components/DMSiLogo.tsx +0 -33
- package/src/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.tsx +0 -35
- package/src/components/DataGrid/ColumnSelectorHeaderCell/index.tsx +0 -74
- package/src/components/DataGrid/PinnedColumns.tsx +0 -183
- package/src/components/DataGrid/TableBody/LoadingCell.tsx +0 -44
- package/src/components/DataGrid/TableBody/TableBodyRow.tsx +0 -157
- package/src/components/DataGrid/TableBody/index.tsx +0 -185
- package/src/components/DataGrid/index.tsx +0 -756
- package/src/components/DataGrid/types.ts +0 -98
- package/src/components/DataGrid/utils.tsx +0 -15
- package/src/components/DataGridCell.tsx +0 -526
- package/src/components/DataTable.tsx +0 -881
- package/src/components/DateInput.tsx +0 -306
- package/src/components/DateRangeInput.tsx +0 -758
- package/src/components/DebugJson.tsx +0 -28
- package/src/components/Display.tsx +0 -66
- package/src/components/EditingContext.tsx +0 -43
- package/src/components/EmptyCartIcon.tsx +0 -18
- package/src/components/FilterGroup.tsx +0 -264
- package/src/components/FullViewportBox.tsx +0 -19
- package/src/components/Grid.tsx +0 -97
- package/src/components/Heading.tsx +0 -72
- package/src/components/HorizontalDivider.tsx +0 -22
- package/src/components/Icon.tsx +0 -39
- package/src/components/ImagePlaceholder.tsx +0 -22
- package/src/components/Input.tsx +0 -609
- package/src/components/InputGroup.tsx +0 -59
- package/src/components/Label.tsx +0 -46
- package/src/components/Link.tsx +0 -117
- package/src/components/List.tsx +0 -18
- package/src/components/ListGroup.tsx +0 -82
- package/src/components/LiveChatComponent.tsx +0 -56
- package/src/components/LoadingScrim.tsx +0 -33
- package/src/components/LogoAgilityTopBar.tsx +0 -54
- package/src/components/LogoDMSiTopBar.tsx +0 -33
- package/src/components/LogoMillworkTopBar.tsx +0 -119
- package/src/components/MainBar.tsx +0 -91
- package/src/components/MaxViewportBox.tsx +0 -19
- package/src/components/Menu.tsx +0 -316
- package/src/components/MenuOption.tsx +0 -330
- package/src/components/MobileDataGrid/ColumnList.tsx +0 -66
- package/src/components/MobileDataGrid/ColumnSelector/index.tsx +0 -97
- package/src/components/MobileDataGrid/GridContextProvider/GridContext.tsx +0 -25
- package/src/components/MobileDataGrid/GridContextProvider/index.tsx +0 -132
- package/src/components/MobileDataGrid/GridContextProvider/useGridContext.ts +0 -10
- package/src/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.tsx +0 -27
- package/src/components/MobileDataGrid/MobileDataGridCard/index.tsx +0 -138
- package/src/components/MobileDataGrid/MobileDataGridHeader.tsx +0 -81
- package/src/components/MobileDataGrid/RowDetailModalProvider/ModalContent.tsx +0 -42
- package/src/components/MobileDataGrid/RowDetailModalProvider/index.tsx +0 -68
- package/src/components/MobileDataGrid/dataGridReducer.ts +0 -55
- package/src/components/MobileDataGrid/index.tsx +0 -92
- package/src/components/MobileDataGrid/types.ts +0 -4
- package/src/components/Modal.tsx +0 -312
- package/src/components/ModalButtons.tsx +0 -62
- package/src/components/ModalContent.tsx +0 -31
- package/src/components/ModalHeader.tsx +0 -78
- package/src/components/ModalScrim.tsx +0 -42
- package/src/components/NavigationTab.tsx +0 -95
- package/src/components/NavigationTabs.tsx +0 -70
- package/src/components/NestedMenu.tsx +0 -131
- package/src/components/Notification.tsx +0 -128
- package/src/components/OptionPill.tsx +0 -139
- package/src/components/OrderCheckIcon.tsx +0 -19
- package/src/components/PDFViewer/DownloadIcon.tsx +0 -25
- package/src/components/PDFViewer/PDFElement.tsx +0 -90
- package/src/components/PDFViewer/PDFNavigation.tsx +0 -68
- package/src/components/PDFViewer/PDFPage.tsx +0 -34
- package/src/components/PDFViewer/index.tsx +0 -128
- package/src/components/Pagination.tsx +0 -182
- package/src/components/Paragraph.tsx +0 -55
- package/src/components/Password.tsx +0 -62
- package/src/components/ProductImagePreview/CarouselPagination.tsx +0 -54
- package/src/components/ProductImagePreview/MobileImageCarousel.tsx +0 -226
- package/src/components/ProductImagePreview/ProductPrimaryImage.tsx +0 -219
- package/src/components/ProductImagePreview/Thumbnail.tsx +0 -55
- package/src/components/ProductImagePreview/ZoomWindow.tsx +0 -136
- package/src/components/ProductImagePreview/index.tsx +0 -182
- package/src/components/ProductImagePreview/useProductImagePreview.ts +0 -211
- package/src/components/ProjectBar.tsx +0 -82
- package/src/components/Radio.tsx +0 -146
- package/src/components/Search.tsx +0 -152
- package/src/components/SearchResultImage/index.tsx +0 -39
- package/src/components/Select.tsx +0 -114
- package/src/components/SideMenu.tsx +0 -30
- package/src/components/SideMenuGroup.tsx +0 -95
- package/src/components/SideMenuItem.tsx +0 -109
- package/src/components/SimpleTable.tsx +0 -77
- package/src/components/SkeletonParagraph.tsx +0 -31
- package/src/components/Spinner.tsx +0 -32
- package/src/components/Stack.tsx +0 -347
- package/src/components/StatusPill.tsx +0 -59
- package/src/components/Stepper.tsx +0 -128
- package/src/components/Subheader.tsx +0 -50
- package/src/components/Surface.tsx +0 -37
- package/src/components/Swatch.tsx +0 -1341
- package/src/components/Textarea.tsx +0 -102
- package/src/components/Theme.tsx +0 -27
- package/src/components/Time.tsx +0 -460
- package/src/components/Toast.tsx +0 -268
- package/src/components/Tooltip.tsx +0 -159
- package/src/components/TopBar.tsx +0 -139
- package/src/components/Upload.tsx +0 -107
- package/src/components/WorldpayIframe.tsx +0 -7
- package/src/components/index.ts +0 -34
- package/src/components/useMenuSystem.tsx +0 -456
- package/src/components/useMounted.tsx +0 -14
- package/src/darkmode.css +0 -278
- package/src/fonts.css +0 -23
- package/src/hooks/index.ts +0 -4
- package/src/hooks/useInfiniteScroll.tsx +0 -40
- package/src/hooks/useKeydown.ts +0 -42
- package/src/hooks/useMatchesMedia.ts +0 -18
- package/src/hooks/useTableLayout.ts +0 -106
- package/src/index.css +0 -800
- package/src/index.tsx +0 -5
- package/src/types.ts +0 -150
- package/src/utils/date.ts +0 -236
- package/src/utils/formatting.tsx +0 -81
- package/src/utils/index.ts +0 -4
- package/src/utils/mergeObjectArrays.ts +0 -18
- package/src/utils.ts +0 -24
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dmsi/wedgekit-react",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.552",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"build": "tsup",
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
"postbuild": "npm run copy:pdf-worker"
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
|
-
"dist"
|
|
17
|
-
"src"
|
|
16
|
+
"dist"
|
|
18
17
|
],
|
|
19
18
|
"exports": {
|
|
20
19
|
"./components/*": {
|
package/src/brand.css
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
[data-theme="brand"] {
|
|
2
|
-
--color-text-primary-normal: var(--color-neutral-000);
|
|
3
|
-
|
|
4
|
-
--color-text-primary-disabled: var(--color-neutral-400);
|
|
5
|
-
--color-text-primary-error: var(--color-critical-200);
|
|
6
|
-
|
|
7
|
-
--color-text-secondary-normal: var(--color-neutral-200);
|
|
8
|
-
--color-text-secondary-disabled: var(--color-neutral-400);
|
|
9
|
-
--color-text-secondary-error: var(--color-critical-200);
|
|
10
|
-
|
|
11
|
-
--color-text-success-normal: var(--color-success-200);
|
|
12
|
-
--color-text-success-disabled: var(--color-neutral-300);
|
|
13
|
-
--color-text-success-error: var(--color-critical-200);
|
|
14
|
-
|
|
15
|
-
--color-text-warning-normal: var(--color-warning-200);
|
|
16
|
-
--color-text-warning-disabled: var(--color-neutral-300);
|
|
17
|
-
--color-text-warning-error: var(--color-critical-200);
|
|
18
|
-
|
|
19
|
-
--color-text-link-normal: var(--color-link-000);
|
|
20
|
-
--color-text-link-hover: var(--color-brand-200);
|
|
21
|
-
--color-text-link-active: var(--color-brand-200);
|
|
22
|
-
--color-text-link-disabled: var(--color-neutral-400);
|
|
23
|
-
|
|
24
|
-
--color-border-primary-normal: var(--color-brand-200);
|
|
25
|
-
--color-border-primary-focus: var(--color-neutral-000);
|
|
26
|
-
--color-border-primary-error: var(--color-critical-300);
|
|
27
|
-
|
|
28
|
-
--color-icon-primary-normal: var(--color-brand-200);
|
|
29
|
-
--color-icon-primary-disabled: var(--color-neutral-400);
|
|
30
|
-
|
|
31
|
-
--color-icon-success-normal: var(--color-success-400);
|
|
32
|
-
--color-icon-success-disabled: var(--color-neutral-400);
|
|
33
|
-
|
|
34
|
-
--color-icon-warning-normal: var(--color-warning-400);
|
|
35
|
-
--color-icon-warning-disabled: var(--color-neutral-400);
|
|
36
|
-
|
|
37
|
-
--color-icon-critical-normal: var(--color-critical-400);
|
|
38
|
-
--color-icon-critical-disabled: var(--color-neutral-400);
|
|
39
|
-
|
|
40
|
-
--color-background-primary-normal: var(--color-brand-400);
|
|
41
|
-
--color-background-grouped-primary-normal: var(--color-brand-400);
|
|
42
|
-
--color-background-secondary-normal: var(--color-brand-500);
|
|
43
|
-
--color-background-grouped-secondary-normal: var(--color-brand-500);
|
|
44
|
-
--color-background-success-normal: var(--color-success-400);
|
|
45
|
-
--color-background-warning-normal: var(--color-warning-400);
|
|
46
|
-
--color-background-critical-normal: var(--color-critical-400);
|
|
47
|
-
|
|
48
|
-
--color-text-action-primary-normal: var(--color-action-000);
|
|
49
|
-
--color-text-action-primary-hover: var(--color-brand-200);
|
|
50
|
-
--color-text-action-primary-active: var(--color-brand-200);
|
|
51
|
-
--color-text-action-primary-disabled: var(--color-neutral-400);
|
|
52
|
-
|
|
53
|
-
--color-text-on-action-primary-normal: var(--color-brand-400);
|
|
54
|
-
--color-text-on-action-primary-hover: var(--color-brand-200);
|
|
55
|
-
--color-text-on-action-primary-active: var(--color-brand-200);
|
|
56
|
-
--color-text-on-action-primary-disabled: var(--color-neutral-400);
|
|
57
|
-
|
|
58
|
-
--color-text-action-critical-normal: var(--color-critical-200);
|
|
59
|
-
--color-text-action-critical-hover: var(--color-critical-300);
|
|
60
|
-
--color-text-action-critical-active: var(--color-critical-200);
|
|
61
|
-
--color-text-action-critical-disabled: var(--color-neutral-400);
|
|
62
|
-
|
|
63
|
-
--color-border-action-normal: var(--color-neutral-000);
|
|
64
|
-
--color-border-action-hover: var(--color-brand-200);
|
|
65
|
-
--color-border-action-active: var(--color-brand-200);
|
|
66
|
-
--color-border-action-disabled: var(--color-neutral-200);
|
|
67
|
-
|
|
68
|
-
--color-text-critical-normal: var(--color-critical-200);
|
|
69
|
-
--color-text-critical-disabled: var(--color-neutral-300);
|
|
70
|
-
--color-text-critical-error: var(--color-critical-200);
|
|
71
|
-
|
|
72
|
-
--color-border-action-critical-normal: var(--color-critical-200);
|
|
73
|
-
--color-border-action-critical-hover: var(--color-critical-300);
|
|
74
|
-
--color-border-action-critical-active: var(--color-critical-200);
|
|
75
|
-
--color-border-action-critical-disabled: var(--color-neutral-200);
|
|
76
|
-
|
|
77
|
-
--color-icon-action-primary-normal: var(--color-neutral-000);
|
|
78
|
-
--color-icon-action-primary-hover: var(--color-brand-200);
|
|
79
|
-
--color-icon-action-primary-active: var(--color-brand-100);
|
|
80
|
-
--color-icon-action-primary-disabled: var(--color-neutral-300);
|
|
81
|
-
|
|
82
|
-
--color-icon-action-secondary-normal: var(--color-neutral-000);
|
|
83
|
-
--color-icon-action-secondary-hover: var(--color-brand-200);
|
|
84
|
-
--color-icon-action-secondary-active: var(--color-brand-200);
|
|
85
|
-
--color-icon-action-secondary-disabled: var(--color-neutral-400);
|
|
86
|
-
|
|
87
|
-
--color-icon-on-action-primary-normal: var(--color-brand-400);
|
|
88
|
-
--color-icon-on-action-primary-hover: var(--color-brand-500);
|
|
89
|
-
--color-icon-on-action-primary-active: var(--color-brand-300);
|
|
90
|
-
--color-icon-on-action-primary-disabled: var(--color-neutral-400);
|
|
91
|
-
|
|
92
|
-
--color-icon-action-critical-normal: var(--color-critical-200);
|
|
93
|
-
--color-icon-action-critical-hover: var(--color-critical-300);
|
|
94
|
-
--color-icon-action-critical-active: var(--color-critical-200);
|
|
95
|
-
--color-icon-action-critical-disabled: var(--color-neutral-400);
|
|
96
|
-
|
|
97
|
-
--color-icon-brand-primary-normal: var(--color-neutral-000);
|
|
98
|
-
--color-icon-brand-primary-hover: var(--color-brand-200);
|
|
99
|
-
--color-icon-brand-primary-active: var(--color-neutral-000);
|
|
100
|
-
--color-icon-brand-primary-disabled: var(--color-neutral-300);
|
|
101
|
-
|
|
102
|
-
--color-background-action-primary-normal: var(--color-action-000);
|
|
103
|
-
--color-background-action-primary-hover: var(--color-brand-200);
|
|
104
|
-
--color-background-action-primary-active: var(--color-neutral-000);
|
|
105
|
-
--color-background-action-primary-disabled: var(--color-neutral-200);
|
|
106
|
-
|
|
107
|
-
--color-background-action-secondary-normal: var(--color-brand-400);
|
|
108
|
-
--color-background-action-secondary-hover: var(--color-brand-500);
|
|
109
|
-
--color-background-action-secondary-active: var(--color-brand-400);
|
|
110
|
-
--color-background-action-secondary-disabled: var(--color-neutral-200);
|
|
111
|
-
|
|
112
|
-
--color-background-brand-normal: var(--color-brand-400);
|
|
113
|
-
|
|
114
|
-
--color-background-action-critical-primary-normal: var(--color-critical-400);
|
|
115
|
-
--color-background-action-critical-primary-hover: var(--color-critical-500);
|
|
116
|
-
--color-background-action-critical-primary-active: var(--color-critical-300);
|
|
117
|
-
--color-background-action-critical-primary-disabled: var(--color-neutral-200);
|
|
118
|
-
|
|
119
|
-
--color-background-action-critical-secondary-normal: var(--color-brand-400);
|
|
120
|
-
--color-background-action-critical-secondary-hover: var(--color-brand-500);
|
|
121
|
-
--color-background-action-critical-secondary-active: var(--color-brand-400);
|
|
122
|
-
--color-background-action-critical-secondary-disabled: var(
|
|
123
|
-
--color-neutral-200
|
|
124
|
-
);
|
|
125
|
-
}
|
package/src/classNames.ts
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import clsx from "clsx";
|
|
2
|
-
|
|
3
|
-
export const typography = {
|
|
4
|
-
display1: clsx(
|
|
5
|
-
"font-sans font-semibold",
|
|
6
|
-
"text-display-1-mobile desktop:text-display-1-desktop compact:text-display-1-desktop-compact",
|
|
7
|
-
"leading-display-1-mobile desktop:leading-display-1-desktop",
|
|
8
|
-
),
|
|
9
|
-
|
|
10
|
-
display2: clsx(
|
|
11
|
-
"font-sans font-bold",
|
|
12
|
-
"text-display-2-mobile desktop:text-display-2-desktop compact:text-display-2-desktop-compact",
|
|
13
|
-
"leading-display-2-mobile desktop:leading-display-2-desktop",
|
|
14
|
-
),
|
|
15
|
-
|
|
16
|
-
heading1: clsx(
|
|
17
|
-
"font-sans font-semibold",
|
|
18
|
-
"text-heading-1-mobile desktop:text-heading-1-desktop compact:text-heading-1-desktop-compact",
|
|
19
|
-
"leading-heading-1-mobile desktop:leading-heading-1-desktop",
|
|
20
|
-
),
|
|
21
|
-
|
|
22
|
-
heading2: clsx(
|
|
23
|
-
"font-sans font-normal",
|
|
24
|
-
"text-heading-2-mobile desktop:text-heading-2-desktop compact:text-heading-2-desktop-compact",
|
|
25
|
-
"leading-heading-2-mobile desktop:leading-heading-2-desktop",
|
|
26
|
-
),
|
|
27
|
-
|
|
28
|
-
heading3: clsx(
|
|
29
|
-
"font-sans font-semibold",
|
|
30
|
-
"text-heading-3-mobile desktop:text-heading-3-desktop compact:text-heading-3-desktop-compact",
|
|
31
|
-
"leading-heading-3-mobile desktop:leading-heading-3-desktop",
|
|
32
|
-
),
|
|
33
|
-
|
|
34
|
-
subheader: clsx(
|
|
35
|
-
"font-sans font-semibold",
|
|
36
|
-
"text-subheader-mobile desktop:text-subheader-desktop compact:text-subheader-desktop-compact",
|
|
37
|
-
"leading-subheader-mobile desktop:leading-subheader-desktop",
|
|
38
|
-
),
|
|
39
|
-
|
|
40
|
-
link: clsx(
|
|
41
|
-
"font-sans font-normal",
|
|
42
|
-
"text-link-mobile desktop:text-link-desktop compact:text-link-desktop-compact",
|
|
43
|
-
"leading-link-mobile desktop:leading-link-desktop",
|
|
44
|
-
),
|
|
45
|
-
buttonLabel: clsx(
|
|
46
|
-
"font-sans font-semibold",
|
|
47
|
-
"text-label-mobile desktop:text-label-desktop compact:text-label-desktop-compact",
|
|
48
|
-
"leading-label-mobile desktop:leading-label-desktop",
|
|
49
|
-
),
|
|
50
|
-
|
|
51
|
-
label: clsx(
|
|
52
|
-
"font-sans font-semibold",
|
|
53
|
-
"text-label-mobile desktop:text-label-desktop compact:text-label-desktop-compact",
|
|
54
|
-
"leading-label-mobile desktop:leading-label-desktop",
|
|
55
|
-
),
|
|
56
|
-
|
|
57
|
-
paragraph: clsx(
|
|
58
|
-
"font-sans font-normal",
|
|
59
|
-
"text-paragraph-mobile desktop:text-paragraph-desktop compact:text-paragraph-desktop-compact",
|
|
60
|
-
"leading-paragraph-mobile desktop:leading-paragraph-desktop",
|
|
61
|
-
),
|
|
62
|
-
|
|
63
|
-
caption: clsx(
|
|
64
|
-
"font-sans font-normal",
|
|
65
|
-
"text-caption-mobile desktop:text-caption-desktop compact:text-caption-desktop-compact",
|
|
66
|
-
"leading-caption-mobile desktop:leading-caption-desktop",
|
|
67
|
-
),
|
|
68
|
-
|
|
69
|
-
breadcrumb: clsx(
|
|
70
|
-
"font-sans font-normal",
|
|
71
|
-
"text-paragraph-mobile desktop:text-paragraph-desktop compact:text-paragraph-desktop-compact",
|
|
72
|
-
"leading-mobile-breadcrumb desktop:leading-desktop-breadcrumb",
|
|
73
|
-
),
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export const baseTransition = clsx(
|
|
77
|
-
"transition-colors duration-100 ease-in-out",
|
|
78
|
-
);
|
|
79
|
-
|
|
80
|
-
export const componentGap = clsx(
|
|
81
|
-
"gap-mobile-component-gap desktop:gap-desktop-component-gap compact:gap-desktop-compact-component-gap",
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
export const paddingUsingComponentGap = clsx(
|
|
85
|
-
"p-mobile-component-gap desktop:p-desktop-component-gap compact:p-desktop-compact-component-gap",
|
|
86
|
-
);
|
|
87
|
-
|
|
88
|
-
export const paddingXUsingLayoutGroupGap = clsx(
|
|
89
|
-
"px-mobile-layout-group-gap desktop:px-desktop-layout-group-gap compact:px-desktop-compact-layout-group-gap",
|
|
90
|
-
);
|
|
91
|
-
|
|
92
|
-
export const paddingYUsingLayoutGroupGap = clsx(
|
|
93
|
-
"py-mobile-layout-group-gap desktop:py-desktop-layout-group-gap compact:py-desktop-compact-layout-group-gap",
|
|
94
|
-
);
|
|
95
|
-
|
|
96
|
-
export const componentPadding = clsx(
|
|
97
|
-
"p-mobile-component-padding desktop:p-desktop-component-padding compact:p-desktop-compact-component-padding",
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
export const componentPaddingBottom = clsx(
|
|
101
|
-
"pb-mobile-component-padding desktop:pb-desktop-component-padding compact:pb-desktop-compact-component-padding",
|
|
102
|
-
);
|
|
103
|
-
|
|
104
|
-
export const componentPaddingX = clsx(
|
|
105
|
-
"px-mobile-component-padding desktop:px-desktop-component-padding compact:px-desktop-compact-component-padding",
|
|
106
|
-
);
|
|
107
|
-
|
|
108
|
-
export const componentPaddingY = clsx(
|
|
109
|
-
"py-mobile-component-padding desktop:py-desktop-component-padding compact:py-desktop-compact-component-padding",
|
|
110
|
-
);
|
|
111
|
-
|
|
112
|
-
export const componentPaddingXUsingComponentGap = clsx(
|
|
113
|
-
"px-mobile-component-gap desktop:px-desktop-component-gap compact:px-desktop-compact-component-gap",
|
|
114
|
-
);
|
|
115
|
-
|
|
116
|
-
export const componentPaddingYUsingComponentGap = clsx(
|
|
117
|
-
"py-mobile-component-gap desktop:py-desktop-component-gap compact:py-desktop-compact-component-gap",
|
|
118
|
-
);
|
|
119
|
-
|
|
120
|
-
export const componentPaddingYUsingComponentGap2xMobile = clsx(
|
|
121
|
-
"py-[calc(var(--spacing-mobile-component-gap)_+_8px)] desktop:py-desktop-component-gap compact:py-desktop-compact-component-gap",
|
|
122
|
-
);
|
|
123
|
-
|
|
124
|
-
export const componentPaddingMinusBorder = clsx(
|
|
125
|
-
"p-[calc(var(--spacing-mobile-component-padding)_-_1px)] desktop:p-[calc(var(--spacing-desktop-component-padding)_-_1px)] compact:p-[calc(var(--spacing-desktop-compact-component-padding)_-_1px)]",
|
|
126
|
-
);
|
|
127
|
-
|
|
128
|
-
export const componentPaddingMinus2pxBorder = clsx(
|
|
129
|
-
"p-[calc(var(--spacing-mobile-component-padding)_-_2px)] desktop:p-[calc(var(--spacing-desktop-component-padding)_-_2px)] compact:p-[calc(var(--spacing-desktop-compact-component-padding)_-_2px)]",
|
|
130
|
-
);
|
|
131
|
-
|
|
132
|
-
export const componentPaddingMinusBorderDesktop = clsx(
|
|
133
|
-
"p-[calc(var(--spacing-desktop-component-padding)_-_1px)]",
|
|
134
|
-
);
|
|
135
|
-
|
|
136
|
-
export const layoutPaddding = clsx(
|
|
137
|
-
"p-mobile-layout-padding desktop:p-desktop-layout-padding compact:p-desktop-compact-layout-padding",
|
|
138
|
-
);
|
|
139
|
-
|
|
140
|
-
export const layoutPaddingBottom = clsx(
|
|
141
|
-
"pb-mobile-layout-padding desktop:pb-desktop-layout-padding compact:pb-desktop-compact-layout-padding",
|
|
142
|
-
);
|
|
143
|
-
|
|
144
|
-
export const layoutPaddingY = clsx(
|
|
145
|
-
"py-mobile-layout-padding desktop:py-desktop-layout-padding compact:py-desktop-compact-layout-padding",
|
|
146
|
-
);
|
|
147
|
-
|
|
148
|
-
export const layoutPaddingX = clsx(
|
|
149
|
-
"px-mobile-layout-padding desktop:px-desktop-layout-padding compact:px-desktop-compact-layout-padding",
|
|
150
|
-
);
|
|
151
|
-
|
|
152
|
-
export const containerPaddingX = clsx(
|
|
153
|
-
"px-mobile-container-padding desktop:px-desktop-container-padding compact:px-desktop-compact-container-padding",
|
|
154
|
-
);
|
|
155
|
-
|
|
156
|
-
export const containerPaddingY = clsx(
|
|
157
|
-
"py-mobile-container-padding desktop:py-desktop-container-padding compact:py-desktop-compact-container-padding",
|
|
158
|
-
);
|
|
159
|
-
|
|
160
|
-
export const layoutGroupGapPaddingY = clsx(
|
|
161
|
-
"py-mobile-layout-group-gap desktop:py-desktop-layout-group-gap compact:py-desktop-compact-layout-group-gap",
|
|
162
|
-
);
|
|
163
|
-
|
|
164
|
-
export const layoutGroupGap = clsx(
|
|
165
|
-
"gap-mobile-layout-group-gap desktop:gap-desktop-layout-group-gap compact:gap-desktop-compact-layout-group-gap",
|
|
166
|
-
);
|
|
167
|
-
|
|
168
|
-
export const layoutGap = clsx(
|
|
169
|
-
"gap-mobile-layout-gap desktop:gap-desktop-layout-gap compact:gap-desktop-compact-layout-gap",
|
|
170
|
-
);
|
|
171
|
-
|
|
172
|
-
export const gapUsingContainerPadding = clsx(
|
|
173
|
-
"gap-mobile-container-padding desktop:gap-desktop-container-padding compact:gap-desktop-compact-container-padding",
|
|
174
|
-
);
|
|
@@ -1,71 +0,0 @@
|
|
|
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(
|
|
7
|
-
props: ComponentProps<"div"> & {
|
|
8
|
-
selected?: boolean;
|
|
9
|
-
loading?: boolean;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
additionalText?: string;
|
|
12
|
-
borderTop?: boolean;
|
|
13
|
-
borderBottom?: boolean;
|
|
14
|
-
},
|
|
15
|
-
) {
|
|
16
|
-
const {
|
|
17
|
-
additionalText,
|
|
18
|
-
borderTop,
|
|
19
|
-
borderBottom,
|
|
20
|
-
selected,
|
|
21
|
-
children,
|
|
22
|
-
loading,
|
|
23
|
-
disabled,
|
|
24
|
-
onClick,
|
|
25
|
-
...rest
|
|
26
|
-
} = props;
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<div
|
|
30
|
-
className={clsx(
|
|
31
|
-
"flex items-center justify-between",
|
|
32
|
-
"py-[15px] px-4 gap-4",
|
|
33
|
-
"bg-background-grouped-primary-normal cursor-pointer",
|
|
34
|
-
borderTop && "border-t",
|
|
35
|
-
borderBottom && "border-b",
|
|
36
|
-
borderTop || borderBottom
|
|
37
|
-
? "border-border-primary-normal"
|
|
38
|
-
: "border-transparent",
|
|
39
|
-
selected
|
|
40
|
-
? "text-text-action-primary-normal"
|
|
41
|
-
: "text-text-primary-normal hover:text-text-action-primary-normal",
|
|
42
|
-
)}
|
|
43
|
-
onClick={(e) => {
|
|
44
|
-
if (loading || disabled) {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
onClick?.(e);
|
|
49
|
-
}}
|
|
50
|
-
{...rest}
|
|
51
|
-
>
|
|
52
|
-
<div className="flex flex-col gap-0.5">
|
|
53
|
-
<Subheader>{children}</Subheader>
|
|
54
|
-
{additionalText && (
|
|
55
|
-
<p className="text-text-primary-normal text-[13px] leading-[1.38462] font-normal">
|
|
56
|
-
{additionalText}
|
|
57
|
-
</p>
|
|
58
|
-
)}
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
|
-
{loading && !selected && <Icon name="cached" size={16} />}
|
|
62
|
-
|
|
63
|
-
{selected && (
|
|
64
|
-
<div className="flex items-center gap-1">
|
|
65
|
-
<div className="rounded-full size-2 bg-text-action-primary-normal"></div>
|
|
66
|
-
<Subheader>Active</Subheader>
|
|
67
|
-
</div>
|
|
68
|
-
)}
|
|
69
|
-
</div>
|
|
70
|
-
);
|
|
71
|
-
}
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import clsx from "clsx";
|
|
4
|
-
import { typography } from "../classNames";
|
|
5
|
-
import { Card } from "./Card";
|
|
6
|
-
import { Icon } from "./Icon";
|
|
7
|
-
import { Stack } from "./Stack";
|
|
8
|
-
import { Paragraph } from "./Paragraph";
|
|
9
|
-
|
|
10
|
-
interface AccordionProps {
|
|
11
|
-
title: React.ReactNode;
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
isOpen: boolean;
|
|
14
|
-
before?: React.ReactNode;
|
|
15
|
-
after?: React.ReactNode;
|
|
16
|
-
onClick?: () => void;
|
|
17
|
-
className?: string;
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
testid?: string;
|
|
20
|
-
titleAlign?: "start" | "center" | "end";
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export function Accordion(props: AccordionProps) {
|
|
24
|
-
const {
|
|
25
|
-
isOpen,
|
|
26
|
-
onClick,
|
|
27
|
-
className,
|
|
28
|
-
disabled,
|
|
29
|
-
testid,
|
|
30
|
-
titleAlign = "center",
|
|
31
|
-
} = props;
|
|
32
|
-
const {
|
|
33
|
-
title,
|
|
34
|
-
before,
|
|
35
|
-
after = (
|
|
36
|
-
<Icon
|
|
37
|
-
name="expand_more"
|
|
38
|
-
className={clsx(
|
|
39
|
-
"text-icon-primary-normal transform transition-all duration-300 ease-in-out",
|
|
40
|
-
isOpen ? "rotate-180" : "rotate-0",
|
|
41
|
-
)}
|
|
42
|
-
/>
|
|
43
|
-
),
|
|
44
|
-
children,
|
|
45
|
-
} = props;
|
|
46
|
-
|
|
47
|
-
function handleClick(e: React.MouseEvent<HTMLDivElement>) {
|
|
48
|
-
e.stopPropagation();
|
|
49
|
-
e.preventDefault();
|
|
50
|
-
onClick?.();
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<Card
|
|
55
|
-
className={clsx(
|
|
56
|
-
"overflow-hidden select-none",
|
|
57
|
-
{ "cursor-pointer": !disabled },
|
|
58
|
-
className,
|
|
59
|
-
)}
|
|
60
|
-
selected={isOpen}
|
|
61
|
-
onClick={handleClick}
|
|
62
|
-
testid={testid}
|
|
63
|
-
>
|
|
64
|
-
<Stack
|
|
65
|
-
sizing="component"
|
|
66
|
-
horizontal
|
|
67
|
-
horizontalMobile
|
|
68
|
-
justify="between"
|
|
69
|
-
items="center"
|
|
70
|
-
>
|
|
71
|
-
<Stack sizing="layout-group" horizontal items={titleAlign}>
|
|
72
|
-
{before}
|
|
73
|
-
{typeof title === "string" ? (
|
|
74
|
-
<Paragraph
|
|
75
|
-
testid={testid ? `${testid}-title` : undefined}
|
|
76
|
-
className="text-text-primary-normal"
|
|
77
|
-
>
|
|
78
|
-
{title}
|
|
79
|
-
</Paragraph>
|
|
80
|
-
) : (
|
|
81
|
-
title
|
|
82
|
-
)}
|
|
83
|
-
</Stack>
|
|
84
|
-
{after}
|
|
85
|
-
</Stack>
|
|
86
|
-
<div
|
|
87
|
-
className={clsx("grid transition-all duration-300 ease-in-out")}
|
|
88
|
-
style={{
|
|
89
|
-
gridTemplateRows: isOpen ? "1fr" : "0fr",
|
|
90
|
-
}}
|
|
91
|
-
data-testid={testid ? `${testid}-content-container` : undefined}
|
|
92
|
-
>
|
|
93
|
-
<div className="overflow-hidden">
|
|
94
|
-
<div
|
|
95
|
-
className={clsx(
|
|
96
|
-
typography.paragraph,
|
|
97
|
-
"text-text-primary-normal desktop:pt-desktop-layout-gap",
|
|
98
|
-
"flex flex-col gap-desktop-layout-gap",
|
|
99
|
-
)}
|
|
100
|
-
onClick={(e) => e.stopPropagation()}
|
|
101
|
-
>
|
|
102
|
-
{children}
|
|
103
|
-
</div>
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
</Card>
|
|
107
|
-
);
|
|
108
|
-
}
|
package/src/components/Alert.tsx
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import clsx from "clsx";
|
|
2
|
-
import { Button } from "./Button";
|
|
3
|
-
import { Heading2 } from "./Heading";
|
|
4
|
-
import { Icon } from "./Icon";
|
|
5
|
-
import { Paragraph } from "./Paragraph";
|
|
6
|
-
import { Stack } from "./Stack";
|
|
7
|
-
import { HTMLAttributes, useCallback } from "react";
|
|
8
|
-
|
|
9
|
-
export type AlertVariant = "error" | "warning";
|
|
10
|
-
|
|
11
|
-
export interface AlertProps
|
|
12
|
-
extends Omit<HTMLAttributes<HTMLDivElement>, "title" | "className"> {
|
|
13
|
-
id?: string;
|
|
14
|
-
testId?: string;
|
|
15
|
-
variant: AlertVariant;
|
|
16
|
-
title: string;
|
|
17
|
-
message: string;
|
|
18
|
-
dismissible?: boolean;
|
|
19
|
-
onClose?: () => void;
|
|
20
|
-
}
|
|
21
|
-
export function Alert({
|
|
22
|
-
id,
|
|
23
|
-
testId,
|
|
24
|
-
variant,
|
|
25
|
-
title,
|
|
26
|
-
message,
|
|
27
|
-
dismissible = false,
|
|
28
|
-
onClose,
|
|
29
|
-
...rest
|
|
30
|
-
}: AlertProps) {
|
|
31
|
-
const isError = variant === "error";
|
|
32
|
-
|
|
33
|
-
const handleClose = useCallback(() => {
|
|
34
|
-
if (onClose) onClose();
|
|
35
|
-
}, [onClose]);
|
|
36
|
-
|
|
37
|
-
return (
|
|
38
|
-
<Stack
|
|
39
|
-
id={id}
|
|
40
|
-
data-testid={testId}
|
|
41
|
-
sizing="container"
|
|
42
|
-
backgroundColor="background-grouped-primary-normal"
|
|
43
|
-
borderColor="border-primary-normal"
|
|
44
|
-
items="start"
|
|
45
|
-
elevation={4}
|
|
46
|
-
rounded
|
|
47
|
-
padding
|
|
48
|
-
horizontal
|
|
49
|
-
horizontalMobile
|
|
50
|
-
{...rest}
|
|
51
|
-
>
|
|
52
|
-
<div
|
|
53
|
-
className={clsx("min-w-[2px] min-h-full flex", {
|
|
54
|
-
"bg-background-critical-normal": isError,
|
|
55
|
-
"bg-background-warning-normal": !isError,
|
|
56
|
-
})}
|
|
57
|
-
/>
|
|
58
|
-
<span
|
|
59
|
-
className={clsx({
|
|
60
|
-
"text-icon-critical-normal": isError,
|
|
61
|
-
"text-icon-warning-normal": !isError,
|
|
62
|
-
})}
|
|
63
|
-
>
|
|
64
|
-
<Icon name="warning" />
|
|
65
|
-
</span>
|
|
66
|
-
<Stack flexGrow={1} sizing="component">
|
|
67
|
-
<Heading2>{title}</Heading2>
|
|
68
|
-
<Paragraph>{message}</Paragraph>
|
|
69
|
-
</Stack>
|
|
70
|
-
{dismissible && (
|
|
71
|
-
<Button
|
|
72
|
-
aria-label="Dismiss alert"
|
|
73
|
-
iconOnly
|
|
74
|
-
variant="tertiary"
|
|
75
|
-
leftIcon={<Icon name="close" />}
|
|
76
|
-
onClick={handleClose}
|
|
77
|
-
/>
|
|
78
|
-
)}
|
|
79
|
-
</Stack>
|
|
80
|
-
);
|
|
81
|
-
}
|