@aivenio/aquarium 1.77.1 → 1.79.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/README.md +19 -2
- package/dist/atoms.cjs +131 -3
- package/dist/atoms.mjs +131 -3
- package/dist/charts.cjs +1 -0
- package/dist/charts.mjs +1 -0
- package/dist/src/atoms/utils/index.d.ts +234 -0
- package/dist/src/atoms/utils/index.js +32 -0
- package/dist/src/molecules/Context/Context.d.ts +2 -1
- package/dist/src/molecules/Context/Context.js +6 -4
- package/dist/src/molecules/DateField/DateField.d.ts +10 -0
- package/dist/src/molecules/DateField/DateField.js +33 -0
- package/dist/src/molecules/DateField/DateInput.d.ts +3 -0
- package/dist/src/molecules/DateField/DateInput.js +22 -0
- package/dist/src/molecules/DatePicker/Button.d.ts +4 -0
- package/dist/src/molecules/DatePicker/Button.js +12 -0
- package/dist/src/molecules/DatePicker/Calendar.d.ts +6 -0
- package/dist/src/molecules/DatePicker/Calendar.js +44 -0
- package/dist/src/molecules/DatePicker/DatePicker.d.ts +12 -0
- package/dist/src/molecules/DatePicker/DatePicker.js +63 -0
- package/dist/src/molecules/DatePicker/DateRangePicker.d.ts +12 -0
- package/dist/src/molecules/DatePicker/DateRangePicker.js +68 -0
- package/dist/src/molecules/DatePicker/Dialog.d.ts +3 -0
- package/dist/src/molecules/DatePicker/Dialog.js +7 -0
- package/dist/src/molecules/DatePicker/Popover.d.ts +7 -0
- package/dist/src/molecules/DatePicker/Popover.js +27 -0
- package/dist/src/molecules/DatePicker/RangeCalendar.d.ts +4 -0
- package/dist/src/molecules/DatePicker/RangeCalendar.js +51 -0
- package/dist/src/molecules/Field/Field.d.ts +3 -0
- package/dist/src/molecules/Field/Field.js +7 -0
- package/dist/src/molecules/Popover/PopoverOverlay.d.ts +1 -1
- package/dist/src/molecules/TimeField/TimeField.d.ts +10 -0
- package/dist/src/molecules/TimeField/TimeField.js +33 -0
- package/dist/src/molecules/TimePicker/TimePicker.d.ts +6 -0
- package/dist/src/molecules/TimePicker/TimePicker.js +4 -0
- package/dist/src/molecules/Typography/Typography.d.ts +1 -1
- package/dist/src/molecules/Typography/Typography.js +11 -1
- package/dist/src/molecules/index.d.ts +3 -0
- package/dist/src/molecules/index.js +4 -1
- package/dist/src/tokens/tokens.json +20 -0
- package/dist/src/utils/mocks/mockDynamicIds.js +1 -2
- package/dist/src/utils/tailwind.d.ts +1 -0
- package/dist/src/utils/tailwind.js +6 -1
- package/dist/styles.css +1938 -1488
- package/dist/system.cjs +1061 -505
- package/dist/system.mjs +1047 -474
- package/dist/tailwind.config.js +2 -1
- package/dist/tailwind.theme.json +93 -3
- package/dist/tokens.json +20 -0
- package/dist/tsconfig.module.tsbuildinfo +1 -1
- package/dist/types/designTokens.d.ts +1 -1
- package/dist/types/tailwindGenerated.d.ts +1 -1
- package/package.json +6 -4
package/dist/system.mjs
CHANGED
@@ -4213,8 +4213,16 @@ __export(molecules_exports, {
|
|
4213
4213
|
ControlLabel: () => ControlLabel,
|
4214
4214
|
DataList: () => DataList2,
|
4215
4215
|
DataTable: () => DataTable,
|
4216
|
+
DatePicker: () => DatePicker,
|
4217
|
+
DatePickerBase: () => DatePickerBase,
|
4218
|
+
DateRangePicker: () => DateRangePicker,
|
4219
|
+
DateRangePickerBase: () => DateRangePickerBase,
|
4220
|
+
DateTimePicker: () => DateTimePicker,
|
4221
|
+
DateTimePickerBase: () => DateTimePickerBase,
|
4222
|
+
DateTimeRangePicker: () => DateTimeRangePicker,
|
4223
|
+
DateTimeRangePickerBase: () => DateTimeRangePickerBase,
|
4216
4224
|
DesignSystemContext: () => DesignSystemContext,
|
4217
|
-
Dialog: () =>
|
4225
|
+
Dialog: () => Dialog2,
|
4218
4226
|
Divider: () => Divider2,
|
4219
4227
|
Drawer: () => Drawer,
|
4220
4228
|
Dropdown: () => Dropdown,
|
@@ -4255,7 +4263,7 @@ __export(molecules_exports, {
|
|
4255
4263
|
Option: () => Option,
|
4256
4264
|
PageHeader: () => PageHeader2,
|
4257
4265
|
Pagination: () => Pagination,
|
4258
|
-
Popover: () =>
|
4266
|
+
Popover: () => Popover3,
|
4259
4267
|
PopoverDialog: () => PopoverDialog2,
|
4260
4268
|
Portal: () => Portal,
|
4261
4269
|
PrimaryButton: () => PrimaryButton,
|
@@ -4289,6 +4297,7 @@ __export(molecules_exports, {
|
|
4289
4297
|
TextButton: () => TextButton,
|
4290
4298
|
Textarea: () => Textarea,
|
4291
4299
|
TextareaBase: () => TextareaBase,
|
4300
|
+
TimePicker: () => TimePicker,
|
4292
4301
|
Timeline: () => Timeline2,
|
4293
4302
|
ToastComponent: () => ToastComponent,
|
4294
4303
|
ToastProvider: () => ToastProvider,
|
@@ -4325,6 +4334,7 @@ import {
|
|
4325
4334
|
} from "@iconify/react";
|
4326
4335
|
|
4327
4336
|
// src/utils/tailwind.ts
|
4337
|
+
import { composeRenderProps } from "react-aria-components";
|
4328
4338
|
import originalClassNames from "classnames";
|
4329
4339
|
function cleanClassNames(classNames13) {
|
4330
4340
|
const tokens = classNames13.split(/\s+/);
|
@@ -5027,6 +5037,9 @@ var tailwind_theme_default = {
|
|
5027
5037
|
"11/12": "91.666667%",
|
5028
5038
|
full: "100%",
|
5029
5039
|
screen: "100vw",
|
5040
|
+
svw: "100svw",
|
5041
|
+
lvw: "100lvw",
|
5042
|
+
dvw: "100dvw",
|
5030
5043
|
min: "min-content",
|
5031
5044
|
max: "max-content",
|
5032
5045
|
fit: "fit-content"
|
@@ -5068,12 +5081,32 @@ var tailwind_theme_default = {
|
|
5068
5081
|
"5/6": "83.333333%",
|
5069
5082
|
full: "100%",
|
5070
5083
|
screen: "100vh",
|
5084
|
+
svh: "100svh",
|
5085
|
+
lvh: "100lvh",
|
5086
|
+
dvh: "100dvh",
|
5071
5087
|
min: "min-content",
|
5072
5088
|
max: "max-content",
|
5073
5089
|
fit: "fit-content"
|
5074
5090
|
},
|
5075
5091
|
maxWidth: {
|
5076
|
-
"0": "
|
5092
|
+
"0": "0px",
|
5093
|
+
"1": "2px",
|
5094
|
+
"2": "4px",
|
5095
|
+
"3": "8px",
|
5096
|
+
"4": "12px",
|
5097
|
+
"5": "16px",
|
5098
|
+
"6": "24px",
|
5099
|
+
"7": "32px",
|
5100
|
+
"8": "40px",
|
5101
|
+
"9": "48px",
|
5102
|
+
"1px": "1px",
|
5103
|
+
l1: "16px",
|
5104
|
+
l2: "24px",
|
5105
|
+
l3: "32px",
|
5106
|
+
l4: "48px",
|
5107
|
+
l5: "64px",
|
5108
|
+
l6: "96px",
|
5109
|
+
l7: "160px",
|
5077
5110
|
none: "none",
|
5078
5111
|
xs: "20rem",
|
5079
5112
|
sm: "24rem",
|
@@ -5117,14 +5150,35 @@ var tailwind_theme_default = {
|
|
5117
5150
|
l5: "64px",
|
5118
5151
|
l6: "96px",
|
5119
5152
|
l7: "160px",
|
5153
|
+
none: "none",
|
5120
5154
|
full: "100%",
|
5121
5155
|
screen: "100vh",
|
5156
|
+
svh: "100svh",
|
5157
|
+
lvh: "100lvh",
|
5158
|
+
dvh: "100dvh",
|
5122
5159
|
min: "min-content",
|
5123
5160
|
max: "max-content",
|
5124
5161
|
fit: "fit-content"
|
5125
5162
|
},
|
5126
5163
|
minWidth: {
|
5127
5164
|
"0": "0px",
|
5165
|
+
"1": "2px",
|
5166
|
+
"2": "4px",
|
5167
|
+
"3": "8px",
|
5168
|
+
"4": "12px",
|
5169
|
+
"5": "16px",
|
5170
|
+
"6": "24px",
|
5171
|
+
"7": "32px",
|
5172
|
+
"8": "40px",
|
5173
|
+
"9": "48px",
|
5174
|
+
"1px": "1px",
|
5175
|
+
l1: "16px",
|
5176
|
+
l2: "24px",
|
5177
|
+
l3: "32px",
|
5178
|
+
l4: "48px",
|
5179
|
+
l5: "64px",
|
5180
|
+
l6: "96px",
|
5181
|
+
l7: "160px",
|
5128
5182
|
full: "100%",
|
5129
5183
|
min: "min-content",
|
5130
5184
|
max: "max-content",
|
@@ -5132,8 +5186,28 @@ var tailwind_theme_default = {
|
|
5132
5186
|
},
|
5133
5187
|
minHeight: {
|
5134
5188
|
"0": "0px",
|
5189
|
+
"1": "2px",
|
5190
|
+
"2": "4px",
|
5191
|
+
"3": "8px",
|
5192
|
+
"4": "12px",
|
5193
|
+
"5": "16px",
|
5194
|
+
"6": "24px",
|
5195
|
+
"7": "32px",
|
5196
|
+
"8": "40px",
|
5197
|
+
"9": "48px",
|
5198
|
+
"1px": "1px",
|
5199
|
+
l1: "16px",
|
5200
|
+
l2: "24px",
|
5201
|
+
l3: "32px",
|
5202
|
+
l4: "48px",
|
5203
|
+
l5: "64px",
|
5204
|
+
l6: "96px",
|
5205
|
+
l7: "160px",
|
5135
5206
|
full: "100%",
|
5136
5207
|
screen: "100vh",
|
5208
|
+
svh: "100svh",
|
5209
|
+
lvh: "100lvh",
|
5210
|
+
dvh: "100dvh",
|
5137
5211
|
min: "min-content",
|
5138
5212
|
max: "max-content",
|
5139
5213
|
fit: "fit-content"
|
@@ -5630,6 +5704,12 @@ var tailwind_theme_default = {
|
|
5630
5704
|
"span-4": "span 4 / span 4",
|
5631
5705
|
"span-5": "span 5 / span 5",
|
5632
5706
|
"span-6": "span 6 / span 6",
|
5707
|
+
"span-7": "span 7 / span 7",
|
5708
|
+
"span-8": "span 8 / span 8",
|
5709
|
+
"span-9": "span 9 / span 9",
|
5710
|
+
"span-10": "span 10 / span 10",
|
5711
|
+
"span-11": "span 11 / span 11",
|
5712
|
+
"span-12": "span 12 / span 12",
|
5633
5713
|
"span-full": "1 / -1"
|
5634
5714
|
},
|
5635
5715
|
gridRowStart: {
|
@@ -5640,6 +5720,12 @@ var tailwind_theme_default = {
|
|
5640
5720
|
"5": "5",
|
5641
5721
|
"6": "6",
|
5642
5722
|
"7": "7",
|
5723
|
+
"8": "8",
|
5724
|
+
"9": "9",
|
5725
|
+
"10": "10",
|
5726
|
+
"11": "11",
|
5727
|
+
"12": "12",
|
5728
|
+
"13": "13",
|
5643
5729
|
auto: "auto"
|
5644
5730
|
},
|
5645
5731
|
gridRowEnd: {
|
@@ -5650,6 +5736,12 @@ var tailwind_theme_default = {
|
|
5650
5736
|
"5": "5",
|
5651
5737
|
"6": "6",
|
5652
5738
|
"7": "7",
|
5739
|
+
"8": "8",
|
5740
|
+
"9": "9",
|
5741
|
+
"10": "10",
|
5742
|
+
"11": "11",
|
5743
|
+
"12": "12",
|
5744
|
+
"13": "13",
|
5653
5745
|
auto: "auto"
|
5654
5746
|
},
|
5655
5747
|
gridTemplateColumns: {
|
@@ -5665,7 +5757,8 @@ var tailwind_theme_default = {
|
|
5665
5757
|
"10": "repeat(10, minmax(0, 1fr))",
|
5666
5758
|
"11": "repeat(11, minmax(0, 1fr))",
|
5667
5759
|
"12": "repeat(12, minmax(0, 1fr))",
|
5668
|
-
none: "none"
|
5760
|
+
none: "none",
|
5761
|
+
subgrid: "subgrid"
|
5669
5762
|
},
|
5670
5763
|
gridTemplateRows: {
|
5671
5764
|
"1": "repeat(1, minmax(0, 1fr))",
|
@@ -5674,7 +5767,14 @@ var tailwind_theme_default = {
|
|
5674
5767
|
"4": "repeat(4, minmax(0, 1fr))",
|
5675
5768
|
"5": "repeat(5, minmax(0, 1fr))",
|
5676
5769
|
"6": "repeat(6, minmax(0, 1fr))",
|
5677
|
-
|
5770
|
+
"7": "repeat(7, minmax(0, 1fr))",
|
5771
|
+
"8": "repeat(8, minmax(0, 1fr))",
|
5772
|
+
"9": "repeat(9, minmax(0, 1fr))",
|
5773
|
+
"10": "repeat(10, minmax(0, 1fr))",
|
5774
|
+
"11": "repeat(11, minmax(0, 1fr))",
|
5775
|
+
"12": "repeat(12, minmax(0, 1fr))",
|
5776
|
+
none: "none",
|
5777
|
+
subgrid: "subgrid"
|
5678
5778
|
},
|
5679
5779
|
keyframes: {
|
5680
5780
|
spin: { to: { transform: "rotate(360deg)" } },
|
@@ -5704,6 +5804,7 @@ var tailwind_theme_default = {
|
|
5704
5804
|
|
5705
5805
|
// src/molecules/Context/Context.tsx
|
5706
5806
|
import React15 from "react";
|
5807
|
+
import { I18nProvider } from "@react-aria/i18n";
|
5707
5808
|
import { ModalProvider } from "@react-aria/overlays";
|
5708
5809
|
|
5709
5810
|
// src/utils/breakpoints.ts
|
@@ -6174,6 +6275,26 @@ var tokens_default = {
|
|
6174
6275
|
lineHeight: 1.5,
|
6175
6276
|
textTransform: "none"
|
6176
6277
|
},
|
6278
|
+
"code-small": {
|
6279
|
+
fontFamily: [
|
6280
|
+
"Source Code Pro"
|
6281
|
+
],
|
6282
|
+
fontSize: "14px",
|
6283
|
+
fontWeight: 400,
|
6284
|
+
fontStyle: "normal",
|
6285
|
+
lineHeight: 1.42,
|
6286
|
+
textTransform: "none"
|
6287
|
+
},
|
6288
|
+
"code-small-strong": {
|
6289
|
+
fontFamily: [
|
6290
|
+
"Source Code Pro"
|
6291
|
+
],
|
6292
|
+
fontSize: "14px",
|
6293
|
+
fontWeight: 600,
|
6294
|
+
fontStyle: "normal",
|
6295
|
+
lineHeight: 1.42,
|
6296
|
+
textTransform: "none"
|
6297
|
+
},
|
6177
6298
|
"caption-small": {
|
6178
6299
|
fontFamily: [
|
6179
6300
|
"Inter"
|
@@ -7342,7 +7463,7 @@ var ToastConsumer = () => {
|
|
7342
7463
|
};
|
7343
7464
|
|
7344
7465
|
// src/molecules/Context/Context.tsx
|
7345
|
-
var Context = ({ children }) => {
|
7466
|
+
var Context = ({ children, locale = "en-GB" }) => {
|
7346
7467
|
const windowSize = useWindowSize();
|
7347
7468
|
const [breakpointMatches, setBreakpointMatches] = React15.useState(getMatches(windowSize));
|
7348
7469
|
React15.useEffect(() => {
|
@@ -7350,7 +7471,9 @@ var Context = ({ children }) => {
|
|
7350
7471
|
}, [windowSize]);
|
7351
7472
|
return /* @__PURE__ */ React15.createElement(DesignSystemContext.Provider, {
|
7352
7473
|
value: { breakpointMatches }
|
7353
|
-
}, /* @__PURE__ */ React15.createElement(
|
7474
|
+
}, /* @__PURE__ */ React15.createElement(I18nProvider, {
|
7475
|
+
locale
|
7476
|
+
}, /* @__PURE__ */ React15.createElement(ModalProvider, null, /* @__PURE__ */ React15.createElement(ToastProvider, null, children))));
|
7354
7477
|
};
|
7355
7478
|
var context = {
|
7356
7479
|
breakpointMatches: getMatches(void 0)
|
@@ -7716,6 +7839,22 @@ Typography2.CodeStrong = (_a) => {
|
|
7716
7839
|
}));
|
7717
7840
|
};
|
7718
7841
|
Typography2.CodeStrong.displayName = "Typography.CodeStrong";
|
7842
|
+
Typography2.CodeSmall = (_a) => {
|
7843
|
+
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7844
|
+
return /* @__PURE__ */ React19.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7845
|
+
htmlTag,
|
7846
|
+
variant: "code-small"
|
7847
|
+
}));
|
7848
|
+
};
|
7849
|
+
Typography2.CodeSmall.displayName = "Typography.Code";
|
7850
|
+
Typography2.CodeSmallStrong = (_a) => {
|
7851
|
+
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7852
|
+
return /* @__PURE__ */ React19.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
7853
|
+
htmlTag,
|
7854
|
+
variant: "code-small-strong"
|
7855
|
+
}));
|
7856
|
+
};
|
7857
|
+
Typography2.CodeSmallStrong.displayName = "Typography.CodeSmallStrong";
|
7719
7858
|
Typography2.LargeText = (_a) => {
|
7720
7859
|
var _b = _a, { htmlTag = "div" } = _b, props = __objRest(_b, ["htmlTag"]);
|
7721
7860
|
return /* @__PURE__ */ React19.createElement(Typography, __spreadProps(__spreadValues({}, props), {
|
@@ -11884,14 +12023,14 @@ var DataListRow = ({
|
|
11884
12023
|
}, additionalRowProps(row, index, rows)), renderFirstColumn == null ? void 0 : renderFirstColumn(row, index, rows), /* @__PURE__ */ React68.createElement(List, {
|
11885
12024
|
items: columns,
|
11886
12025
|
renderItem: (column, columnIndex) => {
|
11887
|
-
const
|
12026
|
+
const cell2 = /* @__PURE__ */ React68.createElement(DataList.Cell, __spreadValues(__spreadValues({}, cellProps(column)), additionalColumnProps(column, columnIndex, columns, row)), /* @__PURE__ */ React68.createElement(DataListCell, {
|
11888
12027
|
column,
|
11889
12028
|
row,
|
11890
12029
|
index,
|
11891
12030
|
rows
|
11892
12031
|
}));
|
11893
12032
|
return createAnimatedCell({
|
11894
|
-
cellElement:
|
12033
|
+
cellElement: cell2,
|
11895
12034
|
stickyStyles,
|
11896
12035
|
stickyColumn: cellProps(column).stickyColumn
|
11897
12036
|
});
|
@@ -12363,7 +12502,7 @@ var DataList2 = (_a) => {
|
|
12363
12502
|
color: "default",
|
12364
12503
|
"aria-hidden": true
|
12365
12504
|
}), content) : content;
|
12366
|
-
const
|
12505
|
+
const cell2 = columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */ React72.createElement(DataList.SortCell, __spreadValues({
|
12367
12506
|
direction: sort && sort.column.headerName === column.headerName ? sort.direction : "none",
|
12368
12507
|
onClick: () => updateSort(column),
|
12369
12508
|
sticky
|
@@ -12371,7 +12510,7 @@ var DataList2 = (_a) => {
|
|
12371
12510
|
sticky
|
12372
12511
|
}), headerContentAndIcon);
|
12373
12512
|
return createAnimatedCell({
|
12374
|
-
cellElement:
|
12513
|
+
cellElement: cell2,
|
12375
12514
|
stickyStyles,
|
12376
12515
|
stickyColumn: cellProps(column).stickyColumn
|
12377
12516
|
});
|
@@ -12602,7 +12741,7 @@ var DataTable = (_a) => {
|
|
12602
12741
|
color: "default",
|
12603
12742
|
"aria-hidden": true
|
12604
12743
|
}), content) : content;
|
12605
|
-
const
|
12744
|
+
const cell2 = columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */ React75.createElement(Table2.SortCell, __spreadValues({
|
12606
12745
|
direction: sort && sort.column.headerName === column.headerName ? sort.direction : "none",
|
12607
12746
|
onClick: () => updateSort(column),
|
12608
12747
|
style: { width: column.width },
|
@@ -12612,7 +12751,7 @@ var DataTable = (_a) => {
|
|
12612
12751
|
"aria-label": column.headerInvisible ? column.headerName : void 0
|
12613
12752
|
}), headerContentAndIcon);
|
12614
12753
|
return createAnimatedCell({
|
12615
|
-
cellElement:
|
12754
|
+
cellElement: cell2,
|
12616
12755
|
stickyStyles,
|
12617
12756
|
stickyColumn: cellProps(column).stickyColumn
|
12618
12757
|
});
|
@@ -12700,13 +12839,434 @@ var renderCell = (column, row, index, rows) => {
|
|
12700
12839
|
};
|
12701
12840
|
DataTable.Skeleton = DataListSkeleton;
|
12702
12841
|
|
12703
|
-
// src/molecules/
|
12842
|
+
// src/molecules/DatePicker/DatePicker.tsx
|
12843
|
+
import React83 from "react";
|
12844
|
+
import {
|
12845
|
+
DatePicker as AriaDatePicker,
|
12846
|
+
DatePickerStateContext
|
12847
|
+
} from "react-aria-components";
|
12848
|
+
import { useLabel as useLabel2 } from "@react-aria/label";
|
12849
|
+
import { useId as useId10 } from "@react-aria/utils";
|
12850
|
+
import omit9 from "lodash/omit";
|
12851
|
+
|
12852
|
+
// src/molecules/DateField/DateInput.tsx
|
12853
|
+
import React76 from "react";
|
12854
|
+
import { DateInput as AriaDateInput, DateSegment } from "react-aria-components";
|
12855
|
+
import { tv as tv2 } from "tailwind-variants";
|
12856
|
+
|
12857
|
+
// src/atoms/utils/index.ts
|
12858
|
+
import { tv } from "tailwind-variants";
|
12859
|
+
var focusRing = tv({
|
12860
|
+
base: "outline outline-primary-default outline-offset-2",
|
12861
|
+
variants: {
|
12862
|
+
isFocusVisible: {
|
12863
|
+
false: "outline-0",
|
12864
|
+
true: "outline-2"
|
12865
|
+
}
|
12866
|
+
}
|
12867
|
+
});
|
12868
|
+
var fieldBorder = tv({
|
12869
|
+
variants: {
|
12870
|
+
isReadOnly: {
|
12871
|
+
true: "bg-primary-muted"
|
12872
|
+
},
|
12873
|
+
isFocusWithin: {
|
12874
|
+
false: "border-default hover:border-intense",
|
12875
|
+
true: "border-info-default"
|
12876
|
+
},
|
12877
|
+
isInvalid: {
|
12878
|
+
true: "border-danger-default"
|
12879
|
+
},
|
12880
|
+
isDisabled: {
|
12881
|
+
true: "bg-default cursor-not-allowed text-inactive"
|
12882
|
+
}
|
12883
|
+
}
|
12884
|
+
});
|
12885
|
+
var fieldGroup = tv({
|
12886
|
+
base: "group flex items-center bg-body border rounded-sm typography-small text-default px-3 py-3 overflow-hidden",
|
12887
|
+
variants: fieldBorder.variants
|
12888
|
+
});
|
12889
|
+
|
12890
|
+
// src/molecules/DateField/DateInput.tsx
|
12891
|
+
var segmentStyles = tv2({
|
12892
|
+
base: "inline p-0.5 rounded outline outline-0 caret-transparent text-default",
|
12893
|
+
variants: {
|
12894
|
+
isPlaceholder: {
|
12895
|
+
true: "text-inactive"
|
12896
|
+
},
|
12897
|
+
isDisabled: {
|
12898
|
+
true: "text-inactive"
|
12899
|
+
},
|
12900
|
+
isFocused: {
|
12901
|
+
true: "bg-info-muted"
|
12902
|
+
}
|
12903
|
+
}
|
12904
|
+
});
|
12905
|
+
function DateInput(props) {
|
12906
|
+
return /* @__PURE__ */ React76.createElement(AriaDateInput, __spreadValues({
|
12907
|
+
className: (renderProps) => fieldGroup(__spreadProps(__spreadValues({}, renderProps), { class: "block min-w-[150px]" }))
|
12908
|
+
}, props), (segment) => /* @__PURE__ */ React76.createElement(DateSegment, {
|
12909
|
+
segment,
|
12910
|
+
className: segmentStyles
|
12911
|
+
}));
|
12912
|
+
}
|
12913
|
+
|
12914
|
+
// src/molecules/Field/Field.tsx
|
12704
12915
|
import React77 from "react";
|
12916
|
+
import { Group as Group3 } from "react-aria-components";
|
12917
|
+
var FieldGroup = (props) => {
|
12918
|
+
return /* @__PURE__ */ React77.createElement(Group3, __spreadProps(__spreadValues({}, props), {
|
12919
|
+
className: (renderProps) => fieldGroup(renderProps)
|
12920
|
+
}));
|
12921
|
+
};
|
12922
|
+
|
12923
|
+
// src/molecules/TimeField/TimeField.tsx
|
12924
|
+
import React78 from "react";
|
12925
|
+
import {
|
12926
|
+
TimeField as AriaTimeField
|
12927
|
+
} from "react-aria-components";
|
12928
|
+
import { useLabel } from "@react-aria/label";
|
12929
|
+
import { useId as useId9 } from "@react-aria/utils";
|
12930
|
+
import omit8 from "lodash/omit";
|
12931
|
+
function TimeFieldBase(_a) {
|
12932
|
+
var _b = _a, { disabled, valid } = _b, props = __objRest(_b, ["disabled", "valid"]);
|
12933
|
+
return /* @__PURE__ */ React78.createElement(AriaTimeField, __spreadProps(__spreadValues({}, props), {
|
12934
|
+
isInvalid: valid === false,
|
12935
|
+
isDisabled: disabled
|
12936
|
+
}), /* @__PURE__ */ React78.createElement(DateInput, null));
|
12937
|
+
}
|
12938
|
+
function TimeField(props) {
|
12939
|
+
const { labelProps, fieldProps } = useLabel({ label: props.labelText });
|
12940
|
+
const errorMessageId = useId9();
|
12941
|
+
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
12942
|
+
const _a = getLabelControlProps(props), { "data-testid": dataTestId } = _a, labelControlProps = __objRest(_a, ["data-testid"]);
|
12943
|
+
const baseProps = omit8(props, Object.keys(labelControlProps));
|
12944
|
+
return /* @__PURE__ */ React78.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({}, labelProps), labelControlProps), {
|
12945
|
+
messageId: errorMessageId,
|
12946
|
+
className: "Aquarium-DateField"
|
12947
|
+
}), /* @__PURE__ */ React78.createElement(TimeFieldBase, __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, baseProps), fieldProps), errorProps), {
|
12948
|
+
disabled: props.disabled,
|
12949
|
+
valid: props.valid
|
12950
|
+
})));
|
12951
|
+
}
|
12952
|
+
|
12953
|
+
// src/molecules/DatePicker/DatePicker.tsx
|
12954
|
+
var import_calendar2 = __toESM(require_calendar());
|
12955
|
+
|
12956
|
+
// src/molecules/DatePicker/Button.tsx
|
12957
|
+
import React79 from "react";
|
12958
|
+
import { Button as AriaButton } from "react-aria-components";
|
12959
|
+
import { composeRenderProps as composeRenderProps2 } from "react-aria-components";
|
12960
|
+
import { tv as tv3 } from "tailwind-variants";
|
12961
|
+
var button = tv3({
|
12962
|
+
extend: focusRing
|
12963
|
+
});
|
12964
|
+
function Button2(props) {
|
12965
|
+
return /* @__PURE__ */ React79.createElement(AriaButton, __spreadProps(__spreadValues({}, props), {
|
12966
|
+
className: composeRenderProps2(props.className, (className, renderProps) => button(__spreadProps(__spreadValues({}, renderProps), { className })))
|
12967
|
+
}));
|
12968
|
+
}
|
12969
|
+
|
12970
|
+
// src/molecules/DatePicker/Calendar.tsx
|
12971
|
+
import React80 from "react";
|
12972
|
+
import {
|
12973
|
+
Calendar as AriaCalendar,
|
12974
|
+
CalendarCell,
|
12975
|
+
CalendarGrid,
|
12976
|
+
CalendarGridBody,
|
12977
|
+
CalendarGridHeader as AriaCalendarGridHeader,
|
12978
|
+
CalendarHeaderCell,
|
12979
|
+
Heading
|
12980
|
+
} from "react-aria-components";
|
12981
|
+
import { tv as tv4 } from "tailwind-variants";
|
12982
|
+
var import_chevronLeft4 = __toESM(require_chevronLeft());
|
12983
|
+
var import_chevronRight4 = __toESM(require_chevronRight());
|
12984
|
+
var cellStyles = tv4({
|
12985
|
+
extend: focusRing,
|
12986
|
+
base: "w-8 h-8 typography-small cursor-default rounded flex items-center justify-center",
|
12987
|
+
variants: {
|
12988
|
+
isSelected: {
|
12989
|
+
false: "text-default hover:bg-default pressed:bg-intense",
|
12990
|
+
true: "bg-primary-default invalid:bg-danger-default text-white"
|
12991
|
+
},
|
12992
|
+
isUnavailable: {
|
12993
|
+
true: "text-inactive"
|
12994
|
+
},
|
12995
|
+
isDisabled: {
|
12996
|
+
true: "text-inactive"
|
12997
|
+
}
|
12998
|
+
}
|
12999
|
+
});
|
13000
|
+
var Calendar = (props) => {
|
13001
|
+
return /* @__PURE__ */ React80.createElement(AriaCalendar, __spreadValues({}, props), /* @__PURE__ */ React80.createElement(CalendarHeader, null), /* @__PURE__ */ React80.createElement(CalendarGrid, null, /* @__PURE__ */ React80.createElement(CalendarGridHeader, null), /* @__PURE__ */ React80.createElement(CalendarGridBody, null, (date) => /* @__PURE__ */ React80.createElement(CalendarCell, {
|
13002
|
+
date,
|
13003
|
+
className: cellStyles
|
13004
|
+
}))));
|
13005
|
+
};
|
13006
|
+
var CalendarHeader = () => {
|
13007
|
+
return /* @__PURE__ */ React80.createElement("header", {
|
13008
|
+
className: "flex items-center gap-1 pb-5 w-full"
|
13009
|
+
}, /* @__PURE__ */ React80.createElement(Button2, {
|
13010
|
+
slot: "previous",
|
13011
|
+
className: "p-3"
|
13012
|
+
}, /* @__PURE__ */ React80.createElement(Icon, {
|
13013
|
+
icon: import_chevronLeft4.default
|
13014
|
+
})), /* @__PURE__ */ React80.createElement(Heading, {
|
13015
|
+
className: tw("flex-1 typography-default-strong text-center")
|
13016
|
+
}), /* @__PURE__ */ React80.createElement(Button2, {
|
13017
|
+
slot: "next",
|
13018
|
+
className: "p-3"
|
13019
|
+
}, /* @__PURE__ */ React80.createElement(Icon, {
|
13020
|
+
icon: import_chevronRight4.default
|
13021
|
+
})));
|
13022
|
+
};
|
13023
|
+
var CalendarGridHeader = () => {
|
13024
|
+
return /* @__PURE__ */ React80.createElement(AriaCalendarGridHeader, null, (day) => /* @__PURE__ */ React80.createElement(CalendarHeaderCell, {
|
13025
|
+
className: "text-xs text-inactive typography-caption"
|
13026
|
+
}, day));
|
13027
|
+
};
|
13028
|
+
|
13029
|
+
// src/molecules/DatePicker/Dialog.tsx
|
13030
|
+
import React81 from "react";
|
13031
|
+
import { Dialog as AriaDialog } from "react-aria-components";
|
13032
|
+
function Dialog(props) {
|
13033
|
+
return /* @__PURE__ */ React81.createElement(AriaDialog, __spreadProps(__spreadValues({}, props), {
|
13034
|
+
className: classNames(
|
13035
|
+
props.className,
|
13036
|
+
tw(
|
13037
|
+
"outline outline-0 p-5 [[data-placement]>&]:px-5 [[data-placement]>&]:py-6 max-h-[inherit] overflow-auto relative"
|
13038
|
+
)
|
13039
|
+
)
|
13040
|
+
}));
|
13041
|
+
}
|
13042
|
+
|
13043
|
+
// src/molecules/DatePicker/Popover.tsx
|
13044
|
+
import React82 from "react";
|
13045
|
+
import {
|
13046
|
+
OverlayArrow,
|
13047
|
+
Popover as AriaPopover,
|
13048
|
+
PopoverContext,
|
13049
|
+
useSlottedContext
|
13050
|
+
} from "react-aria-components";
|
13051
|
+
var Popover2 = (_a) => {
|
13052
|
+
var _b = _a, { children, showArrow, className } = _b, props = __objRest(_b, ["children", "showArrow", "className"]);
|
13053
|
+
const popoverContext = useSlottedContext(PopoverContext);
|
13054
|
+
const isSubmenu = (popoverContext == null ? void 0 : popoverContext.trigger) === "SubmenuTrigger";
|
13055
|
+
let offset = showArrow ? 12 : 8;
|
13056
|
+
offset = isSubmenu ? offset - 6 : offset;
|
13057
|
+
return /* @__PURE__ */ React82.createElement(AriaPopover, __spreadProps(__spreadValues({
|
13058
|
+
offset
|
13059
|
+
}, props), {
|
13060
|
+
className: tw(
|
13061
|
+
"rounded-sm shadow-16dp bg-popover-content mt-1 overflow-y-auto flex flex-col border border-default outline-none"
|
13062
|
+
)
|
13063
|
+
}), showArrow && /* @__PURE__ */ React82.createElement(OverlayArrow, {
|
13064
|
+
className: "group"
|
13065
|
+
}, /* @__PURE__ */ React82.createElement("svg", {
|
13066
|
+
width: 12,
|
13067
|
+
height: 12,
|
13068
|
+
viewBox: "0 0 12 12",
|
13069
|
+
className: "block fill-white stroke-1 stroke-black group-placement-bottom:rotate-180 group-placement-left:-rotate-90 group-placement-right:rotate-90"
|
13070
|
+
}, /* @__PURE__ */ React82.createElement("path", {
|
13071
|
+
d: "M0 0 L6 6 L12 0"
|
13072
|
+
}))), children);
|
13073
|
+
};
|
13074
|
+
|
13075
|
+
// src/molecules/DatePicker/DatePicker.tsx
|
13076
|
+
var createDatePickerBase = (variant) => (_a) => {
|
13077
|
+
var _b = _a, { disabled, valid, granularity, shouldCloseOnSelect } = _b, props = __objRest(_b, ["disabled", "valid", "granularity", "shouldCloseOnSelect"]);
|
13078
|
+
const hasSomeValue = props.value || props.defaultValue || props.placeholderValue;
|
13079
|
+
return /* @__PURE__ */ React83.createElement(AriaDatePicker, __spreadProps(__spreadValues({}, props), {
|
13080
|
+
shouldCloseOnSelect: shouldCloseOnSelect != null ? shouldCloseOnSelect : variant === "date",
|
13081
|
+
isDisabled: disabled,
|
13082
|
+
isInvalid: valid === false,
|
13083
|
+
granularity: granularity != null ? granularity : variant === "datetime" && !hasSomeValue ? "minute" : void 0
|
13084
|
+
}), /* @__PURE__ */ React83.createElement(FieldGroup, {
|
13085
|
+
className: tw("min-w-[210px] w-auto")
|
13086
|
+
}, /* @__PURE__ */ React83.createElement(DateInput, {
|
13087
|
+
className: tw("flex-1")
|
13088
|
+
}), /* @__PURE__ */ React83.createElement(Button2, null, /* @__PURE__ */ React83.createElement(Icon, {
|
13089
|
+
icon: import_calendar2.default
|
13090
|
+
}))), /* @__PURE__ */ React83.createElement(Popover2, {
|
13091
|
+
offset: 1
|
13092
|
+
}, /* @__PURE__ */ React83.createElement(Dialog, null, /* @__PURE__ */ React83.createElement(Spacing, {
|
13093
|
+
gap: "6"
|
13094
|
+
}, /* @__PURE__ */ React83.createElement(Calendar, null), variant === "datetime" && /* @__PURE__ */ React83.createElement(PickerTimeField, {
|
13095
|
+
granularity
|
13096
|
+
})))));
|
13097
|
+
};
|
13098
|
+
var DatePickerBase = createDatePickerBase("date");
|
13099
|
+
var DateTimePickerBase = createDatePickerBase("datetime");
|
13100
|
+
var PickerTimeField = ({ granularity }) => {
|
13101
|
+
const state = React83.useContext(DatePickerStateContext);
|
13102
|
+
return /* @__PURE__ */ React83.createElement(TimeField, {
|
13103
|
+
labelText: "Time",
|
13104
|
+
granularity: granularity !== "day" ? granularity : void 0,
|
13105
|
+
value: state.timeValue,
|
13106
|
+
onChange: state.setTimeValue,
|
13107
|
+
reserveSpaceForError: false
|
13108
|
+
});
|
13109
|
+
};
|
13110
|
+
var createDatePicker = (variant) => (props) => {
|
13111
|
+
const { labelProps, fieldProps } = useLabel2({ label: props.labelText });
|
13112
|
+
const errorMessageId = useId10();
|
13113
|
+
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13114
|
+
const _a = getLabelControlProps(props), { "data-testid": dataTestId } = _a, labelControlProps = __objRest(_a, ["data-testid"]);
|
13115
|
+
const baseProps = omit9(props, Object.keys(labelControlProps));
|
13116
|
+
const allProps = __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, baseProps), fieldProps), errorProps), { disabled: props.disabled, valid: props.valid });
|
13117
|
+
return /* @__PURE__ */ React83.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({}, labelProps), labelControlProps), {
|
13118
|
+
messageId: errorMessageId,
|
13119
|
+
className: "Aquarium-DatePicker"
|
13120
|
+
}), variant === "date" ? /* @__PURE__ */ React83.createElement(DatePickerBase, __spreadValues({}, allProps)) : /* @__PURE__ */ React83.createElement(DateTimePickerBase, __spreadValues({}, allProps)));
|
13121
|
+
};
|
13122
|
+
var DatePicker = createDatePicker("date");
|
13123
|
+
var DateTimePicker = createDatePicker("datetime");
|
13124
|
+
|
13125
|
+
// src/molecules/DatePicker/DateRangePicker.tsx
|
13126
|
+
import React85 from "react";
|
13127
|
+
import {
|
13128
|
+
DateRangePicker as AriaDateRangePicker,
|
13129
|
+
DateRangePickerStateContext
|
13130
|
+
} from "react-aria-components";
|
13131
|
+
import { useLabel as useLabel3 } from "@react-aria/label";
|
13132
|
+
import { useId as useId11 } from "@react-aria/utils";
|
13133
|
+
import omit10 from "lodash/omit";
|
13134
|
+
var import_calendar3 = __toESM(require_calendar());
|
13135
|
+
|
13136
|
+
// src/molecules/DatePicker/RangeCalendar.tsx
|
13137
|
+
import React84 from "react";
|
13138
|
+
import {
|
13139
|
+
CalendarCell as CalendarCell2,
|
13140
|
+
CalendarGrid as CalendarGrid2,
|
13141
|
+
CalendarGridBody as CalendarGridBody2,
|
13142
|
+
RangeCalendar as AriaRangeCalendar
|
13143
|
+
} from "react-aria-components";
|
13144
|
+
import { tv as tv5 } from "tailwind-variants";
|
13145
|
+
var cell = tv5({
|
13146
|
+
extend: focusRing,
|
13147
|
+
base: "w-full h-full flex items-center justify-center rounded text-default",
|
13148
|
+
variants: {
|
13149
|
+
selectionState: {
|
13150
|
+
none: "group-hover:bg-default group-pressed:bg-intense",
|
13151
|
+
middle: [
|
13152
|
+
"text-white",
|
13153
|
+
"group-hover:bg-primary-default",
|
13154
|
+
"group-invalid:group-hover:bg-danger-default",
|
13155
|
+
"group-pressed:bg-primary-intense",
|
13156
|
+
"group-invalid:group-pressed:bg-danger-intense"
|
13157
|
+
],
|
13158
|
+
cap: "text-white bg-primary-default group-invalid:bg-danger-default"
|
13159
|
+
},
|
13160
|
+
isUnavailable: {
|
13161
|
+
true: "text-inactive"
|
13162
|
+
},
|
13163
|
+
isDisabled: {
|
13164
|
+
true: "text-inactive"
|
13165
|
+
}
|
13166
|
+
}
|
13167
|
+
});
|
13168
|
+
function RangeCalendar(props) {
|
13169
|
+
return /* @__PURE__ */ React84.createElement(AriaRangeCalendar, __spreadValues({}, props), /* @__PURE__ */ React84.createElement(CalendarHeader, null), /* @__PURE__ */ React84.createElement(CalendarGrid2, {
|
13170
|
+
className: "[&_td]:px-0"
|
13171
|
+
}, /* @__PURE__ */ React84.createElement(CalendarGridHeader, null), /* @__PURE__ */ React84.createElement(CalendarGridBody2, null, (date) => /* @__PURE__ */ React84.createElement(CalendarCell2, {
|
13172
|
+
date,
|
13173
|
+
className: tw(
|
13174
|
+
"group w-8 h-8 typography-small outline outline-0 cursor-default",
|
13175
|
+
"outside-month:text-inactive selected:bg-primary-default",
|
13176
|
+
"invalid:selected:bg-danger-default",
|
13177
|
+
"selection-start:rounded-s selection-end:rounded-e"
|
13178
|
+
)
|
13179
|
+
}, (_a) => {
|
13180
|
+
var _b = _a, { formattedDate, isSelected, isSelectionStart, isSelectionEnd } = _b, rest = __objRest(_b, ["formattedDate", "isSelected", "isSelectionStart", "isSelectionEnd"]);
|
13181
|
+
return /* @__PURE__ */ React84.createElement("span", {
|
13182
|
+
className: cell(__spreadValues({
|
13183
|
+
selectionState: isSelected && (isSelectionStart || isSelectionEnd) ? "cap" : isSelected ? "middle" : "none"
|
13184
|
+
}, rest))
|
13185
|
+
}, formattedDate);
|
13186
|
+
}))));
|
13187
|
+
}
|
13188
|
+
|
13189
|
+
// src/molecules/DatePicker/DateRangePicker.tsx
|
13190
|
+
var createDateRangePickerBase = (variant) => (_a) => {
|
13191
|
+
var _b = _a, {
|
13192
|
+
disabled,
|
13193
|
+
valid,
|
13194
|
+
granularity,
|
13195
|
+
shouldCloseOnSelect
|
13196
|
+
} = _b, props = __objRest(_b, [
|
13197
|
+
"disabled",
|
13198
|
+
"valid",
|
13199
|
+
"granularity",
|
13200
|
+
"shouldCloseOnSelect"
|
13201
|
+
]);
|
13202
|
+
const hasSomeValue = props.value || props.defaultValue || props.placeholderValue;
|
13203
|
+
return /* @__PURE__ */ React85.createElement(AriaDateRangePicker, __spreadProps(__spreadValues({}, props), {
|
13204
|
+
shouldCloseOnSelect: shouldCloseOnSelect != null ? shouldCloseOnSelect : variant === "date",
|
13205
|
+
isDisabled: disabled,
|
13206
|
+
isInvalid: valid === false,
|
13207
|
+
granularity: granularity != null ? granularity : variant === "datetime" && !hasSomeValue ? "minute" : void 0,
|
13208
|
+
className: tw("group flex flex-col gap-1")
|
13209
|
+
}), /* @__PURE__ */ React85.createElement(FieldGroup, {
|
13210
|
+
className: tw("min-w-[200px] w-auto")
|
13211
|
+
}, /* @__PURE__ */ React85.createElement(DateInput, {
|
13212
|
+
slot: "start",
|
13213
|
+
className: tw("px-2 py-1")
|
13214
|
+
}), /* @__PURE__ */ React85.createElement("span", {
|
13215
|
+
"aria-hidden": true,
|
13216
|
+
className: tw("text-muted")
|
13217
|
+
}, "-"), /* @__PURE__ */ React85.createElement(DateInput, {
|
13218
|
+
slot: "end",
|
13219
|
+
className: tw("flex-1 px-2 py-1")
|
13220
|
+
}), /* @__PURE__ */ React85.createElement(Button2, null, /* @__PURE__ */ React85.createElement(Icon, {
|
13221
|
+
icon: import_calendar3.default
|
13222
|
+
}))), /* @__PURE__ */ React85.createElement(Popover2, null, /* @__PURE__ */ React85.createElement(Dialog, null, /* @__PURE__ */ React85.createElement(Spacing, {
|
13223
|
+
gap: "6"
|
13224
|
+
}, /* @__PURE__ */ React85.createElement(RangeCalendar, null), variant === "datetime" && /* @__PURE__ */ React85.createElement(Spacing, {
|
13225
|
+
gap: "6",
|
13226
|
+
row: true
|
13227
|
+
}, /* @__PURE__ */ React85.createElement(PickerTimeField2, {
|
13228
|
+
granularity,
|
13229
|
+
part: "start"
|
13230
|
+
}), /* @__PURE__ */ React85.createElement(PickerTimeField2, {
|
13231
|
+
granularity,
|
13232
|
+
part: "end"
|
13233
|
+
}))))));
|
13234
|
+
};
|
13235
|
+
var PickerTimeField2 = ({ granularity, part }) => {
|
13236
|
+
var _a;
|
13237
|
+
const { timeRange, setTime } = React85.useContext(DateRangePickerStateContext);
|
13238
|
+
return /* @__PURE__ */ React85.createElement(TimeField, {
|
13239
|
+
labelText: part === "start" ? "Start time" : "End time",
|
13240
|
+
granularity: granularity !== "day" ? granularity : void 0,
|
13241
|
+
value: (_a = timeRange == null ? void 0 : timeRange[part]) != null ? _a : null,
|
13242
|
+
onChange: (value) => setTime(part, value),
|
13243
|
+
reserveSpaceForError: false
|
13244
|
+
});
|
13245
|
+
};
|
13246
|
+
var DateRangePickerBase = createDateRangePickerBase("date");
|
13247
|
+
var DateTimeRangePickerBase = createDateRangePickerBase("datetime");
|
13248
|
+
var createDateRangePicker = (variant) => (props) => {
|
13249
|
+
const { labelProps, fieldProps } = useLabel3({ label: props.labelText });
|
13250
|
+
const errorMessageId = useId11();
|
13251
|
+
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13252
|
+
const _a = getLabelControlProps(props), { "data-testid": dataTestId } = _a, labelControlProps = __objRest(_a, ["data-testid"]);
|
13253
|
+
const baseProps = omit10(props, Object.keys(labelControlProps));
|
13254
|
+
const allProps = __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, baseProps), fieldProps), errorProps), { disabled: props.disabled, valid: props.valid });
|
13255
|
+
return /* @__PURE__ */ React85.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({}, labelProps), labelControlProps), {
|
13256
|
+
messageId: errorMessageId,
|
13257
|
+
className: "Aquarium-DatePicker"
|
13258
|
+
}), variant === "date" ? /* @__PURE__ */ React85.createElement(DateRangePickerBase, __spreadValues({}, allProps)) : /* @__PURE__ */ React85.createElement(DateTimeRangePickerBase, __spreadValues({}, allProps)));
|
13259
|
+
};
|
13260
|
+
var DateRangePicker = createDateRangePicker("date");
|
13261
|
+
var DateTimeRangePicker = createDateRangePicker("datetime");
|
13262
|
+
|
13263
|
+
// src/molecules/Dialog/Dialog.tsx
|
13264
|
+
import React87 from "react";
|
12705
13265
|
import { useDialog } from "@react-aria/dialog";
|
12706
13266
|
import { Overlay as Overlay2, useModalOverlay } from "@react-aria/overlays";
|
12707
|
-
import { useId as
|
13267
|
+
import { useId as useId12 } from "@react-aria/utils";
|
12708
13268
|
import { useOverlayTriggerState as useOverlayTriggerState2 } from "@react-stately/overlays";
|
12709
|
-
import
|
13269
|
+
import omit11 from "lodash/omit";
|
12710
13270
|
|
12711
13271
|
// src/atoms/Dialog/Dialog.tsx
|
12712
13272
|
var import_confirm2 = __toESM(require_confirm());
|
@@ -12728,7 +13288,7 @@ var DIALOG_ICONS_AND_COLORS = {
|
|
12728
13288
|
};
|
12729
13289
|
|
12730
13290
|
// src/atoms/Modal/Modal.tsx
|
12731
|
-
import
|
13291
|
+
import React86 from "react";
|
12732
13292
|
var Modal = (_a) => {
|
12733
13293
|
var _b = _a, {
|
12734
13294
|
children,
|
@@ -12741,7 +13301,7 @@ var Modal = (_a) => {
|
|
12741
13301
|
"className",
|
12742
13302
|
"open"
|
12743
13303
|
]);
|
12744
|
-
return open ? /* @__PURE__ */
|
13304
|
+
return open ? /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12745
13305
|
className: classNames(
|
12746
13306
|
tw("inset-0 overflow-y-auto z-modal fixed"),
|
12747
13307
|
{
|
@@ -12753,11 +13313,11 @@ var Modal = (_a) => {
|
|
12753
13313
|
};
|
12754
13314
|
Modal.BackDrop = (_a) => {
|
12755
13315
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
12756
|
-
return /* @__PURE__ */
|
13316
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12757
13317
|
className: classNames(tw("-z-10 fixed min-w-full min-h-full bg-body-intense opacity-70"), className)
|
12758
13318
|
}));
|
12759
13319
|
};
|
12760
|
-
Modal.Dialog =
|
13320
|
+
Modal.Dialog = React86.forwardRef(
|
12761
13321
|
(_a, ref) => {
|
12762
13322
|
var _b = _a, { kind = "dialog", children, className, size = "sm" } = _b, rest = __objRest(_b, ["kind", "children", "className", "size"]);
|
12763
13323
|
const commonClasses = tw("bg-popover-content max-h-full flex flex-col");
|
@@ -12771,7 +13331,7 @@ Modal.Dialog = React76.forwardRef(
|
|
12771
13331
|
"w-[560px]": size === "md",
|
12772
13332
|
"w-[1080px]": size === "full"
|
12773
13333
|
});
|
12774
|
-
return /* @__PURE__ */
|
13334
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({
|
12775
13335
|
ref,
|
12776
13336
|
"aria-modal": "true"
|
12777
13337
|
}, rest), {
|
@@ -12781,31 +13341,31 @@ Modal.Dialog = React76.forwardRef(
|
|
12781
13341
|
);
|
12782
13342
|
Modal.Header = (_a) => {
|
12783
13343
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12784
|
-
return /* @__PURE__ */
|
13344
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12785
13345
|
className: classNames(tw("pl-7 pr-[64px] py-6 gap-3 flex items-center"), className)
|
12786
13346
|
}), children);
|
12787
13347
|
};
|
12788
13348
|
Modal.HeaderImage = (_a) => {
|
12789
13349
|
var _b = _a, { backgroundImage, className } = _b, rest = __objRest(_b, ["backgroundImage", "className"]);
|
12790
13350
|
const common = tw("h-[120px] min-h-[120px] w-full ");
|
12791
|
-
return backgroundImage ? /* @__PURE__ */
|
13351
|
+
return backgroundImage ? /* @__PURE__ */ React86.createElement("img", __spreadProps(__spreadValues({
|
12792
13352
|
"aria-hidden": true,
|
12793
13353
|
src: backgroundImage != null ? backgroundImage : void 0
|
12794
13354
|
}, rest), {
|
12795
13355
|
className: classNames(common, tw("object-cover"), className)
|
12796
|
-
})) : /* @__PURE__ */
|
13356
|
+
})) : /* @__PURE__ */ React86.createElement("div", {
|
12797
13357
|
className: classNames(common, tw("bg-default"), className)
|
12798
13358
|
});
|
12799
13359
|
};
|
12800
13360
|
Modal.CloseButtonContainer = (_a) => {
|
12801
13361
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
12802
|
-
return /* @__PURE__ */
|
13362
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12803
13363
|
className: classNames(tw("absolute top-[24px] right-[28px]"), className)
|
12804
13364
|
}));
|
12805
13365
|
};
|
12806
13366
|
Modal.Title = (_a) => {
|
12807
13367
|
var _b = _a, { kind = "dialog", children, className } = _b, rest = __objRest(_b, ["kind", "children", "className"]);
|
12808
|
-
return /* @__PURE__ */
|
13368
|
+
return /* @__PURE__ */ React86.createElement(Typography, __spreadValues({
|
12809
13369
|
htmlTag: "h2",
|
12810
13370
|
variant: "subheading",
|
12811
13371
|
color: "intense",
|
@@ -12819,40 +13379,40 @@ Modal.Title = (_a) => {
|
|
12819
13379
|
};
|
12820
13380
|
Modal.Subtitle = (_a) => {
|
12821
13381
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
12822
|
-
return /* @__PURE__ */
|
13382
|
+
return /* @__PURE__ */ React86.createElement(Typography, __spreadValues({
|
12823
13383
|
variant: "small",
|
12824
13384
|
color: "default"
|
12825
13385
|
}, rest), children);
|
12826
13386
|
};
|
12827
13387
|
Modal.TitleContainer = (_a) => {
|
12828
13388
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12829
|
-
return /* @__PURE__ */
|
13389
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12830
13390
|
className: classNames(tw("flex flex-col grow"), className)
|
12831
13391
|
}), children);
|
12832
13392
|
};
|
12833
13393
|
Modal.Body = (_a) => {
|
12834
13394
|
var _b = _a, { children, className, noFooter = false, maxHeight, style } = _b, rest = __objRest(_b, ["children", "className", "noFooter", "maxHeight", "style"]);
|
12835
|
-
return /* @__PURE__ */
|
13395
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12836
13396
|
className: classNames(tw("px-7 grow overflow-y-auto text-default", { "pb-6": noFooter }), className),
|
12837
13397
|
style: __spreadValues({ maxHeight }, style)
|
12838
13398
|
}), children);
|
12839
13399
|
};
|
12840
13400
|
Modal.Footer = (_a) => {
|
12841
13401
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12842
|
-
return /* @__PURE__ */
|
13402
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12843
13403
|
className: classNames(tw("px-7 py-6"), className)
|
12844
13404
|
}), children);
|
12845
13405
|
};
|
12846
13406
|
Modal.Actions = (_a) => {
|
12847
13407
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12848
|
-
return /* @__PURE__ */
|
13408
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12849
13409
|
className: classNames(tw("flex gap-4 justify-end"), className)
|
12850
13410
|
}), children);
|
12851
13411
|
};
|
12852
13412
|
|
12853
13413
|
// src/molecules/Dialog/Dialog.tsx
|
12854
|
-
var
|
12855
|
-
const ref =
|
13414
|
+
var Dialog2 = (props) => {
|
13415
|
+
const ref = React87.useRef(null);
|
12856
13416
|
const { open, onClose } = props;
|
12857
13417
|
const state = useOverlayTriggerState2({ isOpen: open, onOpenChange: (isOpen) => !isOpen && (onClose == null ? void 0 : onClose()) });
|
12858
13418
|
const { modalProps, underlayProps } = useModalOverlay(
|
@@ -12863,13 +13423,13 @@ var Dialog = (props) => {
|
|
12863
13423
|
if (!state.isOpen) {
|
12864
13424
|
return null;
|
12865
13425
|
}
|
12866
|
-
return /* @__PURE__ */
|
13426
|
+
return /* @__PURE__ */ React87.createElement(Overlay2, null, /* @__PURE__ */ React87.createElement(Modal, {
|
12867
13427
|
className: "Aquarium-Dialog",
|
12868
13428
|
open: true
|
12869
|
-
}, /* @__PURE__ */
|
13429
|
+
}, /* @__PURE__ */ React87.createElement(Modal.BackDrop, __spreadValues({}, underlayProps)), /* @__PURE__ */ React87.createElement(Modal.Dialog, __spreadValues({
|
12870
13430
|
ref,
|
12871
13431
|
size: "sm"
|
12872
|
-
}, modalProps), /* @__PURE__ */
|
13432
|
+
}, modalProps), /* @__PURE__ */ React87.createElement(DialogWrapper, __spreadValues({}, props)))));
|
12873
13433
|
};
|
12874
13434
|
var DialogWrapper = ({
|
12875
13435
|
title,
|
@@ -12878,9 +13438,9 @@ var DialogWrapper = ({
|
|
12878
13438
|
primaryAction,
|
12879
13439
|
secondaryAction
|
12880
13440
|
}) => {
|
12881
|
-
const ref =
|
12882
|
-
const labelledBy =
|
12883
|
-
const describedBy =
|
13441
|
+
const ref = React87.useRef(null);
|
13442
|
+
const labelledBy = useId12();
|
13443
|
+
const describedBy = useId12();
|
12884
13444
|
const { dialogProps } = useDialog(
|
12885
13445
|
{
|
12886
13446
|
"role": "alertdialog",
|
@@ -12889,52 +13449,52 @@ var DialogWrapper = ({
|
|
12889
13449
|
},
|
12890
13450
|
ref
|
12891
13451
|
);
|
12892
|
-
return /* @__PURE__ */
|
13452
|
+
return /* @__PURE__ */ React87.createElement("div", __spreadProps(__spreadValues({
|
12893
13453
|
ref
|
12894
13454
|
}, dialogProps), {
|
12895
13455
|
className: tw("outline-none")
|
12896
|
-
}), /* @__PURE__ */
|
13456
|
+
}), /* @__PURE__ */ React87.createElement(Modal.Header, {
|
12897
13457
|
className: tw("icon-stroke-2")
|
12898
|
-
}, /* @__PURE__ */
|
13458
|
+
}, /* @__PURE__ */ React87.createElement(Icon, {
|
12899
13459
|
icon: DIALOG_ICONS_AND_COLORS[type].icon,
|
12900
13460
|
color: DIALOG_ICONS_AND_COLORS[type].color,
|
12901
13461
|
fontSize: 20
|
12902
|
-
}), /* @__PURE__ */
|
13462
|
+
}), /* @__PURE__ */ React87.createElement(Modal.Title, {
|
12903
13463
|
id: labelledBy,
|
12904
13464
|
variant: "large",
|
12905
13465
|
color: DIALOG_ICONS_AND_COLORS[type].color
|
12906
|
-
}, title)), /* @__PURE__ */
|
13466
|
+
}, title)), /* @__PURE__ */ React87.createElement(Modal.Body, {
|
12907
13467
|
id: describedBy
|
12908
|
-
}, /* @__PURE__ */
|
13468
|
+
}, /* @__PURE__ */ React87.createElement(Typography2.Default, null, children)), /* @__PURE__ */ React87.createElement(Modal.Footer, null, /* @__PURE__ */ React87.createElement(Modal.Actions, null, secondaryAction && /* @__PURE__ */ React87.createElement(Button.Ghost, __spreadValues({
|
12909
13469
|
key: secondaryAction.text
|
12910
|
-
},
|
13470
|
+
}, omit11(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */ React87.createElement(Button.Secondary, __spreadValues({
|
12911
13471
|
key: primaryAction.text
|
12912
|
-
},
|
13472
|
+
}, omit11(primaryAction, "text")), primaryAction.text))));
|
12913
13473
|
};
|
12914
13474
|
|
12915
13475
|
// src/molecules/Drawer/Drawer.tsx
|
12916
|
-
import
|
13476
|
+
import React89 from "react";
|
12917
13477
|
import { useOverlayTriggerState as useOverlayTriggerState3 } from "react-stately";
|
12918
13478
|
import { useDialog as useDialog2 } from "@react-aria/dialog";
|
12919
13479
|
import { Overlay as Overlay3, useModalOverlay as useModalOverlay2 } from "@react-aria/overlays";
|
12920
|
-
import { useId as
|
13480
|
+
import { useId as useId13 } from "@react-aria/utils";
|
12921
13481
|
import { animated as animated5, useSpring as useSpring4 } from "@react-spring/web";
|
12922
13482
|
import castArray3 from "lodash/castArray";
|
12923
|
-
import
|
13483
|
+
import omit12 from "lodash/omit";
|
12924
13484
|
|
12925
13485
|
// src/molecules/Tabs/Tabs.tsx
|
12926
|
-
import
|
13486
|
+
import React88, { useEffect as useEffect8, useLayoutEffect as useLayoutEffect2, useRef as useRef10, useState as useState11 } from "react";
|
12927
13487
|
import isNumber5 from "lodash/isNumber";
|
12928
13488
|
import kebabCase from "lodash/kebabCase";
|
12929
|
-
var
|
12930
|
-
var
|
13489
|
+
var import_chevronLeft5 = __toESM(require_chevronLeft());
|
13490
|
+
var import_chevronRight5 = __toESM(require_chevronRight());
|
12931
13491
|
var import_warningSign4 = __toESM(require_warningSign());
|
12932
13492
|
var isTabComponent = (c) => {
|
12933
|
-
return
|
13493
|
+
return React88.isValidElement(c) && (c.type === Tab || c.type === ModalTab);
|
12934
13494
|
};
|
12935
|
-
var Tab =
|
13495
|
+
var Tab = React88.forwardRef(
|
12936
13496
|
({ className, id, title, children }, ref) => {
|
12937
|
-
return /* @__PURE__ */
|
13497
|
+
return /* @__PURE__ */ React88.createElement("div", {
|
12938
13498
|
ref,
|
12939
13499
|
id: `${id != null ? id : kebabCase(title)}-panel`,
|
12940
13500
|
className,
|
@@ -12946,14 +13506,14 @@ var Tab = React78.forwardRef(
|
|
12946
13506
|
);
|
12947
13507
|
var TabContainer = (_a) => {
|
12948
13508
|
var _b = _a, { className, children } = _b, rest = __objRest(_b, ["className", "children"]);
|
12949
|
-
return /* @__PURE__ */
|
13509
|
+
return /* @__PURE__ */ React88.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12950
13510
|
className: classNames("py-6 z-0", className)
|
12951
13511
|
}), children);
|
12952
13512
|
};
|
12953
13513
|
var ModalTab = Tab;
|
12954
13514
|
var ModalTabContainer = TabContainer;
|
12955
13515
|
var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
12956
|
-
const Tab2 =
|
13516
|
+
const Tab2 = React88.forwardRef(
|
12957
13517
|
(_a, ref) => {
|
12958
13518
|
var _b = _a, {
|
12959
13519
|
id,
|
@@ -12985,17 +13545,17 @@ var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
|
12985
13545
|
const _id = id != null ? id : kebabCase(title);
|
12986
13546
|
let statusIcon = void 0;
|
12987
13547
|
if (status === "warning") {
|
12988
|
-
statusIcon = /* @__PURE__ */
|
13548
|
+
statusIcon = /* @__PURE__ */ React88.createElement(InlineIcon, {
|
12989
13549
|
icon: import_warningSign4.default,
|
12990
13550
|
color: selected ? void 0 : "warning-default"
|
12991
13551
|
});
|
12992
13552
|
} else if (status === "error") {
|
12993
|
-
statusIcon = /* @__PURE__ */
|
13553
|
+
statusIcon = /* @__PURE__ */ React88.createElement(InlineIcon, {
|
12994
13554
|
icon: import_warningSign4.default,
|
12995
13555
|
color: selected ? void 0 : "danger-default"
|
12996
13556
|
});
|
12997
13557
|
}
|
12998
|
-
const tab = /* @__PURE__ */
|
13558
|
+
const tab = /* @__PURE__ */ React88.createElement(Component, __spreadValues({
|
12999
13559
|
ref,
|
13000
13560
|
id: `${_id}-tab`,
|
13001
13561
|
onClick: () => !disabled && onSelected(value != null ? value : index),
|
@@ -13012,29 +13572,29 @@ var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
|
13012
13572
|
"aria-selected": selected,
|
13013
13573
|
"aria-controls": `${_id}-panel`,
|
13014
13574
|
tabIndex: disabled ? void 0 : 0
|
13015
|
-
}, rest), /* @__PURE__ */
|
13575
|
+
}, rest), /* @__PURE__ */ React88.createElement(Typography2, {
|
13016
13576
|
htmlTag: "div",
|
13017
13577
|
variant: "small-strong",
|
13018
13578
|
color: selected ? "primary-default" : disabled ? "default" : "current",
|
13019
13579
|
className: tw("inline-flex items-center gap-3")
|
13020
|
-
}, showNotification ? /* @__PURE__ */
|
13580
|
+
}, showNotification ? /* @__PURE__ */ React88.createElement(Badge.Notification, {
|
13021
13581
|
right: "-4px",
|
13022
13582
|
top: "3px"
|
13023
|
-
}, /* @__PURE__ */
|
13583
|
+
}, /* @__PURE__ */ React88.createElement("span", {
|
13024
13584
|
className: tw("whitespace-nowrap")
|
13025
|
-
}, title)) : /* @__PURE__ */
|
13585
|
+
}, title)) : /* @__PURE__ */ React88.createElement("span", {
|
13026
13586
|
className: tw("whitespace-nowrap")
|
13027
|
-
}, title), isNumber5(badge) && /* @__PURE__ */
|
13587
|
+
}, title), isNumber5(badge) && /* @__PURE__ */ React88.createElement(Typography2, {
|
13028
13588
|
htmlTag: "span",
|
13029
13589
|
variant: "small",
|
13030
13590
|
color: selected ? "primary-intense" : "grey-5",
|
13031
13591
|
className: "leading-none"
|
13032
|
-
}, /* @__PURE__ */
|
13592
|
+
}, /* @__PURE__ */ React88.createElement(TabBadge, {
|
13033
13593
|
kind: "filled",
|
13034
13594
|
value: badge,
|
13035
13595
|
textClassname: classNames({ "text-white": selected, "text-muted": !selected })
|
13036
13596
|
})), statusIcon));
|
13037
|
-
return tooltip ? /* @__PURE__ */
|
13597
|
+
return tooltip ? /* @__PURE__ */ React88.createElement(Tooltip, {
|
13038
13598
|
content: tooltip
|
13039
13599
|
}, tab) : tab;
|
13040
13600
|
}
|
@@ -13048,7 +13608,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
13048
13608
|
const Tabs2 = (props) => {
|
13049
13609
|
var _a, _b;
|
13050
13610
|
const { className, value, defaultValue, onChange, children } = props;
|
13051
|
-
const childArr =
|
13611
|
+
const childArr = React88.Children.toArray(children);
|
13052
13612
|
const firstTab = childArr[0];
|
13053
13613
|
const firstTabValue = isTabComponent(firstTab) ? firstTab.props.value : -1;
|
13054
13614
|
const [selected, setSelected] = useState11((_b = (_a = value != null ? value : defaultValue) != null ? _a : firstTabValue) != null ? _b : 0);
|
@@ -13061,7 +13621,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
13061
13621
|
var _a2, _b2;
|
13062
13622
|
const container = containerRef.current;
|
13063
13623
|
const tabs = tabsRef.current;
|
13064
|
-
const values =
|
13624
|
+
const values = React88.Children.map(
|
13065
13625
|
children,
|
13066
13626
|
(tab, i) => {
|
13067
13627
|
var _a3;
|
@@ -13102,7 +13662,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
13102
13662
|
updateCarets();
|
13103
13663
|
setSelected(value);
|
13104
13664
|
revealSelectedTab({ smooth: value !== selected });
|
13105
|
-
}, [value,
|
13665
|
+
}, [value, React88.Children.count(children)]);
|
13106
13666
|
useLayoutEffect2(() => {
|
13107
13667
|
var _a2;
|
13108
13668
|
updateCarets();
|
@@ -13166,27 +13726,27 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
13166
13726
|
const handleSelected = (key) => {
|
13167
13727
|
(onChange != null ? onChange : setSelected)(key);
|
13168
13728
|
};
|
13169
|
-
|
13729
|
+
React88.Children.forEach(children, (c) => {
|
13170
13730
|
if (c && !isTabComponent(c)) {
|
13171
13731
|
throw new Error("<Tabs> can only have <Tabs.Tab> components as children");
|
13172
13732
|
}
|
13173
13733
|
});
|
13174
|
-
return /* @__PURE__ */
|
13734
|
+
return /* @__PURE__ */ React88.createElement("div", {
|
13175
13735
|
ref: parentRef,
|
13176
13736
|
className: classNames("Aquarium-Tabs", tw("h-full"), className)
|
13177
|
-
}, /* @__PURE__ */
|
13737
|
+
}, /* @__PURE__ */ React88.createElement("div", {
|
13178
13738
|
className: tw("relative flex items-center border-b-2 border-default")
|
13179
|
-
}, /* @__PURE__ */
|
13739
|
+
}, /* @__PURE__ */ React88.createElement("div", {
|
13180
13740
|
ref: containerRef,
|
13181
13741
|
className: tw("overflow-y-auto scrollbar-hide mb-[-2px] h-auto")
|
13182
|
-
}, /* @__PURE__ */
|
13742
|
+
}, /* @__PURE__ */ React88.createElement("div", {
|
13183
13743
|
ref: tabsRef,
|
13184
13744
|
role: "tablist",
|
13185
13745
|
"aria-label": "tabs",
|
13186
13746
|
className: tw("inline-flex items-center cursor-pointer font-normal h-full")
|
13187
|
-
},
|
13747
|
+
}, React88.Children.map(
|
13188
13748
|
children,
|
13189
|
-
(tab, index) => tab ? /* @__PURE__ */
|
13749
|
+
(tab, index) => tab ? /* @__PURE__ */ React88.createElement(TabItemComponent, __spreadProps(__spreadValues({
|
13190
13750
|
key: tab.props.value
|
13191
13751
|
}, tab.props), {
|
13192
13752
|
index,
|
@@ -13194,28 +13754,28 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
13194
13754
|
onKeyDown: handleKeyDown,
|
13195
13755
|
onSelected: handleSelected
|
13196
13756
|
})) : void 0
|
13197
|
-
))), leftCaret && /* @__PURE__ */
|
13757
|
+
))), leftCaret && /* @__PURE__ */ React88.createElement("div", {
|
13198
13758
|
className: tw("absolute left-0 bg-gradient-to-r from-white via-white z-20 py-3 pr-4")
|
13199
|
-
}, /* @__PURE__ */
|
13759
|
+
}, /* @__PURE__ */ React88.createElement("div", {
|
13200
13760
|
onClick: () => handleScrollToNext("left"),
|
13201
13761
|
className: tw("hover:bg-muted p-2 leading-none cursor-pointer")
|
13202
|
-
}, /* @__PURE__ */
|
13203
|
-
icon:
|
13204
|
-
}))), rightCaret && /* @__PURE__ */
|
13762
|
+
}, /* @__PURE__ */ React88.createElement(InlineIcon, {
|
13763
|
+
icon: import_chevronLeft5.default
|
13764
|
+
}))), rightCaret && /* @__PURE__ */ React88.createElement("div", {
|
13205
13765
|
onClick: () => handleScrollToNext("right"),
|
13206
13766
|
className: tw("absolute right-0 bg-gradient-to-l from-white via-white z-20 py-3 pl-4")
|
13207
|
-
}, /* @__PURE__ */
|
13767
|
+
}, /* @__PURE__ */ React88.createElement("div", {
|
13208
13768
|
onClick: () => handleScrollToNext("right"),
|
13209
13769
|
className: tw("hover:bg-muted p-2 leading-none cursor-pointer")
|
13210
|
-
}, /* @__PURE__ */
|
13211
|
-
icon:
|
13770
|
+
}, /* @__PURE__ */ React88.createElement(InlineIcon, {
|
13771
|
+
icon: import_chevronRight5.default
|
13212
13772
|
})))), renderChildren(children, selected, props));
|
13213
13773
|
};
|
13214
13774
|
Tabs2.displayName = displayName;
|
13215
13775
|
Tabs2.Tab = TabComponent;
|
13216
13776
|
return Tabs2;
|
13217
13777
|
};
|
13218
|
-
var Tabs = createTabsComponent(Tab, TabItem, "Tabs", (children, selected) => /* @__PURE__ */
|
13778
|
+
var Tabs = createTabsComponent(Tab, TabItem, "Tabs", (children, selected) => /* @__PURE__ */ React88.createElement(TabContainer, null, children.find(
|
13219
13779
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
13220
13780
|
)));
|
13221
13781
|
|
@@ -13232,8 +13792,8 @@ var WIDTHS = {
|
|
13232
13792
|
var Drawer = (_a) => {
|
13233
13793
|
var _b = _a, { open, closeOnEsc = true } = _b, props = __objRest(_b, ["open", "closeOnEsc"]);
|
13234
13794
|
const { onClose, size = "sm", portalContainer } = props;
|
13235
|
-
const [hidden, setHidden] =
|
13236
|
-
const ref =
|
13795
|
+
const [hidden, setHidden] = React89.useState(!open);
|
13796
|
+
const ref = React89.useRef(null);
|
13237
13797
|
const state = useOverlayTriggerState3({ isOpen: !hidden, onOpenChange: (isOpen) => !isOpen && onClose() });
|
13238
13798
|
if (open && hidden) {
|
13239
13799
|
setHidden(!open);
|
@@ -13260,21 +13820,21 @@ var Drawer = (_a) => {
|
|
13260
13820
|
if (!state.isOpen) {
|
13261
13821
|
return null;
|
13262
13822
|
}
|
13263
|
-
return /* @__PURE__ */
|
13823
|
+
return /* @__PURE__ */ React89.createElement(Overlay3, {
|
13264
13824
|
portalContainer
|
13265
|
-
}, /* @__PURE__ */
|
13825
|
+
}, /* @__PURE__ */ React89.createElement(Modal, {
|
13266
13826
|
kind: "drawer",
|
13267
13827
|
className: "Aquarium-Drawer overflow-x-hidden",
|
13268
13828
|
open: true
|
13269
|
-
}, /* @__PURE__ */
|
13829
|
+
}, /* @__PURE__ */ React89.createElement(AnimatedBackDrop, __spreadValues({
|
13270
13830
|
style: { opacity }
|
13271
|
-
}, underlayProps)), /* @__PURE__ */
|
13831
|
+
}, underlayProps)), /* @__PURE__ */ React89.createElement(DrawerWrapper, __spreadProps(__spreadValues(__spreadValues({
|
13272
13832
|
ref
|
13273
13833
|
}, props), modalProps), {
|
13274
13834
|
spring: { right }
|
13275
13835
|
}))));
|
13276
13836
|
};
|
13277
|
-
var DrawerWrapper =
|
13837
|
+
var DrawerWrapper = React89.forwardRef(
|
13278
13838
|
(_a, ref) => {
|
13279
13839
|
var _b = _a, {
|
13280
13840
|
title,
|
@@ -13304,83 +13864,83 @@ var DrawerWrapper = React79.forwardRef(
|
|
13304
13864
|
"menuAriaLabel"
|
13305
13865
|
]);
|
13306
13866
|
var _a2;
|
13307
|
-
const labelledBy =
|
13308
|
-
const describedBy =
|
13867
|
+
const labelledBy = useId13();
|
13868
|
+
const describedBy = useId13();
|
13309
13869
|
const { dialogProps } = useDialog2(
|
13310
13870
|
{ "role": "dialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
13311
13871
|
ref
|
13312
13872
|
);
|
13313
13873
|
const dialogSize = size === "lg" ? "full" : size;
|
13314
|
-
const childElements =
|
13874
|
+
const childElements = React89.Children.toArray(children).filter(React89.isValidElement);
|
13315
13875
|
const onlyChild = childElements.length === 1 ? childElements[0] : null;
|
13316
13876
|
const hasTabs = isComponentType(onlyChild, Tabs);
|
13317
|
-
return /* @__PURE__ */
|
13877
|
+
return /* @__PURE__ */ React89.createElement(AnimatedDialog, __spreadProps(__spreadValues(__spreadValues({
|
13318
13878
|
ref,
|
13319
13879
|
kind: "drawer",
|
13320
13880
|
"aria-modal": "true",
|
13321
13881
|
size: dialogSize
|
13322
13882
|
}, props), dialogProps), {
|
13323
13883
|
style: { position: "fixed", right: spring.right }
|
13324
|
-
}), /* @__PURE__ */
|
13884
|
+
}), /* @__PURE__ */ React89.createElement(Modal.CloseButtonContainer, null, /* @__PURE__ */ React89.createElement(Button.Icon, {
|
13325
13885
|
"aria-label": "Close",
|
13326
13886
|
icon: import_cross6.default,
|
13327
13887
|
onClick: onClose
|
13328
|
-
})), /* @__PURE__ */
|
13888
|
+
})), /* @__PURE__ */ React89.createElement(Modal.Header, {
|
13329
13889
|
className: tw({ "pb-3": hasTabs })
|
13330
|
-
}, /* @__PURE__ */
|
13890
|
+
}, /* @__PURE__ */ React89.createElement(Modal.Title, {
|
13331
13891
|
id: labelledBy,
|
13332
13892
|
kind: "drawer"
|
13333
|
-
}, title)), hasTabs ? /* @__PURE__ */
|
13893
|
+
}, title)), hasTabs ? /* @__PURE__ */ React89.createElement(DrawerTabs, __spreadProps(__spreadValues({}, onlyChild.props), {
|
13334
13894
|
className: tw("[&>div:first-child]:px-5 grow flex flex-col overflow-y-auto")
|
13335
|
-
})) : /* @__PURE__ */
|
13895
|
+
})) : /* @__PURE__ */ React89.createElement(Modal.Body, {
|
13336
13896
|
id: describedBy,
|
13337
13897
|
tabIndex: 0,
|
13338
13898
|
noFooter: !(secondaryActions || primaryAction)
|
13339
|
-
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */
|
13899
|
+
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */ React89.createElement(Modal.Footer, null, /* @__PURE__ */ React89.createElement(Modal.Actions, {
|
13340
13900
|
className: size === "sm" ? tw("flex-col") : void 0
|
13341
|
-
}, size !== "sm" && menu && /* @__PURE__ */
|
13901
|
+
}, size !== "sm" && menu && /* @__PURE__ */ React89.createElement(Box.Flex, {
|
13342
13902
|
alignItems: "center"
|
13343
|
-
}, /* @__PURE__ */
|
13903
|
+
}, /* @__PURE__ */ React89.createElement(DropdownMenu2, {
|
13344
13904
|
onAction: (action) => onAction == null ? void 0 : onAction(action),
|
13345
13905
|
onOpenChange: onMenuOpenChange
|
13346
|
-
}, /* @__PURE__ */
|
13906
|
+
}, /* @__PURE__ */ React89.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React89.createElement(Button.Icon, {
|
13347
13907
|
"aria-label": (_a2 = menuAriaLabel != null ? menuAriaLabel : menuLabel) != null ? _a2 : "Context menu",
|
13348
13908
|
icon: import_more4.default
|
13349
13909
|
})), menu)), secondaryActions && castArray3(secondaryActions).filter(Boolean).map((_b2) => {
|
13350
13910
|
var _c = _b2, { text } = _c, action = __objRest(_c, ["text"]);
|
13351
|
-
return /* @__PURE__ */
|
13911
|
+
return /* @__PURE__ */ React89.createElement(Button.Secondary, __spreadValues({
|
13352
13912
|
key: text
|
13353
13913
|
}, action), text);
|
13354
|
-
}), primaryAction && /* @__PURE__ */
|
13914
|
+
}), primaryAction && /* @__PURE__ */ React89.createElement(Button.Primary, __spreadValues({
|
13355
13915
|
key: primaryAction.text
|
13356
|
-
},
|
13916
|
+
}, omit12(primaryAction, "text")), primaryAction.text))));
|
13357
13917
|
}
|
13358
13918
|
);
|
13359
|
-
var DrawerTabs = createTabsComponent(ModalTab, TabItem, "DrawerTabs", (children, selected) => /* @__PURE__ */
|
13919
|
+
var DrawerTabs = createTabsComponent(ModalTab, TabItem, "DrawerTabs", (children, selected) => /* @__PURE__ */ React89.createElement(Modal.Body, {
|
13360
13920
|
className: tw("h-full")
|
13361
|
-
}, /* @__PURE__ */
|
13921
|
+
}, /* @__PURE__ */ React89.createElement(ModalTabContainer, null, children.find(
|
13362
13922
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
13363
13923
|
))));
|
13364
13924
|
|
13365
13925
|
// src/molecules/Dropdown/Dropdown.tsx
|
13366
|
-
import
|
13926
|
+
import React92 from "react";
|
13367
13927
|
|
13368
13928
|
// src/molecules/Popover/Popover.tsx
|
13369
|
-
import
|
13929
|
+
import React91, { useRef as useRef11 } from "react";
|
13370
13930
|
import { PressResponder as PressResponder2, usePress as usePress2 } from "@react-aria/interactions";
|
13371
13931
|
import { useOverlayTrigger } from "@react-aria/overlays";
|
13372
13932
|
import { mergeProps as mergeProps3 } from "@react-aria/utils";
|
13373
13933
|
import { useOverlayTriggerState as useOverlayTriggerState4 } from "@react-stately/overlays";
|
13374
13934
|
import classNames10 from "classnames";
|
13375
|
-
import
|
13935
|
+
import omit13 from "lodash/omit";
|
13376
13936
|
|
13377
13937
|
// src/molecules/Popover/Dialog.tsx
|
13378
|
-
import
|
13938
|
+
import React90 from "react";
|
13379
13939
|
import { useDialog as useDialog3 } from "@react-aria/dialog";
|
13380
|
-
var
|
13381
|
-
const ref =
|
13940
|
+
var Dialog3 = ({ children }) => {
|
13941
|
+
const ref = React90.useRef(null);
|
13382
13942
|
const { dialogProps } = useDialog3({}, ref);
|
13383
|
-
return /* @__PURE__ */
|
13943
|
+
return /* @__PURE__ */ React90.createElement("div", __spreadProps(__spreadValues({
|
13384
13944
|
ref
|
13385
13945
|
}, dialogProps), {
|
13386
13946
|
className: tw("outline-none")
|
@@ -13389,9 +13949,9 @@ var Dialog2 = ({ children }) => {
|
|
13389
13949
|
|
13390
13950
|
// src/molecules/Popover/PopoverContext.tsx
|
13391
13951
|
import { createContext as createContext4, useContext as useContext7 } from "react";
|
13392
|
-
var
|
13952
|
+
var PopoverContext2 = createContext4(null);
|
13393
13953
|
var usePopoverContext = () => {
|
13394
|
-
const ctx = useContext7(
|
13954
|
+
const ctx = useContext7(PopoverContext2);
|
13395
13955
|
if (ctx === null) {
|
13396
13956
|
throw new Error("PopoverContext was used outside of provider.");
|
13397
13957
|
}
|
@@ -13399,7 +13959,7 @@ var usePopoverContext = () => {
|
|
13399
13959
|
};
|
13400
13960
|
|
13401
13961
|
// src/molecules/Popover/Popover.tsx
|
13402
|
-
var
|
13962
|
+
var Popover3 = (props) => {
|
13403
13963
|
const {
|
13404
13964
|
id,
|
13405
13965
|
type,
|
@@ -13420,22 +13980,22 @@ var Popover2 = (props) => {
|
|
13420
13980
|
}
|
13421
13981
|
}));
|
13422
13982
|
const { triggerProps, overlayProps } = useOverlayTrigger({ type: type != null ? type : "dialog" }, state, triggerRef);
|
13423
|
-
return /* @__PURE__ */
|
13983
|
+
return /* @__PURE__ */ React91.createElement(PopoverContext2.Provider, {
|
13424
13984
|
value: {
|
13425
13985
|
state
|
13426
13986
|
}
|
13427
|
-
},
|
13428
|
-
if (isComponentType(child,
|
13429
|
-
return /* @__PURE__ */
|
13987
|
+
}, React91.Children.map(props.children, (child) => {
|
13988
|
+
if (isComponentType(child, Popover3.Trigger)) {
|
13989
|
+
return /* @__PURE__ */ React91.createElement(PressResponder2, __spreadValues({
|
13430
13990
|
ref: triggerRef
|
13431
|
-
},
|
13991
|
+
}, omit13(triggerProps, "aria-expanded")), /* @__PURE__ */ React91.createElement(PopoverTriggerWrapper, {
|
13432
13992
|
"data-testid": props["data-testid"],
|
13433
13993
|
"aria-controls": id,
|
13434
13994
|
"aria-expanded": triggerProps["aria-expanded"]
|
13435
13995
|
}, child.props.children));
|
13436
13996
|
}
|
13437
|
-
if (isComponentType(child,
|
13438
|
-
return state.isOpen && /* @__PURE__ */
|
13997
|
+
if (isComponentType(child, Popover3.Panel)) {
|
13998
|
+
return state.isOpen && /* @__PURE__ */ React91.createElement(PopoverOverlay, __spreadValues({
|
13439
13999
|
triggerRef: targetRef != null ? targetRef : triggerRef,
|
13440
14000
|
state,
|
13441
14001
|
placement,
|
@@ -13446,17 +14006,17 @@ var Popover2 = (props) => {
|
|
13446
14006
|
offset,
|
13447
14007
|
crossOffset,
|
13448
14008
|
shouldFlip
|
13449
|
-
}, overlayProps), containFocus ? /* @__PURE__ */
|
14009
|
+
}, overlayProps), containFocus ? /* @__PURE__ */ React91.createElement(Dialog3, null, child.props.children) : child.props.children);
|
13450
14010
|
}
|
13451
14011
|
throw new Error("Invalid children element type");
|
13452
14012
|
}));
|
13453
14013
|
};
|
13454
14014
|
var Trigger = () => null;
|
13455
14015
|
Trigger.displayName = "Popover.Trigger";
|
13456
|
-
|
14016
|
+
Popover3.Trigger = Trigger;
|
13457
14017
|
var Panel = () => null;
|
13458
14018
|
Panel.displayName = "Popover.Panel";
|
13459
|
-
|
14019
|
+
Popover3.Panel = Panel;
|
13460
14020
|
var asPopoverButton = (Component, displayName) => {
|
13461
14021
|
const PopoverButton2 = (props) => {
|
13462
14022
|
const { onClick } = props;
|
@@ -13465,7 +14025,7 @@ var asPopoverButton = (Component, displayName) => {
|
|
13465
14025
|
state.close();
|
13466
14026
|
onClick == null ? void 0 : onClick(e);
|
13467
14027
|
};
|
13468
|
-
return /* @__PURE__ */
|
14028
|
+
return /* @__PURE__ */ React91.createElement(Component, __spreadProps(__spreadValues({}, props), {
|
13469
14029
|
onClick: handleClick
|
13470
14030
|
}));
|
13471
14031
|
};
|
@@ -13473,14 +14033,14 @@ var asPopoverButton = (Component, displayName) => {
|
|
13473
14033
|
return PopoverButton2;
|
13474
14034
|
};
|
13475
14035
|
var PopoverButton = asPopoverButton(Button, "PopoverButton");
|
13476
|
-
|
14036
|
+
Popover3.Button = PopoverButton;
|
13477
14037
|
var PopoverTriggerWrapper = (_a) => {
|
13478
14038
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
13479
14039
|
var _a2;
|
13480
14040
|
const ref = useRef11(null);
|
13481
|
-
const trigger =
|
14041
|
+
const trigger = React91.Children.only(children);
|
13482
14042
|
const { pressProps } = usePress2(__spreadProps(__spreadValues({}, rest), { ref }));
|
13483
|
-
return
|
14043
|
+
return React91.cloneElement(trigger, __spreadProps(__spreadValues({
|
13484
14044
|
"ref": ref
|
13485
14045
|
}, mergeProps3(pressProps, trigger.props)), {
|
13486
14046
|
"aria-controls": (_a2 = rest["aria-controls"]) != null ? _a2 : pressProps["aria-controls"]
|
@@ -13489,10 +14049,10 @@ var PopoverTriggerWrapper = (_a) => {
|
|
13489
14049
|
|
13490
14050
|
// src/molecules/Dropdown/Dropdown.tsx
|
13491
14051
|
var Dropdown = ({ children, content, placement = "bottom-left" }) => {
|
13492
|
-
return /* @__PURE__ */
|
14052
|
+
return /* @__PURE__ */ React92.createElement(Popover3, {
|
13493
14053
|
type: "menu",
|
13494
14054
|
placement
|
13495
|
-
}, /* @__PURE__ */
|
14055
|
+
}, /* @__PURE__ */ React92.createElement(Popover3.Trigger, null, children), /* @__PURE__ */ React92.createElement(Popover3.Panel, {
|
13496
14056
|
className: "Aquarium-Dropdown"
|
13497
14057
|
}, content));
|
13498
14058
|
};
|
@@ -13503,26 +14063,26 @@ var DropdownMenu3 = ({
|
|
13503
14063
|
triggerId,
|
13504
14064
|
setClose = () => void 0
|
13505
14065
|
}) => {
|
13506
|
-
const menuRef =
|
13507
|
-
|
14066
|
+
const menuRef = React92.useRef(null);
|
14067
|
+
React92.useEffect(() => {
|
13508
14068
|
const id = setTimeout(() => {
|
13509
14069
|
var _a, _b, _c;
|
13510
14070
|
return (_c = (_b = (_a = menuRef.current) == null ? void 0 : _a.children) == null ? void 0 : _b[0]) == null ? void 0 : _c.focus();
|
13511
14071
|
});
|
13512
14072
|
return () => clearTimeout(id);
|
13513
14073
|
}, [menuRef.current]);
|
13514
|
-
return /* @__PURE__ */
|
14074
|
+
return /* @__PURE__ */ React92.createElement("div", {
|
13515
14075
|
style: { minWidth: "250px" },
|
13516
14076
|
className: tw("py-3 bg-popover-content")
|
13517
|
-
}, !!title && /* @__PURE__ */
|
14077
|
+
}, !!title && /* @__PURE__ */ React92.createElement("div", {
|
13518
14078
|
className: tw("px-4 py-4 text-left text-intense typography-default-strong")
|
13519
|
-
}, title), /* @__PURE__ */
|
14079
|
+
}, title), /* @__PURE__ */ React92.createElement("ol", {
|
13520
14080
|
role: "menu",
|
13521
14081
|
ref: menuRef,
|
13522
14082
|
id: contentId,
|
13523
14083
|
"aria-labelledby": triggerId
|
13524
|
-
},
|
13525
|
-
return
|
14084
|
+
}, React92.Children.map(children, (child) => {
|
14085
|
+
return React92.cloneElement(child, { setClose });
|
13526
14086
|
})));
|
13527
14087
|
};
|
13528
14088
|
var DropdownItem = (_a) => {
|
@@ -13577,10 +14137,10 @@ var DropdownItem = (_a) => {
|
|
13577
14137
|
handleSelect();
|
13578
14138
|
}
|
13579
14139
|
};
|
13580
|
-
const itemContent = /* @__PURE__ */
|
14140
|
+
const itemContent = /* @__PURE__ */ React92.createElement("div", {
|
13581
14141
|
className: tw("py-3 px-4")
|
13582
14142
|
}, children);
|
13583
|
-
return /* @__PURE__ */
|
14143
|
+
return /* @__PURE__ */ React92.createElement("li", __spreadProps(__spreadValues({
|
13584
14144
|
role: "menuitem",
|
13585
14145
|
tabIndex: -1,
|
13586
14146
|
onClick: handleClick,
|
@@ -13594,11 +14154,11 @@ var DropdownItem = (_a) => {
|
|
13594
14154
|
"text-danger-default": color === "danger" && !disabled
|
13595
14155
|
})
|
13596
14156
|
)
|
13597
|
-
}), tooltip ? /* @__PURE__ */
|
14157
|
+
}), tooltip ? /* @__PURE__ */ React92.createElement(Tooltip, {
|
13598
14158
|
content: tooltip,
|
13599
14159
|
placement: tooltipPlacement,
|
13600
14160
|
inline: false
|
13601
|
-
}, /* @__PURE__ */
|
14161
|
+
}, /* @__PURE__ */ React92.createElement("div", {
|
13602
14162
|
tabIndex: 0,
|
13603
14163
|
className: tw("grow")
|
13604
14164
|
}, itemContent)) : itemContent);
|
@@ -13607,7 +14167,7 @@ Dropdown.Menu = DropdownMenu3;
|
|
13607
14167
|
Dropdown.Item = DropdownItem;
|
13608
14168
|
|
13609
14169
|
// src/molecules/EmptyState/EmptyState.tsx
|
13610
|
-
import
|
14170
|
+
import React93 from "react";
|
13611
14171
|
var EmptyStateLayout = /* @__PURE__ */ ((EmptyStateLayout2) => {
|
13612
14172
|
EmptyStateLayout2["Vertical"] = "vertical";
|
13613
14173
|
EmptyStateLayout2["Horizontal"] = "horizontal";
|
@@ -13664,7 +14224,7 @@ var EmptyState = ({
|
|
13664
14224
|
fullHeight = isVerticalLayout(layout) ? true : false
|
13665
14225
|
}) => {
|
13666
14226
|
const template = layoutStyle(layout);
|
13667
|
-
return /* @__PURE__ */
|
14227
|
+
return /* @__PURE__ */ React93.createElement(Box, {
|
13668
14228
|
className: classNames(
|
13669
14229
|
"Aquarium-EmptyState",
|
13670
14230
|
tw("rounded p-[56px]", {
|
@@ -13677,39 +14237,39 @@ var EmptyState = ({
|
|
13677
14237
|
),
|
13678
14238
|
backgroundColor: "transparent",
|
13679
14239
|
borderColor: "default"
|
13680
|
-
}, /* @__PURE__ */
|
14240
|
+
}, /* @__PURE__ */ React93.createElement(Box.Flex, {
|
13681
14241
|
style: { gap: "56px" },
|
13682
14242
|
flexDirection: template.layout,
|
13683
14243
|
justifyContent: template.justifyContent,
|
13684
14244
|
alignItems: template.layout === "row" ? "center" : template.alignItems,
|
13685
14245
|
height: fullHeight ? "full" : void 0
|
13686
|
-
}, image && /* @__PURE__ */
|
14246
|
+
}, image && /* @__PURE__ */ React93.createElement("img", {
|
13687
14247
|
src: image,
|
13688
14248
|
alt: imageAlt,
|
13689
14249
|
style: { width: imageWidth ? `${imageWidth}px` : void 0, height: "auto" }
|
13690
|
-
}), /* @__PURE__ */
|
14250
|
+
}), /* @__PURE__ */ React93.createElement(Box.Flex, {
|
13691
14251
|
flexDirection: "column",
|
13692
14252
|
justifyContent: template.justifyContent,
|
13693
14253
|
alignItems: template.alignItems
|
13694
|
-
}, /* @__PURE__ */
|
14254
|
+
}, /* @__PURE__ */ React93.createElement(Typography2.Heading, {
|
13695
14255
|
htmlTag: "h2"
|
13696
|
-
}, title), (description || children) && /* @__PURE__ */
|
14256
|
+
}, title), (description || children) && /* @__PURE__ */ React93.createElement(Box, {
|
13697
14257
|
marginTop: "5"
|
13698
|
-
}, /* @__PURE__ */
|
14258
|
+
}, /* @__PURE__ */ React93.createElement(Typography2.Default, null, children || description)), (secondaryAction || primaryAction) && /* @__PURE__ */ React93.createElement(Box.Flex, {
|
13699
14259
|
marginTop: "7",
|
13700
14260
|
gap: "4",
|
13701
14261
|
justifyContent: "center",
|
13702
14262
|
alignItems: "center",
|
13703
14263
|
flexWrap: "wrap"
|
13704
|
-
}, primaryAction && renderAction({ kind: "primary", action: primaryAction }), secondaryAction && renderAction({ kind: "secondary", action: secondaryAction })), footer && /* @__PURE__ */
|
14264
|
+
}, primaryAction && renderAction({ kind: "primary", action: primaryAction }), secondaryAction && renderAction({ kind: "secondary", action: secondaryAction })), footer && /* @__PURE__ */ React93.createElement(Box, {
|
13705
14265
|
marginTop: "5"
|
13706
|
-
}, /* @__PURE__ */
|
14266
|
+
}, /* @__PURE__ */ React93.createElement(Typography2.Small, {
|
13707
14267
|
color: "default"
|
13708
14268
|
}, footer)))));
|
13709
14269
|
};
|
13710
14270
|
|
13711
14271
|
// src/molecules/Flexbox/FlexboxItem.tsx
|
13712
|
-
import
|
14272
|
+
import React94 from "react";
|
13713
14273
|
var FlexboxItem = Tailwindify(
|
13714
14274
|
({ htmlTag = "div", className, style, children, display, flex, grow, shrink, order, alignSelf }) => {
|
13715
14275
|
const hookStyle = useStyle({
|
@@ -13721,7 +14281,7 @@ var FlexboxItem = Tailwindify(
|
|
13721
14281
|
alignSelf
|
13722
14282
|
});
|
13723
14283
|
const HtmlElement = htmlTag;
|
13724
|
-
return /* @__PURE__ */
|
14284
|
+
return /* @__PURE__ */ React94.createElement(HtmlElement, {
|
13725
14285
|
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
13726
14286
|
className
|
13727
14287
|
}, children);
|
@@ -13729,7 +14289,7 @@ var FlexboxItem = Tailwindify(
|
|
13729
14289
|
);
|
13730
14290
|
|
13731
14291
|
// src/molecules/Grid/GridItem.tsx
|
13732
|
-
import
|
14292
|
+
import React95 from "react";
|
13733
14293
|
var GridItem2 = Tailwindify(
|
13734
14294
|
({
|
13735
14295
|
htmlTag = "div",
|
@@ -13760,7 +14320,7 @@ var GridItem2 = Tailwindify(
|
|
13760
14320
|
gridRowEnd: rowEnd
|
13761
14321
|
});
|
13762
14322
|
const HtmlElement = htmlTag;
|
13763
|
-
return /* @__PURE__ */
|
14323
|
+
return /* @__PURE__ */ React95.createElement(HtmlElement, {
|
13764
14324
|
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
13765
14325
|
className
|
13766
14326
|
}, children);
|
@@ -13768,7 +14328,7 @@ var GridItem2 = Tailwindify(
|
|
13768
14328
|
);
|
13769
14329
|
|
13770
14330
|
// src/molecules/LineClamp/LineClamp.tsx
|
13771
|
-
import
|
14331
|
+
import React96 from "react";
|
13772
14332
|
var LineClamp2 = ({
|
13773
14333
|
lines,
|
13774
14334
|
children,
|
@@ -13777,10 +14337,10 @@ var LineClamp2 = ({
|
|
13777
14337
|
collapseLabel,
|
13778
14338
|
onClampedChange
|
13779
14339
|
}) => {
|
13780
|
-
const ref =
|
13781
|
-
const [clamped, setClamped] =
|
13782
|
-
const [isClampingEnabled, setClampingEnabled] =
|
13783
|
-
|
14340
|
+
const ref = React96.useRef(null);
|
14341
|
+
const [clamped, setClamped] = React96.useState(true);
|
14342
|
+
const [isClampingEnabled, setClampingEnabled] = React96.useState(false);
|
14343
|
+
React96.useEffect(() => {
|
13784
14344
|
var _a, _b;
|
13785
14345
|
const el = ref.current;
|
13786
14346
|
setClampingEnabled(((_a = el == null ? void 0 : el.scrollHeight) != null ? _a : 0) > ((_b = el == null ? void 0 : el.clientHeight) != null ? _b : 0));
|
@@ -13789,28 +14349,28 @@ var LineClamp2 = ({
|
|
13789
14349
|
setClamped(!clamped);
|
13790
14350
|
onClampedChange == null ? void 0 : onClampedChange(!clamped);
|
13791
14351
|
};
|
13792
|
-
return /* @__PURE__ */
|
14352
|
+
return /* @__PURE__ */ React96.createElement("div", {
|
13793
14353
|
className: "Aquarium-LineClamp"
|
13794
|
-
}, /* @__PURE__ */
|
14354
|
+
}, /* @__PURE__ */ React96.createElement(LineClamp, {
|
13795
14355
|
ref,
|
13796
14356
|
lines,
|
13797
14357
|
clamped,
|
13798
14358
|
wordBreak
|
13799
|
-
}, children), expandLabel && isClampingEnabled && /* @__PURE__ */
|
14359
|
+
}, children), expandLabel && isClampingEnabled && /* @__PURE__ */ React96.createElement(Button.Ghost, {
|
13800
14360
|
dense: true,
|
13801
14361
|
onClick: handleClampedChange
|
13802
14362
|
}, clamped ? expandLabel : collapseLabel));
|
13803
14363
|
};
|
13804
14364
|
|
13805
14365
|
// src/molecules/Link/Link.tsx
|
13806
|
-
import
|
14366
|
+
import React98 from "react";
|
13807
14367
|
import classNames11 from "classnames";
|
13808
14368
|
|
13809
14369
|
// src/atoms/Link/Link.tsx
|
13810
|
-
import
|
14370
|
+
import React97 from "react";
|
13811
14371
|
var Link = (_a) => {
|
13812
14372
|
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
13813
|
-
return /* @__PURE__ */
|
14373
|
+
return /* @__PURE__ */ React97.createElement("a", __spreadValues({
|
13814
14374
|
className: classNames(className, linkStyle)
|
13815
14375
|
}, props), children);
|
13816
14376
|
};
|
@@ -13818,27 +14378,27 @@ var Link = (_a) => {
|
|
13818
14378
|
// src/molecules/Link/Link.tsx
|
13819
14379
|
var Link2 = (_a) => {
|
13820
14380
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
13821
|
-
return /* @__PURE__ */
|
14381
|
+
return /* @__PURE__ */ React98.createElement(Link, __spreadValues({
|
13822
14382
|
className: classNames11("Aquarium-Link", className)
|
13823
14383
|
}, props));
|
13824
14384
|
};
|
13825
14385
|
|
13826
14386
|
// src/molecules/List/useStaticInfiniteList.ts
|
13827
|
-
import
|
14387
|
+
import React99 from "react";
|
13828
14388
|
var useStaticInfiniteList = ({
|
13829
14389
|
items,
|
13830
14390
|
pageSize,
|
13831
14391
|
autoReset = true
|
13832
14392
|
}) => {
|
13833
|
-
const [currentPage, setCurrentPage] =
|
14393
|
+
const [currentPage, setCurrentPage] = React99.useState(1);
|
13834
14394
|
const numberOfVisible = currentPage * pageSize;
|
13835
|
-
const next =
|
14395
|
+
const next = React99.useCallback(() => {
|
13836
14396
|
setCurrentPage((page) => page + 1);
|
13837
14397
|
}, [setCurrentPage]);
|
13838
|
-
const reset =
|
14398
|
+
const reset = React99.useCallback(() => {
|
13839
14399
|
setCurrentPage(1);
|
13840
14400
|
}, [setCurrentPage]);
|
13841
|
-
|
14401
|
+
React99.useEffect(() => {
|
13842
14402
|
if (autoReset) {
|
13843
14403
|
setCurrentPage(1);
|
13844
14404
|
}
|
@@ -13853,17 +14413,17 @@ var useStaticInfiniteList = ({
|
|
13853
14413
|
};
|
13854
14414
|
|
13855
14415
|
// src/molecules/ListItem/ListItem.tsx
|
13856
|
-
import
|
14416
|
+
import React100 from "react";
|
13857
14417
|
var ListItem = ({ name, icon, active = false }) => {
|
13858
|
-
return /* @__PURE__ */
|
14418
|
+
return /* @__PURE__ */ React100.createElement(Box.Flex, {
|
13859
14419
|
className: "Aquarium-ListItem",
|
13860
14420
|
alignItems: "center"
|
13861
|
-
}, /* @__PURE__ */
|
14421
|
+
}, /* @__PURE__ */ React100.createElement(Typography2, {
|
13862
14422
|
variant: active ? "small-strong" : "small",
|
13863
14423
|
color: "default",
|
13864
14424
|
htmlTag: "span",
|
13865
14425
|
className: `px-4 py-2 rounded-full ${active ? "bg-default" : "hover:bg-muted"}`
|
13866
|
-
}, /* @__PURE__ */
|
14426
|
+
}, /* @__PURE__ */ React100.createElement("img", {
|
13867
14427
|
src: icon,
|
13868
14428
|
alt: "",
|
13869
14429
|
className: "inline mr-4",
|
@@ -13873,18 +14433,18 @@ var ListItem = ({ name, icon, active = false }) => {
|
|
13873
14433
|
};
|
13874
14434
|
|
13875
14435
|
// src/molecules/Modal/Modal.tsx
|
13876
|
-
import
|
14436
|
+
import React101 from "react";
|
13877
14437
|
import { useDialog as useDialog4 } from "@react-aria/dialog";
|
13878
14438
|
import { Overlay as Overlay4, useModalOverlay as useModalOverlay3 } from "@react-aria/overlays";
|
13879
|
-
import { useId as
|
14439
|
+
import { useId as useId14 } from "@react-aria/utils";
|
13880
14440
|
import { useOverlayTriggerState as useOverlayTriggerState5 } from "@react-stately/overlays";
|
13881
14441
|
import castArray4 from "lodash/castArray";
|
13882
|
-
import
|
14442
|
+
import omit14 from "lodash/omit";
|
13883
14443
|
var import_cross7 = __toESM(require_cross());
|
13884
14444
|
var Modal2 = (_a) => {
|
13885
14445
|
var _b = _a, { closeOnEsc = true } = _b, props = __objRest(_b, ["closeOnEsc"]);
|
13886
14446
|
const { open, onClose, size, portalContainer } = props;
|
13887
|
-
const ref =
|
14447
|
+
const ref = React101.useRef(null);
|
13888
14448
|
const state = useOverlayTriggerState5({ isOpen: open, onOpenChange: (isOpen) => !isOpen && onClose() });
|
13889
14449
|
const { modalProps, underlayProps } = useModalOverlay3(
|
13890
14450
|
{ isDismissable: false, isKeyboardDismissDisabled: !closeOnEsc },
|
@@ -13894,75 +14454,75 @@ var Modal2 = (_a) => {
|
|
13894
14454
|
if (!state.isOpen) {
|
13895
14455
|
return null;
|
13896
14456
|
}
|
13897
|
-
return /* @__PURE__ */
|
14457
|
+
return /* @__PURE__ */ React101.createElement(Overlay4, {
|
13898
14458
|
portalContainer
|
13899
|
-
}, /* @__PURE__ */
|
14459
|
+
}, /* @__PURE__ */ React101.createElement(Modal, {
|
13900
14460
|
className: "Aquarium-Modal",
|
13901
14461
|
open: true
|
13902
|
-
}, /* @__PURE__ */
|
14462
|
+
}, /* @__PURE__ */ React101.createElement(Modal.BackDrop, __spreadValues({}, underlayProps)), /* @__PURE__ */ React101.createElement(ModalWrapper, __spreadValues(__spreadValues({
|
13903
14463
|
ref,
|
13904
14464
|
size
|
13905
14465
|
}, props), modalProps))));
|
13906
14466
|
};
|
13907
|
-
var ModalWrapper =
|
14467
|
+
var ModalWrapper = React101.forwardRef(
|
13908
14468
|
(_a, ref) => {
|
13909
14469
|
var _b = _a, { title, subtitle, headerImage, primaryAction, secondaryActions, children, onClose } = _b, props = __objRest(_b, ["title", "subtitle", "headerImage", "primaryAction", "secondaryActions", "children", "onClose"]);
|
13910
|
-
const labelledBy =
|
13911
|
-
const describedBy =
|
14470
|
+
const labelledBy = useId14();
|
14471
|
+
const describedBy = useId14();
|
13912
14472
|
const { dialogProps } = useDialog4(
|
13913
14473
|
{ "role": "dialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
13914
14474
|
ref
|
13915
14475
|
);
|
13916
|
-
return /* @__PURE__ */
|
14476
|
+
return /* @__PURE__ */ React101.createElement(Modal.Dialog, __spreadProps(__spreadValues(__spreadValues({
|
13917
14477
|
ref
|
13918
14478
|
}, props), dialogProps), {
|
13919
14479
|
tabIndex: -1
|
13920
|
-
}), /* @__PURE__ */
|
14480
|
+
}), /* @__PURE__ */ React101.createElement(Modal.CloseButtonContainer, null, /* @__PURE__ */ React101.createElement(IconButton, {
|
13921
14481
|
"aria-label": "Close",
|
13922
14482
|
icon: import_cross7.default,
|
13923
14483
|
onClick: onClose
|
13924
|
-
})), headerImage !== void 0 && /* @__PURE__ */
|
14484
|
+
})), headerImage !== void 0 && /* @__PURE__ */ React101.createElement(Modal.HeaderImage, {
|
13925
14485
|
backgroundImage: headerImage
|
13926
|
-
}), /* @__PURE__ */
|
14486
|
+
}), /* @__PURE__ */ React101.createElement(Modal.Header, {
|
13927
14487
|
className: tw({ "pb-3": isComponentType(children, ModalTabs) })
|
13928
|
-
}, /* @__PURE__ */
|
14488
|
+
}, /* @__PURE__ */ React101.createElement(Modal.TitleContainer, null, /* @__PURE__ */ React101.createElement(Modal.Title, {
|
13929
14489
|
id: labelledBy
|
13930
|
-
}, title), subtitle && /* @__PURE__ */
|
14490
|
+
}, title), subtitle && /* @__PURE__ */ React101.createElement(Modal.Subtitle, null, subtitle))), isComponentType(children, ModalTabs) ? React101.cloneElement(children, { className: tw("[&>div:first-child]:px-5 grow") }) : /* @__PURE__ */ React101.createElement(Modal.Body, {
|
13931
14491
|
id: describedBy,
|
13932
14492
|
tabIndex: 0,
|
13933
14493
|
noFooter: !(secondaryActions || primaryAction)
|
13934
|
-
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */
|
14494
|
+
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */ React101.createElement(Modal.Footer, null, /* @__PURE__ */ React101.createElement(Modal.Actions, null, secondaryActions && castArray4(secondaryActions).filter(Boolean).map((_a2) => {
|
13935
14495
|
var _b2 = _a2, { text } = _b2, action = __objRest(_b2, ["text"]);
|
13936
|
-
return /* @__PURE__ */
|
14496
|
+
return /* @__PURE__ */ React101.createElement(Button.Secondary, __spreadValues({
|
13937
14497
|
key: text
|
13938
14498
|
}, action), text);
|
13939
|
-
}), primaryAction && /* @__PURE__ */
|
14499
|
+
}), primaryAction && /* @__PURE__ */ React101.createElement(Button.Primary, __spreadValues({
|
13940
14500
|
key: primaryAction.text
|
13941
|
-
},
|
14501
|
+
}, omit14(primaryAction, "text")), primaryAction.text))));
|
13942
14502
|
}
|
13943
14503
|
);
|
13944
14504
|
var ModalTabs = createTabsComponent(
|
13945
14505
|
ModalTab,
|
13946
14506
|
TabItem,
|
13947
14507
|
"ModalTabs",
|
13948
|
-
(children, selected, props) => /* @__PURE__ */
|
14508
|
+
(children, selected, props) => /* @__PURE__ */ React101.createElement(Modal.Body, {
|
13949
14509
|
maxHeight: props.maxHeight
|
13950
|
-
}, /* @__PURE__ */
|
14510
|
+
}, /* @__PURE__ */ React101.createElement(ModalTabContainer, null, children.find(
|
13951
14511
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
13952
14512
|
)))
|
13953
14513
|
);
|
13954
14514
|
|
13955
14515
|
// src/molecules/MultiInput/MultiInput.tsx
|
13956
|
-
import
|
13957
|
-
import { useId as
|
14516
|
+
import React103, { useEffect as useEffect9, useRef as useRef12, useState as useState12 } from "react";
|
14517
|
+
import { useId as useId15 } from "@react-aria/utils";
|
13958
14518
|
import castArray5 from "lodash/castArray";
|
13959
14519
|
import identity from "lodash/identity";
|
13960
|
-
import
|
14520
|
+
import omit15 from "lodash/omit";
|
13961
14521
|
|
13962
14522
|
// src/molecules/MultiInput/InputChip.tsx
|
13963
|
-
import
|
14523
|
+
import React102 from "react";
|
13964
14524
|
var import_smallCross3 = __toESM(require_smallCross());
|
13965
|
-
var InputChip =
|
14525
|
+
var InputChip = React102.forwardRef(
|
13966
14526
|
(_a, ref) => {
|
13967
14527
|
var _b = _a, { invalid = false, disabled, readOnly, className, onClick: _onClick, children } = _b, props = __objRest(_b, ["invalid", "disabled", "readOnly", "className", "onClick", "children"]);
|
13968
14528
|
const onClick = (e) => {
|
@@ -13970,18 +14530,18 @@ var InputChip = React92.forwardRef(
|
|
13970
14530
|
_onClick == null ? void 0 : _onClick(e);
|
13971
14531
|
}
|
13972
14532
|
};
|
13973
|
-
return /* @__PURE__ */
|
14533
|
+
return /* @__PURE__ */ React102.createElement("div", {
|
13974
14534
|
className: classNames(className, "inline-flex align-middle mx-1 items-stretch rounded-sm break-all", {
|
13975
14535
|
"bg-status-danger ": invalid,
|
13976
14536
|
"bg-muted ": !invalid && !disabled,
|
13977
14537
|
"bg-default": disabled
|
13978
14538
|
})
|
13979
|
-
}, /* @__PURE__ */
|
14539
|
+
}, /* @__PURE__ */ React102.createElement("div", {
|
13980
14540
|
className: tw("px-2 py-1")
|
13981
|
-
}, /* @__PURE__ */
|
14541
|
+
}, /* @__PURE__ */ React102.createElement(Typography2, {
|
13982
14542
|
variant: "small",
|
13983
14543
|
color: invalid ? "warning-default" : disabled ? "inactive" : "default"
|
13984
|
-
}, children)), !readOnly && /* @__PURE__ */
|
14544
|
+
}, children)), !readOnly && /* @__PURE__ */ React102.createElement("div", __spreadProps(__spreadValues({
|
13985
14545
|
ref
|
13986
14546
|
}, props), {
|
13987
14547
|
onClick,
|
@@ -13992,7 +14552,7 @@ var InputChip = React92.forwardRef(
|
|
13992
14552
|
}),
|
13993
14553
|
role: "button",
|
13994
14554
|
"aria-label": `Remove ${String(children)}`
|
13995
|
-
}), !disabled && /* @__PURE__ */
|
14555
|
+
}), !disabled && /* @__PURE__ */ React102.createElement(Icon, {
|
13996
14556
|
icon: import_smallCross3.default,
|
13997
14557
|
className: tw({
|
13998
14558
|
"text-danger-default": invalid,
|
@@ -14133,7 +14693,7 @@ var MultiInputBase = (_a) => {
|
|
14133
14693
|
};
|
14134
14694
|
const renderChips = () => items == null ? void 0 : items.map((item, index) => {
|
14135
14695
|
var _a3;
|
14136
|
-
return /* @__PURE__ */
|
14696
|
+
return /* @__PURE__ */ React103.createElement(InputChip, {
|
14137
14697
|
key: `${itemToString(item)}.${index}`,
|
14138
14698
|
invalid: !((_a3 = isItemValid == null ? void 0 : isItemValid(item, index)) != null ? _a3 : true),
|
14139
14699
|
readOnly,
|
@@ -14144,13 +14704,13 @@ var MultiInputBase = (_a) => {
|
|
14144
14704
|
}
|
14145
14705
|
}, itemToString(item));
|
14146
14706
|
});
|
14147
|
-
return /* @__PURE__ */
|
14707
|
+
return /* @__PURE__ */ React103.createElement("div", {
|
14148
14708
|
className: "Aquarium-MultiInputBase"
|
14149
|
-
}, /* @__PURE__ */
|
14709
|
+
}, /* @__PURE__ */ React103.createElement(Select.InputContainer, {
|
14150
14710
|
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default"
|
14151
|
-
}, /* @__PURE__ */
|
14711
|
+
}, /* @__PURE__ */ React103.createElement("div", {
|
14152
14712
|
className: "grow inline-flex flex-row flex-wrap gap-y-2"
|
14153
|
-
}, inline && renderChips(), /* @__PURE__ */
|
14713
|
+
}, inline && renderChips(), /* @__PURE__ */ React103.createElement(Select.Input, __spreadProps(__spreadValues({
|
14154
14714
|
ref: inputRef,
|
14155
14715
|
id: id != null ? id : name,
|
14156
14716
|
name,
|
@@ -14168,11 +14728,11 @@ var MultiInputBase = (_a) => {
|
|
14168
14728
|
onFocus: handleFocus,
|
14169
14729
|
onBlur: handleBlur,
|
14170
14730
|
autoComplete: "off"
|
14171
|
-
}))), endAdornment && /* @__PURE__ */
|
14731
|
+
}))), endAdornment && /* @__PURE__ */ React103.createElement(InputAdornment, null, endAdornment)), !inline && /* @__PURE__ */ React103.createElement("div", {
|
14172
14732
|
className: tw("flex flex-row flex-wrap gap-y-2 mt-2")
|
14173
14733
|
}, renderChips()));
|
14174
14734
|
};
|
14175
|
-
var BaseMultiInputSkeleton = () => /* @__PURE__ */
|
14735
|
+
var BaseMultiInputSkeleton = () => /* @__PURE__ */ React103.createElement(Skeleton, {
|
14176
14736
|
height: 38
|
14177
14737
|
});
|
14178
14738
|
MultiInputBase.Skeleton = BaseMultiInputSkeleton;
|
@@ -14184,13 +14744,13 @@ var MultiInput = (props) => {
|
|
14184
14744
|
var _a2;
|
14185
14745
|
setValue((_a2 = props.value) != null ? _a2 : []);
|
14186
14746
|
}, [JSON.stringify(props.value)]);
|
14187
|
-
const defaultId =
|
14747
|
+
const defaultId = useId15();
|
14188
14748
|
const id = (_e = (_d = props.id) != null ? _d : props.name) != null ? _e : defaultId;
|
14189
|
-
const errorMessageId =
|
14749
|
+
const errorMessageId = useId15();
|
14190
14750
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
14191
14751
|
const labelControlProps = getLabelControlProps(props);
|
14192
|
-
const baseProps =
|
14193
|
-
return /* @__PURE__ */
|
14752
|
+
const baseProps = omit15(props, Object.keys(labelControlProps));
|
14753
|
+
return /* @__PURE__ */ React103.createElement(LabelControl, __spreadProps(__spreadValues({
|
14194
14754
|
id: `${id}-label`,
|
14195
14755
|
htmlFor: `${id}-input`,
|
14196
14756
|
messageId: errorMessageId
|
@@ -14198,7 +14758,7 @@ var MultiInput = (props) => {
|
|
14198
14758
|
length: value.length,
|
14199
14759
|
maxLength,
|
14200
14760
|
className: "Aquarium-MultiInput"
|
14201
|
-
}), /* @__PURE__ */
|
14761
|
+
}), /* @__PURE__ */ React103.createElement(MultiInputBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
14202
14762
|
id: `${id}-input`,
|
14203
14763
|
onChange: (value2) => {
|
14204
14764
|
var _a2;
|
@@ -14210,20 +14770,20 @@ var MultiInput = (props) => {
|
|
14210
14770
|
valid: props.valid
|
14211
14771
|
})));
|
14212
14772
|
};
|
14213
|
-
var MultiInputSkeleton = () => /* @__PURE__ */
|
14773
|
+
var MultiInputSkeleton = () => /* @__PURE__ */ React103.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React103.createElement(MultiInputBase.Skeleton, null));
|
14214
14774
|
MultiInput.Skeleton = MultiInputSkeleton;
|
14215
14775
|
MultiInput.Skeleton.displayName = "MultiInput.Skeleton";
|
14216
14776
|
|
14217
14777
|
// src/molecules/MultiSelect/MultiSelect.tsx
|
14218
|
-
import
|
14778
|
+
import React104, { useEffect as useEffect10, useRef as useRef13, useState as useState13 } from "react";
|
14219
14779
|
import { ariaHideOutside as ariaHideOutside2 } from "@react-aria/overlays";
|
14220
|
-
import { useId as
|
14780
|
+
import { useId as useId16 } from "@react-aria/utils";
|
14221
14781
|
import { useCombobox as useCombobox2, useMultipleSelection } from "downshift";
|
14222
14782
|
import isArray4 from "lodash/isArray";
|
14223
14783
|
import isEqual from "lodash/isEqual";
|
14224
14784
|
import isNil2 from "lodash/isNil";
|
14225
14785
|
import isObject2 from "lodash/isObject";
|
14226
|
-
import
|
14786
|
+
import omit16 from "lodash/omit";
|
14227
14787
|
import omitBy from "lodash/omitBy";
|
14228
14788
|
import { matchSorter as matchSorter2 } from "match-sorter";
|
14229
14789
|
var isOptionGroup = (option) => {
|
@@ -14375,16 +14935,16 @@ var MultiSelectBase = (_a) => {
|
|
14375
14935
|
return ariaHideOutside2([inputRef.current, popoverRef.current]);
|
14376
14936
|
}
|
14377
14937
|
}, [state.isOpen, inputRef, popoverRef]);
|
14378
|
-
const renderItem = (item, index) => /* @__PURE__ */
|
14938
|
+
const renderItem = (item, index) => /* @__PURE__ */ React104.createElement(Select.Item, __spreadValues({
|
14379
14939
|
key: itemToString(item),
|
14380
14940
|
highlighted: index === highlightedIndex,
|
14381
14941
|
selected: selectedItems.includes(item)
|
14382
14942
|
}, getItemProps({ item, index })), renderOption(item));
|
14383
|
-
const renderGroup = (group) => group.options.length ? /* @__PURE__ */
|
14943
|
+
const renderGroup = (group) => group.options.length ? /* @__PURE__ */ React104.createElement(React104.Fragment, {
|
14384
14944
|
key: group.label
|
14385
|
-
}, /* @__PURE__ */
|
14945
|
+
}, /* @__PURE__ */ React104.createElement(Select.Group, null, group.label), group.options.map((opt) => renderItem(opt, flattenedOptions.indexOf(opt)))) : null;
|
14386
14946
|
const renderChips = () => {
|
14387
|
-
return selectedItems.map((selectedItem, index) => /* @__PURE__ */
|
14947
|
+
return selectedItems.map((selectedItem, index) => /* @__PURE__ */ React104.createElement(InputChip, __spreadProps(__spreadValues({
|
14388
14948
|
key: `${itemToString(selectedItem)}.chip`,
|
14389
14949
|
className: tw("mx-0"),
|
14390
14950
|
disabled,
|
@@ -14402,14 +14962,14 @@ var MultiSelectBase = (_a) => {
|
|
14402
14962
|
getDropdownProps({ ref: inputRef, disabled: disabled || readOnly, value: inputValue })
|
14403
14963
|
);
|
14404
14964
|
const menuProps = getMenuProps({ ref: menuRef }, { suppressRefError: !isOpen });
|
14405
|
-
return /* @__PURE__ */
|
14965
|
+
return /* @__PURE__ */ React104.createElement("div", {
|
14406
14966
|
className: classNames("Aquarium-MultiSelectBase", tw("relative"))
|
14407
|
-
}, /* @__PURE__ */
|
14967
|
+
}, /* @__PURE__ */ React104.createElement(Select.InputContainer, {
|
14408
14968
|
ref: targetRef,
|
14409
14969
|
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default"
|
14410
|
-
}, /* @__PURE__ */
|
14970
|
+
}, /* @__PURE__ */ React104.createElement("div", {
|
14411
14971
|
className: "grow inline-flex flex-row flex-wrap gap-2"
|
14412
|
-
}, !hideChips && inline && renderChips(), /* @__PURE__ */
|
14972
|
+
}, !hideChips && inline && renderChips(), /* @__PURE__ */ React104.createElement(Select.Input, __spreadProps(__spreadValues(__spreadValues({
|
14413
14973
|
name,
|
14414
14974
|
placeholder: selectedItems.length === 0 && !readOnly ? placeholder : ""
|
14415
14975
|
}, inputProps), props), {
|
@@ -14428,12 +14988,12 @@ var MultiSelectBase = (_a) => {
|
|
14428
14988
|
setFocus(false);
|
14429
14989
|
(_a3 = inputProps.onBlur) == null ? void 0 : _a3.call(inputProps, e);
|
14430
14990
|
}
|
14431
|
-
}))), !readOnly && /* @__PURE__ */
|
14991
|
+
}))), !readOnly && /* @__PURE__ */ React104.createElement(Select.Toggle, __spreadValues({
|
14432
14992
|
hasFocus,
|
14433
14993
|
isOpen
|
14434
|
-
}, getToggleButtonProps({ disabled })))), !hideChips && !inline && /* @__PURE__ */
|
14994
|
+
}, getToggleButtonProps({ disabled })))), !hideChips && !inline && /* @__PURE__ */ React104.createElement("div", {
|
14435
14995
|
className: tw("flex flex-row flex-wrap gap-2 mt-2")
|
14436
|
-
}, renderChips()), isOpen && /* @__PURE__ */
|
14996
|
+
}, renderChips()), isOpen && /* @__PURE__ */ React104.createElement(PopoverOverlay, {
|
14437
14997
|
ref: popoverRef,
|
14438
14998
|
triggerRef: targetRef,
|
14439
14999
|
state,
|
@@ -14441,13 +15001,13 @@ var MultiSelectBase = (_a) => {
|
|
14441
15001
|
shouldFlip: true,
|
14442
15002
|
isNonModal: true,
|
14443
15003
|
style: { width: (_a2 = targetRef.current) == null ? void 0 : _a2.offsetWidth }
|
14444
|
-
}, /* @__PURE__ */
|
15004
|
+
}, /* @__PURE__ */ React104.createElement(Select.Menu, __spreadValues({
|
14445
15005
|
maxHeight
|
14446
|
-
}, menuProps), hasNoResults && /* @__PURE__ */
|
15006
|
+
}, menuProps), hasNoResults && /* @__PURE__ */ React104.createElement(Select.NoResults, null, emptyState), filteredOptions.map(
|
14447
15007
|
(option, index) => isOptionGroup(option) ? renderGroup(option) : renderItem(option, index)
|
14448
15008
|
))));
|
14449
15009
|
};
|
14450
|
-
var MultiSelectBaseSkeleton = () => /* @__PURE__ */
|
15010
|
+
var MultiSelectBaseSkeleton = () => /* @__PURE__ */ React104.createElement(Skeleton, {
|
14451
15011
|
height: 38
|
14452
15012
|
});
|
14453
15013
|
MultiSelectBase.Skeleton = MultiSelectBaseSkeleton;
|
@@ -14462,19 +15022,19 @@ var MultiSelect = (_a) => {
|
|
14462
15022
|
"emptyState"
|
14463
15023
|
]);
|
14464
15024
|
var _a2;
|
14465
|
-
const defaultId =
|
15025
|
+
const defaultId = useId16();
|
14466
15026
|
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
14467
|
-
const errorMessageId =
|
15027
|
+
const errorMessageId = useId16();
|
14468
15028
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
14469
15029
|
const labelControlProps = getLabelControlProps(props);
|
14470
|
-
const baseProps =
|
14471
|
-
return /* @__PURE__ */
|
15030
|
+
const baseProps = omit16(props, Object.keys(labelControlProps));
|
15031
|
+
return /* @__PURE__ */ React104.createElement(LabelControl, __spreadProps(__spreadValues({
|
14472
15032
|
id: `${id}-label`,
|
14473
15033
|
htmlFor: `${id}-input`,
|
14474
15034
|
messageId: errorMessageId
|
14475
15035
|
}, labelControlProps), {
|
14476
15036
|
className: "Aquarium-MultiSelect"
|
14477
|
-
}), /* @__PURE__ */
|
15037
|
+
}), /* @__PURE__ */ React104.createElement(MultiSelectBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
14478
15038
|
id,
|
14479
15039
|
options,
|
14480
15040
|
emptyState,
|
@@ -14482,17 +15042,17 @@ var MultiSelect = (_a) => {
|
|
14482
15042
|
valid: props.valid
|
14483
15043
|
})));
|
14484
15044
|
};
|
14485
|
-
var MultiSelectSkeleton = () => /* @__PURE__ */
|
15045
|
+
var MultiSelectSkeleton = () => /* @__PURE__ */ React104.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React104.createElement(MultiSelectBase.Skeleton, null));
|
14486
15046
|
MultiSelect.Skeleton = MultiSelectSkeleton;
|
14487
15047
|
MultiSelect.Skeleton.displayName = "MultiSelect.Skeleton";
|
14488
15048
|
|
14489
15049
|
// src/molecules/NativeSelect/NativeSelect.tsx
|
14490
|
-
import
|
14491
|
-
import { useId as
|
14492
|
-
import
|
15050
|
+
import React105 from "react";
|
15051
|
+
import { useId as useId17 } from "@react-aria/utils";
|
15052
|
+
import omit17 from "lodash/omit";
|
14493
15053
|
import uniqueId from "lodash/uniqueId";
|
14494
15054
|
var import_caretDown2 = __toESM(require_caretDown());
|
14495
|
-
var NativeSelectBase =
|
15055
|
+
var NativeSelectBase = React105.forwardRef(
|
14496
15056
|
(_a, ref) => {
|
14497
15057
|
var _b = _a, { children, disabled = false, required = false, valid = true, readOnly = false } = _b, props = __objRest(_b, ["children", "disabled", "required", "valid", "readOnly"]);
|
14498
15058
|
const placeholderValue = uniqueId("default_value_for_placeholder");
|
@@ -14509,16 +15069,16 @@ var NativeSelectBase = React95.forwardRef(
|
|
14509
15069
|
(_b2 = props.onBlur) == null ? void 0 : _b2.call(props, event);
|
14510
15070
|
}
|
14511
15071
|
};
|
14512
|
-
return /* @__PURE__ */
|
15072
|
+
return /* @__PURE__ */ React105.createElement("span", {
|
14513
15073
|
className: classNames("Aquarium-NativeSelectBase", tw("relative block"))
|
14514
|
-
}, !readOnly && /* @__PURE__ */
|
15074
|
+
}, !readOnly && /* @__PURE__ */ React105.createElement("span", {
|
14515
15075
|
className: tw(
|
14516
15076
|
"absolute right-0 inset-y-0 mr-4 text-inactive flex ml-3 pointer-events-none typography-default-strong mt-4"
|
14517
15077
|
)
|
14518
|
-
}, /* @__PURE__ */
|
15078
|
+
}, /* @__PURE__ */ React105.createElement(Icon, {
|
14519
15079
|
icon: import_caretDown2.default,
|
14520
15080
|
"data-testid": "icon-dropdown"
|
14521
|
-
})), /* @__PURE__ */
|
15081
|
+
})), /* @__PURE__ */ React105.createElement("select", __spreadProps(__spreadValues({
|
14522
15082
|
ref,
|
14523
15083
|
disabled: disabled || readOnly,
|
14524
15084
|
required
|
@@ -14537,32 +15097,32 @@ var NativeSelectBase = React95.forwardRef(
|
|
14537
15097
|
),
|
14538
15098
|
props.className
|
14539
15099
|
)
|
14540
|
-
}), props.placeholder && /* @__PURE__ */
|
15100
|
+
}), props.placeholder && /* @__PURE__ */ React105.createElement("option", {
|
14541
15101
|
value: placeholderValue,
|
14542
15102
|
disabled: true
|
14543
15103
|
}, props.placeholder), children));
|
14544
15104
|
}
|
14545
15105
|
);
|
14546
|
-
NativeSelectBase.Skeleton = () => /* @__PURE__ */
|
15106
|
+
NativeSelectBase.Skeleton = () => /* @__PURE__ */ React105.createElement(Skeleton, {
|
14547
15107
|
height: 38
|
14548
15108
|
});
|
14549
|
-
var NativeSelect =
|
15109
|
+
var NativeSelect = React105.forwardRef(
|
14550
15110
|
(_a, ref) => {
|
14551
15111
|
var _b = _a, { readOnly } = _b, props = __objRest(_b, ["readOnly"]);
|
14552
15112
|
var _a2;
|
14553
|
-
const defaultId =
|
15113
|
+
const defaultId = useId17();
|
14554
15114
|
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
14555
|
-
const errorMessageId =
|
15115
|
+
const errorMessageId = useId17();
|
14556
15116
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
14557
15117
|
const _b2 = getLabelControlProps(props), { "data-testid": dataTestId } = _b2, labelControlProps = __objRest(_b2, ["data-testid"]);
|
14558
|
-
const baseProps =
|
14559
|
-
return /* @__PURE__ */
|
15118
|
+
const baseProps = omit17(props, Object.keys(labelControlProps));
|
15119
|
+
return /* @__PURE__ */ React105.createElement(LabelControl, __spreadProps(__spreadValues({
|
14560
15120
|
id: `${id}-label`,
|
14561
15121
|
htmlFor: id,
|
14562
15122
|
messageId: errorMessageId
|
14563
15123
|
}, labelControlProps), {
|
14564
15124
|
className: "Aquarium-NativeSelect"
|
14565
|
-
}), /* @__PURE__ */
|
15125
|
+
}), /* @__PURE__ */ React105.createElement(NativeSelectBase, __spreadProps(__spreadValues(__spreadValues({
|
14566
15126
|
ref
|
14567
15127
|
}, baseProps), errorProps), {
|
14568
15128
|
id,
|
@@ -14576,63 +15136,63 @@ var NativeSelect = React95.forwardRef(
|
|
14576
15136
|
}
|
14577
15137
|
);
|
14578
15138
|
NativeSelect.displayName = "NativeSelect";
|
14579
|
-
var Option =
|
15139
|
+
var Option = React105.forwardRef((_a, ref) => {
|
14580
15140
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
14581
|
-
return /* @__PURE__ */
|
15141
|
+
return /* @__PURE__ */ React105.createElement("option", __spreadValues({
|
14582
15142
|
ref
|
14583
15143
|
}, props), children);
|
14584
15144
|
});
|
14585
15145
|
Option.displayName = "Option";
|
14586
|
-
var NativeSelectSkeleton = () => /* @__PURE__ */
|
15146
|
+
var NativeSelectSkeleton = () => /* @__PURE__ */ React105.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React105.createElement(NativeSelectBase.Skeleton, null), /* @__PURE__ */ React105.createElement("div", {
|
14587
15147
|
style: { height: "1px" }
|
14588
15148
|
}));
|
14589
15149
|
NativeSelect.Skeleton = NativeSelectSkeleton;
|
14590
15150
|
NativeSelect.Skeleton.displayName = "NativeSelect.Skeleton";
|
14591
15151
|
|
14592
15152
|
// src/molecules/Navigation/Navigation.tsx
|
14593
|
-
import
|
15153
|
+
import React107 from "react";
|
14594
15154
|
import classNames12 from "classnames";
|
14595
15155
|
|
14596
15156
|
// src/atoms/Navigation/Navigation.tsx
|
14597
|
-
import
|
15157
|
+
import React106 from "react";
|
14598
15158
|
var Navigation = (_a) => {
|
14599
15159
|
var _b = _a, { className, children } = _b, rest = __objRest(_b, ["className", "children"]);
|
14600
|
-
return /* @__PURE__ */
|
15160
|
+
return /* @__PURE__ */ React106.createElement("nav", {
|
14601
15161
|
className: classNames(tw("bg-muted h-full"))
|
14602
|
-
}, /* @__PURE__ */
|
15162
|
+
}, /* @__PURE__ */ React106.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
14603
15163
|
className: classNames(tw("flex flex-col h-full"), className),
|
14604
15164
|
role: "menubar"
|
14605
15165
|
}), children));
|
14606
15166
|
};
|
14607
15167
|
var Header = (_a) => {
|
14608
15168
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14609
|
-
return /* @__PURE__ */
|
15169
|
+
return /* @__PURE__ */ React106.createElement("li", __spreadProps(__spreadValues({}, rest), {
|
14610
15170
|
role: "presentation",
|
14611
15171
|
className: classNames(tw("px-6 py-5"), className)
|
14612
15172
|
}));
|
14613
15173
|
};
|
14614
15174
|
var Footer = (_a) => {
|
14615
15175
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14616
|
-
return /* @__PURE__ */
|
15176
|
+
return /* @__PURE__ */ React106.createElement("li", __spreadProps(__spreadValues({}, rest), {
|
14617
15177
|
role: "presentation",
|
14618
15178
|
className: classNames(tw("px-6 py-5 mt-auto"), className)
|
14619
15179
|
}));
|
14620
15180
|
};
|
14621
15181
|
var Section2 = (_a) => {
|
14622
15182
|
var _b = _a, { title, className } = _b, rest = __objRest(_b, ["title", "className"]);
|
14623
|
-
return /* @__PURE__ */
|
15183
|
+
return /* @__PURE__ */ React106.createElement("li", {
|
14624
15184
|
role: "presentation",
|
14625
15185
|
className: tw("py-5")
|
14626
|
-
}, title && /* @__PURE__ */
|
15186
|
+
}, title && /* @__PURE__ */ React106.createElement("div", {
|
14627
15187
|
className: classNames(className, "py-2 px-6 text-inactive uppercase cursor-default typography-caption")
|
14628
|
-
}, title), /* @__PURE__ */
|
15188
|
+
}, title), /* @__PURE__ */ React106.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
14629
15189
|
role: "group",
|
14630
15190
|
className: classNames(tw("flex flex-col"), className)
|
14631
15191
|
})));
|
14632
15192
|
};
|
14633
15193
|
var Divider3 = (_a) => {
|
14634
15194
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14635
|
-
return /* @__PURE__ */
|
15195
|
+
return /* @__PURE__ */ React106.createElement("li", __spreadProps(__spreadValues({
|
14636
15196
|
role: "separator"
|
14637
15197
|
}, rest), {
|
14638
15198
|
className: classNames(tw("border-t-2 border-muted"), className)
|
@@ -14640,9 +15200,9 @@ var Divider3 = (_a) => {
|
|
14640
15200
|
};
|
14641
15201
|
var Item5 = (_a) => {
|
14642
15202
|
var _b = _a, { className, active } = _b, rest = __objRest(_b, ["className", "active"]);
|
14643
|
-
return /* @__PURE__ */
|
15203
|
+
return /* @__PURE__ */ React106.createElement("li", {
|
14644
15204
|
role: "presentation"
|
14645
|
-
}, /* @__PURE__ */
|
15205
|
+
}, /* @__PURE__ */ React106.createElement("a", __spreadProps(__spreadValues({}, rest), {
|
14646
15206
|
role: "menuitem",
|
14647
15207
|
className: classNames(
|
14648
15208
|
tw("py-3 px-6 hover:bg-default cursor-pointer flex gap-4 items-center typography-small focusable", {
|
@@ -14662,7 +15222,7 @@ Navigation.Divider = Divider3;
|
|
14662
15222
|
// src/molecules/Navigation/Navigation.tsx
|
14663
15223
|
var Navigation2 = (_a) => {
|
14664
15224
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
14665
|
-
return /* @__PURE__ */
|
15225
|
+
return /* @__PURE__ */ React107.createElement(Navigation, __spreadValues({
|
14666
15226
|
className: classNames12("Aquarium-Navigation", className)
|
14667
15227
|
}, props));
|
14668
15228
|
};
|
@@ -14676,11 +15236,11 @@ var Item6 = (_a) => {
|
|
14676
15236
|
"icon",
|
14677
15237
|
"showNotification"
|
14678
15238
|
]);
|
14679
|
-
return /* @__PURE__ */
|
15239
|
+
return /* @__PURE__ */ React107.createElement(Navigation.Item, __spreadValues({}, rest), icon && showNotification && /* @__PURE__ */ React107.createElement(Badge.Notification, null, /* @__PURE__ */ React107.createElement(InlineIcon, {
|
14680
15240
|
icon,
|
14681
15241
|
width: "20px",
|
14682
15242
|
height: "20px"
|
14683
|
-
})), icon && !showNotification && /* @__PURE__ */
|
15243
|
+
})), icon && !showNotification && /* @__PURE__ */ React107.createElement(InlineIcon, {
|
14684
15244
|
icon,
|
14685
15245
|
width: "20px",
|
14686
15246
|
height: "20px"
|
@@ -14693,32 +15253,32 @@ Navigation2.Header = Navigation.Header;
|
|
14693
15253
|
Navigation2.Section = Navigation.Section;
|
14694
15254
|
|
14695
15255
|
// src/molecules/PageHeader/PageHeader.tsx
|
14696
|
-
import
|
15256
|
+
import React109 from "react";
|
14697
15257
|
import castArray6 from "lodash/castArray";
|
14698
15258
|
|
14699
15259
|
// src/atoms/PageHeader/PageHeader.tsx
|
14700
|
-
import
|
15260
|
+
import React108 from "react";
|
14701
15261
|
var PageHeader = (_a) => {
|
14702
15262
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14703
|
-
return /* @__PURE__ */
|
15263
|
+
return /* @__PURE__ */ React108.createElement("div", __spreadValues({
|
14704
15264
|
className: classNames(tw("flex flex-row gap-4 pb-6"), className)
|
14705
15265
|
}, rest), children);
|
14706
15266
|
};
|
14707
15267
|
PageHeader.Container = (_a) => {
|
14708
15268
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14709
|
-
return /* @__PURE__ */
|
15269
|
+
return /* @__PURE__ */ React108.createElement("div", __spreadValues({
|
14710
15270
|
className: classNames(tw("flex flex-col grow gap-0"), className)
|
14711
15271
|
}, rest), children);
|
14712
15272
|
};
|
14713
15273
|
PageHeader.TitleContainer = (_a) => {
|
14714
15274
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14715
|
-
return /* @__PURE__ */
|
15275
|
+
return /* @__PURE__ */ React108.createElement("div", __spreadValues({
|
14716
15276
|
className: classNames(tw("flex flex-col justify-center gap-2"), className)
|
14717
15277
|
}, rest), children);
|
14718
15278
|
};
|
14719
15279
|
PageHeader.Title = (_a) => {
|
14720
15280
|
var _b = _a, { isSubHeader = false, children } = _b, rest = __objRest(_b, ["isSubHeader", "children"]);
|
14721
|
-
return /* @__PURE__ */
|
15281
|
+
return /* @__PURE__ */ React108.createElement(Typography2, __spreadProps(__spreadValues({}, rest), {
|
14722
15282
|
color: "intense",
|
14723
15283
|
variant: isSubHeader ? "subheading" : "heading",
|
14724
15284
|
htmlTag: isSubHeader ? "h2" : "h1"
|
@@ -14726,19 +15286,19 @@ PageHeader.Title = (_a) => {
|
|
14726
15286
|
};
|
14727
15287
|
PageHeader.Subtitle = (_a) => {
|
14728
15288
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
14729
|
-
return /* @__PURE__ */
|
15289
|
+
return /* @__PURE__ */ React108.createElement(Typography2.Small, __spreadProps(__spreadValues({}, rest), {
|
14730
15290
|
color: "default"
|
14731
15291
|
}), children);
|
14732
15292
|
};
|
14733
15293
|
PageHeader.Chips = (_a) => {
|
14734
15294
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14735
|
-
return /* @__PURE__ */
|
15295
|
+
return /* @__PURE__ */ React108.createElement("div", __spreadValues({
|
14736
15296
|
className: classNames(tw("flex gap-3"), className)
|
14737
15297
|
}, rest), children);
|
14738
15298
|
};
|
14739
15299
|
PageHeader.Actions = (_a) => {
|
14740
15300
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14741
|
-
return /* @__PURE__ */
|
15301
|
+
return /* @__PURE__ */ React108.createElement("div", __spreadValues({
|
14742
15302
|
className: classNames(tw("flex flex-row gap-4 self-start"), className)
|
14743
15303
|
}, rest), children);
|
14744
15304
|
};
|
@@ -14762,64 +15322,64 @@ var CommonPageHeader = ({
|
|
14762
15322
|
onMenuOpenChange,
|
14763
15323
|
isSubHeader = false
|
14764
15324
|
}) => {
|
14765
|
-
return /* @__PURE__ */
|
15325
|
+
return /* @__PURE__ */ React109.createElement(PageHeader, {
|
14766
15326
|
className: "Aquarium-PageHeader"
|
14767
|
-
}, /* @__PURE__ */
|
15327
|
+
}, /* @__PURE__ */ React109.createElement(PageHeader.Container, null, breadcrumbs && /* @__PURE__ */ React109.createElement(Box, {
|
14768
15328
|
marginBottom: "3"
|
14769
|
-
}, /* @__PURE__ */
|
15329
|
+
}, /* @__PURE__ */ React109.createElement(Breadcrumbs, null, breadcrumbs)), /* @__PURE__ */ React109.createElement(Spacing, {
|
14770
15330
|
row: true,
|
14771
15331
|
gap: "5"
|
14772
|
-
}, image && /* @__PURE__ */
|
15332
|
+
}, image && /* @__PURE__ */ React109.createElement("img", {
|
14773
15333
|
src: image,
|
14774
15334
|
alt: imageAlt != null ? imageAlt : "",
|
14775
15335
|
className: tw("w-[56px] h-[56px]")
|
14776
|
-
}), /* @__PURE__ */
|
15336
|
+
}), /* @__PURE__ */ React109.createElement(PageHeader.TitleContainer, null, /* @__PURE__ */ React109.createElement(PageHeader.Title, {
|
14777
15337
|
isSubHeader
|
14778
|
-
}, title), chips.length > 0 && /* @__PURE__ */
|
15338
|
+
}, title), chips.length > 0 && /* @__PURE__ */ React109.createElement(PageHeader.Chips, null, chips.map((chip) => /* @__PURE__ */ React109.createElement(Chip2, {
|
14779
15339
|
key: chip,
|
14780
15340
|
dense: true,
|
14781
15341
|
text: chip
|
14782
|
-
}))), subtitle && /* @__PURE__ */
|
15342
|
+
}))), subtitle && /* @__PURE__ */ React109.createElement(PageHeader.Subtitle, null, subtitle)))), (secondaryActions || primaryAction || secondaryAction || menu) && /* @__PURE__ */ React109.createElement(PageHeader.Actions, null, menu && /* @__PURE__ */ React109.createElement(Box.Flex, {
|
14783
15343
|
alignItems: "center"
|
14784
|
-
}, /* @__PURE__ */
|
15344
|
+
}, /* @__PURE__ */ React109.createElement(DropdownMenu2, {
|
14785
15345
|
placement: defaultContextualMenuPlacement,
|
14786
15346
|
onAction: (action) => onAction == null ? void 0 : onAction(action),
|
14787
15347
|
onOpenChange: onMenuOpenChange
|
14788
|
-
}, /* @__PURE__ */
|
15348
|
+
}, /* @__PURE__ */ React109.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React109.createElement(Button.Icon, {
|
14789
15349
|
"aria-label": menuAriaLabel,
|
14790
15350
|
icon: import_more5.default
|
14791
15351
|
})), menu)), secondaryActions && castArray6(secondaryActions).filter(Boolean).map((secondaryAction2) => renderAction({ kind: "secondary", action: secondaryAction2 })), primaryAction && renderAction({ kind: "primary", action: primaryAction })));
|
14792
15352
|
};
|
14793
|
-
var PageHeader2 = (props) => /* @__PURE__ */
|
15353
|
+
var PageHeader2 = (props) => /* @__PURE__ */ React109.createElement(CommonPageHeader, __spreadValues({}, props));
|
14794
15354
|
PageHeader2.displayName = "PageHeader";
|
14795
|
-
var SubHeader = (props) => /* @__PURE__ */
|
15355
|
+
var SubHeader = (props) => /* @__PURE__ */ React109.createElement(CommonPageHeader, __spreadProps(__spreadValues({}, props), {
|
14796
15356
|
isSubHeader: true
|
14797
15357
|
}));
|
14798
15358
|
PageHeader2.SubHeader = SubHeader;
|
14799
15359
|
PageHeader2.SubHeader.displayName = "PageHeader.SubHeader";
|
14800
15360
|
|
14801
15361
|
// src/molecules/PopoverDialog/PopoverDialog.tsx
|
14802
|
-
import
|
14803
|
-
import
|
15362
|
+
import React111 from "react";
|
15363
|
+
import omit18 from "lodash/omit";
|
14804
15364
|
|
14805
15365
|
// src/atoms/PopoverDialog/PopoverDialog.tsx
|
14806
|
-
import
|
15366
|
+
import React110 from "react";
|
14807
15367
|
var Header2 = (_a) => {
|
14808
15368
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14809
|
-
return /* @__PURE__ */
|
15369
|
+
return /* @__PURE__ */ React110.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14810
15370
|
className: classNames(tw("p-5 gap-3 flex items-center"), className)
|
14811
15371
|
}), children);
|
14812
15372
|
};
|
14813
15373
|
var Title2 = (_a) => {
|
14814
15374
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14815
|
-
return /* @__PURE__ */
|
15375
|
+
return /* @__PURE__ */ React110.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
14816
15376
|
htmlTag: "h1",
|
14817
15377
|
variant: "small-strong"
|
14818
15378
|
}), children);
|
14819
15379
|
};
|
14820
15380
|
var Body = (_a) => {
|
14821
15381
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14822
|
-
return /* @__PURE__ */
|
15382
|
+
return /* @__PURE__ */ React110.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
14823
15383
|
htmlTag: "div",
|
14824
15384
|
variant: "caption",
|
14825
15385
|
className: classNames(tw("px-5 overflow-y-auto"), className)
|
@@ -14827,13 +15387,13 @@ var Body = (_a) => {
|
|
14827
15387
|
};
|
14828
15388
|
var Footer2 = (_a) => {
|
14829
15389
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14830
|
-
return /* @__PURE__ */
|
15390
|
+
return /* @__PURE__ */ React110.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14831
15391
|
className: classNames(tw("p-5"), className)
|
14832
15392
|
}), children);
|
14833
15393
|
};
|
14834
15394
|
var Actions2 = (_a) => {
|
14835
15395
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14836
|
-
return /* @__PURE__ */
|
15396
|
+
return /* @__PURE__ */ React110.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14837
15397
|
className: classNames(tw("flex gap-4"), className)
|
14838
15398
|
}), children);
|
14839
15399
|
};
|
@@ -14849,29 +15409,29 @@ var PopoverDialog = {
|
|
14849
15409
|
var PopoverDialog2 = ({ placement, open, title, secondaryAction, primaryAction, children }) => {
|
14850
15410
|
const wrapPromptWithBody = (child) => {
|
14851
15411
|
if (isComponentType(child, PopoverDialog2.Prompt)) {
|
14852
|
-
return /* @__PURE__ */
|
15412
|
+
return /* @__PURE__ */ React111.createElement(Popover3.Panel, {
|
14853
15413
|
className: classNames("Aquarium-PopoverDialog", tw("max-w-[300px]"))
|
14854
|
-
}, /* @__PURE__ */
|
15414
|
+
}, /* @__PURE__ */ React111.createElement(PopoverDialog.Header, null, /* @__PURE__ */ React111.createElement(PopoverDialog.Title, null, title)), child, /* @__PURE__ */ React111.createElement(PopoverDialog.Footer, null, /* @__PURE__ */ React111.createElement(PopoverDialog.Actions, null, secondaryAction && /* @__PURE__ */ React111.createElement(Popover3.Button, __spreadValues({
|
14855
15415
|
kind: "secondary-ghost",
|
14856
15416
|
key: secondaryAction.text,
|
14857
15417
|
dense: true
|
14858
|
-
},
|
15418
|
+
}, omit18(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */ React111.createElement(Popover3.Button, __spreadValues({
|
14859
15419
|
kind: "ghost",
|
14860
15420
|
key: primaryAction.text,
|
14861
15421
|
dense: true
|
14862
|
-
},
|
15422
|
+
}, omit18(primaryAction, "text")), primaryAction.text))));
|
14863
15423
|
}
|
14864
15424
|
return child;
|
14865
15425
|
};
|
14866
|
-
return /* @__PURE__ */
|
15426
|
+
return /* @__PURE__ */ React111.createElement(Popover3, {
|
14867
15427
|
type: "dialog",
|
14868
15428
|
isOpen: open,
|
14869
15429
|
placement,
|
14870
15430
|
containFocus: true
|
14871
|
-
},
|
15431
|
+
}, React111.Children.map(children, wrapPromptWithBody));
|
14872
15432
|
};
|
14873
|
-
PopoverDialog2.Trigger =
|
14874
|
-
var Prompt = ({ children }) => /* @__PURE__ */
|
15433
|
+
PopoverDialog2.Trigger = Popover3.Trigger;
|
15434
|
+
var Prompt = ({ children }) => /* @__PURE__ */ React111.createElement(PopoverDialog.Body, null, children);
|
14875
15435
|
Prompt.displayName = "PopoverDialog.Prompt";
|
14876
15436
|
PopoverDialog2.Prompt = Prompt;
|
14877
15437
|
|
@@ -14880,14 +15440,14 @@ import { createPortal } from "react-dom";
|
|
14880
15440
|
var Portal = ({ children, to }) => createPortal(children, to);
|
14881
15441
|
|
14882
15442
|
// src/molecules/ProgressBar/ProgressBar.tsx
|
14883
|
-
import
|
15443
|
+
import React113 from "react";
|
14884
15444
|
|
14885
15445
|
// src/atoms/ProgressBar/ProgressBar.tsx
|
14886
|
-
import
|
15446
|
+
import React112 from "react";
|
14887
15447
|
import clamp3 from "lodash/clamp";
|
14888
15448
|
var ProgressBar = (_a) => {
|
14889
15449
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14890
|
-
return /* @__PURE__ */
|
15450
|
+
return /* @__PURE__ */ React112.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14891
15451
|
className: classNames(tw("relative flex items-center w-full bg-muted h-2 rounded-full overflow-hidden"), className)
|
14892
15452
|
}), children);
|
14893
15453
|
};
|
@@ -14900,7 +15460,7 @@ var STATUS_COLORS = {
|
|
14900
15460
|
ProgressBar.Indicator = (_a) => {
|
14901
15461
|
var _b = _a, { min, max, value, "aria-label": ariaLabel, status, className } = _b, rest = __objRest(_b, ["min", "max", "value", "aria-label", "status", "className"]);
|
14902
15462
|
const completedPercentage = clamp3((value - min) / (max - min) * 100, 0, 100);
|
14903
|
-
return /* @__PURE__ */
|
15463
|
+
return /* @__PURE__ */ React112.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14904
15464
|
className: classNames(
|
14905
15465
|
tw("h-2 rounded-full transition-all ease-in-out delay-150"),
|
14906
15466
|
STATUS_COLORS[status],
|
@@ -14916,11 +15476,11 @@ ProgressBar.Indicator = (_a) => {
|
|
14916
15476
|
};
|
14917
15477
|
ProgressBar.Labels = (_a) => {
|
14918
15478
|
var _b = _a, { children, startLabel, endLabel, className } = _b, rest = __objRest(_b, ["children", "startLabel", "endLabel", "className"]);
|
14919
|
-
return /* @__PURE__ */
|
15479
|
+
return /* @__PURE__ */ React112.createElement("div", {
|
14920
15480
|
className: classNames(tw("flex flex-row"), className)
|
14921
|
-
}, /* @__PURE__ */
|
15481
|
+
}, /* @__PURE__ */ React112.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
14922
15482
|
className: tw("grow text-default typography-caption")
|
14923
|
-
}), startLabel), /* @__PURE__ */
|
15483
|
+
}), startLabel), /* @__PURE__ */ React112.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
14924
15484
|
className: tw("grow text-default typography-caption text-right")
|
14925
15485
|
}), endLabel));
|
14926
15486
|
};
|
@@ -14938,7 +15498,7 @@ var ProgressBar2 = (props) => {
|
|
14938
15498
|
if (min > max) {
|
14939
15499
|
throw new Error("`min` value provided to `ProgressBar` is greater than `max` value.");
|
14940
15500
|
}
|
14941
|
-
const progress = /* @__PURE__ */
|
15501
|
+
const progress = /* @__PURE__ */ React113.createElement(ProgressBar, null, /* @__PURE__ */ React113.createElement(ProgressBar.Indicator, {
|
14942
15502
|
status: value === max ? completedStatus : progresStatus,
|
14943
15503
|
min,
|
14944
15504
|
max,
|
@@ -14948,15 +15508,15 @@ var ProgressBar2 = (props) => {
|
|
14948
15508
|
if (props.dense) {
|
14949
15509
|
return progress;
|
14950
15510
|
}
|
14951
|
-
return /* @__PURE__ */
|
15511
|
+
return /* @__PURE__ */ React113.createElement("div", {
|
14952
15512
|
className: "Aquarium-ProgressBar"
|
14953
|
-
}, progress, /* @__PURE__ */
|
15513
|
+
}, progress, /* @__PURE__ */ React113.createElement(ProgressBar.Labels, {
|
14954
15514
|
className: tw("py-2"),
|
14955
15515
|
startLabel: props.startLabel,
|
14956
15516
|
endLabel: props.endLabel
|
14957
15517
|
}));
|
14958
15518
|
};
|
14959
|
-
var ProgressBarSkeleton = () => /* @__PURE__ */
|
15519
|
+
var ProgressBarSkeleton = () => /* @__PURE__ */ React113.createElement(Skeleton, {
|
14960
15520
|
height: 4,
|
14961
15521
|
display: "block"
|
14962
15522
|
});
|
@@ -14964,13 +15524,13 @@ ProgressBar2.Skeleton = ProgressBarSkeleton;
|
|
14964
15524
|
ProgressBar2.Skeleton.displayName = "ProgressBar.Skeleton";
|
14965
15525
|
|
14966
15526
|
// src/molecules/RadioButton/RadioButton.tsx
|
14967
|
-
import
|
14968
|
-
var RadioButton2 =
|
15527
|
+
import React114 from "react";
|
15528
|
+
var RadioButton2 = React114.forwardRef(
|
14969
15529
|
(_a, ref) => {
|
14970
15530
|
var _b = _a, { name, id, readOnly = false, disabled = false, caption, children, "aria-label": ariaLabel } = _b, props = __objRest(_b, ["name", "id", "readOnly", "disabled", "caption", "children", "aria-label"]);
|
14971
15531
|
var _a2;
|
14972
15532
|
const isChecked = (_a2 = props.checked) != null ? _a2 : props.defaultChecked;
|
14973
|
-
return !readOnly || isChecked ? /* @__PURE__ */
|
15533
|
+
return !readOnly || isChecked ? /* @__PURE__ */ React114.createElement(ControlLabel, {
|
14974
15534
|
htmlFor: id,
|
14975
15535
|
label: children,
|
14976
15536
|
"aria-label": ariaLabel,
|
@@ -14979,7 +15539,7 @@ var RadioButton2 = React104.forwardRef(
|
|
14979
15539
|
disabled,
|
14980
15540
|
style: { gap: "0 8px" },
|
14981
15541
|
className: "Aquarium-RadioButton"
|
14982
|
-
}, !readOnly && /* @__PURE__ */
|
15542
|
+
}, !readOnly && /* @__PURE__ */ React114.createElement(RadioButton, __spreadProps(__spreadValues({
|
14983
15543
|
id,
|
14984
15544
|
ref,
|
14985
15545
|
name
|
@@ -14990,12 +15550,12 @@ var RadioButton2 = React104.forwardRef(
|
|
14990
15550
|
}
|
14991
15551
|
);
|
14992
15552
|
RadioButton2.displayName = "RadioButton";
|
14993
|
-
var RadioButtonSkeleton = () => /* @__PURE__ */
|
15553
|
+
var RadioButtonSkeleton = () => /* @__PURE__ */ React114.createElement("div", {
|
14994
15554
|
className: tw("flex gap-3")
|
14995
|
-
}, /* @__PURE__ */
|
15555
|
+
}, /* @__PURE__ */ React114.createElement(Skeleton, {
|
14996
15556
|
height: 20,
|
14997
15557
|
width: 20
|
14998
|
-
}), /* @__PURE__ */
|
15558
|
+
}), /* @__PURE__ */ React114.createElement(Skeleton, {
|
14999
15559
|
height: 20,
|
15000
15560
|
width: 150
|
15001
15561
|
}));
|
@@ -15003,10 +15563,10 @@ RadioButton2.Skeleton = RadioButtonSkeleton;
|
|
15003
15563
|
RadioButton2.Skeleton.displayName = "RadioButton.Skeleton";
|
15004
15564
|
|
15005
15565
|
// src/molecules/RadioButtonGroup/RadioButtonGroup.tsx
|
15006
|
-
import
|
15007
|
-
import { useId as
|
15566
|
+
import React115 from "react";
|
15567
|
+
import { useId as useId18 } from "@react-aria/utils";
|
15008
15568
|
var isRadioButton = (c) => {
|
15009
|
-
return
|
15569
|
+
return React115.isValidElement(c) && c.type === RadioButton2;
|
15010
15570
|
};
|
15011
15571
|
var RadioButtonGroup = (_a) => {
|
15012
15572
|
var _b = _a, {
|
@@ -15029,8 +15589,8 @@ var RadioButtonGroup = (_a) => {
|
|
15029
15589
|
"children"
|
15030
15590
|
]);
|
15031
15591
|
var _a2;
|
15032
|
-
const [value, setValue] =
|
15033
|
-
const errorMessageId =
|
15592
|
+
const [value, setValue] = React115.useState((_a2 = _value != null ? _value : defaultValue) != null ? _a2 : "");
|
15593
|
+
const errorMessageId = useId18();
|
15034
15594
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
15035
15595
|
const labelControlProps = getLabelControlProps(props);
|
15036
15596
|
if (_value !== void 0 && _value !== value) {
|
@@ -15040,14 +15600,14 @@ var RadioButtonGroup = (_a) => {
|
|
15040
15600
|
setValue(e.target.value);
|
15041
15601
|
onChange == null ? void 0 : onChange(e.target.value);
|
15042
15602
|
};
|
15043
|
-
const content =
|
15603
|
+
const content = React115.Children.map(children, (c) => {
|
15044
15604
|
var _a3, _b2, _c;
|
15045
15605
|
if (!isRadioButton(c)) {
|
15046
15606
|
return null;
|
15047
15607
|
}
|
15048
15608
|
const defaultChecked = defaultValue === void 0 ? void 0 : c.props.value === defaultValue;
|
15049
15609
|
const checked = value === void 0 ? void 0 : c.props.value === value;
|
15050
|
-
return
|
15610
|
+
return React115.cloneElement(c, {
|
15051
15611
|
name,
|
15052
15612
|
defaultChecked: (_a3 = c.props.defaultChecked) != null ? _a3 : defaultChecked,
|
15053
15613
|
checked: (_b2 = c.props.checked) != null ? _b2 : checked,
|
@@ -15056,13 +15616,13 @@ var RadioButtonGroup = (_a) => {
|
|
15056
15616
|
readOnly
|
15057
15617
|
});
|
15058
15618
|
});
|
15059
|
-
return /* @__PURE__ */
|
15619
|
+
return /* @__PURE__ */ React115.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({
|
15060
15620
|
fieldset: true
|
15061
15621
|
}, labelControlProps), errorProps), {
|
15062
15622
|
className: "Aquarium-RadioButtonGroup"
|
15063
|
-
}), cols && /* @__PURE__ */
|
15623
|
+
}), cols && /* @__PURE__ */ React115.createElement(InputGroup, {
|
15064
15624
|
cols
|
15065
|
-
}, content), !cols && /* @__PURE__ */
|
15625
|
+
}, content), !cols && /* @__PURE__ */ React115.createElement(Flexbox, {
|
15066
15626
|
direction,
|
15067
15627
|
alignItems: "flex-start",
|
15068
15628
|
colGap: "8",
|
@@ -15071,12 +15631,12 @@ var RadioButtonGroup = (_a) => {
|
|
15071
15631
|
}, content));
|
15072
15632
|
};
|
15073
15633
|
var RadioButtonGroupSkeleton = ({ direction = "row", options = 2 }) => {
|
15074
|
-
return /* @__PURE__ */
|
15634
|
+
return /* @__PURE__ */ React115.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React115.createElement("div", {
|
15075
15635
|
className: tw("flex flex-wrap", {
|
15076
15636
|
"flex-row gap-8": direction === "row",
|
15077
15637
|
"flex-col gap-2": direction === "column"
|
15078
15638
|
})
|
15079
|
-
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */
|
15639
|
+
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */ React115.createElement(RadioButton2.Skeleton, {
|
15080
15640
|
key
|
15081
15641
|
}))));
|
15082
15642
|
};
|
@@ -15084,25 +15644,25 @@ RadioButtonGroup.Skeleton = RadioButtonGroupSkeleton;
|
|
15084
15644
|
RadioButtonGroup.Skeleton.displayName = "RadioButtonGroup.Skeleton";
|
15085
15645
|
|
15086
15646
|
// src/molecules/Section/Section.tsx
|
15087
|
-
import
|
15647
|
+
import React120, { useRef as useRef14 } from "react";
|
15088
15648
|
import { useButton as useButton4 } from "@react-aria/button";
|
15089
|
-
import { useId as
|
15649
|
+
import { useId as useId19 } from "@react-aria/utils";
|
15090
15650
|
import { animated as animated6, useSpring as useSpring5 } from "@react-spring/web";
|
15091
15651
|
import castArray7 from "lodash/castArray";
|
15092
15652
|
import isUndefined9 from "lodash/isUndefined";
|
15093
15653
|
|
15094
15654
|
// src/molecules/Switch/Switch.tsx
|
15095
|
-
import
|
15655
|
+
import React117 from "react";
|
15096
15656
|
|
15097
15657
|
// src/atoms/Switch/Switch.tsx
|
15098
|
-
import
|
15658
|
+
import React116 from "react";
|
15099
15659
|
var import_ban2 = __toESM(require_ban());
|
15100
|
-
var Switch =
|
15660
|
+
var Switch = React116.forwardRef(
|
15101
15661
|
(_a, ref) => {
|
15102
15662
|
var _b = _a, { id, children, name, disabled = false, readOnly = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly"]);
|
15103
|
-
return /* @__PURE__ */
|
15663
|
+
return /* @__PURE__ */ React116.createElement("span", {
|
15104
15664
|
className: tw("relative inline-flex justify-center items-center self-center group")
|
15105
|
-
}, /* @__PURE__ */
|
15665
|
+
}, /* @__PURE__ */ React116.createElement("input", __spreadProps(__spreadValues({
|
15106
15666
|
id,
|
15107
15667
|
ref,
|
15108
15668
|
type: "checkbox",
|
@@ -15121,7 +15681,7 @@ var Switch = React106.forwardRef(
|
|
15121
15681
|
),
|
15122
15682
|
readOnly,
|
15123
15683
|
disabled
|
15124
|
-
})), /* @__PURE__ */
|
15684
|
+
})), /* @__PURE__ */ React116.createElement("span", {
|
15125
15685
|
className: tw(
|
15126
15686
|
"pointer-events-none rounded-full absolute inline-flex justify-center items-center transition duration-300 h-4 w-4 transform peer-checked/switch:translate-x-5",
|
15127
15687
|
"bg-white left-2 peer-checked/switch:left-1 text-inactive peer-checked/switch:text-primary-muted",
|
@@ -15129,7 +15689,7 @@ var Switch = React106.forwardRef(
|
|
15129
15689
|
"shadow-4dp": !disabled
|
15130
15690
|
}
|
15131
15691
|
)
|
15132
|
-
}, disabled && /* @__PURE__ */
|
15692
|
+
}, disabled && /* @__PURE__ */ React116.createElement(Icon, {
|
15133
15693
|
icon: import_ban2.default,
|
15134
15694
|
width: "10px",
|
15135
15695
|
height: "10px"
|
@@ -15138,7 +15698,7 @@ var Switch = React106.forwardRef(
|
|
15138
15698
|
);
|
15139
15699
|
|
15140
15700
|
// src/molecules/Switch/Switch.tsx
|
15141
|
-
var Switch2 =
|
15701
|
+
var Switch2 = React117.forwardRef(
|
15142
15702
|
(_a, ref) => {
|
15143
15703
|
var _b = _a, {
|
15144
15704
|
id,
|
@@ -15161,7 +15721,7 @@ var Switch2 = React107.forwardRef(
|
|
15161
15721
|
]);
|
15162
15722
|
var _a2;
|
15163
15723
|
const isChecked = (_a2 = props.checked) != null ? _a2 : props.defaultChecked;
|
15164
|
-
return !readOnly || isChecked ? /* @__PURE__ */
|
15724
|
+
return !readOnly || isChecked ? /* @__PURE__ */ React117.createElement(ControlLabel, {
|
15165
15725
|
htmlFor: id,
|
15166
15726
|
label: children,
|
15167
15727
|
"aria-label": ariaLabel,
|
@@ -15171,7 +15731,7 @@ var Switch2 = React107.forwardRef(
|
|
15171
15731
|
style: { gap: "0 8px" },
|
15172
15732
|
labelPlacement,
|
15173
15733
|
className: "Aquarium-Switch"
|
15174
|
-
}, !readOnly && /* @__PURE__ */
|
15734
|
+
}, !readOnly && /* @__PURE__ */ React117.createElement(Switch, __spreadProps(__spreadValues({
|
15175
15735
|
id,
|
15176
15736
|
ref,
|
15177
15737
|
name
|
@@ -15182,12 +15742,12 @@ var Switch2 = React107.forwardRef(
|
|
15182
15742
|
}
|
15183
15743
|
);
|
15184
15744
|
Switch2.displayName = "Switch";
|
15185
|
-
var SwitchSkeleton = () => /* @__PURE__ */
|
15745
|
+
var SwitchSkeleton = () => /* @__PURE__ */ React117.createElement("div", {
|
15186
15746
|
className: tw("flex gap-3")
|
15187
|
-
}, /* @__PURE__ */
|
15747
|
+
}, /* @__PURE__ */ React117.createElement(Skeleton, {
|
15188
15748
|
height: 20,
|
15189
15749
|
width: 35
|
15190
|
-
}), /* @__PURE__ */
|
15750
|
+
}), /* @__PURE__ */ React117.createElement(Skeleton, {
|
15191
15751
|
height: 20,
|
15192
15752
|
width: 150
|
15193
15753
|
}));
|
@@ -15195,7 +15755,7 @@ Switch2.Skeleton = SwitchSkeleton;
|
|
15195
15755
|
Switch2.Skeleton.displayName = "Switch.Skeleton ";
|
15196
15756
|
|
15197
15757
|
// src/molecules/TagLabel/TagLabel.tsx
|
15198
|
-
import
|
15758
|
+
import React118 from "react";
|
15199
15759
|
var getVariantClassNames = (variant = "primary") => {
|
15200
15760
|
switch (variant) {
|
15201
15761
|
case "neutral":
|
@@ -15211,7 +15771,7 @@ var getVariantClassNames = (variant = "primary") => {
|
|
15211
15771
|
};
|
15212
15772
|
var TagLabel = (_a) => {
|
15213
15773
|
var _b = _a, { title, dense = false, variant } = _b, rest = __objRest(_b, ["title", "dense", "variant"]);
|
15214
|
-
return /* @__PURE__ */
|
15774
|
+
return /* @__PURE__ */ React118.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
15215
15775
|
className: classNames(
|
15216
15776
|
"Aquarium-TagLabel",
|
15217
15777
|
getVariantClassNames(variant),
|
@@ -15225,11 +15785,11 @@ var TagLabel = (_a) => {
|
|
15225
15785
|
};
|
15226
15786
|
|
15227
15787
|
// src/atoms/Section/Section.tsx
|
15228
|
-
import
|
15788
|
+
import React119 from "react";
|
15229
15789
|
var import_caretUp2 = __toESM(require_caretUp());
|
15230
15790
|
var Section3 = (_a) => {
|
15231
15791
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
15232
|
-
return /* @__PURE__ */
|
15792
|
+
return /* @__PURE__ */ React119.createElement(Box, __spreadValues({
|
15233
15793
|
component: "section",
|
15234
15794
|
borderColor: "grey-5",
|
15235
15795
|
borderWidth: "1px"
|
@@ -15237,7 +15797,7 @@ var Section3 = (_a) => {
|
|
15237
15797
|
};
|
15238
15798
|
Section3.Header = (_a) => {
|
15239
15799
|
var _b = _a, { children, className, expanded } = _b, rest = __objRest(_b, ["children", "className", "expanded"]);
|
15240
|
-
return /* @__PURE__ */
|
15800
|
+
return /* @__PURE__ */ React119.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15241
15801
|
className: classNames(
|
15242
15802
|
tw("px-6 flex gap-5 justify-between items-center h-[72px]", {
|
15243
15803
|
"bg-muted": expanded
|
@@ -15246,10 +15806,10 @@ Section3.Header = (_a) => {
|
|
15246
15806
|
)
|
15247
15807
|
}), children);
|
15248
15808
|
};
|
15249
|
-
Section3.TitleContainer =
|
15809
|
+
Section3.TitleContainer = React119.forwardRef(
|
15250
15810
|
(_a, ref) => {
|
15251
15811
|
var _b = _a, { children, className, collapsible } = _b, rest = __objRest(_b, ["children", "className", "collapsible"]);
|
15252
|
-
return /* @__PURE__ */
|
15812
|
+
return /* @__PURE__ */ React119.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15253
15813
|
ref,
|
15254
15814
|
className: classNames(
|
15255
15815
|
tw("grow grid grid-cols-[auto_1fr] gap-x-3 items-center", {
|
@@ -15260,14 +15820,14 @@ Section3.TitleContainer = React109.forwardRef(
|
|
15260
15820
|
}), children);
|
15261
15821
|
}
|
15262
15822
|
);
|
15263
|
-
Section3.Toggle = (props) => /* @__PURE__ */
|
15823
|
+
Section3.Toggle = (props) => /* @__PURE__ */ React119.createElement(Icon, __spreadProps(__spreadValues({}, props), {
|
15264
15824
|
icon: import_caretUp2.default,
|
15265
15825
|
height: 22,
|
15266
15826
|
width: 22
|
15267
15827
|
}));
|
15268
15828
|
Section3.Title = (_a) => {
|
15269
15829
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
15270
|
-
return /* @__PURE__ */
|
15830
|
+
return /* @__PURE__ */ React119.createElement(Typography2.Large, __spreadProps(__spreadValues({}, rest), {
|
15271
15831
|
htmlTag: "h2",
|
15272
15832
|
color: "intense",
|
15273
15833
|
className: "flex gap-3 items-center"
|
@@ -15275,21 +15835,21 @@ Section3.Title = (_a) => {
|
|
15275
15835
|
};
|
15276
15836
|
Section3.Subtitle = (_a) => {
|
15277
15837
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
15278
|
-
return /* @__PURE__ */
|
15838
|
+
return /* @__PURE__ */ React119.createElement(Typography2.Small, __spreadProps(__spreadValues({}, rest), {
|
15279
15839
|
color: "default"
|
15280
15840
|
}), children);
|
15281
15841
|
};
|
15282
15842
|
Section3.Actions = (_a) => {
|
15283
15843
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
15284
|
-
return /* @__PURE__ */
|
15844
|
+
return /* @__PURE__ */ React119.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15285
15845
|
className: classNames(tw("flex gap-4 justify-end"), className)
|
15286
15846
|
}), children);
|
15287
15847
|
};
|
15288
15848
|
Section3.Body = (_a) => {
|
15289
15849
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
15290
|
-
return /* @__PURE__ */
|
15850
|
+
return /* @__PURE__ */ React119.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15291
15851
|
className: classNames(tw("p-6"), className)
|
15292
|
-
}), /* @__PURE__ */
|
15852
|
+
}), /* @__PURE__ */ React119.createElement(Typography, {
|
15293
15853
|
htmlTag: "div",
|
15294
15854
|
color: "default"
|
15295
15855
|
}, children));
|
@@ -15303,7 +15863,7 @@ var Section4 = (props) => {
|
|
15303
15863
|
const _collapsible = title ? (_a = props.collapsible) != null ? _a : false : false;
|
15304
15864
|
const _collapsed = title ? props.collapsed : void 0;
|
15305
15865
|
const _defaultCollapsed = title ? (_b = props.defaultCollapsed) != null ? _b : false : false;
|
15306
|
-
const [isCollapsed, setCollapsed] =
|
15866
|
+
const [isCollapsed, setCollapsed] = React120.useState(_collapsed != null ? _collapsed : _defaultCollapsed);
|
15307
15867
|
const [ref, { height }] = useMeasure();
|
15308
15868
|
const toggleAreaRef = useRef14(null);
|
15309
15869
|
const menu = title ? (_c = props.menu) != null ? _c : void 0 : void 0;
|
@@ -15335,20 +15895,20 @@ var Section4 = (props) => {
|
|
15335
15895
|
},
|
15336
15896
|
immediate: !_collapsible
|
15337
15897
|
}), { transform, backgroundColor } = _f, spring = __objRest(_f, ["transform", "backgroundColor"]);
|
15338
|
-
const toggleId =
|
15339
|
-
const regionId =
|
15340
|
-
const titleId =
|
15898
|
+
const toggleId = useId19();
|
15899
|
+
const regionId = useId19();
|
15900
|
+
const titleId = useId19();
|
15341
15901
|
const hasTabs = isComponentType(children, Tabs);
|
15342
15902
|
const { buttonProps } = useButton4(
|
15343
15903
|
{ "elementType": "div", "onPress": handleTitleClick, "aria-expanded": !isCollapsed, "aria-controls": regionId },
|
15344
15904
|
toggleAreaRef
|
15345
15905
|
);
|
15346
|
-
return /* @__PURE__ */
|
15906
|
+
return /* @__PURE__ */ React120.createElement(Section3, {
|
15347
15907
|
"aria-label": title,
|
15348
15908
|
className: "Aquarium-Section"
|
15349
|
-
}, title && /* @__PURE__ */
|
15909
|
+
}, title && /* @__PURE__ */ React120.createElement(React120.Fragment, null, /* @__PURE__ */ React120.createElement(Section3.Header, {
|
15350
15910
|
expanded: _collapsible && !isCollapsed
|
15351
|
-
}, /* @__PURE__ */
|
15911
|
+
}, /* @__PURE__ */ React120.createElement(Section3.TitleContainer, __spreadProps(__spreadValues({}, _collapsible ? __spreadProps(__spreadValues({}, buttonProps), {
|
15352
15912
|
onPointerDown: (e) => {
|
15353
15913
|
e.preventDefault();
|
15354
15914
|
handleTitleClick();
|
@@ -15357,49 +15917,49 @@ var Section4 = (props) => {
|
|
15357
15917
|
ref: _collapsible ? toggleAreaRef : void 0,
|
15358
15918
|
id: toggleId,
|
15359
15919
|
collapsible: _collapsible
|
15360
|
-
}), _collapsible && /* @__PURE__ */
|
15920
|
+
}), _collapsible && /* @__PURE__ */ React120.createElement(animated6.div, {
|
15361
15921
|
style: { transform }
|
15362
|
-
}, /* @__PURE__ */
|
15922
|
+
}, /* @__PURE__ */ React120.createElement(Section3.Toggle, null)), /* @__PURE__ */ React120.createElement(Section3.Title, {
|
15363
15923
|
id: titleId
|
15364
|
-
}, /* @__PURE__ */
|
15924
|
+
}, /* @__PURE__ */ React120.createElement(LineClamp2, {
|
15365
15925
|
lines: 1
|
15366
|
-
}, title), props.tag && /* @__PURE__ */
|
15926
|
+
}, title), props.tag && /* @__PURE__ */ React120.createElement(TagLabel, __spreadValues({}, props.tag)), props.badge && /* @__PURE__ */ React120.createElement(Chip2, {
|
15367
15927
|
text: props.badge
|
15368
|
-
}), props.chip && /* @__PURE__ */
|
15928
|
+
}), props.chip && /* @__PURE__ */ React120.createElement(StatusChip, __spreadValues({}, props.chip))), subtitle && /* @__PURE__ */ React120.createElement(Section3.Subtitle, {
|
15369
15929
|
className: tw("row-start-2", { "col-start-2": _collapsible })
|
15370
|
-
}, /* @__PURE__ */
|
15930
|
+
}, /* @__PURE__ */ React120.createElement(LineClamp2, {
|
15371
15931
|
lines: 1
|
15372
|
-
}, subtitle))), !isCollapsed && /* @__PURE__ */
|
15932
|
+
}, subtitle))), !isCollapsed && /* @__PURE__ */ React120.createElement(Section3.Actions, null, menu && /* @__PURE__ */ React120.createElement(Box.Flex, {
|
15373
15933
|
alignItems: "center"
|
15374
|
-
}, /* @__PURE__ */
|
15934
|
+
}, /* @__PURE__ */ React120.createElement(DropdownMenu2, {
|
15375
15935
|
onAction: (action) => onAction == null ? void 0 : onAction(action),
|
15376
15936
|
onOpenChange: onMenuOpenChange,
|
15377
15937
|
placement: defaultContextualMenuPlacement
|
15378
|
-
}, /* @__PURE__ */
|
15938
|
+
}, /* @__PURE__ */ React120.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React120.createElement(Button.Icon, {
|
15379
15939
|
"aria-label": menuAriaLabel,
|
15380
15940
|
icon: import_more6.default
|
15381
|
-
})), menu)), props.actions && castArray7(props.actions).filter(Boolean).map((action) => renderAction({ kind: "secondary", action })), props.switch && /* @__PURE__ */
|
15941
|
+
})), menu)), props.actions && castArray7(props.actions).filter(Boolean).map((action) => renderAction({ kind: "secondary", action })), props.switch && /* @__PURE__ */ React120.createElement(Switch2, __spreadValues({}, props.switch)), props.select && /* @__PURE__ */ React120.createElement(SelectBase, __spreadValues({
|
15382
15942
|
"aria-labelledby": titleId
|
15383
|
-
}, props.select)))), !hasTabs && !isCollapsed && /* @__PURE__ */
|
15943
|
+
}, props.select)))), !hasTabs && !isCollapsed && /* @__PURE__ */ React120.createElement(animated6.div, {
|
15384
15944
|
className: tw(`h-[1px]`),
|
15385
15945
|
style: { backgroundColor }
|
15386
|
-
})), /* @__PURE__ */
|
15946
|
+
})), /* @__PURE__ */ React120.createElement(animated6.div, {
|
15387
15947
|
id: regionId,
|
15388
15948
|
"aria-hidden": _collapsible ? isCollapsed ? true : void 0 : void 0,
|
15389
15949
|
style: spring,
|
15390
15950
|
className: tw({ "overflow-hidden": _collapsible })
|
15391
|
-
}, /* @__PURE__ */
|
15951
|
+
}, /* @__PURE__ */ React120.createElement("div", {
|
15392
15952
|
ref
|
15393
|
-
}, hasTabs ? /* @__PURE__ */
|
15953
|
+
}, hasTabs ? /* @__PURE__ */ React120.createElement(SectionTabs, __spreadProps(__spreadValues({}, children.props), {
|
15394
15954
|
className: tw("[&>div:first-child]:px-3 grow flex flex-col overflow-y-auto", { "mt-4": _collapsible })
|
15395
|
-
})) : /* @__PURE__ */
|
15955
|
+
})) : /* @__PURE__ */ React120.createElement(Section3.Body, null, children))));
|
15396
15956
|
};
|
15397
|
-
var SectionTabs = createTabsComponent(ModalTab, TabItem, "SectionTabs", (children, selected) => /* @__PURE__ */
|
15957
|
+
var SectionTabs = createTabsComponent(ModalTab, TabItem, "SectionTabs", (children, selected) => /* @__PURE__ */ React120.createElement(Section3.Body, null, children.find(
|
15398
15958
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
15399
15959
|
)));
|
15400
15960
|
|
15401
15961
|
// src/molecules/SegmentedControl/SegmentedControl.tsx
|
15402
|
-
import
|
15962
|
+
import React121 from "react";
|
15403
15963
|
var SegmentedControl = (_a) => {
|
15404
15964
|
var _b = _a, {
|
15405
15965
|
children,
|
@@ -15416,7 +15976,7 @@ var SegmentedControl = (_a) => {
|
|
15416
15976
|
"selected",
|
15417
15977
|
"className"
|
15418
15978
|
]);
|
15419
|
-
return /* @__PURE__ */
|
15979
|
+
return /* @__PURE__ */ React121.createElement("li", null, /* @__PURE__ */ React121.createElement("button", __spreadProps(__spreadValues({
|
15420
15980
|
type: "button"
|
15421
15981
|
}, rest), {
|
15422
15982
|
className: classNames(getBaseSegmentedControlClassNames(selected), className),
|
@@ -15441,16 +16001,16 @@ var SegmentedControlGroup = (_a) => {
|
|
15441
16001
|
"className",
|
15442
16002
|
"ariaLabel"
|
15443
16003
|
]);
|
15444
|
-
return /* @__PURE__ */
|
16004
|
+
return /* @__PURE__ */ React121.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
15445
16005
|
"aria-label": ariaLabel,
|
15446
16006
|
className: classNames(
|
15447
16007
|
"Aquarium-SegmentedControl",
|
15448
16008
|
"flex border border-default rounded-sm divide-x divide-grey-20",
|
15449
16009
|
className
|
15450
16010
|
)
|
15451
|
-
}),
|
16011
|
+
}), React121.Children.map(
|
15452
16012
|
children,
|
15453
|
-
(child) =>
|
16013
|
+
(child) => React121.cloneElement(child, {
|
15454
16014
|
onClick: () => onChange(child.props.value),
|
15455
16015
|
selected: child.props.value === value
|
15456
16016
|
})
|
@@ -15467,14 +16027,14 @@ var getBaseSegmentedControlClassNames = (selected) => tw(
|
|
15467
16027
|
);
|
15468
16028
|
|
15469
16029
|
// src/molecules/Stepper/Stepper.tsx
|
15470
|
-
import
|
16030
|
+
import React123 from "react";
|
15471
16031
|
|
15472
16032
|
// src/atoms/Stepper/Stepper.tsx
|
15473
|
-
import
|
16033
|
+
import React122 from "react";
|
15474
16034
|
var import_tick6 = __toESM(require_tick());
|
15475
16035
|
var Stepper = (_a) => {
|
15476
16036
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15477
|
-
return /* @__PURE__ */
|
16037
|
+
return /* @__PURE__ */ React122.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15478
16038
|
className: classNames(className)
|
15479
16039
|
}));
|
15480
16040
|
};
|
@@ -15488,7 +16048,7 @@ var ConnectorContainer = (_a) => {
|
|
15488
16048
|
"completed",
|
15489
16049
|
"dense"
|
15490
16050
|
]);
|
15491
|
-
return /* @__PURE__ */
|
16051
|
+
return /* @__PURE__ */ React122.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15492
16052
|
className: classNames(
|
15493
16053
|
tw("absolute w-full -left-1/2", {
|
15494
16054
|
"top-[3px] px-[14px]": Boolean(dense),
|
@@ -15500,7 +16060,7 @@ var ConnectorContainer = (_a) => {
|
|
15500
16060
|
};
|
15501
16061
|
var Connector = (_a) => {
|
15502
16062
|
var _b = _a, { children, className, completed, dense } = _b, rest = __objRest(_b, ["children", "className", "completed", "dense"]);
|
15503
|
-
return /* @__PURE__ */
|
16063
|
+
return /* @__PURE__ */ React122.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15504
16064
|
className: classNames(
|
15505
16065
|
tw("w-full", {
|
15506
16066
|
"bg-intense": !completed,
|
@@ -15514,7 +16074,7 @@ var Connector = (_a) => {
|
|
15514
16074
|
};
|
15515
16075
|
var Step = (_a) => {
|
15516
16076
|
var _b = _a, { className, state } = _b, rest = __objRest(_b, ["className", "state"]);
|
15517
|
-
return /* @__PURE__ */
|
16077
|
+
return /* @__PURE__ */ React122.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15518
16078
|
className: classNames(
|
15519
16079
|
tw("flex flex-col items-center relative text-center", {
|
15520
16080
|
"text-intense": state !== "inactive",
|
@@ -15536,13 +16096,13 @@ var getDenseClassNames = (state) => tw("h-[8px] w-[8px]", {
|
|
15536
16096
|
});
|
15537
16097
|
var Indicator = (_a) => {
|
15538
16098
|
var _b = _a, { children, className, state, dense } = _b, rest = __objRest(_b, ["children", "className", "state", "dense"]);
|
15539
|
-
return /* @__PURE__ */
|
16099
|
+
return /* @__PURE__ */ React122.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15540
16100
|
className: classNames(
|
15541
16101
|
tw("rounded-full flex justify-center items-center mx-2 mb-3"),
|
15542
16102
|
dense ? getDenseClassNames(state) : getClassNames(state),
|
15543
16103
|
className
|
15544
16104
|
)
|
15545
|
-
}), state === "completed" ? /* @__PURE__ */
|
16105
|
+
}), state === "completed" ? /* @__PURE__ */ React122.createElement(InlineIcon, {
|
15546
16106
|
icon: import_tick6.default
|
15547
16107
|
}) : dense ? null : children);
|
15548
16108
|
};
|
@@ -15553,26 +16113,26 @@ Stepper.ConnectorContainer = ConnectorContainer;
|
|
15553
16113
|
|
15554
16114
|
// src/molecules/Stepper/Stepper.tsx
|
15555
16115
|
var Stepper2 = ({ children, activeIndex, dense }) => {
|
15556
|
-
const steps =
|
15557
|
-
return /* @__PURE__ */
|
16116
|
+
const steps = React123.Children.count(children);
|
16117
|
+
return /* @__PURE__ */ React123.createElement(Stepper, {
|
15558
16118
|
role: "list",
|
15559
16119
|
className: "Aquarium-Stepper"
|
15560
|
-
}, /* @__PURE__ */
|
16120
|
+
}, /* @__PURE__ */ React123.createElement(Template, {
|
15561
16121
|
columns: steps
|
15562
|
-
},
|
16122
|
+
}, React123.Children.map(children, (child, index) => {
|
15563
16123
|
if (!isComponentType(child, Step2)) {
|
15564
16124
|
throw new Error("<Stepper> can only have <Stepper.Step> components as children");
|
15565
16125
|
} else {
|
15566
16126
|
const state = index > activeIndex ? "inactive" : index === activeIndex ? "active" : "completed";
|
15567
|
-
return /* @__PURE__ */
|
16127
|
+
return /* @__PURE__ */ React123.createElement(Stepper.Step, {
|
15568
16128
|
state,
|
15569
16129
|
"aria-current": state === "active" ? "step" : false,
|
15570
16130
|
role: "listitem"
|
15571
|
-
}, index > 0 && index <= steps && /* @__PURE__ */
|
16131
|
+
}, index > 0 && index <= steps && /* @__PURE__ */ React123.createElement(Stepper.ConnectorContainer, {
|
15572
16132
|
dense
|
15573
|
-
}, /* @__PURE__ */
|
16133
|
+
}, /* @__PURE__ */ React123.createElement(Stepper.ConnectorContainer.Connector, {
|
15574
16134
|
completed: state === "completed" || state === "active"
|
15575
|
-
})), /* @__PURE__ */
|
16135
|
+
})), /* @__PURE__ */ React123.createElement(Stepper.Step.Indicator, {
|
15576
16136
|
state,
|
15577
16137
|
dense
|
15578
16138
|
}, index + 1), child.props.children);
|
@@ -15585,8 +16145,8 @@ Step2.displayName = "Stepper.Step";
|
|
15585
16145
|
Stepper2.Step = Step2;
|
15586
16146
|
|
15587
16147
|
// src/molecules/SwitchGroup/SwitchGroup.tsx
|
15588
|
-
import
|
15589
|
-
import { useId as
|
16148
|
+
import React124, { useState as useState14 } from "react";
|
16149
|
+
import { useId as useId20 } from "@react-aria/utils";
|
15590
16150
|
var SwitchGroup = (_a) => {
|
15591
16151
|
var _b = _a, {
|
15592
16152
|
value,
|
@@ -15608,7 +16168,7 @@ var SwitchGroup = (_a) => {
|
|
15608
16168
|
if (value !== void 0 && value !== selectedItems) {
|
15609
16169
|
setSelectedItems(value);
|
15610
16170
|
}
|
15611
|
-
const errorMessageId =
|
16171
|
+
const errorMessageId = useId20();
|
15612
16172
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
15613
16173
|
const labelControlProps = getLabelControlProps(props);
|
15614
16174
|
const handleChange = (e) => {
|
@@ -15617,13 +16177,13 @@ var SwitchGroup = (_a) => {
|
|
15617
16177
|
setSelectedItems(updated);
|
15618
16178
|
onChange == null ? void 0 : onChange(updated);
|
15619
16179
|
};
|
15620
|
-
return /* @__PURE__ */
|
16180
|
+
return /* @__PURE__ */ React124.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({
|
15621
16181
|
fieldset: true
|
15622
16182
|
}, labelControlProps), errorProps), {
|
15623
16183
|
className: "Aquarium-SwitchGroup"
|
15624
|
-
}), /* @__PURE__ */
|
16184
|
+
}), /* @__PURE__ */ React124.createElement(InputGroup, {
|
15625
16185
|
cols
|
15626
|
-
},
|
16186
|
+
}, React124.Children.map(children, (c) => {
|
15627
16187
|
var _a3, _b2, _c, _d;
|
15628
16188
|
if (!isComponentType(c, Switch2)) {
|
15629
16189
|
return null;
|
@@ -15631,7 +16191,7 @@ var SwitchGroup = (_a) => {
|
|
15631
16191
|
const str = (_a3 = c.props.value) == null ? void 0 : _a3.toString();
|
15632
16192
|
const defaultChecked = defaultValue === void 0 ? void 0 : str !== void 0 && defaultValue.includes(str);
|
15633
16193
|
const checked = value === void 0 ? void 0 : str !== void 0 && value.includes(str);
|
15634
|
-
return
|
16194
|
+
return React124.cloneElement(c, {
|
15635
16195
|
defaultChecked: (_b2 = c.props.defaultChecked) != null ? _b2 : defaultChecked,
|
15636
16196
|
checked: (_c = c.props.checked) != null ? _c : checked,
|
15637
16197
|
onChange: (_d = c.props.onChange) != null ? _d : handleChange,
|
@@ -15641,9 +16201,9 @@ var SwitchGroup = (_a) => {
|
|
15641
16201
|
})));
|
15642
16202
|
};
|
15643
16203
|
var SwitchGroupSkeleton = ({ options = 2 }) => {
|
15644
|
-
return /* @__PURE__ */
|
16204
|
+
return /* @__PURE__ */ React124.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React124.createElement("div", {
|
15645
16205
|
className: tw("flex flex-wrap flex-col gap-2")
|
15646
|
-
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */
|
16206
|
+
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */ React124.createElement(Switch2.Skeleton, {
|
15647
16207
|
key
|
15648
16208
|
}))));
|
15649
16209
|
};
|
@@ -15651,14 +16211,14 @@ SwitchGroup.Skeleton = SwitchGroupSkeleton;
|
|
15651
16211
|
SwitchGroup.Skeleton.displayName = "SwitchGroup.Skeleton";
|
15652
16212
|
|
15653
16213
|
// src/molecules/Textarea/Textarea.tsx
|
15654
|
-
import
|
15655
|
-
import { useId as
|
15656
|
-
import
|
16214
|
+
import React125, { useState as useState15 } from "react";
|
16215
|
+
import { useId as useId21 } from "@react-aria/utils";
|
16216
|
+
import omit19 from "lodash/omit";
|
15657
16217
|
import toString2 from "lodash/toString";
|
15658
|
-
var TextareaBase =
|
16218
|
+
var TextareaBase = React125.forwardRef(
|
15659
16219
|
(_a, ref) => {
|
15660
16220
|
var _b = _a, { readOnly = false, valid = true } = _b, props = __objRest(_b, ["readOnly", "valid"]);
|
15661
|
-
return /* @__PURE__ */
|
16221
|
+
return /* @__PURE__ */ React125.createElement("textarea", __spreadProps(__spreadValues({
|
15662
16222
|
ref
|
15663
16223
|
}, props), {
|
15664
16224
|
readOnly,
|
@@ -15666,26 +16226,26 @@ var TextareaBase = React115.forwardRef(
|
|
15666
16226
|
}));
|
15667
16227
|
}
|
15668
16228
|
);
|
15669
|
-
TextareaBase.Skeleton = () => /* @__PURE__ */
|
16229
|
+
TextareaBase.Skeleton = () => /* @__PURE__ */ React125.createElement(Skeleton, {
|
15670
16230
|
height: 58
|
15671
16231
|
});
|
15672
|
-
var Textarea =
|
16232
|
+
var Textarea = React125.forwardRef((props, ref) => {
|
15673
16233
|
var _a, _b, _c;
|
15674
16234
|
const [value, setValue] = useState15((_b = (_a = props.value) != null ? _a : props.defaultValue) != null ? _b : "");
|
15675
|
-
const defaultId =
|
16235
|
+
const defaultId = useId21();
|
15676
16236
|
const id = (_c = props.id) != null ? _c : defaultId;
|
15677
|
-
const errorMessageId =
|
16237
|
+
const errorMessageId = useId21();
|
15678
16238
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
15679
16239
|
const _d = getLabelControlProps(props), { "data-testid": dataTestId } = _d, labelControlProps = __objRest(_d, ["data-testid"]);
|
15680
|
-
const baseProps =
|
15681
|
-
return /* @__PURE__ */
|
16240
|
+
const baseProps = omit19(props, Object.keys(labelControlProps));
|
16241
|
+
return /* @__PURE__ */ React125.createElement(LabelControl, __spreadProps(__spreadValues({
|
15682
16242
|
id: `${id}-label`,
|
15683
16243
|
htmlFor: id,
|
15684
16244
|
messageId: errorMessageId,
|
15685
16245
|
length: value !== void 0 ? toString2(value).length : void 0
|
15686
16246
|
}, labelControlProps), {
|
15687
16247
|
className: "Aquarium-Textarea"
|
15688
|
-
}), /* @__PURE__ */
|
16248
|
+
}), /* @__PURE__ */ React125.createElement(TextareaBase, __spreadProps(__spreadValues(__spreadValues({
|
15689
16249
|
ref
|
15690
16250
|
}, baseProps), errorProps), {
|
15691
16251
|
id,
|
@@ -15702,48 +16262,48 @@ var Textarea = React115.forwardRef((props, ref) => {
|
|
15702
16262
|
})));
|
15703
16263
|
});
|
15704
16264
|
Textarea.displayName = "Textarea";
|
15705
|
-
var TextAreaSkeleton = () => /* @__PURE__ */
|
16265
|
+
var TextAreaSkeleton = () => /* @__PURE__ */ React125.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React125.createElement(TextareaBase.Skeleton, null));
|
15706
16266
|
Textarea.Skeleton = TextAreaSkeleton;
|
15707
16267
|
Textarea.Skeleton.displayName = "Textarea.Skeleton";
|
15708
16268
|
|
15709
16269
|
// src/molecules/Timeline/Timeline.tsx
|
15710
|
-
import
|
16270
|
+
import React127 from "react";
|
15711
16271
|
|
15712
16272
|
// src/atoms/Timeline/Timeline.tsx
|
15713
|
-
import
|
16273
|
+
import React126 from "react";
|
15714
16274
|
var Timeline = (_a) => {
|
15715
16275
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15716
|
-
return /* @__PURE__ */
|
16276
|
+
return /* @__PURE__ */ React126.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15717
16277
|
className: classNames(tw("grid grid-cols-[16px_1fr] gap-x-4"), className)
|
15718
16278
|
}));
|
15719
16279
|
};
|
15720
16280
|
var Content2 = (_a) => {
|
15721
16281
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15722
|
-
return /* @__PURE__ */
|
16282
|
+
return /* @__PURE__ */ React126.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15723
16283
|
className: classNames(tw("pb-6"), className)
|
15724
16284
|
}));
|
15725
16285
|
};
|
15726
16286
|
var Separator2 = (_a) => {
|
15727
16287
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15728
|
-
return /* @__PURE__ */
|
16288
|
+
return /* @__PURE__ */ React126.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15729
16289
|
className: classNames(tw("flex items-center justify-center h-5 w-5"), className)
|
15730
16290
|
}));
|
15731
16291
|
};
|
15732
16292
|
var LineContainer = (_a) => {
|
15733
16293
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15734
|
-
return /* @__PURE__ */
|
16294
|
+
return /* @__PURE__ */ React126.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15735
16295
|
className: classNames(tw("flex justify-center py-1"), className)
|
15736
16296
|
}));
|
15737
16297
|
};
|
15738
16298
|
var Line = (_a) => {
|
15739
16299
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15740
|
-
return /* @__PURE__ */
|
16300
|
+
return /* @__PURE__ */ React126.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15741
16301
|
className: classNames(tw("w-1 bg-default h-full justify-self-center"), className)
|
15742
16302
|
}));
|
15743
16303
|
};
|
15744
16304
|
var Dot = (_a) => {
|
15745
16305
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15746
|
-
return /* @__PURE__ */
|
16306
|
+
return /* @__PURE__ */ React126.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15747
16307
|
className: classNames(tw("bg-intense h-[6px] w-[6px] rounded"), className)
|
15748
16308
|
}));
|
15749
16309
|
};
|
@@ -15758,64 +16318,68 @@ var import_error5 = __toESM(require_error());
|
|
15758
16318
|
var import_time2 = __toESM(require_time());
|
15759
16319
|
var import_warningSign5 = __toESM(require_warningSign());
|
15760
16320
|
var TimelineItem = () => null;
|
15761
|
-
var Timeline2 = ({ children }) => /* @__PURE__ */
|
16321
|
+
var Timeline2 = ({ children }) => /* @__PURE__ */ React127.createElement("div", {
|
15762
16322
|
className: "Aquarium-Timeline"
|
15763
|
-
},
|
16323
|
+
}, React127.Children.map(children, (item) => {
|
15764
16324
|
if (!isComponentType(item, TimelineItem)) {
|
15765
16325
|
throw new Error("<Timeline> can only have <Timeline.Item> components as children");
|
15766
16326
|
} else {
|
15767
16327
|
const { props, key } = item;
|
15768
|
-
return /* @__PURE__ */
|
16328
|
+
return /* @__PURE__ */ React127.createElement(Timeline, {
|
15769
16329
|
key: key != null ? key : props.title
|
15770
|
-
}, /* @__PURE__ */
|
16330
|
+
}, /* @__PURE__ */ React127.createElement(Timeline.Separator, null, props.variant === "error" ? /* @__PURE__ */ React127.createElement(Icon, {
|
15771
16331
|
icon: import_error5.default,
|
15772
16332
|
color: "danger-default"
|
15773
|
-
}) : props.variant === "warning" ? /* @__PURE__ */
|
16333
|
+
}) : props.variant === "warning" ? /* @__PURE__ */ React127.createElement(Icon, {
|
15774
16334
|
icon: import_warningSign5.default,
|
15775
16335
|
color: "warning-default"
|
15776
|
-
}) : props.variant === "info" ? /* @__PURE__ */
|
16336
|
+
}) : props.variant === "info" ? /* @__PURE__ */ React127.createElement(Icon, {
|
15777
16337
|
icon: import_time2.default,
|
15778
16338
|
color: "info-default"
|
15779
|
-
}) : /* @__PURE__ */
|
16339
|
+
}) : /* @__PURE__ */ React127.createElement(Timeline.Separator.Dot, null)), /* @__PURE__ */ React127.createElement(Typography2.Caption, {
|
15780
16340
|
color: "muted"
|
15781
|
-
}, props.title), /* @__PURE__ */
|
16341
|
+
}, props.title), /* @__PURE__ */ React127.createElement(Timeline.LineContainer, null, /* @__PURE__ */ React127.createElement(Timeline.LineContainer.Line, null)), /* @__PURE__ */ React127.createElement(Timeline.Content, null, /* @__PURE__ */ React127.createElement(Typography2.Small, null, props.children)));
|
15782
16342
|
}
|
15783
16343
|
}));
|
15784
|
-
var TimelineItemSkeleton = () => /* @__PURE__ */
|
16344
|
+
var TimelineItemSkeleton = () => /* @__PURE__ */ React127.createElement(Timeline, null, /* @__PURE__ */ React127.createElement(Timeline.Separator, null, /* @__PURE__ */ React127.createElement(Skeleton, {
|
15785
16345
|
width: 6,
|
15786
16346
|
height: 6,
|
15787
16347
|
rounded: true
|
15788
|
-
})), /* @__PURE__ */
|
16348
|
+
})), /* @__PURE__ */ React127.createElement(Skeleton, {
|
15789
16349
|
height: 12,
|
15790
16350
|
width: 120
|
15791
|
-
}), /* @__PURE__ */
|
16351
|
+
}), /* @__PURE__ */ React127.createElement(Timeline.LineContainer, null, /* @__PURE__ */ React127.createElement(Skeleton, {
|
15792
16352
|
width: 2,
|
15793
16353
|
height: "100%"
|
15794
|
-
})), /* @__PURE__ */
|
16354
|
+
})), /* @__PURE__ */ React127.createElement(Timeline.Content, null, /* @__PURE__ */ React127.createElement(Box, {
|
15795
16355
|
display: "flex",
|
15796
16356
|
flexDirection: "column",
|
15797
16357
|
gap: "3"
|
15798
|
-
}, /* @__PURE__ */
|
16358
|
+
}, /* @__PURE__ */ React127.createElement(Skeleton, {
|
15799
16359
|
height: 32,
|
15800
16360
|
width: "100%"
|
15801
|
-
}), /* @__PURE__ */
|
16361
|
+
}), /* @__PURE__ */ React127.createElement(Skeleton, {
|
15802
16362
|
height: 32,
|
15803
16363
|
width: "73%"
|
15804
|
-
}), /* @__PURE__ */
|
16364
|
+
}), /* @__PURE__ */ React127.createElement(Skeleton, {
|
15805
16365
|
height: 32,
|
15806
16366
|
width: "80%"
|
15807
16367
|
}))));
|
15808
|
-
var TimelineSkeleton = ({ items = 3 }) => /* @__PURE__ */
|
16368
|
+
var TimelineSkeleton = ({ items = 3 }) => /* @__PURE__ */ React127.createElement("div", null, Array.from({ length: items }).map((_, key) => /* @__PURE__ */ React127.createElement(TimelineItemSkeleton, {
|
15809
16369
|
key
|
15810
16370
|
})));
|
15811
16371
|
Timeline2.Item = TimelineItem;
|
15812
16372
|
Timeline2.Skeleton = TimelineSkeleton;
|
15813
16373
|
Timeline2.Skeleton.displayName = "Timeline.Skeleton";
|
15814
16374
|
|
16375
|
+
// src/molecules/TimePicker/TimePicker.tsx
|
16376
|
+
import React128 from "react";
|
16377
|
+
var TimePicker = (props) => /* @__PURE__ */ React128.createElement(TimeField, __spreadValues({}, props));
|
16378
|
+
|
15815
16379
|
// src/utils/table/useTableSelect.ts
|
15816
|
-
import
|
16380
|
+
import React129 from "react";
|
15817
16381
|
var useTableSelect = (data, { key }) => {
|
15818
|
-
const [selected, setSelected] =
|
16382
|
+
const [selected, setSelected] = React129.useState([]);
|
15819
16383
|
const allSelected = selected.length === data.length;
|
15820
16384
|
const isSelected = (dot) => selected.includes(dot[key]);
|
15821
16385
|
const selectAll = () => setSelected(data.map((dot) => dot[key]));
|
@@ -15981,8 +16545,16 @@ export {
|
|
15981
16545
|
ControlLabel,
|
15982
16546
|
DataList2 as DataList,
|
15983
16547
|
DataTable,
|
16548
|
+
DatePicker,
|
16549
|
+
DatePickerBase,
|
16550
|
+
DateRangePicker,
|
16551
|
+
DateRangePickerBase,
|
16552
|
+
DateTimePicker,
|
16553
|
+
DateTimePickerBase,
|
16554
|
+
DateTimeRangePicker,
|
16555
|
+
DateTimeRangePickerBase,
|
15984
16556
|
DesignSystemContext,
|
15985
|
-
Dialog,
|
16557
|
+
Dialog2 as Dialog,
|
15986
16558
|
Divider2 as Divider,
|
15987
16559
|
Drawer,
|
15988
16560
|
Dropdown,
|
@@ -16027,7 +16599,7 @@ export {
|
|
16027
16599
|
Option,
|
16028
16600
|
PageHeader2 as PageHeader,
|
16029
16601
|
Pagination,
|
16030
|
-
|
16602
|
+
Popover3 as Popover,
|
16031
16603
|
PopoverDialog2 as PopoverDialog,
|
16032
16604
|
Portal,
|
16033
16605
|
PositionerPlacement,
|
@@ -16062,6 +16634,7 @@ export {
|
|
16062
16634
|
TextButton,
|
16063
16635
|
Textarea,
|
16064
16636
|
TextareaBase,
|
16637
|
+
TimePicker,
|
16065
16638
|
Timeline2 as Timeline,
|
16066
16639
|
ToastComponent,
|
16067
16640
|
ToastProvider,
|