@aivenio/aquarium 1.24.0 → 1.25.1
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/_variables.scss +1 -1
- package/dist/_variables_timescale.scss +1 -1
- package/dist/atoms.cjs +2 -3
- package/dist/atoms.mjs +2 -3
- package/dist/src/atoms/Alert/Alert.d.ts +2 -2
- package/dist/src/atoms/Banner/Banner.d.ts +6 -6
- package/dist/src/atoms/Card/Card.d.ts +6 -6
- package/dist/src/atoms/Card/Card.js +1 -1
- package/dist/src/atoms/Checkbox/Checkbox.d.ts +1 -1
- package/dist/src/atoms/DataList/DataList.js +2 -2
- package/dist/src/atoms/Dialog/Dialog.d.ts +1 -1
- package/dist/src/atoms/DropdownMenu/DropdownMenu.d.ts +5 -5
- package/dist/src/atoms/Modal/Modal.d.ts +3 -3
- package/dist/src/atoms/Navigation/Navigation.d.ts +1 -1
- package/dist/src/atoms/PageHeader/PageHeader.d.ts +4 -2
- package/dist/src/atoms/PageHeader/PageHeader.js +3 -3
- package/dist/src/atoms/ProgressBar/ProgressBar.d.ts +2 -2
- package/dist/src/atoms/ProgressBar/ProgressBar.js +2 -2
- package/dist/src/atoms/RadioButton/RadioButton.d.ts +1 -1
- package/dist/src/atoms/Section/Section.d.ts +1 -1
- package/dist/src/atoms/Select/Select.d.ts +23 -23
- package/dist/src/atoms/Select/Select.js +3 -3
- package/dist/src/atoms/Stepper/Stepper.d.ts +2 -2
- package/dist/src/atoms/Switch/Switch.d.ts +1 -1
- package/dist/src/atoms/Table/Table.d.ts +4 -4
- package/dist/src/atoms/Table/Table.js +2 -2
- package/dist/src/atoms/Toast/Toast.d.ts +1 -1
- package/dist/src/atoms/Typography/Typography.d.ts +1 -1
- package/dist/src/atoms/Typography/Typography.js +7 -5
- package/dist/src/charts/BarChart/BarChart.d.ts +2 -2
- package/dist/src/charts/lib/utils.d.ts +1 -1
- package/dist/src/js/resolveTheme.d.ts +4 -2
- package/dist/src/molecules/Alert/Alert.d.ts +2 -1
- package/dist/src/molecules/Alert/Alert.js +1 -1
- package/dist/src/molecules/Badge/Badge.d.ts +2 -2
- package/dist/src/molecules/Banner/Banner.d.ts +2 -1
- package/dist/src/molecules/Banner/Banner.js +1 -1
- package/dist/src/molecules/Box/Box.d.ts +17 -17
- package/dist/src/molecules/Breadcrumbs/Breadcrumbs.d.ts +3 -3
- package/dist/src/molecules/Breadcrumbs/Breadcrumbs.js +3 -3
- package/dist/src/molecules/Button/Button.d.ts +8 -8
- package/dist/src/molecules/Button/Button.js +4 -4
- package/dist/src/molecules/Card/Card.d.ts +11 -10
- package/dist/src/molecules/Card/Card.js +5 -3
- package/dist/src/molecules/Card/Compact.d.ts +2 -2
- package/dist/src/molecules/Card/Compact.js +5 -3
- package/dist/src/molecules/Carousel/Carousel.js +20 -12
- package/dist/src/molecules/Chip/Chip.d.ts +3 -3
- package/dist/src/molecules/Combobox/Combobox.d.ts +4 -4
- package/dist/src/molecules/Combobox/Combobox.js +1 -1
- package/dist/src/molecules/ControlLabel/ControlLabel.d.ts +1 -1
- package/dist/src/molecules/DataList/DataList.d.ts +2 -2
- package/dist/src/molecules/DataTable/DataTable.d.ts +2 -2
- package/dist/src/molecules/Dialog/Dialog.js +8 -6
- package/dist/src/molecules/Dropdown/Dropdown.d.ts +1 -1
- package/dist/src/molecules/Dropdown/Dropdown.js +3 -3
- package/dist/src/molecules/DropdownMenu/DropdownMenu.d.ts +6 -6
- package/dist/src/molecules/Element/Element.d.ts +2 -2
- package/dist/src/molecules/EmptyState/EmptyState.d.ts +1 -1
- package/dist/src/molecules/Flexbox/Flexbox.d.ts +7 -7
- package/dist/src/molecules/Flexbox/FlexboxItem.d.ts +7 -7
- package/dist/src/molecules/Grid/Grid.d.ts +7 -7
- package/dist/src/molecules/Grid/GridItem.d.ts +7 -7
- package/dist/src/molecules/Input/Input.js +7 -5
- package/dist/src/molecules/LineClamp/LineClamp.d.ts +15 -15
- package/dist/src/molecules/ListItem/ListItem.js +4 -4
- package/dist/src/molecules/Modal/Modal.js +8 -6
- package/dist/src/molecules/MultiInput/InputChip.d.ts +2 -2
- package/dist/src/molecules/MultiInput/InputChip.js +2 -2
- package/dist/src/molecules/MultiInput/MultiInput.d.ts +5 -5
- package/dist/src/molecules/MultiInput/MultiInput.js +9 -5
- package/dist/src/molecules/MultiSelect/MultiSelect.d.ts +4 -4
- package/dist/src/molecules/MultiSelect/MultiSelect.js +6 -4
- package/dist/src/molecules/NativeSelect/NativeSelect.js +12 -8
- package/dist/src/molecules/Navigation/Navigation.d.ts +2 -2
- package/dist/src/molecules/PageHeader/PageHeader.d.ts +44 -8
- package/dist/src/molecules/PageHeader/PageHeader.js +18 -6
- package/dist/src/molecules/Pagination/usePagination.d.ts +1 -1
- package/dist/src/molecules/Pagination/usePagination.js +1 -1
- package/dist/src/molecules/Popover/Popover.d.ts +2 -2
- package/dist/src/molecules/Popover/Popover.js +1 -1
- package/dist/src/molecules/PopoverDialog/PopoverDialog.d.ts +1 -1
- package/dist/src/molecules/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/src/molecules/RadioButtonGroup/RadioButtonGroup.d.ts +4 -3
- package/dist/src/molecules/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/dist/src/molecules/Section/Section.d.ts +1 -1
- package/dist/src/molecules/SegmentedControl/SegmentedControl.d.ts +3 -3
- package/dist/src/molecules/SegmentedControl/SegmentedControl.js +2 -2
- package/dist/src/molecules/Select/Select.d.ts +4 -4
- package/dist/src/molecules/Select/Select.js +5 -3
- package/dist/src/molecules/Stepper/Stepper.d.ts +1 -1
- package/dist/src/molecules/Switch/Switch.d.ts +1 -1
- package/dist/src/molecules/Tabs/Tabs.d.ts +13 -9
- package/dist/src/molecules/Tabs/Tabs.js +26 -17
- package/dist/src/molecules/TagLabel/TagLabel.d.ts +1 -1
- package/dist/src/molecules/Tailwindify/Tailwindify.d.ts +5 -5
- package/dist/src/molecules/Tailwindify/Tailwindify.js +7 -4
- package/dist/src/molecules/Template/Template.d.ts +1 -1
- package/dist/src/molecules/Textarea/Textarea.d.ts +3 -3
- package/dist/src/molecules/Timeline/Timeline.d.ts +3 -3
- package/dist/src/molecules/Toast/Toast.spec.js +2 -2
- package/dist/src/molecules/Toast/types.d.ts +5 -5
- package/dist/src/molecules/Toast/types.js +1 -1
- package/dist/src/molecules/Tooltip/Tooltip.d.ts +1 -1
- package/dist/src/molecules/Tooltip/Tooltip.js +5 -3
- package/dist/src/molecules/Tooltip/useTooltipTriggerState.js +9 -5
- package/dist/src/molecules/Typography/Typography.d.ts +4 -4
- package/dist/src/molecules/Typography/Typography.js +9 -9
- package/dist/src/molecules/index.d.ts +2 -2
- package/dist/src/system.js +9 -5
- package/dist/src/utils/form/FormControl/FormControl.js +2 -2
- package/dist/src/utils/form/HelperText/HelperText.js +4 -4
- package/dist/src/utils/form/InputAdornment/InputAdornment.js +6 -6
- package/dist/src/utils/form/Label/Label.d.ts +3 -3
- package/dist/src/utils/form/Label/Label.js +12 -10
- package/dist/src/utils/object.d.ts +1 -1
- package/dist/src/utils/positioner.d.ts +1 -1
- package/dist/src/utils/table/types.d.ts +9 -9
- package/dist/src/utils/table/useTableSort.d.ts +1 -1
- package/dist/src/utils/table/utils.d.ts +1 -1
- package/dist/src/utils/tailwind.js +6 -4
- package/dist/src/utils/themeVariableSamples.d.ts +2 -0
- package/dist/src/utils/themeVariableSamples.js +146 -0
- package/dist/src/utils/useStyle.d.ts +3 -3
- package/dist/src/utils/useStyle.js +30 -22
- package/dist/system.cjs +48 -15
- package/dist/system.mjs +48 -15
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/DimensionProps.d.ts +1 -1
- package/dist/types/designTokens.d.ts +2 -2
- package/dist/types/designTokens.js +6 -4
- package/dist/types/tailwind.d.ts +1 -1
- package/dist/types/utils.d.ts +5 -5
- package/package.json +11 -13
@@ -5,13 +5,13 @@ import { type Weight } from '../../../src/molecules/Template/Template';
|
|
5
5
|
import { type ActionType } from '../../../types/ActionType';
|
6
6
|
import { type AllOrNone, type RequireAtLeastOne } from '../../../types/utils';
|
7
7
|
import type React from 'react';
|
8
|
-
export declare type TextAlign = '
|
8
|
+
export declare type TextAlign = 'center' | 'left' | 'right';
|
9
9
|
export declare type SortDirection = AriaAttributes['aria-sort'];
|
10
10
|
export declare type Column = {
|
11
11
|
/**
|
12
12
|
* Type of the column.
|
13
13
|
*/
|
14
|
-
type: '
|
14
|
+
type: 'action' | 'custom' | 'item' | 'number' | 'status' | 'text';
|
15
15
|
/**
|
16
16
|
* Display name for the column.
|
17
17
|
*/
|
@@ -37,7 +37,7 @@ declare type Sortable = {
|
|
37
37
|
*/
|
38
38
|
sortable?: boolean;
|
39
39
|
};
|
40
|
-
export declare type FieldColumn<R, K extends keyof R = keyof R> = K extends keyof R ? {
|
40
|
+
export declare type FieldColumn<R, K extends keyof R = keyof R> = K extends keyof R ? CustomSortable<R> & Sortable & {
|
41
41
|
/**
|
42
42
|
* Name of the property field that this column represents in the data rows.
|
43
43
|
*/
|
@@ -47,7 +47,7 @@ export declare type FieldColumn<R, K extends keyof R = keyof R> = K extends keyo
|
|
47
47
|
* Sorting will still be based on the unformatted value.
|
48
48
|
*/
|
49
49
|
formatter?: Formatter<R, K>;
|
50
|
-
}
|
50
|
+
} : never;
|
51
51
|
export declare type TextColumn<R> = FieldColumn<R> & {
|
52
52
|
/**
|
53
53
|
* Type of the column.
|
@@ -108,14 +108,14 @@ declare type StatusColumn<R> = Column & CustomSortable<R> & {
|
|
108
108
|
*/
|
109
109
|
status: (row: R, index: number, rows: R[]) => {
|
110
110
|
status: ChipStatus;
|
111
|
-
text:
|
111
|
+
text: number | string;
|
112
112
|
};
|
113
113
|
};
|
114
114
|
declare type ListColumn = Column & {
|
115
115
|
/**
|
116
116
|
* Width of the column. Number for pixels and string for percentages
|
117
117
|
*/
|
118
|
-
width?:
|
118
|
+
width?: Weight | number;
|
119
119
|
};
|
120
120
|
declare type TableColumn = Column & {
|
121
121
|
/**
|
@@ -125,13 +125,13 @@ declare type TableColumn = Column & {
|
|
125
125
|
};
|
126
126
|
export declare type DataListColumn<R extends DataTableRow> = DataColumn<R, ListColumn>;
|
127
127
|
export declare type DataTableColumn<R extends DataTableRow> = DataColumn<R, TableColumn>;
|
128
|
-
declare type DataColumn<R extends DataTableRow, C extends Column> = C & (
|
128
|
+
declare type DataColumn<R extends DataTableRow, C extends Column> = C & (ActionColumn<R> | CustomColumn<R> | ItemColumn<R> | NumberColumn<R> | StatusColumn<R> | TextColumn<R>);
|
129
129
|
export declare type DataTableRow = Record<string, any> & {
|
130
130
|
/**
|
131
131
|
* Assigned ID for each data row.
|
132
132
|
* Used as a key. Use something unqiue derived from the data, not index.
|
133
133
|
*/
|
134
|
-
id:
|
134
|
+
id: number | string;
|
135
135
|
};
|
136
136
|
export declare type Sort<C> = {
|
137
137
|
column: C;
|
@@ -162,7 +162,7 @@ export declare type DataTableMenuProps<R extends DataTableRow> = AllOrNone<{
|
|
162
162
|
* @param row currently selected row
|
163
163
|
* @param index currectly selected row index
|
164
164
|
*/
|
165
|
-
onAction: (action:
|
165
|
+
onAction: (action: number | string, row: R, index: number) => void;
|
166
166
|
/**
|
167
167
|
* Handler that is called when the menu's open state changes.
|
168
168
|
*/
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { type DataListColumn, type DataTableColumn, type DataTableRow, type Sort } from '../../../src/utils/table/types';
|
2
|
-
export declare const useTableSort: <C extends
|
2
|
+
export declare const useTableSort: <C extends DataListColumn<R> | DataTableColumn<R>, R extends DataTableRow>() => [Sort<C> | undefined, (column: C) => void];
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { type DataListColumn, type DataTableColumn, type DataTableRow, type Sort } from '../../../src/utils/table/types';
|
2
|
-
export declare const sortRowsBy: <C extends
|
2
|
+
export declare const sortRowsBy: <C extends DataListColumn<R> | DataTableColumn<R>, R extends DataTableRow>(rows: R[], sort: Sort<C> | undefined) => R[];
|
@@ -3,9 +3,11 @@ function cleanClassNames(classNames) {
|
|
3
3
|
const tokens = classNames.split(/\s+/);
|
4
4
|
return tokens.filter((item) => item).join(' ');
|
5
5
|
}
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
/*
|
7
|
+
* Wrapper function for 'classnames' module that requires more strict typing
|
8
|
+
* Note: Adding many parameters was the only way I was aware of to get inference
|
9
|
+
* working for each parameter separately
|
10
|
+
*/
|
9
11
|
export function tw(classesOrModifiers1, classesOrModifiers2, classesOrModifiers3, classesOrModifiers4, classesOrModifiers5, classesOrModifiers6, classesOrModifiers7, classesOrModifiers8, classesOrModifiers9, classesOrModifiers10) {
|
10
12
|
const result = originalClassNames(classesOrModifiers1, classesOrModifiers2, classesOrModifiers3, classesOrModifiers4, classesOrModifiers5, classesOrModifiers6, classesOrModifiers7, classesOrModifiers8, classesOrModifiers9, classesOrModifiers10);
|
11
13
|
return cleanClassNames(result);
|
@@ -15,4 +17,4 @@ export const classNames = (...args) => {
|
|
15
17
|
const result = originalClassNames(...args);
|
16
18
|
return cleanClassNames(result);
|
17
19
|
};
|
18
|
-
//# sourceMappingURL=data:application/json;base64,
|
20
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGFpbHdpbmQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdXRpbHMvdGFpbHdpbmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxrQkFBcUMsTUFBTSxZQUFZLENBQUM7QUFJL0QsU0FBUyxlQUFlLENBQUMsVUFBa0I7SUFDekMsTUFBTSxNQUFNLEdBQUcsVUFBVSxDQUFDLEtBQUssQ0FBQyxLQUFLLENBQUMsQ0FBQztJQUN2QyxPQUFPLE1BQU0sQ0FBQyxNQUFNLENBQUMsQ0FBQyxJQUFJLEVBQUUsRUFBRSxDQUFDLElBQUksQ0FBQyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQztBQUNqRCxDQUFDO0FBRUQ7Ozs7R0FJRztBQUNILE1BQU0sVUFBVSxFQUFFLENBQ2hCLG1CQUFxRCxFQUNyRCxtQkFBcUQsRUFDckQsbUJBQXFELEVBQ3JELG1CQUFxRCxFQUNyRCxtQkFBcUQsRUFDckQsbUJBQXFELEVBQ3JELG1CQUFxRCxFQUNyRCxtQkFBcUQsRUFDckQsbUJBQXFELEVBQ3JELG9CQUF1RDtJQUV2RCxNQUFNLE1BQU0sR0FBRyxrQkFBa0IsQ0FDL0IsbUJBQW1CLEVBQ25CLG1CQUFtQixFQUNuQixtQkFBbUIsRUFDbkIsbUJBQW1CLEVBQ25CLG1CQUFtQixFQUNuQixtQkFBbUIsRUFDbkIsbUJBQW1CLEVBQ25CLG1CQUFtQixFQUNuQixtQkFBbUIsRUFDbkIsb0JBQW9CLENBQ3JCLENBQUM7SUFFRixPQUFPLGVBQWUsQ0FBQyxNQUFNLENBQUMsQ0FBQztBQUNqQyxDQUFDO0FBRUQsNENBQTRDO0FBQzVDLE1BQU0sQ0FBQyxNQUFNLFVBQVUsR0FBRyxDQUFDLEdBQUcsSUFBZ0IsRUFBVSxFQUFFO0lBQ3hELE1BQU0sTUFBTSxHQUFHLGtCQUFrQixDQUFDLEdBQUcsSUFBSSxDQUFDLENBQUM7SUFDM0MsT0FBTyxlQUFlLENBQUMsTUFBTSxDQUFDLENBQUM7QUFDakMsQ0FBQyxDQUFDIn0=
|
@@ -0,0 +1,2 @@
|
|
1
|
+
export declare const sampleCustomVariables = "\n:root {\n --aquarium-colors-primary-100: #5a40e2;\n --aquarium-colors-primary-90: #6447fb;\n --aquarium-colors-primary-80: #7459fb;\n --aquarium-colors-primary-70: #836cfc;\n --aquarium-colors-primary-60: #937efc;\n --aquarium-colors-primary-50: #a291fd;\n --aquarium-colors-primary-40: #b2a3fd;\n --aquarium-colors-primary-30: #c1b5fd;\n --aquarium-colors-primary-20: #d1c8fe;\n --aquarium-colors-primary-10: #e0dafe;\n --aquarium-colors-primary-5: #f0edff;\n .Aquarium-Button {\n --aquarium-border-radius-sm: 1.5rem;\n --aquarium-colors-primary-80: #000000;\n }\n}\n";
|
2
|
+
export declare const timescaleDBCustomVariables = "\n:root {\n --aquarium-colors-primary-100: #6447fb;\n --aquarium-colors-primary-90: #6447fb;\n --aquarium-colors-primary-80: #6447fb;\n --aquarium-colors-primary-70: #b0c0fb;\n --aquarium-colors-primary-60: #c8d3fd;\n --aquarium-colors-primary-50: #d0d9fd;\n --aquarium-colors-primary-40: #d7dffc;\n --aquarium-colors-primary-30: #dfe6fd;\n --aquarium-colors-primary-20: #e8edfe;\n --aquarium-colors-primary-10: #eff2fe;\n --aquarium-colors-primary-5: #f8f9ff;\n --aquarium-colors-primary-0: #f8f9ff;\n --aquarium-colors-grey-100: #000;\n --aquarium-colors-grey-90: #000;\n --aquarium-colors-grey-80: #444;\n --aquarium-colors-grey-70: #444;\n --aquarium-colors-grey-60: #6a6a6a;\n --aquarium-colors-grey-50: #7e7e7e;\n --aquarium-colors-grey-40: #939393;\n --aquarium-colors-grey-30: #a5a5a5;\n --aquarium-colors-grey-20: #bdbdbd;\n --aquarium-colors-grey-10: #ebebeb;\n --aquarium-colors-grey-5: #ebebeb;\n --aquarium-colors-grey-0: #f8f8f8;\n}\n\n.Aquarium-Button {\n font-weight: 600;\n border-radius: 24px;\n}\n\n.Aquarium-Button.Primary {\n color: var(--aquarium-colors-white);\n background-color: var(--aquarium-colors-grey-100);\n\n &:hover {\n background-color: var(--aquarium-colors-grey-80);\n }\n\n &:active {\n background-color: var(--aquarium-colors-grey-70);\n }\n\n &:disabled {\n color: var(--aquarium-colors-grey-20);\n background-color: var(--aquarium-colors-grey-5);\n }\n}\n\n.Aquarium-Button.Secondary {\n color: var(--aquarium-colors-grey-100);\n background-color: var(--aquarium-colors-white);\n border: 1.5px solid var(--aquarium-colors-grey-100);\n box-shadow: none;\n\n &:hover {\n color: var(--aquarium-colors-grey-100);\n background-color: var(--aquarium-colors-primary-10);\n }\n\n &:active {\n color: var(--aquarium-colors-grey-100);\n background-color: var(--aquarium-colors-primary-20);\n }\n\n &:focus-visible {\n color: var(--aquarium-colors-grey-100);\n box-shadow: none;\n }\n\n &:disabled {\n color: var(--aquarium-colors-grey-20);\n background-color: var(--aquarium-colors-white);\n border-color: var(--aquarium-colors-grey-20);\n\n &:hover {\n background-color: var(--aquarium-colors-white);\n }\n }\n}\n\n.Aquarium-Button.Ghost {\n padding: var(--aquarium-spacing-2) var(--aquarium-spacing-3);\n\n &.Aquarium-Dense {\n padding: var(--aquarium-spacing-2) var(--aquarium-spacing-2);\n }\n\n &:hover {\n color: var(--aquarium-colors-primary-90);\n background-color: var(--aquarium-colors-primary-10);\n }\n\n &:active {\n background-color: var(--aquarium-colors-primary-20);\n }\n\n &:disabled {\n color: var(--aquarium-colors-grey-20);\n\n &:hover {\n background-color: var(--aquarium-colors-transparent);\n }\n }\n}\n\n.Aquarium-Modal > [aria-modal*='true'],\n.Aquarium-Dialog > [aria-modal*='true'],\n.Aquarium-EmptyState {\n border-radius: 16px;\n}\n\n.Aquarium-Modal > [aria-modal*='true'] {\n overflow: hidden;\n}\n";
|
@@ -0,0 +1,146 @@
|
|
1
|
+
export const sampleCustomVariables = `
|
2
|
+
:root {
|
3
|
+
--aquarium-colors-primary-100: #5a40e2;
|
4
|
+
--aquarium-colors-primary-90: #6447fb;
|
5
|
+
--aquarium-colors-primary-80: #7459fb;
|
6
|
+
--aquarium-colors-primary-70: #836cfc;
|
7
|
+
--aquarium-colors-primary-60: #937efc;
|
8
|
+
--aquarium-colors-primary-50: #a291fd;
|
9
|
+
--aquarium-colors-primary-40: #b2a3fd;
|
10
|
+
--aquarium-colors-primary-30: #c1b5fd;
|
11
|
+
--aquarium-colors-primary-20: #d1c8fe;
|
12
|
+
--aquarium-colors-primary-10: #e0dafe;
|
13
|
+
--aquarium-colors-primary-5: #f0edff;
|
14
|
+
.Aquarium-Button {
|
15
|
+
--aquarium-border-radius-sm: 1.5rem;
|
16
|
+
--aquarium-colors-primary-80: #000000;
|
17
|
+
}
|
18
|
+
}
|
19
|
+
`;
|
20
|
+
/*
|
21
|
+
* Since we can't comment in the constant value below, it causes css not being applied properly.
|
22
|
+
* So adding the comment about the image modal here.
|
23
|
+
*
|
24
|
+
* We need to set overflow: hidden so corner rounding works as it should
|
25
|
+
* when a header image is used with modals.
|
26
|
+
* .Aquarium-Modal > [aria-modal*='true'] { overflow: hidden; }
|
27
|
+
*/
|
28
|
+
export const timescaleDBCustomVariables = `
|
29
|
+
:root {
|
30
|
+
--aquarium-colors-primary-100: #6447fb;
|
31
|
+
--aquarium-colors-primary-90: #6447fb;
|
32
|
+
--aquarium-colors-primary-80: #6447fb;
|
33
|
+
--aquarium-colors-primary-70: #b0c0fb;
|
34
|
+
--aquarium-colors-primary-60: #c8d3fd;
|
35
|
+
--aquarium-colors-primary-50: #d0d9fd;
|
36
|
+
--aquarium-colors-primary-40: #d7dffc;
|
37
|
+
--aquarium-colors-primary-30: #dfe6fd;
|
38
|
+
--aquarium-colors-primary-20: #e8edfe;
|
39
|
+
--aquarium-colors-primary-10: #eff2fe;
|
40
|
+
--aquarium-colors-primary-5: #f8f9ff;
|
41
|
+
--aquarium-colors-primary-0: #f8f9ff;
|
42
|
+
--aquarium-colors-grey-100: #000;
|
43
|
+
--aquarium-colors-grey-90: #000;
|
44
|
+
--aquarium-colors-grey-80: #444;
|
45
|
+
--aquarium-colors-grey-70: #444;
|
46
|
+
--aquarium-colors-grey-60: #6a6a6a;
|
47
|
+
--aquarium-colors-grey-50: #7e7e7e;
|
48
|
+
--aquarium-colors-grey-40: #939393;
|
49
|
+
--aquarium-colors-grey-30: #a5a5a5;
|
50
|
+
--aquarium-colors-grey-20: #bdbdbd;
|
51
|
+
--aquarium-colors-grey-10: #ebebeb;
|
52
|
+
--aquarium-colors-grey-5: #ebebeb;
|
53
|
+
--aquarium-colors-grey-0: #f8f8f8;
|
54
|
+
}
|
55
|
+
|
56
|
+
.Aquarium-Button {
|
57
|
+
font-weight: 600;
|
58
|
+
border-radius: 24px;
|
59
|
+
}
|
60
|
+
|
61
|
+
.Aquarium-Button.Primary {
|
62
|
+
color: var(--aquarium-colors-white);
|
63
|
+
background-color: var(--aquarium-colors-grey-100);
|
64
|
+
|
65
|
+
&:hover {
|
66
|
+
background-color: var(--aquarium-colors-grey-80);
|
67
|
+
}
|
68
|
+
|
69
|
+
&:active {
|
70
|
+
background-color: var(--aquarium-colors-grey-70);
|
71
|
+
}
|
72
|
+
|
73
|
+
&:disabled {
|
74
|
+
color: var(--aquarium-colors-grey-20);
|
75
|
+
background-color: var(--aquarium-colors-grey-5);
|
76
|
+
}
|
77
|
+
}
|
78
|
+
|
79
|
+
.Aquarium-Button.Secondary {
|
80
|
+
color: var(--aquarium-colors-grey-100);
|
81
|
+
background-color: var(--aquarium-colors-white);
|
82
|
+
border: 1.5px solid var(--aquarium-colors-grey-100);
|
83
|
+
box-shadow: none;
|
84
|
+
|
85
|
+
&:hover {
|
86
|
+
color: var(--aquarium-colors-grey-100);
|
87
|
+
background-color: var(--aquarium-colors-primary-10);
|
88
|
+
}
|
89
|
+
|
90
|
+
&:active {
|
91
|
+
color: var(--aquarium-colors-grey-100);
|
92
|
+
background-color: var(--aquarium-colors-primary-20);
|
93
|
+
}
|
94
|
+
|
95
|
+
&:focus-visible {
|
96
|
+
color: var(--aquarium-colors-grey-100);
|
97
|
+
box-shadow: none;
|
98
|
+
}
|
99
|
+
|
100
|
+
&:disabled {
|
101
|
+
color: var(--aquarium-colors-grey-20);
|
102
|
+
background-color: var(--aquarium-colors-white);
|
103
|
+
border-color: var(--aquarium-colors-grey-20);
|
104
|
+
|
105
|
+
&:hover {
|
106
|
+
background-color: var(--aquarium-colors-white);
|
107
|
+
}
|
108
|
+
}
|
109
|
+
}
|
110
|
+
|
111
|
+
.Aquarium-Button.Ghost {
|
112
|
+
padding: var(--aquarium-spacing-2) var(--aquarium-spacing-3);
|
113
|
+
|
114
|
+
&.Aquarium-Dense {
|
115
|
+
padding: var(--aquarium-spacing-2) var(--aquarium-spacing-2);
|
116
|
+
}
|
117
|
+
|
118
|
+
&:hover {
|
119
|
+
color: var(--aquarium-colors-primary-90);
|
120
|
+
background-color: var(--aquarium-colors-primary-10);
|
121
|
+
}
|
122
|
+
|
123
|
+
&:active {
|
124
|
+
background-color: var(--aquarium-colors-primary-20);
|
125
|
+
}
|
126
|
+
|
127
|
+
&:disabled {
|
128
|
+
color: var(--aquarium-colors-grey-20);
|
129
|
+
|
130
|
+
&:hover {
|
131
|
+
background-color: var(--aquarium-colors-transparent);
|
132
|
+
}
|
133
|
+
}
|
134
|
+
}
|
135
|
+
|
136
|
+
.Aquarium-Modal > [aria-modal*='true'],
|
137
|
+
.Aquarium-Dialog > [aria-modal*='true'],
|
138
|
+
.Aquarium-EmptyState {
|
139
|
+
border-radius: 16px;
|
140
|
+
}
|
141
|
+
|
142
|
+
.Aquarium-Modal > [aria-modal*='true'] {
|
143
|
+
overflow: hidden;
|
144
|
+
}
|
145
|
+
`;
|
146
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGhlbWVWYXJpYWJsZVNhbXBsZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdXRpbHMvdGhlbWVWYXJpYWJsZVNhbXBsZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFDLE1BQU0scUJBQXFCLEdBQUc7Ozs7Ozs7Ozs7Ozs7Ozs7OztDQWtCcEMsQ0FBQztBQUVGOzs7Ozs7O0dBT0c7QUFDSCxNQUFNLENBQUMsTUFBTSwwQkFBMEIsR0FBRzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0NBcUh6QyxDQUFDIn0=
|
@@ -1,10 +1,10 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { type Breakpointable } from '../../types/tailwind';
|
3
3
|
declare type StylesObject = {
|
4
|
-
[key in keyof React.CSSProperties]: {
|
4
|
+
[key in keyof React.CSSProperties]: Breakpointable<any> | {
|
5
5
|
value: Breakpointable<any>;
|
6
|
-
transformer?: (val: any) =>
|
7
|
-
}
|
6
|
+
transformer?: (val: any) => number | string;
|
7
|
+
};
|
8
8
|
};
|
9
9
|
export declare function resolveTailwindThemeValue(key: string, val: any): any;
|
10
10
|
export declare function useStyle(styles: StylesObject): React.CSSProperties;
|
@@ -17,25 +17,29 @@ const THEME_MAPPING = {
|
|
17
17
|
rowGap: 'gap',
|
18
18
|
columnGap: 'gap',
|
19
19
|
};
|
20
|
-
|
21
|
-
|
20
|
+
/*
|
21
|
+
* Disabled because any felt better as a whole. The function usage becomes
|
22
|
+
* more complicated with a type parameter
|
23
|
+
*/
|
22
24
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
23
25
|
export function resolveTailwindThemeValue(key, val) {
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
26
|
+
/*
|
27
|
+
* If tailwind theme has the mapping for value, use it to get value.
|
28
|
+
* For example the theme has:
|
29
|
+
*
|
30
|
+
* "gridRow": {
|
31
|
+
* "auto": "auto",
|
32
|
+
* "span-1": "span 1 / span 1",
|
33
|
+
* "span-2": "span 2 / span 2",
|
34
|
+
* "span-3": "span 3 / span 3",
|
35
|
+
* "span-4": "span 4 / span 4",
|
36
|
+
* "span-5": "span 5 / span 5",
|
37
|
+
* "span-6": "span 6 / span 6",
|
38
|
+
* "span-full": "1 / -1"
|
39
|
+
* },
|
40
|
+
*
|
41
|
+
* key would be "gridRow", and val could be e.g. "span-5"
|
42
|
+
*/
|
39
43
|
const resolvedKey = key in THEME_MAPPING ? THEME_MAPPING[key] : key;
|
40
44
|
const found = get(partialTheme, [resolvedKey, val], undefined);
|
41
45
|
if (!isUndefined(found)) {
|
@@ -46,8 +50,10 @@ export function resolveTailwindThemeValue(key, val) {
|
|
46
50
|
export function useStyle(styles) {
|
47
51
|
const context = useContext(DesignSystemContext);
|
48
52
|
return Object.keys(styles).reduce((acc, key) => {
|
49
|
-
|
50
|
-
|
53
|
+
/*
|
54
|
+
* This was the only way I got tsc happy. We are iterating the object keys,
|
55
|
+
* so we know the property must exist.
|
56
|
+
*/
|
51
57
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
52
58
|
const property = styles[key];
|
53
59
|
const isStylesObject = isPlainObject(property) && 'value' in property;
|
@@ -60,11 +66,13 @@ export function useStyle(styles) {
|
|
60
66
|
(val) => resolveTailwindThemeValue(key, property.transformer(val));
|
61
67
|
const cssPropertyValue = transformer(resolvedValue);
|
62
68
|
if (isUndefined(cssPropertyValue)) {
|
63
|
-
|
64
|
-
|
69
|
+
/*
|
70
|
+
* If style value is undefined, we omit the key from the object
|
71
|
+
* this should reduce unwanted {key: "undefined"} noise
|
72
|
+
*/
|
65
73
|
return acc;
|
66
74
|
}
|
67
75
|
return Object.assign(Object.assign({}, acc), { [key]: cssPropertyValue });
|
68
76
|
}, {});
|
69
77
|
}
|
70
|
-
//# sourceMappingURL=data:application/json;base64,
|
78
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlU3R5bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvdXRpbHMvdXNlU3R5bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLE9BQU8sQ0FBQztBQUNuQyxPQUFPLEdBQUcsTUFBTSxZQUFZLENBQUM7QUFDN0IsT0FBTyxhQUFhLE1BQU0sc0JBQXNCLENBQUM7QUFDakQsT0FBTyxXQUFXLE1BQU0sb0JBQW9CLENBQUM7QUFDN0MsT0FBTyxZQUFZLE1BQU0scUJBQXFCLENBQUM7QUFFL0MsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sK0JBQStCLENBQUM7QUFFcEUsT0FBTyxFQUFFLHFCQUFxQixFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFZOUQsTUFBTSxhQUFhLEdBQTJCO0lBQzVDLFVBQVUsRUFBRSxTQUFTO0lBQ3JCLGFBQWEsRUFBRSxTQUFTO0lBQ3hCLFdBQVcsRUFBRSxTQUFTO0lBQ3RCLFlBQVksRUFBRSxTQUFTO0lBQ3ZCLFNBQVMsRUFBRSxRQUFRO0lBQ25CLFlBQVksRUFBRSxRQUFRO0lBQ3RCLFVBQVUsRUFBRSxRQUFRO0lBQ3BCLFdBQVcsRUFBRSxRQUFRO0lBQ3JCLE1BQU0sRUFBRSxLQUFLO0lBQ2IsU0FBUyxFQUFFLEtBQUs7Q0FDakIsQ0FBQztBQUVGOzs7R0FHRztBQUNILDZFQUE2RTtBQUM3RSxNQUFNLFVBQVUseUJBQXlCLENBQUMsR0FBVyxFQUFFLEdBQVE7SUFDN0Q7Ozs7Ozs7Ozs7Ozs7Ozs7T0FnQkc7SUFDSCxNQUFNLFdBQVcsR0FBRyxHQUFHLElBQUksYUFBYSxDQUFDLENBQUMsQ0FBQyxhQUFhLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLEdBQUcsQ0FBQztJQUNwRSxNQUFNLEtBQUssR0FBRyxHQUFHLENBQUMsWUFBWSxFQUFFLENBQUMsV0FBVyxFQUFFLEdBQUcsQ0FBQyxFQUFFLFNBQVMsQ0FBQyxDQUFDO0lBQy9ELElBQUksQ0FBQyxXQUFXLENBQUMsS0FBSyxDQUFDLEVBQUU7UUFDdkIsT0FBTyxLQUFLLENBQUM7S0FDZDtJQUVELE9BQU8sR0FBRyxDQUFDO0FBQ2IsQ0FBQztBQUVELE1BQU0sVUFBVSxRQUFRLENBQUMsTUFBb0I7SUFDM0MsTUFBTSxPQUFPLEdBQUcsVUFBVSxDQUFDLG1CQUFtQixDQUFDLENBQUM7SUFFaEQsT0FBTyxNQUFNLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQyxDQUFDLE1BQU0sQ0FBQyxDQUFDLEdBQUcsRUFBRSxHQUFHLEVBQUUsRUFBRTtRQUM3Qzs7O1dBR0c7UUFDSCxvRUFBb0U7UUFDcEUsTUFBTSxRQUFRLEdBQUcsTUFBTSxDQUFDLEdBQXlCLENBQUUsQ0FBQztRQUVwRCxNQUFNLGNBQWMsR0FBRyxhQUFhLENBQUMsUUFBUSxDQUFDLElBQUksT0FBTyxJQUFJLFFBQVEsQ0FBQztRQUN0RSxNQUFNLEtBQUssR0FBRyxjQUFjLENBQUMsQ0FBQyxDQUFDLFFBQVEsQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLFFBQVEsQ0FBQztRQUN6RCxNQUFNLGFBQWEsR0FBRyxxQkFBcUIsQ0FBQyxLQUFLLEVBQUUsT0FBTyxDQUFDLGlCQUFpQixDQUFDLENBQUM7UUFFOUUsTUFBTSxXQUFXLEdBQUcsV0FBVyxDQUFDLFFBQVEsYUFBUixRQUFRLHVCQUFSLFFBQVEsQ0FBRSxXQUFXLENBQUM7WUFDcEQsQ0FBQyxDQUFDLENBQUMsR0FBUSxFQUFFLEVBQUUsQ0FBQyx5QkFBeUIsQ0FBQyxHQUFHLEVBQUUsR0FBRyxDQUFDO1lBQ25ELENBQUMsQ0FBQyx5RUFBeUU7Z0JBQ3pFLDREQUE0RDtnQkFDNUQsQ0FBQyxHQUFRLEVBQUUsRUFBRSxDQUFDLHlCQUF5QixDQUFDLEdBQUcsRUFBRSxRQUFRLENBQUMsV0FBVyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUM7UUFFNUUsTUFBTSxnQkFBZ0IsR0FBRyxXQUFXLENBQUMsYUFBYSxDQUFDLENBQUM7UUFDcEQsSUFBSSxXQUFXLENBQUMsZ0JBQWdCLENBQUMsRUFBRTtZQUNqQzs7O2VBR0c7WUFDSCxPQUFPLEdBQUcsQ0FBQztTQUNaO1FBRUQsdUNBQ0ssR0FBRyxLQUNOLENBQUMsR0FBRyxDQUFDLEVBQUUsZ0JBQWdCLElBQ3ZCO0lBQ0osQ0FBQyxFQUFFLEVBQXlCLENBQUMsQ0FBQztBQUNoQyxDQUFDIn0=
|
package/dist/system.cjs
CHANGED
@@ -6836,9 +6836,8 @@ function Tailwindify(Component) {
|
|
6836
6836
|
return import_react15.default.cloneElement(child, newProps);
|
6837
6837
|
});
|
6838
6838
|
return /* @__PURE__ */ import_react15.default.createElement(Component, __spreadValues({
|
6839
|
-
className
|
6840
|
-
|
6841
|
-
}, componentProps));
|
6839
|
+
className
|
6840
|
+
}, componentProps), childrenWithProps);
|
6842
6841
|
};
|
6843
6842
|
}
|
6844
6843
|
|
@@ -7825,7 +7824,7 @@ var asCrumb = (Component, displayName, options = { isActive: false }) => {
|
|
7825
7824
|
role: "link"
|
7826
7825
|
}), /* @__PURE__ */ import_react28.default.createElement("span", {
|
7827
7826
|
className: (0, import_classnames3.default)(
|
7828
|
-
tw("flex flex-row flex-nowrap items-center gap-x-3 ", {
|
7827
|
+
tw("flex flex-row flex-nowrap items-center gap-x-3 whitespace-nowrap", {
|
7829
7828
|
"text-primary-80 hover:text-primary-70": !options.isActive,
|
7830
7829
|
"text-grey-90": options.isActive
|
7831
7830
|
})
|
@@ -11041,6 +11040,7 @@ var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
|
11041
11040
|
index,
|
11042
11041
|
selected,
|
11043
11042
|
onSelected,
|
11043
|
+
showNotification = false,
|
11044
11044
|
className
|
11045
11045
|
} = _b, rest = __objRest(_b, [
|
11046
11046
|
"id",
|
@@ -11053,6 +11053,7 @@ var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
|
11053
11053
|
"index",
|
11054
11054
|
"selected",
|
11055
11055
|
"onSelected",
|
11056
|
+
"showNotification",
|
11056
11057
|
"className"
|
11057
11058
|
]);
|
11058
11059
|
const _id = id != null ? id : (0, import_kebabCase.default)(title);
|
@@ -11090,8 +11091,13 @@ var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
|
11090
11091
|
variant: "small",
|
11091
11092
|
color: selected ? "primary-80" : disabled ? "grey-20" : "current",
|
11092
11093
|
className: tw("inline-flex items-center gap-3")
|
11094
|
+
}, showNotification ? /* @__PURE__ */ import_react82.default.createElement(Badge.Notification, {
|
11095
|
+
right: "-4px",
|
11096
|
+
top: "3px"
|
11093
11097
|
}, /* @__PURE__ */ import_react82.default.createElement("span", {
|
11094
11098
|
className: tw("whitespace-nowrap")
|
11099
|
+
}, title)) : /* @__PURE__ */ import_react82.default.createElement("span", {
|
11100
|
+
className: tw("whitespace-nowrap")
|
11095
11101
|
}, title), (0, import_isNumber5.default)(badge) && /* @__PURE__ */ import_react82.default.createElement(Typography2, {
|
11096
11102
|
htmlTag: "span",
|
11097
11103
|
variant: "small",
|
@@ -11399,7 +11405,7 @@ var InputChip = import_react84.default.forwardRef(
|
|
11399
11405
|
"hover:bg-grey-10 focus:bg-grey-20": !invalid && !disabled
|
11400
11406
|
}),
|
11401
11407
|
role: "button",
|
11402
|
-
"aria-label": `Remove ${children}`
|
11408
|
+
"aria-label": `Remove ${String(children)}`
|
11403
11409
|
}), /* @__PURE__ */ import_react84.default.createElement(Icon, {
|
11404
11410
|
icon: import_smallCross2.default,
|
11405
11411
|
className: tw({
|
@@ -11555,7 +11561,7 @@ var MultiInputBase = (_a) => {
|
|
11555
11561
|
return /* @__PURE__ */ import_react85.default.createElement("div", {
|
11556
11562
|
className: "Aquarium-MultiInputBase"
|
11557
11563
|
}, /* @__PURE__ */ import_react85.default.createElement(Select.InputContainer, {
|
11558
|
-
variant: disabled ? "disabled" : valid
|
11564
|
+
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default"
|
11559
11565
|
}, /* @__PURE__ */ import_react85.default.createElement("div", {
|
11560
11566
|
className: "grow inline-flex flex-row flex-wrap gap-y-2"
|
11561
11567
|
}, inline && renderChips(), /* @__PURE__ */ import_react85.default.createElement(Select.Input, __spreadProps(__spreadValues({
|
@@ -12100,9 +12106,11 @@ PageHeader.TitleContainer = (_a) => {
|
|
12100
12106
|
}, rest), children);
|
12101
12107
|
};
|
12102
12108
|
PageHeader.Title = (_a) => {
|
12103
|
-
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
12104
|
-
return /* @__PURE__ */ import_react90.default.createElement(Typography2
|
12105
|
-
color: "grey-100"
|
12109
|
+
var _b = _a, { isSubHeader = false, children } = _b, rest = __objRest(_b, ["isSubHeader", "children"]);
|
12110
|
+
return /* @__PURE__ */ import_react90.default.createElement(Typography2, __spreadProps(__spreadValues({}, rest), {
|
12111
|
+
color: "grey-100",
|
12112
|
+
variant: isSubHeader ? "subheading" : "heading",
|
12113
|
+
htmlTag: isSubHeader ? "h2" : "h1"
|
12106
12114
|
}), children);
|
12107
12115
|
};
|
12108
12116
|
PageHeader.Subtitle = (_a) => {
|
@@ -12125,31 +12133,49 @@ PageHeader.Actions = (_a) => {
|
|
12125
12133
|
};
|
12126
12134
|
|
12127
12135
|
// src/molecules/PageHeader/PageHeader.tsx
|
12128
|
-
var
|
12136
|
+
var import_more4 = __toESM(require_more());
|
12137
|
+
var CommonPageHeader = ({
|
12129
12138
|
title,
|
12130
12139
|
subtitle,
|
12131
12140
|
image,
|
12132
12141
|
imageAlt,
|
12133
12142
|
primaryAction,
|
12134
|
-
|
12143
|
+
secondaryAction,
|
12144
|
+
secondaryActions = secondaryAction ? [secondaryAction] : void 0,
|
12135
12145
|
chips = [],
|
12136
|
-
breadcrumbs
|
12146
|
+
breadcrumbs,
|
12147
|
+
menu,
|
12148
|
+
menuLabel = "Context menu",
|
12149
|
+
onAction,
|
12150
|
+
onMenuOpenChange,
|
12151
|
+
isSubHeader = false
|
12137
12152
|
}) => {
|
12138
12153
|
return /* @__PURE__ */ import_react91.default.createElement(PageHeader, {
|
12139
12154
|
className: "Aquarium-PageHeader"
|
12140
12155
|
}, /* @__PURE__ */ import_react91.default.createElement(PageHeader.Container, null, breadcrumbs && /* @__PURE__ */ import_react91.default.createElement(Box, {
|
12141
12156
|
marginBottom: image ? "3" : void 0
|
12142
|
-
}, /* @__PURE__ */ import_react91.default.createElement(Breadcrumbs, null, breadcrumbs)), /* @__PURE__ */ import_react91.default.createElement(
|
12157
|
+
}, /* @__PURE__ */ import_react91.default.createElement(Breadcrumbs, null, breadcrumbs)), /* @__PURE__ */ import_react91.default.createElement(Spacing, {
|
12158
|
+
row: true,
|
12143
12159
|
gap: "5"
|
12144
12160
|
}, image && /* @__PURE__ */ import_react91.default.createElement("img", {
|
12145
12161
|
src: image,
|
12146
12162
|
alt: imageAlt,
|
12147
12163
|
className: tw("w-[56px] h-[56px]")
|
12148
|
-
}), /* @__PURE__ */ import_react91.default.createElement(PageHeader.TitleContainer, null, /* @__PURE__ */ import_react91.default.createElement(PageHeader.Title,
|
12164
|
+
}), /* @__PURE__ */ import_react91.default.createElement(PageHeader.TitleContainer, null, /* @__PURE__ */ import_react91.default.createElement(PageHeader.Title, {
|
12165
|
+
isSubHeader
|
12166
|
+
}, title), chips.length > 0 && /* @__PURE__ */ import_react91.default.createElement(PageHeader.Chips, null, chips.map((chip) => /* @__PURE__ */ import_react91.default.createElement(Chip2, {
|
12149
12167
|
key: chip,
|
12150
12168
|
dense: true,
|
12151
12169
|
text: chip
|
12152
|
-
}))), subtitle && /* @__PURE__ */ import_react91.default.createElement(PageHeader.Subtitle, null, subtitle)))), (secondaryActions || primaryAction) && /* @__PURE__ */ import_react91.default.createElement(PageHeader.Actions, null,
|
12170
|
+
}))), subtitle && /* @__PURE__ */ import_react91.default.createElement(PageHeader.Subtitle, null, subtitle)))), (secondaryActions || primaryAction || secondaryAction || menu) && /* @__PURE__ */ import_react91.default.createElement(PageHeader.Actions, null, menu && /* @__PURE__ */ import_react91.default.createElement(Box.Flex, {
|
12171
|
+
alignItems: "center"
|
12172
|
+
}, /* @__PURE__ */ import_react91.default.createElement(DropdownMenu2, {
|
12173
|
+
onAction: (action) => onAction == null ? void 0 : onAction(action),
|
12174
|
+
onOpenChange: onMenuOpenChange
|
12175
|
+
}, /* @__PURE__ */ import_react91.default.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ import_react91.default.createElement(Button.Icon, {
|
12176
|
+
"aria-label": menuLabel,
|
12177
|
+
icon: import_more4.default
|
12178
|
+
})), menu)), secondaryActions && (0, import_castArray3.default)(secondaryActions).filter(Boolean).map(
|
12153
12179
|
(action) => !isLink(action) ? /* @__PURE__ */ import_react91.default.createElement(Button.Secondary, __spreadValues({
|
12154
12180
|
key: action.text
|
12155
12181
|
}, (0, import_omit13.default)(action, "text")), action.text) : /* @__PURE__ */ import_react91.default.createElement(Button.ExternalLink, __spreadValues({
|
@@ -12163,6 +12189,13 @@ var PageHeader2 = ({
|
|
12163
12189
|
kind: "primary"
|
12164
12190
|
}, (0, import_omit13.default)(primaryAction, "text")), primaryAction.text))));
|
12165
12191
|
};
|
12192
|
+
var PageHeader2 = (props) => /* @__PURE__ */ import_react91.default.createElement(CommonPageHeader, __spreadValues({}, props));
|
12193
|
+
PageHeader2.displayName = "PageHeader";
|
12194
|
+
var SubHeader = (props) => /* @__PURE__ */ import_react91.default.createElement(CommonPageHeader, __spreadProps(__spreadValues({}, props), {
|
12195
|
+
isSubHeader: true
|
12196
|
+
}));
|
12197
|
+
PageHeader2.SubHeader = SubHeader;
|
12198
|
+
PageHeader2.SubHeader.displayName = "PageHeader.SubHeader";
|
12166
12199
|
|
12167
12200
|
// src/molecules/Pagination/Pagination.tsx
|
12168
12201
|
var import_react93 = __toESM(require("react"));
|