@aivenio/aquarium 1.78.0 → 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/dist/atoms.cjs +95 -3
- package/dist/atoms.mjs +95 -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/index.d.ts +3 -0
- package/dist/src/molecules/index.js +4 -1
- package/dist/src/utils/tailwind.d.ts +1 -0
- package/dist/src/utils/tailwind.js +6 -1
- package/dist/styles.css +1933 -1489
- package/dist/system.cjs +1025 -505
- package/dist/system.mjs +1011 -474
- package/dist/tailwind.config.js +2 -1
- package/dist/tailwind.theme.json +93 -3
- package/dist/tsconfig.module.tsbuildinfo +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
|
@@ -7362,7 +7463,7 @@ var ToastConsumer = () => {
|
|
7362
7463
|
};
|
7363
7464
|
|
7364
7465
|
// src/molecules/Context/Context.tsx
|
7365
|
-
var Context = ({ children }) => {
|
7466
|
+
var Context = ({ children, locale = "en-GB" }) => {
|
7366
7467
|
const windowSize = useWindowSize();
|
7367
7468
|
const [breakpointMatches, setBreakpointMatches] = React15.useState(getMatches(windowSize));
|
7368
7469
|
React15.useEffect(() => {
|
@@ -7370,7 +7471,9 @@ var Context = ({ children }) => {
|
|
7370
7471
|
}, [windowSize]);
|
7371
7472
|
return /* @__PURE__ */ React15.createElement(DesignSystemContext.Provider, {
|
7372
7473
|
value: { breakpointMatches }
|
7373
|
-
}, /* @__PURE__ */ React15.createElement(
|
7474
|
+
}, /* @__PURE__ */ React15.createElement(I18nProvider, {
|
7475
|
+
locale
|
7476
|
+
}, /* @__PURE__ */ React15.createElement(ModalProvider, null, /* @__PURE__ */ React15.createElement(ToastProvider, null, children))));
|
7374
7477
|
};
|
7375
7478
|
var context = {
|
7376
7479
|
breakpointMatches: getMatches(void 0)
|
@@ -11920,14 +12023,14 @@ var DataListRow = ({
|
|
11920
12023
|
}, additionalRowProps(row, index, rows)), renderFirstColumn == null ? void 0 : renderFirstColumn(row, index, rows), /* @__PURE__ */ React68.createElement(List, {
|
11921
12024
|
items: columns,
|
11922
12025
|
renderItem: (column, columnIndex) => {
|
11923
|
-
const
|
12026
|
+
const cell2 = /* @__PURE__ */ React68.createElement(DataList.Cell, __spreadValues(__spreadValues({}, cellProps(column)), additionalColumnProps(column, columnIndex, columns, row)), /* @__PURE__ */ React68.createElement(DataListCell, {
|
11924
12027
|
column,
|
11925
12028
|
row,
|
11926
12029
|
index,
|
11927
12030
|
rows
|
11928
12031
|
}));
|
11929
12032
|
return createAnimatedCell({
|
11930
|
-
cellElement:
|
12033
|
+
cellElement: cell2,
|
11931
12034
|
stickyStyles,
|
11932
12035
|
stickyColumn: cellProps(column).stickyColumn
|
11933
12036
|
});
|
@@ -12399,7 +12502,7 @@ var DataList2 = (_a) => {
|
|
12399
12502
|
color: "default",
|
12400
12503
|
"aria-hidden": true
|
12401
12504
|
}), content) : content;
|
12402
|
-
const
|
12505
|
+
const cell2 = columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */ React72.createElement(DataList.SortCell, __spreadValues({
|
12403
12506
|
direction: sort && sort.column.headerName === column.headerName ? sort.direction : "none",
|
12404
12507
|
onClick: () => updateSort(column),
|
12405
12508
|
sticky
|
@@ -12407,7 +12510,7 @@ var DataList2 = (_a) => {
|
|
12407
12510
|
sticky
|
12408
12511
|
}), headerContentAndIcon);
|
12409
12512
|
return createAnimatedCell({
|
12410
|
-
cellElement:
|
12513
|
+
cellElement: cell2,
|
12411
12514
|
stickyStyles,
|
12412
12515
|
stickyColumn: cellProps(column).stickyColumn
|
12413
12516
|
});
|
@@ -12638,7 +12741,7 @@ var DataTable = (_a) => {
|
|
12638
12741
|
color: "default",
|
12639
12742
|
"aria-hidden": true
|
12640
12743
|
}), content) : content;
|
12641
|
-
const
|
12744
|
+
const cell2 = columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */ React75.createElement(Table2.SortCell, __spreadValues({
|
12642
12745
|
direction: sort && sort.column.headerName === column.headerName ? sort.direction : "none",
|
12643
12746
|
onClick: () => updateSort(column),
|
12644
12747
|
style: { width: column.width },
|
@@ -12648,7 +12751,7 @@ var DataTable = (_a) => {
|
|
12648
12751
|
"aria-label": column.headerInvisible ? column.headerName : void 0
|
12649
12752
|
}), headerContentAndIcon);
|
12650
12753
|
return createAnimatedCell({
|
12651
|
-
cellElement:
|
12754
|
+
cellElement: cell2,
|
12652
12755
|
stickyStyles,
|
12653
12756
|
stickyColumn: cellProps(column).stickyColumn
|
12654
12757
|
});
|
@@ -12736,13 +12839,434 @@ var renderCell = (column, row, index, rows) => {
|
|
12736
12839
|
};
|
12737
12840
|
DataTable.Skeleton = DataListSkeleton;
|
12738
12841
|
|
12739
|
-
// 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
|
12740
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";
|
12741
13265
|
import { useDialog } from "@react-aria/dialog";
|
12742
13266
|
import { Overlay as Overlay2, useModalOverlay } from "@react-aria/overlays";
|
12743
|
-
import { useId as
|
13267
|
+
import { useId as useId12 } from "@react-aria/utils";
|
12744
13268
|
import { useOverlayTriggerState as useOverlayTriggerState2 } from "@react-stately/overlays";
|
12745
|
-
import
|
13269
|
+
import omit11 from "lodash/omit";
|
12746
13270
|
|
12747
13271
|
// src/atoms/Dialog/Dialog.tsx
|
12748
13272
|
var import_confirm2 = __toESM(require_confirm());
|
@@ -12764,7 +13288,7 @@ var DIALOG_ICONS_AND_COLORS = {
|
|
12764
13288
|
};
|
12765
13289
|
|
12766
13290
|
// src/atoms/Modal/Modal.tsx
|
12767
|
-
import
|
13291
|
+
import React86 from "react";
|
12768
13292
|
var Modal = (_a) => {
|
12769
13293
|
var _b = _a, {
|
12770
13294
|
children,
|
@@ -12777,7 +13301,7 @@ var Modal = (_a) => {
|
|
12777
13301
|
"className",
|
12778
13302
|
"open"
|
12779
13303
|
]);
|
12780
|
-
return open ? /* @__PURE__ */
|
13304
|
+
return open ? /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12781
13305
|
className: classNames(
|
12782
13306
|
tw("inset-0 overflow-y-auto z-modal fixed"),
|
12783
13307
|
{
|
@@ -12789,11 +13313,11 @@ var Modal = (_a) => {
|
|
12789
13313
|
};
|
12790
13314
|
Modal.BackDrop = (_a) => {
|
12791
13315
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
12792
|
-
return /* @__PURE__ */
|
13316
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12793
13317
|
className: classNames(tw("-z-10 fixed min-w-full min-h-full bg-body-intense opacity-70"), className)
|
12794
13318
|
}));
|
12795
13319
|
};
|
12796
|
-
Modal.Dialog =
|
13320
|
+
Modal.Dialog = React86.forwardRef(
|
12797
13321
|
(_a, ref) => {
|
12798
13322
|
var _b = _a, { kind = "dialog", children, className, size = "sm" } = _b, rest = __objRest(_b, ["kind", "children", "className", "size"]);
|
12799
13323
|
const commonClasses = tw("bg-popover-content max-h-full flex flex-col");
|
@@ -12807,7 +13331,7 @@ Modal.Dialog = React76.forwardRef(
|
|
12807
13331
|
"w-[560px]": size === "md",
|
12808
13332
|
"w-[1080px]": size === "full"
|
12809
13333
|
});
|
12810
|
-
return /* @__PURE__ */
|
13334
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({
|
12811
13335
|
ref,
|
12812
13336
|
"aria-modal": "true"
|
12813
13337
|
}, rest), {
|
@@ -12817,31 +13341,31 @@ Modal.Dialog = React76.forwardRef(
|
|
12817
13341
|
);
|
12818
13342
|
Modal.Header = (_a) => {
|
12819
13343
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12820
|
-
return /* @__PURE__ */
|
13344
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12821
13345
|
className: classNames(tw("pl-7 pr-[64px] py-6 gap-3 flex items-center"), className)
|
12822
13346
|
}), children);
|
12823
13347
|
};
|
12824
13348
|
Modal.HeaderImage = (_a) => {
|
12825
13349
|
var _b = _a, { backgroundImage, className } = _b, rest = __objRest(_b, ["backgroundImage", "className"]);
|
12826
13350
|
const common = tw("h-[120px] min-h-[120px] w-full ");
|
12827
|
-
return backgroundImage ? /* @__PURE__ */
|
13351
|
+
return backgroundImage ? /* @__PURE__ */ React86.createElement("img", __spreadProps(__spreadValues({
|
12828
13352
|
"aria-hidden": true,
|
12829
13353
|
src: backgroundImage != null ? backgroundImage : void 0
|
12830
13354
|
}, rest), {
|
12831
13355
|
className: classNames(common, tw("object-cover"), className)
|
12832
|
-
})) : /* @__PURE__ */
|
13356
|
+
})) : /* @__PURE__ */ React86.createElement("div", {
|
12833
13357
|
className: classNames(common, tw("bg-default"), className)
|
12834
13358
|
});
|
12835
13359
|
};
|
12836
13360
|
Modal.CloseButtonContainer = (_a) => {
|
12837
13361
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
12838
|
-
return /* @__PURE__ */
|
13362
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12839
13363
|
className: classNames(tw("absolute top-[24px] right-[28px]"), className)
|
12840
13364
|
}));
|
12841
13365
|
};
|
12842
13366
|
Modal.Title = (_a) => {
|
12843
13367
|
var _b = _a, { kind = "dialog", children, className } = _b, rest = __objRest(_b, ["kind", "children", "className"]);
|
12844
|
-
return /* @__PURE__ */
|
13368
|
+
return /* @__PURE__ */ React86.createElement(Typography, __spreadValues({
|
12845
13369
|
htmlTag: "h2",
|
12846
13370
|
variant: "subheading",
|
12847
13371
|
color: "intense",
|
@@ -12855,40 +13379,40 @@ Modal.Title = (_a) => {
|
|
12855
13379
|
};
|
12856
13380
|
Modal.Subtitle = (_a) => {
|
12857
13381
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
12858
|
-
return /* @__PURE__ */
|
13382
|
+
return /* @__PURE__ */ React86.createElement(Typography, __spreadValues({
|
12859
13383
|
variant: "small",
|
12860
13384
|
color: "default"
|
12861
13385
|
}, rest), children);
|
12862
13386
|
};
|
12863
13387
|
Modal.TitleContainer = (_a) => {
|
12864
13388
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12865
|
-
return /* @__PURE__ */
|
13389
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12866
13390
|
className: classNames(tw("flex flex-col grow"), className)
|
12867
13391
|
}), children);
|
12868
13392
|
};
|
12869
13393
|
Modal.Body = (_a) => {
|
12870
13394
|
var _b = _a, { children, className, noFooter = false, maxHeight, style } = _b, rest = __objRest(_b, ["children", "className", "noFooter", "maxHeight", "style"]);
|
12871
|
-
return /* @__PURE__ */
|
13395
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12872
13396
|
className: classNames(tw("px-7 grow overflow-y-auto text-default", { "pb-6": noFooter }), className),
|
12873
13397
|
style: __spreadValues({ maxHeight }, style)
|
12874
13398
|
}), children);
|
12875
13399
|
};
|
12876
13400
|
Modal.Footer = (_a) => {
|
12877
13401
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12878
|
-
return /* @__PURE__ */
|
13402
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12879
13403
|
className: classNames(tw("px-7 py-6"), className)
|
12880
13404
|
}), children);
|
12881
13405
|
};
|
12882
13406
|
Modal.Actions = (_a) => {
|
12883
13407
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12884
|
-
return /* @__PURE__ */
|
13408
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12885
13409
|
className: classNames(tw("flex gap-4 justify-end"), className)
|
12886
13410
|
}), children);
|
12887
13411
|
};
|
12888
13412
|
|
12889
13413
|
// src/molecules/Dialog/Dialog.tsx
|
12890
|
-
var
|
12891
|
-
const ref =
|
13414
|
+
var Dialog2 = (props) => {
|
13415
|
+
const ref = React87.useRef(null);
|
12892
13416
|
const { open, onClose } = props;
|
12893
13417
|
const state = useOverlayTriggerState2({ isOpen: open, onOpenChange: (isOpen) => !isOpen && (onClose == null ? void 0 : onClose()) });
|
12894
13418
|
const { modalProps, underlayProps } = useModalOverlay(
|
@@ -12899,13 +13423,13 @@ var Dialog = (props) => {
|
|
12899
13423
|
if (!state.isOpen) {
|
12900
13424
|
return null;
|
12901
13425
|
}
|
12902
|
-
return /* @__PURE__ */
|
13426
|
+
return /* @__PURE__ */ React87.createElement(Overlay2, null, /* @__PURE__ */ React87.createElement(Modal, {
|
12903
13427
|
className: "Aquarium-Dialog",
|
12904
13428
|
open: true
|
12905
|
-
}, /* @__PURE__ */
|
13429
|
+
}, /* @__PURE__ */ React87.createElement(Modal.BackDrop, __spreadValues({}, underlayProps)), /* @__PURE__ */ React87.createElement(Modal.Dialog, __spreadValues({
|
12906
13430
|
ref,
|
12907
13431
|
size: "sm"
|
12908
|
-
}, modalProps), /* @__PURE__ */
|
13432
|
+
}, modalProps), /* @__PURE__ */ React87.createElement(DialogWrapper, __spreadValues({}, props)))));
|
12909
13433
|
};
|
12910
13434
|
var DialogWrapper = ({
|
12911
13435
|
title,
|
@@ -12914,9 +13438,9 @@ var DialogWrapper = ({
|
|
12914
13438
|
primaryAction,
|
12915
13439
|
secondaryAction
|
12916
13440
|
}) => {
|
12917
|
-
const ref =
|
12918
|
-
const labelledBy =
|
12919
|
-
const describedBy =
|
13441
|
+
const ref = React87.useRef(null);
|
13442
|
+
const labelledBy = useId12();
|
13443
|
+
const describedBy = useId12();
|
12920
13444
|
const { dialogProps } = useDialog(
|
12921
13445
|
{
|
12922
13446
|
"role": "alertdialog",
|
@@ -12925,52 +13449,52 @@ var DialogWrapper = ({
|
|
12925
13449
|
},
|
12926
13450
|
ref
|
12927
13451
|
);
|
12928
|
-
return /* @__PURE__ */
|
13452
|
+
return /* @__PURE__ */ React87.createElement("div", __spreadProps(__spreadValues({
|
12929
13453
|
ref
|
12930
13454
|
}, dialogProps), {
|
12931
13455
|
className: tw("outline-none")
|
12932
|
-
}), /* @__PURE__ */
|
13456
|
+
}), /* @__PURE__ */ React87.createElement(Modal.Header, {
|
12933
13457
|
className: tw("icon-stroke-2")
|
12934
|
-
}, /* @__PURE__ */
|
13458
|
+
}, /* @__PURE__ */ React87.createElement(Icon, {
|
12935
13459
|
icon: DIALOG_ICONS_AND_COLORS[type].icon,
|
12936
13460
|
color: DIALOG_ICONS_AND_COLORS[type].color,
|
12937
13461
|
fontSize: 20
|
12938
|
-
}), /* @__PURE__ */
|
13462
|
+
}), /* @__PURE__ */ React87.createElement(Modal.Title, {
|
12939
13463
|
id: labelledBy,
|
12940
13464
|
variant: "large",
|
12941
13465
|
color: DIALOG_ICONS_AND_COLORS[type].color
|
12942
|
-
}, title)), /* @__PURE__ */
|
13466
|
+
}, title)), /* @__PURE__ */ React87.createElement(Modal.Body, {
|
12943
13467
|
id: describedBy
|
12944
|
-
}, /* @__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({
|
12945
13469
|
key: secondaryAction.text
|
12946
|
-
},
|
13470
|
+
}, omit11(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */ React87.createElement(Button.Secondary, __spreadValues({
|
12947
13471
|
key: primaryAction.text
|
12948
|
-
},
|
13472
|
+
}, omit11(primaryAction, "text")), primaryAction.text))));
|
12949
13473
|
};
|
12950
13474
|
|
12951
13475
|
// src/molecules/Drawer/Drawer.tsx
|
12952
|
-
import
|
13476
|
+
import React89 from "react";
|
12953
13477
|
import { useOverlayTriggerState as useOverlayTriggerState3 } from "react-stately";
|
12954
13478
|
import { useDialog as useDialog2 } from "@react-aria/dialog";
|
12955
13479
|
import { Overlay as Overlay3, useModalOverlay as useModalOverlay2 } from "@react-aria/overlays";
|
12956
|
-
import { useId as
|
13480
|
+
import { useId as useId13 } from "@react-aria/utils";
|
12957
13481
|
import { animated as animated5, useSpring as useSpring4 } from "@react-spring/web";
|
12958
13482
|
import castArray3 from "lodash/castArray";
|
12959
|
-
import
|
13483
|
+
import omit12 from "lodash/omit";
|
12960
13484
|
|
12961
13485
|
// src/molecules/Tabs/Tabs.tsx
|
12962
|
-
import
|
13486
|
+
import React88, { useEffect as useEffect8, useLayoutEffect as useLayoutEffect2, useRef as useRef10, useState as useState11 } from "react";
|
12963
13487
|
import isNumber5 from "lodash/isNumber";
|
12964
13488
|
import kebabCase from "lodash/kebabCase";
|
12965
|
-
var
|
12966
|
-
var
|
13489
|
+
var import_chevronLeft5 = __toESM(require_chevronLeft());
|
13490
|
+
var import_chevronRight5 = __toESM(require_chevronRight());
|
12967
13491
|
var import_warningSign4 = __toESM(require_warningSign());
|
12968
13492
|
var isTabComponent = (c) => {
|
12969
|
-
return
|
13493
|
+
return React88.isValidElement(c) && (c.type === Tab || c.type === ModalTab);
|
12970
13494
|
};
|
12971
|
-
var Tab =
|
13495
|
+
var Tab = React88.forwardRef(
|
12972
13496
|
({ className, id, title, children }, ref) => {
|
12973
|
-
return /* @__PURE__ */
|
13497
|
+
return /* @__PURE__ */ React88.createElement("div", {
|
12974
13498
|
ref,
|
12975
13499
|
id: `${id != null ? id : kebabCase(title)}-panel`,
|
12976
13500
|
className,
|
@@ -12982,14 +13506,14 @@ var Tab = React78.forwardRef(
|
|
12982
13506
|
);
|
12983
13507
|
var TabContainer = (_a) => {
|
12984
13508
|
var _b = _a, { className, children } = _b, rest = __objRest(_b, ["className", "children"]);
|
12985
|
-
return /* @__PURE__ */
|
13509
|
+
return /* @__PURE__ */ React88.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12986
13510
|
className: classNames("py-6 z-0", className)
|
12987
13511
|
}), children);
|
12988
13512
|
};
|
12989
13513
|
var ModalTab = Tab;
|
12990
13514
|
var ModalTabContainer = TabContainer;
|
12991
13515
|
var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
12992
|
-
const Tab2 =
|
13516
|
+
const Tab2 = React88.forwardRef(
|
12993
13517
|
(_a, ref) => {
|
12994
13518
|
var _b = _a, {
|
12995
13519
|
id,
|
@@ -13021,17 +13545,17 @@ var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
|
13021
13545
|
const _id = id != null ? id : kebabCase(title);
|
13022
13546
|
let statusIcon = void 0;
|
13023
13547
|
if (status === "warning") {
|
13024
|
-
statusIcon = /* @__PURE__ */
|
13548
|
+
statusIcon = /* @__PURE__ */ React88.createElement(InlineIcon, {
|
13025
13549
|
icon: import_warningSign4.default,
|
13026
13550
|
color: selected ? void 0 : "warning-default"
|
13027
13551
|
});
|
13028
13552
|
} else if (status === "error") {
|
13029
|
-
statusIcon = /* @__PURE__ */
|
13553
|
+
statusIcon = /* @__PURE__ */ React88.createElement(InlineIcon, {
|
13030
13554
|
icon: import_warningSign4.default,
|
13031
13555
|
color: selected ? void 0 : "danger-default"
|
13032
13556
|
});
|
13033
13557
|
}
|
13034
|
-
const tab = /* @__PURE__ */
|
13558
|
+
const tab = /* @__PURE__ */ React88.createElement(Component, __spreadValues({
|
13035
13559
|
ref,
|
13036
13560
|
id: `${_id}-tab`,
|
13037
13561
|
onClick: () => !disabled && onSelected(value != null ? value : index),
|
@@ -13048,29 +13572,29 @@ var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
|
13048
13572
|
"aria-selected": selected,
|
13049
13573
|
"aria-controls": `${_id}-panel`,
|
13050
13574
|
tabIndex: disabled ? void 0 : 0
|
13051
|
-
}, rest), /* @__PURE__ */
|
13575
|
+
}, rest), /* @__PURE__ */ React88.createElement(Typography2, {
|
13052
13576
|
htmlTag: "div",
|
13053
13577
|
variant: "small-strong",
|
13054
13578
|
color: selected ? "primary-default" : disabled ? "default" : "current",
|
13055
13579
|
className: tw("inline-flex items-center gap-3")
|
13056
|
-
}, showNotification ? /* @__PURE__ */
|
13580
|
+
}, showNotification ? /* @__PURE__ */ React88.createElement(Badge.Notification, {
|
13057
13581
|
right: "-4px",
|
13058
13582
|
top: "3px"
|
13059
|
-
}, /* @__PURE__ */
|
13583
|
+
}, /* @__PURE__ */ React88.createElement("span", {
|
13060
13584
|
className: tw("whitespace-nowrap")
|
13061
|
-
}, title)) : /* @__PURE__ */
|
13585
|
+
}, title)) : /* @__PURE__ */ React88.createElement("span", {
|
13062
13586
|
className: tw("whitespace-nowrap")
|
13063
|
-
}, title), isNumber5(badge) && /* @__PURE__ */
|
13587
|
+
}, title), isNumber5(badge) && /* @__PURE__ */ React88.createElement(Typography2, {
|
13064
13588
|
htmlTag: "span",
|
13065
13589
|
variant: "small",
|
13066
13590
|
color: selected ? "primary-intense" : "grey-5",
|
13067
13591
|
className: "leading-none"
|
13068
|
-
}, /* @__PURE__ */
|
13592
|
+
}, /* @__PURE__ */ React88.createElement(TabBadge, {
|
13069
13593
|
kind: "filled",
|
13070
13594
|
value: badge,
|
13071
13595
|
textClassname: classNames({ "text-white": selected, "text-muted": !selected })
|
13072
13596
|
})), statusIcon));
|
13073
|
-
return tooltip ? /* @__PURE__ */
|
13597
|
+
return tooltip ? /* @__PURE__ */ React88.createElement(Tooltip, {
|
13074
13598
|
content: tooltip
|
13075
13599
|
}, tab) : tab;
|
13076
13600
|
}
|
@@ -13084,7 +13608,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
13084
13608
|
const Tabs2 = (props) => {
|
13085
13609
|
var _a, _b;
|
13086
13610
|
const { className, value, defaultValue, onChange, children } = props;
|
13087
|
-
const childArr =
|
13611
|
+
const childArr = React88.Children.toArray(children);
|
13088
13612
|
const firstTab = childArr[0];
|
13089
13613
|
const firstTabValue = isTabComponent(firstTab) ? firstTab.props.value : -1;
|
13090
13614
|
const [selected, setSelected] = useState11((_b = (_a = value != null ? value : defaultValue) != null ? _a : firstTabValue) != null ? _b : 0);
|
@@ -13097,7 +13621,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
13097
13621
|
var _a2, _b2;
|
13098
13622
|
const container = containerRef.current;
|
13099
13623
|
const tabs = tabsRef.current;
|
13100
|
-
const values =
|
13624
|
+
const values = React88.Children.map(
|
13101
13625
|
children,
|
13102
13626
|
(tab, i) => {
|
13103
13627
|
var _a3;
|
@@ -13138,7 +13662,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
13138
13662
|
updateCarets();
|
13139
13663
|
setSelected(value);
|
13140
13664
|
revealSelectedTab({ smooth: value !== selected });
|
13141
|
-
}, [value,
|
13665
|
+
}, [value, React88.Children.count(children)]);
|
13142
13666
|
useLayoutEffect2(() => {
|
13143
13667
|
var _a2;
|
13144
13668
|
updateCarets();
|
@@ -13202,27 +13726,27 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
13202
13726
|
const handleSelected = (key) => {
|
13203
13727
|
(onChange != null ? onChange : setSelected)(key);
|
13204
13728
|
};
|
13205
|
-
|
13729
|
+
React88.Children.forEach(children, (c) => {
|
13206
13730
|
if (c && !isTabComponent(c)) {
|
13207
13731
|
throw new Error("<Tabs> can only have <Tabs.Tab> components as children");
|
13208
13732
|
}
|
13209
13733
|
});
|
13210
|
-
return /* @__PURE__ */
|
13734
|
+
return /* @__PURE__ */ React88.createElement("div", {
|
13211
13735
|
ref: parentRef,
|
13212
13736
|
className: classNames("Aquarium-Tabs", tw("h-full"), className)
|
13213
|
-
}, /* @__PURE__ */
|
13737
|
+
}, /* @__PURE__ */ React88.createElement("div", {
|
13214
13738
|
className: tw("relative flex items-center border-b-2 border-default")
|
13215
|
-
}, /* @__PURE__ */
|
13739
|
+
}, /* @__PURE__ */ React88.createElement("div", {
|
13216
13740
|
ref: containerRef,
|
13217
13741
|
className: tw("overflow-y-auto scrollbar-hide mb-[-2px] h-auto")
|
13218
|
-
}, /* @__PURE__ */
|
13742
|
+
}, /* @__PURE__ */ React88.createElement("div", {
|
13219
13743
|
ref: tabsRef,
|
13220
13744
|
role: "tablist",
|
13221
13745
|
"aria-label": "tabs",
|
13222
13746
|
className: tw("inline-flex items-center cursor-pointer font-normal h-full")
|
13223
|
-
},
|
13747
|
+
}, React88.Children.map(
|
13224
13748
|
children,
|
13225
|
-
(tab, index) => tab ? /* @__PURE__ */
|
13749
|
+
(tab, index) => tab ? /* @__PURE__ */ React88.createElement(TabItemComponent, __spreadProps(__spreadValues({
|
13226
13750
|
key: tab.props.value
|
13227
13751
|
}, tab.props), {
|
13228
13752
|
index,
|
@@ -13230,28 +13754,28 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
13230
13754
|
onKeyDown: handleKeyDown,
|
13231
13755
|
onSelected: handleSelected
|
13232
13756
|
})) : void 0
|
13233
|
-
))), leftCaret && /* @__PURE__ */
|
13757
|
+
))), leftCaret && /* @__PURE__ */ React88.createElement("div", {
|
13234
13758
|
className: tw("absolute left-0 bg-gradient-to-r from-white via-white z-20 py-3 pr-4")
|
13235
|
-
}, /* @__PURE__ */
|
13759
|
+
}, /* @__PURE__ */ React88.createElement("div", {
|
13236
13760
|
onClick: () => handleScrollToNext("left"),
|
13237
13761
|
className: tw("hover:bg-muted p-2 leading-none cursor-pointer")
|
13238
|
-
}, /* @__PURE__ */
|
13239
|
-
icon:
|
13240
|
-
}))), rightCaret && /* @__PURE__ */
|
13762
|
+
}, /* @__PURE__ */ React88.createElement(InlineIcon, {
|
13763
|
+
icon: import_chevronLeft5.default
|
13764
|
+
}))), rightCaret && /* @__PURE__ */ React88.createElement("div", {
|
13241
13765
|
onClick: () => handleScrollToNext("right"),
|
13242
13766
|
className: tw("absolute right-0 bg-gradient-to-l from-white via-white z-20 py-3 pl-4")
|
13243
|
-
}, /* @__PURE__ */
|
13767
|
+
}, /* @__PURE__ */ React88.createElement("div", {
|
13244
13768
|
onClick: () => handleScrollToNext("right"),
|
13245
13769
|
className: tw("hover:bg-muted p-2 leading-none cursor-pointer")
|
13246
|
-
}, /* @__PURE__ */
|
13247
|
-
icon:
|
13770
|
+
}, /* @__PURE__ */ React88.createElement(InlineIcon, {
|
13771
|
+
icon: import_chevronRight5.default
|
13248
13772
|
})))), renderChildren(children, selected, props));
|
13249
13773
|
};
|
13250
13774
|
Tabs2.displayName = displayName;
|
13251
13775
|
Tabs2.Tab = TabComponent;
|
13252
13776
|
return Tabs2;
|
13253
13777
|
};
|
13254
|
-
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(
|
13255
13779
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
13256
13780
|
)));
|
13257
13781
|
|
@@ -13268,8 +13792,8 @@ var WIDTHS = {
|
|
13268
13792
|
var Drawer = (_a) => {
|
13269
13793
|
var _b = _a, { open, closeOnEsc = true } = _b, props = __objRest(_b, ["open", "closeOnEsc"]);
|
13270
13794
|
const { onClose, size = "sm", portalContainer } = props;
|
13271
|
-
const [hidden, setHidden] =
|
13272
|
-
const ref =
|
13795
|
+
const [hidden, setHidden] = React89.useState(!open);
|
13796
|
+
const ref = React89.useRef(null);
|
13273
13797
|
const state = useOverlayTriggerState3({ isOpen: !hidden, onOpenChange: (isOpen) => !isOpen && onClose() });
|
13274
13798
|
if (open && hidden) {
|
13275
13799
|
setHidden(!open);
|
@@ -13296,21 +13820,21 @@ var Drawer = (_a) => {
|
|
13296
13820
|
if (!state.isOpen) {
|
13297
13821
|
return null;
|
13298
13822
|
}
|
13299
|
-
return /* @__PURE__ */
|
13823
|
+
return /* @__PURE__ */ React89.createElement(Overlay3, {
|
13300
13824
|
portalContainer
|
13301
|
-
}, /* @__PURE__ */
|
13825
|
+
}, /* @__PURE__ */ React89.createElement(Modal, {
|
13302
13826
|
kind: "drawer",
|
13303
13827
|
className: "Aquarium-Drawer overflow-x-hidden",
|
13304
13828
|
open: true
|
13305
|
-
}, /* @__PURE__ */
|
13829
|
+
}, /* @__PURE__ */ React89.createElement(AnimatedBackDrop, __spreadValues({
|
13306
13830
|
style: { opacity }
|
13307
|
-
}, underlayProps)), /* @__PURE__ */
|
13831
|
+
}, underlayProps)), /* @__PURE__ */ React89.createElement(DrawerWrapper, __spreadProps(__spreadValues(__spreadValues({
|
13308
13832
|
ref
|
13309
13833
|
}, props), modalProps), {
|
13310
13834
|
spring: { right }
|
13311
13835
|
}))));
|
13312
13836
|
};
|
13313
|
-
var DrawerWrapper =
|
13837
|
+
var DrawerWrapper = React89.forwardRef(
|
13314
13838
|
(_a, ref) => {
|
13315
13839
|
var _b = _a, {
|
13316
13840
|
title,
|
@@ -13340,83 +13864,83 @@ var DrawerWrapper = React79.forwardRef(
|
|
13340
13864
|
"menuAriaLabel"
|
13341
13865
|
]);
|
13342
13866
|
var _a2;
|
13343
|
-
const labelledBy =
|
13344
|
-
const describedBy =
|
13867
|
+
const labelledBy = useId13();
|
13868
|
+
const describedBy = useId13();
|
13345
13869
|
const { dialogProps } = useDialog2(
|
13346
13870
|
{ "role": "dialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
13347
13871
|
ref
|
13348
13872
|
);
|
13349
13873
|
const dialogSize = size === "lg" ? "full" : size;
|
13350
|
-
const childElements =
|
13874
|
+
const childElements = React89.Children.toArray(children).filter(React89.isValidElement);
|
13351
13875
|
const onlyChild = childElements.length === 1 ? childElements[0] : null;
|
13352
13876
|
const hasTabs = isComponentType(onlyChild, Tabs);
|
13353
|
-
return /* @__PURE__ */
|
13877
|
+
return /* @__PURE__ */ React89.createElement(AnimatedDialog, __spreadProps(__spreadValues(__spreadValues({
|
13354
13878
|
ref,
|
13355
13879
|
kind: "drawer",
|
13356
13880
|
"aria-modal": "true",
|
13357
13881
|
size: dialogSize
|
13358
13882
|
}, props), dialogProps), {
|
13359
13883
|
style: { position: "fixed", right: spring.right }
|
13360
|
-
}), /* @__PURE__ */
|
13884
|
+
}), /* @__PURE__ */ React89.createElement(Modal.CloseButtonContainer, null, /* @__PURE__ */ React89.createElement(Button.Icon, {
|
13361
13885
|
"aria-label": "Close",
|
13362
13886
|
icon: import_cross6.default,
|
13363
13887
|
onClick: onClose
|
13364
|
-
})), /* @__PURE__ */
|
13888
|
+
})), /* @__PURE__ */ React89.createElement(Modal.Header, {
|
13365
13889
|
className: tw({ "pb-3": hasTabs })
|
13366
|
-
}, /* @__PURE__ */
|
13890
|
+
}, /* @__PURE__ */ React89.createElement(Modal.Title, {
|
13367
13891
|
id: labelledBy,
|
13368
13892
|
kind: "drawer"
|
13369
|
-
}, title)), hasTabs ? /* @__PURE__ */
|
13893
|
+
}, title)), hasTabs ? /* @__PURE__ */ React89.createElement(DrawerTabs, __spreadProps(__spreadValues({}, onlyChild.props), {
|
13370
13894
|
className: tw("[&>div:first-child]:px-5 grow flex flex-col overflow-y-auto")
|
13371
|
-
})) : /* @__PURE__ */
|
13895
|
+
})) : /* @__PURE__ */ React89.createElement(Modal.Body, {
|
13372
13896
|
id: describedBy,
|
13373
13897
|
tabIndex: 0,
|
13374
13898
|
noFooter: !(secondaryActions || primaryAction)
|
13375
|
-
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */
|
13899
|
+
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */ React89.createElement(Modal.Footer, null, /* @__PURE__ */ React89.createElement(Modal.Actions, {
|
13376
13900
|
className: size === "sm" ? tw("flex-col") : void 0
|
13377
|
-
}, size !== "sm" && menu && /* @__PURE__ */
|
13901
|
+
}, size !== "sm" && menu && /* @__PURE__ */ React89.createElement(Box.Flex, {
|
13378
13902
|
alignItems: "center"
|
13379
|
-
}, /* @__PURE__ */
|
13903
|
+
}, /* @__PURE__ */ React89.createElement(DropdownMenu2, {
|
13380
13904
|
onAction: (action) => onAction == null ? void 0 : onAction(action),
|
13381
13905
|
onOpenChange: onMenuOpenChange
|
13382
|
-
}, /* @__PURE__ */
|
13906
|
+
}, /* @__PURE__ */ React89.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React89.createElement(Button.Icon, {
|
13383
13907
|
"aria-label": (_a2 = menuAriaLabel != null ? menuAriaLabel : menuLabel) != null ? _a2 : "Context menu",
|
13384
13908
|
icon: import_more4.default
|
13385
13909
|
})), menu)), secondaryActions && castArray3(secondaryActions).filter(Boolean).map((_b2) => {
|
13386
13910
|
var _c = _b2, { text } = _c, action = __objRest(_c, ["text"]);
|
13387
|
-
return /* @__PURE__ */
|
13911
|
+
return /* @__PURE__ */ React89.createElement(Button.Secondary, __spreadValues({
|
13388
13912
|
key: text
|
13389
13913
|
}, action), text);
|
13390
|
-
}), primaryAction && /* @__PURE__ */
|
13914
|
+
}), primaryAction && /* @__PURE__ */ React89.createElement(Button.Primary, __spreadValues({
|
13391
13915
|
key: primaryAction.text
|
13392
|
-
},
|
13916
|
+
}, omit12(primaryAction, "text")), primaryAction.text))));
|
13393
13917
|
}
|
13394
13918
|
);
|
13395
|
-
var DrawerTabs = createTabsComponent(ModalTab, TabItem, "DrawerTabs", (children, selected) => /* @__PURE__ */
|
13919
|
+
var DrawerTabs = createTabsComponent(ModalTab, TabItem, "DrawerTabs", (children, selected) => /* @__PURE__ */ React89.createElement(Modal.Body, {
|
13396
13920
|
className: tw("h-full")
|
13397
|
-
}, /* @__PURE__ */
|
13921
|
+
}, /* @__PURE__ */ React89.createElement(ModalTabContainer, null, children.find(
|
13398
13922
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
13399
13923
|
))));
|
13400
13924
|
|
13401
13925
|
// src/molecules/Dropdown/Dropdown.tsx
|
13402
|
-
import
|
13926
|
+
import React92 from "react";
|
13403
13927
|
|
13404
13928
|
// src/molecules/Popover/Popover.tsx
|
13405
|
-
import
|
13929
|
+
import React91, { useRef as useRef11 } from "react";
|
13406
13930
|
import { PressResponder as PressResponder2, usePress as usePress2 } from "@react-aria/interactions";
|
13407
13931
|
import { useOverlayTrigger } from "@react-aria/overlays";
|
13408
13932
|
import { mergeProps as mergeProps3 } from "@react-aria/utils";
|
13409
13933
|
import { useOverlayTriggerState as useOverlayTriggerState4 } from "@react-stately/overlays";
|
13410
13934
|
import classNames10 from "classnames";
|
13411
|
-
import
|
13935
|
+
import omit13 from "lodash/omit";
|
13412
13936
|
|
13413
13937
|
// src/molecules/Popover/Dialog.tsx
|
13414
|
-
import
|
13938
|
+
import React90 from "react";
|
13415
13939
|
import { useDialog as useDialog3 } from "@react-aria/dialog";
|
13416
|
-
var
|
13417
|
-
const ref =
|
13940
|
+
var Dialog3 = ({ children }) => {
|
13941
|
+
const ref = React90.useRef(null);
|
13418
13942
|
const { dialogProps } = useDialog3({}, ref);
|
13419
|
-
return /* @__PURE__ */
|
13943
|
+
return /* @__PURE__ */ React90.createElement("div", __spreadProps(__spreadValues({
|
13420
13944
|
ref
|
13421
13945
|
}, dialogProps), {
|
13422
13946
|
className: tw("outline-none")
|
@@ -13425,9 +13949,9 @@ var Dialog2 = ({ children }) => {
|
|
13425
13949
|
|
13426
13950
|
// src/molecules/Popover/PopoverContext.tsx
|
13427
13951
|
import { createContext as createContext4, useContext as useContext7 } from "react";
|
13428
|
-
var
|
13952
|
+
var PopoverContext2 = createContext4(null);
|
13429
13953
|
var usePopoverContext = () => {
|
13430
|
-
const ctx = useContext7(
|
13954
|
+
const ctx = useContext7(PopoverContext2);
|
13431
13955
|
if (ctx === null) {
|
13432
13956
|
throw new Error("PopoverContext was used outside of provider.");
|
13433
13957
|
}
|
@@ -13435,7 +13959,7 @@ var usePopoverContext = () => {
|
|
13435
13959
|
};
|
13436
13960
|
|
13437
13961
|
// src/molecules/Popover/Popover.tsx
|
13438
|
-
var
|
13962
|
+
var Popover3 = (props) => {
|
13439
13963
|
const {
|
13440
13964
|
id,
|
13441
13965
|
type,
|
@@ -13456,22 +13980,22 @@ var Popover2 = (props) => {
|
|
13456
13980
|
}
|
13457
13981
|
}));
|
13458
13982
|
const { triggerProps, overlayProps } = useOverlayTrigger({ type: type != null ? type : "dialog" }, state, triggerRef);
|
13459
|
-
return /* @__PURE__ */
|
13983
|
+
return /* @__PURE__ */ React91.createElement(PopoverContext2.Provider, {
|
13460
13984
|
value: {
|
13461
13985
|
state
|
13462
13986
|
}
|
13463
|
-
},
|
13464
|
-
if (isComponentType(child,
|
13465
|
-
return /* @__PURE__ */
|
13987
|
+
}, React91.Children.map(props.children, (child) => {
|
13988
|
+
if (isComponentType(child, Popover3.Trigger)) {
|
13989
|
+
return /* @__PURE__ */ React91.createElement(PressResponder2, __spreadValues({
|
13466
13990
|
ref: triggerRef
|
13467
|
-
},
|
13991
|
+
}, omit13(triggerProps, "aria-expanded")), /* @__PURE__ */ React91.createElement(PopoverTriggerWrapper, {
|
13468
13992
|
"data-testid": props["data-testid"],
|
13469
13993
|
"aria-controls": id,
|
13470
13994
|
"aria-expanded": triggerProps["aria-expanded"]
|
13471
13995
|
}, child.props.children));
|
13472
13996
|
}
|
13473
|
-
if (isComponentType(child,
|
13474
|
-
return state.isOpen && /* @__PURE__ */
|
13997
|
+
if (isComponentType(child, Popover3.Panel)) {
|
13998
|
+
return state.isOpen && /* @__PURE__ */ React91.createElement(PopoverOverlay, __spreadValues({
|
13475
13999
|
triggerRef: targetRef != null ? targetRef : triggerRef,
|
13476
14000
|
state,
|
13477
14001
|
placement,
|
@@ -13482,17 +14006,17 @@ var Popover2 = (props) => {
|
|
13482
14006
|
offset,
|
13483
14007
|
crossOffset,
|
13484
14008
|
shouldFlip
|
13485
|
-
}, overlayProps), containFocus ? /* @__PURE__ */
|
14009
|
+
}, overlayProps), containFocus ? /* @__PURE__ */ React91.createElement(Dialog3, null, child.props.children) : child.props.children);
|
13486
14010
|
}
|
13487
14011
|
throw new Error("Invalid children element type");
|
13488
14012
|
}));
|
13489
14013
|
};
|
13490
14014
|
var Trigger = () => null;
|
13491
14015
|
Trigger.displayName = "Popover.Trigger";
|
13492
|
-
|
14016
|
+
Popover3.Trigger = Trigger;
|
13493
14017
|
var Panel = () => null;
|
13494
14018
|
Panel.displayName = "Popover.Panel";
|
13495
|
-
|
14019
|
+
Popover3.Panel = Panel;
|
13496
14020
|
var asPopoverButton = (Component, displayName) => {
|
13497
14021
|
const PopoverButton2 = (props) => {
|
13498
14022
|
const { onClick } = props;
|
@@ -13501,7 +14025,7 @@ var asPopoverButton = (Component, displayName) => {
|
|
13501
14025
|
state.close();
|
13502
14026
|
onClick == null ? void 0 : onClick(e);
|
13503
14027
|
};
|
13504
|
-
return /* @__PURE__ */
|
14028
|
+
return /* @__PURE__ */ React91.createElement(Component, __spreadProps(__spreadValues({}, props), {
|
13505
14029
|
onClick: handleClick
|
13506
14030
|
}));
|
13507
14031
|
};
|
@@ -13509,14 +14033,14 @@ var asPopoverButton = (Component, displayName) => {
|
|
13509
14033
|
return PopoverButton2;
|
13510
14034
|
};
|
13511
14035
|
var PopoverButton = asPopoverButton(Button, "PopoverButton");
|
13512
|
-
|
14036
|
+
Popover3.Button = PopoverButton;
|
13513
14037
|
var PopoverTriggerWrapper = (_a) => {
|
13514
14038
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
13515
14039
|
var _a2;
|
13516
14040
|
const ref = useRef11(null);
|
13517
|
-
const trigger =
|
14041
|
+
const trigger = React91.Children.only(children);
|
13518
14042
|
const { pressProps } = usePress2(__spreadProps(__spreadValues({}, rest), { ref }));
|
13519
|
-
return
|
14043
|
+
return React91.cloneElement(trigger, __spreadProps(__spreadValues({
|
13520
14044
|
"ref": ref
|
13521
14045
|
}, mergeProps3(pressProps, trigger.props)), {
|
13522
14046
|
"aria-controls": (_a2 = rest["aria-controls"]) != null ? _a2 : pressProps["aria-controls"]
|
@@ -13525,10 +14049,10 @@ var PopoverTriggerWrapper = (_a) => {
|
|
13525
14049
|
|
13526
14050
|
// src/molecules/Dropdown/Dropdown.tsx
|
13527
14051
|
var Dropdown = ({ children, content, placement = "bottom-left" }) => {
|
13528
|
-
return /* @__PURE__ */
|
14052
|
+
return /* @__PURE__ */ React92.createElement(Popover3, {
|
13529
14053
|
type: "menu",
|
13530
14054
|
placement
|
13531
|
-
}, /* @__PURE__ */
|
14055
|
+
}, /* @__PURE__ */ React92.createElement(Popover3.Trigger, null, children), /* @__PURE__ */ React92.createElement(Popover3.Panel, {
|
13532
14056
|
className: "Aquarium-Dropdown"
|
13533
14057
|
}, content));
|
13534
14058
|
};
|
@@ -13539,26 +14063,26 @@ var DropdownMenu3 = ({
|
|
13539
14063
|
triggerId,
|
13540
14064
|
setClose = () => void 0
|
13541
14065
|
}) => {
|
13542
|
-
const menuRef =
|
13543
|
-
|
14066
|
+
const menuRef = React92.useRef(null);
|
14067
|
+
React92.useEffect(() => {
|
13544
14068
|
const id = setTimeout(() => {
|
13545
14069
|
var _a, _b, _c;
|
13546
14070
|
return (_c = (_b = (_a = menuRef.current) == null ? void 0 : _a.children) == null ? void 0 : _b[0]) == null ? void 0 : _c.focus();
|
13547
14071
|
});
|
13548
14072
|
return () => clearTimeout(id);
|
13549
14073
|
}, [menuRef.current]);
|
13550
|
-
return /* @__PURE__ */
|
14074
|
+
return /* @__PURE__ */ React92.createElement("div", {
|
13551
14075
|
style: { minWidth: "250px" },
|
13552
14076
|
className: tw("py-3 bg-popover-content")
|
13553
|
-
}, !!title && /* @__PURE__ */
|
14077
|
+
}, !!title && /* @__PURE__ */ React92.createElement("div", {
|
13554
14078
|
className: tw("px-4 py-4 text-left text-intense typography-default-strong")
|
13555
|
-
}, title), /* @__PURE__ */
|
14079
|
+
}, title), /* @__PURE__ */ React92.createElement("ol", {
|
13556
14080
|
role: "menu",
|
13557
14081
|
ref: menuRef,
|
13558
14082
|
id: contentId,
|
13559
14083
|
"aria-labelledby": triggerId
|
13560
|
-
},
|
13561
|
-
return
|
14084
|
+
}, React92.Children.map(children, (child) => {
|
14085
|
+
return React92.cloneElement(child, { setClose });
|
13562
14086
|
})));
|
13563
14087
|
};
|
13564
14088
|
var DropdownItem = (_a) => {
|
@@ -13613,10 +14137,10 @@ var DropdownItem = (_a) => {
|
|
13613
14137
|
handleSelect();
|
13614
14138
|
}
|
13615
14139
|
};
|
13616
|
-
const itemContent = /* @__PURE__ */
|
14140
|
+
const itemContent = /* @__PURE__ */ React92.createElement("div", {
|
13617
14141
|
className: tw("py-3 px-4")
|
13618
14142
|
}, children);
|
13619
|
-
return /* @__PURE__ */
|
14143
|
+
return /* @__PURE__ */ React92.createElement("li", __spreadProps(__spreadValues({
|
13620
14144
|
role: "menuitem",
|
13621
14145
|
tabIndex: -1,
|
13622
14146
|
onClick: handleClick,
|
@@ -13630,11 +14154,11 @@ var DropdownItem = (_a) => {
|
|
13630
14154
|
"text-danger-default": color === "danger" && !disabled
|
13631
14155
|
})
|
13632
14156
|
)
|
13633
|
-
}), tooltip ? /* @__PURE__ */
|
14157
|
+
}), tooltip ? /* @__PURE__ */ React92.createElement(Tooltip, {
|
13634
14158
|
content: tooltip,
|
13635
14159
|
placement: tooltipPlacement,
|
13636
14160
|
inline: false
|
13637
|
-
}, /* @__PURE__ */
|
14161
|
+
}, /* @__PURE__ */ React92.createElement("div", {
|
13638
14162
|
tabIndex: 0,
|
13639
14163
|
className: tw("grow")
|
13640
14164
|
}, itemContent)) : itemContent);
|
@@ -13643,7 +14167,7 @@ Dropdown.Menu = DropdownMenu3;
|
|
13643
14167
|
Dropdown.Item = DropdownItem;
|
13644
14168
|
|
13645
14169
|
// src/molecules/EmptyState/EmptyState.tsx
|
13646
|
-
import
|
14170
|
+
import React93 from "react";
|
13647
14171
|
var EmptyStateLayout = /* @__PURE__ */ ((EmptyStateLayout2) => {
|
13648
14172
|
EmptyStateLayout2["Vertical"] = "vertical";
|
13649
14173
|
EmptyStateLayout2["Horizontal"] = "horizontal";
|
@@ -13700,7 +14224,7 @@ var EmptyState = ({
|
|
13700
14224
|
fullHeight = isVerticalLayout(layout) ? true : false
|
13701
14225
|
}) => {
|
13702
14226
|
const template = layoutStyle(layout);
|
13703
|
-
return /* @__PURE__ */
|
14227
|
+
return /* @__PURE__ */ React93.createElement(Box, {
|
13704
14228
|
className: classNames(
|
13705
14229
|
"Aquarium-EmptyState",
|
13706
14230
|
tw("rounded p-[56px]", {
|
@@ -13713,39 +14237,39 @@ var EmptyState = ({
|
|
13713
14237
|
),
|
13714
14238
|
backgroundColor: "transparent",
|
13715
14239
|
borderColor: "default"
|
13716
|
-
}, /* @__PURE__ */
|
14240
|
+
}, /* @__PURE__ */ React93.createElement(Box.Flex, {
|
13717
14241
|
style: { gap: "56px" },
|
13718
14242
|
flexDirection: template.layout,
|
13719
14243
|
justifyContent: template.justifyContent,
|
13720
14244
|
alignItems: template.layout === "row" ? "center" : template.alignItems,
|
13721
14245
|
height: fullHeight ? "full" : void 0
|
13722
|
-
}, image && /* @__PURE__ */
|
14246
|
+
}, image && /* @__PURE__ */ React93.createElement("img", {
|
13723
14247
|
src: image,
|
13724
14248
|
alt: imageAlt,
|
13725
14249
|
style: { width: imageWidth ? `${imageWidth}px` : void 0, height: "auto" }
|
13726
|
-
}), /* @__PURE__ */
|
14250
|
+
}), /* @__PURE__ */ React93.createElement(Box.Flex, {
|
13727
14251
|
flexDirection: "column",
|
13728
14252
|
justifyContent: template.justifyContent,
|
13729
14253
|
alignItems: template.alignItems
|
13730
|
-
}, /* @__PURE__ */
|
14254
|
+
}, /* @__PURE__ */ React93.createElement(Typography2.Heading, {
|
13731
14255
|
htmlTag: "h2"
|
13732
|
-
}, title), (description || children) && /* @__PURE__ */
|
14256
|
+
}, title), (description || children) && /* @__PURE__ */ React93.createElement(Box, {
|
13733
14257
|
marginTop: "5"
|
13734
|
-
}, /* @__PURE__ */
|
14258
|
+
}, /* @__PURE__ */ React93.createElement(Typography2.Default, null, children || description)), (secondaryAction || primaryAction) && /* @__PURE__ */ React93.createElement(Box.Flex, {
|
13735
14259
|
marginTop: "7",
|
13736
14260
|
gap: "4",
|
13737
14261
|
justifyContent: "center",
|
13738
14262
|
alignItems: "center",
|
13739
14263
|
flexWrap: "wrap"
|
13740
|
-
}, 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, {
|
13741
14265
|
marginTop: "5"
|
13742
|
-
}, /* @__PURE__ */
|
14266
|
+
}, /* @__PURE__ */ React93.createElement(Typography2.Small, {
|
13743
14267
|
color: "default"
|
13744
14268
|
}, footer)))));
|
13745
14269
|
};
|
13746
14270
|
|
13747
14271
|
// src/molecules/Flexbox/FlexboxItem.tsx
|
13748
|
-
import
|
14272
|
+
import React94 from "react";
|
13749
14273
|
var FlexboxItem = Tailwindify(
|
13750
14274
|
({ htmlTag = "div", className, style, children, display, flex, grow, shrink, order, alignSelf }) => {
|
13751
14275
|
const hookStyle = useStyle({
|
@@ -13757,7 +14281,7 @@ var FlexboxItem = Tailwindify(
|
|
13757
14281
|
alignSelf
|
13758
14282
|
});
|
13759
14283
|
const HtmlElement = htmlTag;
|
13760
|
-
return /* @__PURE__ */
|
14284
|
+
return /* @__PURE__ */ React94.createElement(HtmlElement, {
|
13761
14285
|
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
13762
14286
|
className
|
13763
14287
|
}, children);
|
@@ -13765,7 +14289,7 @@ var FlexboxItem = Tailwindify(
|
|
13765
14289
|
);
|
13766
14290
|
|
13767
14291
|
// src/molecules/Grid/GridItem.tsx
|
13768
|
-
import
|
14292
|
+
import React95 from "react";
|
13769
14293
|
var GridItem2 = Tailwindify(
|
13770
14294
|
({
|
13771
14295
|
htmlTag = "div",
|
@@ -13796,7 +14320,7 @@ var GridItem2 = Tailwindify(
|
|
13796
14320
|
gridRowEnd: rowEnd
|
13797
14321
|
});
|
13798
14322
|
const HtmlElement = htmlTag;
|
13799
|
-
return /* @__PURE__ */
|
14323
|
+
return /* @__PURE__ */ React95.createElement(HtmlElement, {
|
13800
14324
|
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
13801
14325
|
className
|
13802
14326
|
}, children);
|
@@ -13804,7 +14328,7 @@ var GridItem2 = Tailwindify(
|
|
13804
14328
|
);
|
13805
14329
|
|
13806
14330
|
// src/molecules/LineClamp/LineClamp.tsx
|
13807
|
-
import
|
14331
|
+
import React96 from "react";
|
13808
14332
|
var LineClamp2 = ({
|
13809
14333
|
lines,
|
13810
14334
|
children,
|
@@ -13813,10 +14337,10 @@ var LineClamp2 = ({
|
|
13813
14337
|
collapseLabel,
|
13814
14338
|
onClampedChange
|
13815
14339
|
}) => {
|
13816
|
-
const ref =
|
13817
|
-
const [clamped, setClamped] =
|
13818
|
-
const [isClampingEnabled, setClampingEnabled] =
|
13819
|
-
|
14340
|
+
const ref = React96.useRef(null);
|
14341
|
+
const [clamped, setClamped] = React96.useState(true);
|
14342
|
+
const [isClampingEnabled, setClampingEnabled] = React96.useState(false);
|
14343
|
+
React96.useEffect(() => {
|
13820
14344
|
var _a, _b;
|
13821
14345
|
const el = ref.current;
|
13822
14346
|
setClampingEnabled(((_a = el == null ? void 0 : el.scrollHeight) != null ? _a : 0) > ((_b = el == null ? void 0 : el.clientHeight) != null ? _b : 0));
|
@@ -13825,28 +14349,28 @@ var LineClamp2 = ({
|
|
13825
14349
|
setClamped(!clamped);
|
13826
14350
|
onClampedChange == null ? void 0 : onClampedChange(!clamped);
|
13827
14351
|
};
|
13828
|
-
return /* @__PURE__ */
|
14352
|
+
return /* @__PURE__ */ React96.createElement("div", {
|
13829
14353
|
className: "Aquarium-LineClamp"
|
13830
|
-
}, /* @__PURE__ */
|
14354
|
+
}, /* @__PURE__ */ React96.createElement(LineClamp, {
|
13831
14355
|
ref,
|
13832
14356
|
lines,
|
13833
14357
|
clamped,
|
13834
14358
|
wordBreak
|
13835
|
-
}, children), expandLabel && isClampingEnabled && /* @__PURE__ */
|
14359
|
+
}, children), expandLabel && isClampingEnabled && /* @__PURE__ */ React96.createElement(Button.Ghost, {
|
13836
14360
|
dense: true,
|
13837
14361
|
onClick: handleClampedChange
|
13838
14362
|
}, clamped ? expandLabel : collapseLabel));
|
13839
14363
|
};
|
13840
14364
|
|
13841
14365
|
// src/molecules/Link/Link.tsx
|
13842
|
-
import
|
14366
|
+
import React98 from "react";
|
13843
14367
|
import classNames11 from "classnames";
|
13844
14368
|
|
13845
14369
|
// src/atoms/Link/Link.tsx
|
13846
|
-
import
|
14370
|
+
import React97 from "react";
|
13847
14371
|
var Link = (_a) => {
|
13848
14372
|
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
13849
|
-
return /* @__PURE__ */
|
14373
|
+
return /* @__PURE__ */ React97.createElement("a", __spreadValues({
|
13850
14374
|
className: classNames(className, linkStyle)
|
13851
14375
|
}, props), children);
|
13852
14376
|
};
|
@@ -13854,27 +14378,27 @@ var Link = (_a) => {
|
|
13854
14378
|
// src/molecules/Link/Link.tsx
|
13855
14379
|
var Link2 = (_a) => {
|
13856
14380
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
13857
|
-
return /* @__PURE__ */
|
14381
|
+
return /* @__PURE__ */ React98.createElement(Link, __spreadValues({
|
13858
14382
|
className: classNames11("Aquarium-Link", className)
|
13859
14383
|
}, props));
|
13860
14384
|
};
|
13861
14385
|
|
13862
14386
|
// src/molecules/List/useStaticInfiniteList.ts
|
13863
|
-
import
|
14387
|
+
import React99 from "react";
|
13864
14388
|
var useStaticInfiniteList = ({
|
13865
14389
|
items,
|
13866
14390
|
pageSize,
|
13867
14391
|
autoReset = true
|
13868
14392
|
}) => {
|
13869
|
-
const [currentPage, setCurrentPage] =
|
14393
|
+
const [currentPage, setCurrentPage] = React99.useState(1);
|
13870
14394
|
const numberOfVisible = currentPage * pageSize;
|
13871
|
-
const next =
|
14395
|
+
const next = React99.useCallback(() => {
|
13872
14396
|
setCurrentPage((page) => page + 1);
|
13873
14397
|
}, [setCurrentPage]);
|
13874
|
-
const reset =
|
14398
|
+
const reset = React99.useCallback(() => {
|
13875
14399
|
setCurrentPage(1);
|
13876
14400
|
}, [setCurrentPage]);
|
13877
|
-
|
14401
|
+
React99.useEffect(() => {
|
13878
14402
|
if (autoReset) {
|
13879
14403
|
setCurrentPage(1);
|
13880
14404
|
}
|
@@ -13889,17 +14413,17 @@ var useStaticInfiniteList = ({
|
|
13889
14413
|
};
|
13890
14414
|
|
13891
14415
|
// src/molecules/ListItem/ListItem.tsx
|
13892
|
-
import
|
14416
|
+
import React100 from "react";
|
13893
14417
|
var ListItem = ({ name, icon, active = false }) => {
|
13894
|
-
return /* @__PURE__ */
|
14418
|
+
return /* @__PURE__ */ React100.createElement(Box.Flex, {
|
13895
14419
|
className: "Aquarium-ListItem",
|
13896
14420
|
alignItems: "center"
|
13897
|
-
}, /* @__PURE__ */
|
14421
|
+
}, /* @__PURE__ */ React100.createElement(Typography2, {
|
13898
14422
|
variant: active ? "small-strong" : "small",
|
13899
14423
|
color: "default",
|
13900
14424
|
htmlTag: "span",
|
13901
14425
|
className: `px-4 py-2 rounded-full ${active ? "bg-default" : "hover:bg-muted"}`
|
13902
|
-
}, /* @__PURE__ */
|
14426
|
+
}, /* @__PURE__ */ React100.createElement("img", {
|
13903
14427
|
src: icon,
|
13904
14428
|
alt: "",
|
13905
14429
|
className: "inline mr-4",
|
@@ -13909,18 +14433,18 @@ var ListItem = ({ name, icon, active = false }) => {
|
|
13909
14433
|
};
|
13910
14434
|
|
13911
14435
|
// src/molecules/Modal/Modal.tsx
|
13912
|
-
import
|
14436
|
+
import React101 from "react";
|
13913
14437
|
import { useDialog as useDialog4 } from "@react-aria/dialog";
|
13914
14438
|
import { Overlay as Overlay4, useModalOverlay as useModalOverlay3 } from "@react-aria/overlays";
|
13915
|
-
import { useId as
|
14439
|
+
import { useId as useId14 } from "@react-aria/utils";
|
13916
14440
|
import { useOverlayTriggerState as useOverlayTriggerState5 } from "@react-stately/overlays";
|
13917
14441
|
import castArray4 from "lodash/castArray";
|
13918
|
-
import
|
14442
|
+
import omit14 from "lodash/omit";
|
13919
14443
|
var import_cross7 = __toESM(require_cross());
|
13920
14444
|
var Modal2 = (_a) => {
|
13921
14445
|
var _b = _a, { closeOnEsc = true } = _b, props = __objRest(_b, ["closeOnEsc"]);
|
13922
14446
|
const { open, onClose, size, portalContainer } = props;
|
13923
|
-
const ref =
|
14447
|
+
const ref = React101.useRef(null);
|
13924
14448
|
const state = useOverlayTriggerState5({ isOpen: open, onOpenChange: (isOpen) => !isOpen && onClose() });
|
13925
14449
|
const { modalProps, underlayProps } = useModalOverlay3(
|
13926
14450
|
{ isDismissable: false, isKeyboardDismissDisabled: !closeOnEsc },
|
@@ -13930,75 +14454,75 @@ var Modal2 = (_a) => {
|
|
13930
14454
|
if (!state.isOpen) {
|
13931
14455
|
return null;
|
13932
14456
|
}
|
13933
|
-
return /* @__PURE__ */
|
14457
|
+
return /* @__PURE__ */ React101.createElement(Overlay4, {
|
13934
14458
|
portalContainer
|
13935
|
-
}, /* @__PURE__ */
|
14459
|
+
}, /* @__PURE__ */ React101.createElement(Modal, {
|
13936
14460
|
className: "Aquarium-Modal",
|
13937
14461
|
open: true
|
13938
|
-
}, /* @__PURE__ */
|
14462
|
+
}, /* @__PURE__ */ React101.createElement(Modal.BackDrop, __spreadValues({}, underlayProps)), /* @__PURE__ */ React101.createElement(ModalWrapper, __spreadValues(__spreadValues({
|
13939
14463
|
ref,
|
13940
14464
|
size
|
13941
14465
|
}, props), modalProps))));
|
13942
14466
|
};
|
13943
|
-
var ModalWrapper =
|
14467
|
+
var ModalWrapper = React101.forwardRef(
|
13944
14468
|
(_a, ref) => {
|
13945
14469
|
var _b = _a, { title, subtitle, headerImage, primaryAction, secondaryActions, children, onClose } = _b, props = __objRest(_b, ["title", "subtitle", "headerImage", "primaryAction", "secondaryActions", "children", "onClose"]);
|
13946
|
-
const labelledBy =
|
13947
|
-
const describedBy =
|
14470
|
+
const labelledBy = useId14();
|
14471
|
+
const describedBy = useId14();
|
13948
14472
|
const { dialogProps } = useDialog4(
|
13949
14473
|
{ "role": "dialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
13950
14474
|
ref
|
13951
14475
|
);
|
13952
|
-
return /* @__PURE__ */
|
14476
|
+
return /* @__PURE__ */ React101.createElement(Modal.Dialog, __spreadProps(__spreadValues(__spreadValues({
|
13953
14477
|
ref
|
13954
14478
|
}, props), dialogProps), {
|
13955
14479
|
tabIndex: -1
|
13956
|
-
}), /* @__PURE__ */
|
14480
|
+
}), /* @__PURE__ */ React101.createElement(Modal.CloseButtonContainer, null, /* @__PURE__ */ React101.createElement(IconButton, {
|
13957
14481
|
"aria-label": "Close",
|
13958
14482
|
icon: import_cross7.default,
|
13959
14483
|
onClick: onClose
|
13960
|
-
})), headerImage !== void 0 && /* @__PURE__ */
|
14484
|
+
})), headerImage !== void 0 && /* @__PURE__ */ React101.createElement(Modal.HeaderImage, {
|
13961
14485
|
backgroundImage: headerImage
|
13962
|
-
}), /* @__PURE__ */
|
14486
|
+
}), /* @__PURE__ */ React101.createElement(Modal.Header, {
|
13963
14487
|
className: tw({ "pb-3": isComponentType(children, ModalTabs) })
|
13964
|
-
}, /* @__PURE__ */
|
14488
|
+
}, /* @__PURE__ */ React101.createElement(Modal.TitleContainer, null, /* @__PURE__ */ React101.createElement(Modal.Title, {
|
13965
14489
|
id: labelledBy
|
13966
|
-
}, 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, {
|
13967
14491
|
id: describedBy,
|
13968
14492
|
tabIndex: 0,
|
13969
14493
|
noFooter: !(secondaryActions || primaryAction)
|
13970
|
-
}, 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) => {
|
13971
14495
|
var _b2 = _a2, { text } = _b2, action = __objRest(_b2, ["text"]);
|
13972
|
-
return /* @__PURE__ */
|
14496
|
+
return /* @__PURE__ */ React101.createElement(Button.Secondary, __spreadValues({
|
13973
14497
|
key: text
|
13974
14498
|
}, action), text);
|
13975
|
-
}), primaryAction && /* @__PURE__ */
|
14499
|
+
}), primaryAction && /* @__PURE__ */ React101.createElement(Button.Primary, __spreadValues({
|
13976
14500
|
key: primaryAction.text
|
13977
|
-
},
|
14501
|
+
}, omit14(primaryAction, "text")), primaryAction.text))));
|
13978
14502
|
}
|
13979
14503
|
);
|
13980
14504
|
var ModalTabs = createTabsComponent(
|
13981
14505
|
ModalTab,
|
13982
14506
|
TabItem,
|
13983
14507
|
"ModalTabs",
|
13984
|
-
(children, selected, props) => /* @__PURE__ */
|
14508
|
+
(children, selected, props) => /* @__PURE__ */ React101.createElement(Modal.Body, {
|
13985
14509
|
maxHeight: props.maxHeight
|
13986
|
-
}, /* @__PURE__ */
|
14510
|
+
}, /* @__PURE__ */ React101.createElement(ModalTabContainer, null, children.find(
|
13987
14511
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
13988
14512
|
)))
|
13989
14513
|
);
|
13990
14514
|
|
13991
14515
|
// src/molecules/MultiInput/MultiInput.tsx
|
13992
|
-
import
|
13993
|
-
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";
|
13994
14518
|
import castArray5 from "lodash/castArray";
|
13995
14519
|
import identity from "lodash/identity";
|
13996
|
-
import
|
14520
|
+
import omit15 from "lodash/omit";
|
13997
14521
|
|
13998
14522
|
// src/molecules/MultiInput/InputChip.tsx
|
13999
|
-
import
|
14523
|
+
import React102 from "react";
|
14000
14524
|
var import_smallCross3 = __toESM(require_smallCross());
|
14001
|
-
var InputChip =
|
14525
|
+
var InputChip = React102.forwardRef(
|
14002
14526
|
(_a, ref) => {
|
14003
14527
|
var _b = _a, { invalid = false, disabled, readOnly, className, onClick: _onClick, children } = _b, props = __objRest(_b, ["invalid", "disabled", "readOnly", "className", "onClick", "children"]);
|
14004
14528
|
const onClick = (e) => {
|
@@ -14006,18 +14530,18 @@ var InputChip = React92.forwardRef(
|
|
14006
14530
|
_onClick == null ? void 0 : _onClick(e);
|
14007
14531
|
}
|
14008
14532
|
};
|
14009
|
-
return /* @__PURE__ */
|
14533
|
+
return /* @__PURE__ */ React102.createElement("div", {
|
14010
14534
|
className: classNames(className, "inline-flex align-middle mx-1 items-stretch rounded-sm break-all", {
|
14011
14535
|
"bg-status-danger ": invalid,
|
14012
14536
|
"bg-muted ": !invalid && !disabled,
|
14013
14537
|
"bg-default": disabled
|
14014
14538
|
})
|
14015
|
-
}, /* @__PURE__ */
|
14539
|
+
}, /* @__PURE__ */ React102.createElement("div", {
|
14016
14540
|
className: tw("px-2 py-1")
|
14017
|
-
}, /* @__PURE__ */
|
14541
|
+
}, /* @__PURE__ */ React102.createElement(Typography2, {
|
14018
14542
|
variant: "small",
|
14019
14543
|
color: invalid ? "warning-default" : disabled ? "inactive" : "default"
|
14020
|
-
}, children)), !readOnly && /* @__PURE__ */
|
14544
|
+
}, children)), !readOnly && /* @__PURE__ */ React102.createElement("div", __spreadProps(__spreadValues({
|
14021
14545
|
ref
|
14022
14546
|
}, props), {
|
14023
14547
|
onClick,
|
@@ -14028,7 +14552,7 @@ var InputChip = React92.forwardRef(
|
|
14028
14552
|
}),
|
14029
14553
|
role: "button",
|
14030
14554
|
"aria-label": `Remove ${String(children)}`
|
14031
|
-
}), !disabled && /* @__PURE__ */
|
14555
|
+
}), !disabled && /* @__PURE__ */ React102.createElement(Icon, {
|
14032
14556
|
icon: import_smallCross3.default,
|
14033
14557
|
className: tw({
|
14034
14558
|
"text-danger-default": invalid,
|
@@ -14169,7 +14693,7 @@ var MultiInputBase = (_a) => {
|
|
14169
14693
|
};
|
14170
14694
|
const renderChips = () => items == null ? void 0 : items.map((item, index) => {
|
14171
14695
|
var _a3;
|
14172
|
-
return /* @__PURE__ */
|
14696
|
+
return /* @__PURE__ */ React103.createElement(InputChip, {
|
14173
14697
|
key: `${itemToString(item)}.${index}`,
|
14174
14698
|
invalid: !((_a3 = isItemValid == null ? void 0 : isItemValid(item, index)) != null ? _a3 : true),
|
14175
14699
|
readOnly,
|
@@ -14180,13 +14704,13 @@ var MultiInputBase = (_a) => {
|
|
14180
14704
|
}
|
14181
14705
|
}, itemToString(item));
|
14182
14706
|
});
|
14183
|
-
return /* @__PURE__ */
|
14707
|
+
return /* @__PURE__ */ React103.createElement("div", {
|
14184
14708
|
className: "Aquarium-MultiInputBase"
|
14185
|
-
}, /* @__PURE__ */
|
14709
|
+
}, /* @__PURE__ */ React103.createElement(Select.InputContainer, {
|
14186
14710
|
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default"
|
14187
|
-
}, /* @__PURE__ */
|
14711
|
+
}, /* @__PURE__ */ React103.createElement("div", {
|
14188
14712
|
className: "grow inline-flex flex-row flex-wrap gap-y-2"
|
14189
|
-
}, inline && renderChips(), /* @__PURE__ */
|
14713
|
+
}, inline && renderChips(), /* @__PURE__ */ React103.createElement(Select.Input, __spreadProps(__spreadValues({
|
14190
14714
|
ref: inputRef,
|
14191
14715
|
id: id != null ? id : name,
|
14192
14716
|
name,
|
@@ -14204,11 +14728,11 @@ var MultiInputBase = (_a) => {
|
|
14204
14728
|
onFocus: handleFocus,
|
14205
14729
|
onBlur: handleBlur,
|
14206
14730
|
autoComplete: "off"
|
14207
|
-
}))), endAdornment && /* @__PURE__ */
|
14731
|
+
}))), endAdornment && /* @__PURE__ */ React103.createElement(InputAdornment, null, endAdornment)), !inline && /* @__PURE__ */ React103.createElement("div", {
|
14208
14732
|
className: tw("flex flex-row flex-wrap gap-y-2 mt-2")
|
14209
14733
|
}, renderChips()));
|
14210
14734
|
};
|
14211
|
-
var BaseMultiInputSkeleton = () => /* @__PURE__ */
|
14735
|
+
var BaseMultiInputSkeleton = () => /* @__PURE__ */ React103.createElement(Skeleton, {
|
14212
14736
|
height: 38
|
14213
14737
|
});
|
14214
14738
|
MultiInputBase.Skeleton = BaseMultiInputSkeleton;
|
@@ -14220,13 +14744,13 @@ var MultiInput = (props) => {
|
|
14220
14744
|
var _a2;
|
14221
14745
|
setValue((_a2 = props.value) != null ? _a2 : []);
|
14222
14746
|
}, [JSON.stringify(props.value)]);
|
14223
|
-
const defaultId =
|
14747
|
+
const defaultId = useId15();
|
14224
14748
|
const id = (_e = (_d = props.id) != null ? _d : props.name) != null ? _e : defaultId;
|
14225
|
-
const errorMessageId =
|
14749
|
+
const errorMessageId = useId15();
|
14226
14750
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
14227
14751
|
const labelControlProps = getLabelControlProps(props);
|
14228
|
-
const baseProps =
|
14229
|
-
return /* @__PURE__ */
|
14752
|
+
const baseProps = omit15(props, Object.keys(labelControlProps));
|
14753
|
+
return /* @__PURE__ */ React103.createElement(LabelControl, __spreadProps(__spreadValues({
|
14230
14754
|
id: `${id}-label`,
|
14231
14755
|
htmlFor: `${id}-input`,
|
14232
14756
|
messageId: errorMessageId
|
@@ -14234,7 +14758,7 @@ var MultiInput = (props) => {
|
|
14234
14758
|
length: value.length,
|
14235
14759
|
maxLength,
|
14236
14760
|
className: "Aquarium-MultiInput"
|
14237
|
-
}), /* @__PURE__ */
|
14761
|
+
}), /* @__PURE__ */ React103.createElement(MultiInputBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
14238
14762
|
id: `${id}-input`,
|
14239
14763
|
onChange: (value2) => {
|
14240
14764
|
var _a2;
|
@@ -14246,20 +14770,20 @@ var MultiInput = (props) => {
|
|
14246
14770
|
valid: props.valid
|
14247
14771
|
})));
|
14248
14772
|
};
|
14249
|
-
var MultiInputSkeleton = () => /* @__PURE__ */
|
14773
|
+
var MultiInputSkeleton = () => /* @__PURE__ */ React103.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React103.createElement(MultiInputBase.Skeleton, null));
|
14250
14774
|
MultiInput.Skeleton = MultiInputSkeleton;
|
14251
14775
|
MultiInput.Skeleton.displayName = "MultiInput.Skeleton";
|
14252
14776
|
|
14253
14777
|
// src/molecules/MultiSelect/MultiSelect.tsx
|
14254
|
-
import
|
14778
|
+
import React104, { useEffect as useEffect10, useRef as useRef13, useState as useState13 } from "react";
|
14255
14779
|
import { ariaHideOutside as ariaHideOutside2 } from "@react-aria/overlays";
|
14256
|
-
import { useId as
|
14780
|
+
import { useId as useId16 } from "@react-aria/utils";
|
14257
14781
|
import { useCombobox as useCombobox2, useMultipleSelection } from "downshift";
|
14258
14782
|
import isArray4 from "lodash/isArray";
|
14259
14783
|
import isEqual from "lodash/isEqual";
|
14260
14784
|
import isNil2 from "lodash/isNil";
|
14261
14785
|
import isObject2 from "lodash/isObject";
|
14262
|
-
import
|
14786
|
+
import omit16 from "lodash/omit";
|
14263
14787
|
import omitBy from "lodash/omitBy";
|
14264
14788
|
import { matchSorter as matchSorter2 } from "match-sorter";
|
14265
14789
|
var isOptionGroup = (option) => {
|
@@ -14411,16 +14935,16 @@ var MultiSelectBase = (_a) => {
|
|
14411
14935
|
return ariaHideOutside2([inputRef.current, popoverRef.current]);
|
14412
14936
|
}
|
14413
14937
|
}, [state.isOpen, inputRef, popoverRef]);
|
14414
|
-
const renderItem = (item, index) => /* @__PURE__ */
|
14938
|
+
const renderItem = (item, index) => /* @__PURE__ */ React104.createElement(Select.Item, __spreadValues({
|
14415
14939
|
key: itemToString(item),
|
14416
14940
|
highlighted: index === highlightedIndex,
|
14417
14941
|
selected: selectedItems.includes(item)
|
14418
14942
|
}, getItemProps({ item, index })), renderOption(item));
|
14419
|
-
const renderGroup = (group) => group.options.length ? /* @__PURE__ */
|
14943
|
+
const renderGroup = (group) => group.options.length ? /* @__PURE__ */ React104.createElement(React104.Fragment, {
|
14420
14944
|
key: group.label
|
14421
|
-
}, /* @__PURE__ */
|
14945
|
+
}, /* @__PURE__ */ React104.createElement(Select.Group, null, group.label), group.options.map((opt) => renderItem(opt, flattenedOptions.indexOf(opt)))) : null;
|
14422
14946
|
const renderChips = () => {
|
14423
|
-
return selectedItems.map((selectedItem, index) => /* @__PURE__ */
|
14947
|
+
return selectedItems.map((selectedItem, index) => /* @__PURE__ */ React104.createElement(InputChip, __spreadProps(__spreadValues({
|
14424
14948
|
key: `${itemToString(selectedItem)}.chip`,
|
14425
14949
|
className: tw("mx-0"),
|
14426
14950
|
disabled,
|
@@ -14438,14 +14962,14 @@ var MultiSelectBase = (_a) => {
|
|
14438
14962
|
getDropdownProps({ ref: inputRef, disabled: disabled || readOnly, value: inputValue })
|
14439
14963
|
);
|
14440
14964
|
const menuProps = getMenuProps({ ref: menuRef }, { suppressRefError: !isOpen });
|
14441
|
-
return /* @__PURE__ */
|
14965
|
+
return /* @__PURE__ */ React104.createElement("div", {
|
14442
14966
|
className: classNames("Aquarium-MultiSelectBase", tw("relative"))
|
14443
|
-
}, /* @__PURE__ */
|
14967
|
+
}, /* @__PURE__ */ React104.createElement(Select.InputContainer, {
|
14444
14968
|
ref: targetRef,
|
14445
14969
|
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default"
|
14446
|
-
}, /* @__PURE__ */
|
14970
|
+
}, /* @__PURE__ */ React104.createElement("div", {
|
14447
14971
|
className: "grow inline-flex flex-row flex-wrap gap-2"
|
14448
|
-
}, !hideChips && inline && renderChips(), /* @__PURE__ */
|
14972
|
+
}, !hideChips && inline && renderChips(), /* @__PURE__ */ React104.createElement(Select.Input, __spreadProps(__spreadValues(__spreadValues({
|
14449
14973
|
name,
|
14450
14974
|
placeholder: selectedItems.length === 0 && !readOnly ? placeholder : ""
|
14451
14975
|
}, inputProps), props), {
|
@@ -14464,12 +14988,12 @@ var MultiSelectBase = (_a) => {
|
|
14464
14988
|
setFocus(false);
|
14465
14989
|
(_a3 = inputProps.onBlur) == null ? void 0 : _a3.call(inputProps, e);
|
14466
14990
|
}
|
14467
|
-
}))), !readOnly && /* @__PURE__ */
|
14991
|
+
}))), !readOnly && /* @__PURE__ */ React104.createElement(Select.Toggle, __spreadValues({
|
14468
14992
|
hasFocus,
|
14469
14993
|
isOpen
|
14470
|
-
}, getToggleButtonProps({ disabled })))), !hideChips && !inline && /* @__PURE__ */
|
14994
|
+
}, getToggleButtonProps({ disabled })))), !hideChips && !inline && /* @__PURE__ */ React104.createElement("div", {
|
14471
14995
|
className: tw("flex flex-row flex-wrap gap-2 mt-2")
|
14472
|
-
}, renderChips()), isOpen && /* @__PURE__ */
|
14996
|
+
}, renderChips()), isOpen && /* @__PURE__ */ React104.createElement(PopoverOverlay, {
|
14473
14997
|
ref: popoverRef,
|
14474
14998
|
triggerRef: targetRef,
|
14475
14999
|
state,
|
@@ -14477,13 +15001,13 @@ var MultiSelectBase = (_a) => {
|
|
14477
15001
|
shouldFlip: true,
|
14478
15002
|
isNonModal: true,
|
14479
15003
|
style: { width: (_a2 = targetRef.current) == null ? void 0 : _a2.offsetWidth }
|
14480
|
-
}, /* @__PURE__ */
|
15004
|
+
}, /* @__PURE__ */ React104.createElement(Select.Menu, __spreadValues({
|
14481
15005
|
maxHeight
|
14482
|
-
}, menuProps), hasNoResults && /* @__PURE__ */
|
15006
|
+
}, menuProps), hasNoResults && /* @__PURE__ */ React104.createElement(Select.NoResults, null, emptyState), filteredOptions.map(
|
14483
15007
|
(option, index) => isOptionGroup(option) ? renderGroup(option) : renderItem(option, index)
|
14484
15008
|
))));
|
14485
15009
|
};
|
14486
|
-
var MultiSelectBaseSkeleton = () => /* @__PURE__ */
|
15010
|
+
var MultiSelectBaseSkeleton = () => /* @__PURE__ */ React104.createElement(Skeleton, {
|
14487
15011
|
height: 38
|
14488
15012
|
});
|
14489
15013
|
MultiSelectBase.Skeleton = MultiSelectBaseSkeleton;
|
@@ -14498,19 +15022,19 @@ var MultiSelect = (_a) => {
|
|
14498
15022
|
"emptyState"
|
14499
15023
|
]);
|
14500
15024
|
var _a2;
|
14501
|
-
const defaultId =
|
15025
|
+
const defaultId = useId16();
|
14502
15026
|
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
14503
|
-
const errorMessageId =
|
15027
|
+
const errorMessageId = useId16();
|
14504
15028
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
14505
15029
|
const labelControlProps = getLabelControlProps(props);
|
14506
|
-
const baseProps =
|
14507
|
-
return /* @__PURE__ */
|
15030
|
+
const baseProps = omit16(props, Object.keys(labelControlProps));
|
15031
|
+
return /* @__PURE__ */ React104.createElement(LabelControl, __spreadProps(__spreadValues({
|
14508
15032
|
id: `${id}-label`,
|
14509
15033
|
htmlFor: `${id}-input`,
|
14510
15034
|
messageId: errorMessageId
|
14511
15035
|
}, labelControlProps), {
|
14512
15036
|
className: "Aquarium-MultiSelect"
|
14513
|
-
}), /* @__PURE__ */
|
15037
|
+
}), /* @__PURE__ */ React104.createElement(MultiSelectBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
14514
15038
|
id,
|
14515
15039
|
options,
|
14516
15040
|
emptyState,
|
@@ -14518,17 +15042,17 @@ var MultiSelect = (_a) => {
|
|
14518
15042
|
valid: props.valid
|
14519
15043
|
})));
|
14520
15044
|
};
|
14521
|
-
var MultiSelectSkeleton = () => /* @__PURE__ */
|
15045
|
+
var MultiSelectSkeleton = () => /* @__PURE__ */ React104.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React104.createElement(MultiSelectBase.Skeleton, null));
|
14522
15046
|
MultiSelect.Skeleton = MultiSelectSkeleton;
|
14523
15047
|
MultiSelect.Skeleton.displayName = "MultiSelect.Skeleton";
|
14524
15048
|
|
14525
15049
|
// src/molecules/NativeSelect/NativeSelect.tsx
|
14526
|
-
import
|
14527
|
-
import { useId as
|
14528
|
-
import
|
15050
|
+
import React105 from "react";
|
15051
|
+
import { useId as useId17 } from "@react-aria/utils";
|
15052
|
+
import omit17 from "lodash/omit";
|
14529
15053
|
import uniqueId from "lodash/uniqueId";
|
14530
15054
|
var import_caretDown2 = __toESM(require_caretDown());
|
14531
|
-
var NativeSelectBase =
|
15055
|
+
var NativeSelectBase = React105.forwardRef(
|
14532
15056
|
(_a, ref) => {
|
14533
15057
|
var _b = _a, { children, disabled = false, required = false, valid = true, readOnly = false } = _b, props = __objRest(_b, ["children", "disabled", "required", "valid", "readOnly"]);
|
14534
15058
|
const placeholderValue = uniqueId("default_value_for_placeholder");
|
@@ -14545,16 +15069,16 @@ var NativeSelectBase = React95.forwardRef(
|
|
14545
15069
|
(_b2 = props.onBlur) == null ? void 0 : _b2.call(props, event);
|
14546
15070
|
}
|
14547
15071
|
};
|
14548
|
-
return /* @__PURE__ */
|
15072
|
+
return /* @__PURE__ */ React105.createElement("span", {
|
14549
15073
|
className: classNames("Aquarium-NativeSelectBase", tw("relative block"))
|
14550
|
-
}, !readOnly && /* @__PURE__ */
|
15074
|
+
}, !readOnly && /* @__PURE__ */ React105.createElement("span", {
|
14551
15075
|
className: tw(
|
14552
15076
|
"absolute right-0 inset-y-0 mr-4 text-inactive flex ml-3 pointer-events-none typography-default-strong mt-4"
|
14553
15077
|
)
|
14554
|
-
}, /* @__PURE__ */
|
15078
|
+
}, /* @__PURE__ */ React105.createElement(Icon, {
|
14555
15079
|
icon: import_caretDown2.default,
|
14556
15080
|
"data-testid": "icon-dropdown"
|
14557
|
-
})), /* @__PURE__ */
|
15081
|
+
})), /* @__PURE__ */ React105.createElement("select", __spreadProps(__spreadValues({
|
14558
15082
|
ref,
|
14559
15083
|
disabled: disabled || readOnly,
|
14560
15084
|
required
|
@@ -14573,32 +15097,32 @@ var NativeSelectBase = React95.forwardRef(
|
|
14573
15097
|
),
|
14574
15098
|
props.className
|
14575
15099
|
)
|
14576
|
-
}), props.placeholder && /* @__PURE__ */
|
15100
|
+
}), props.placeholder && /* @__PURE__ */ React105.createElement("option", {
|
14577
15101
|
value: placeholderValue,
|
14578
15102
|
disabled: true
|
14579
15103
|
}, props.placeholder), children));
|
14580
15104
|
}
|
14581
15105
|
);
|
14582
|
-
NativeSelectBase.Skeleton = () => /* @__PURE__ */
|
15106
|
+
NativeSelectBase.Skeleton = () => /* @__PURE__ */ React105.createElement(Skeleton, {
|
14583
15107
|
height: 38
|
14584
15108
|
});
|
14585
|
-
var NativeSelect =
|
15109
|
+
var NativeSelect = React105.forwardRef(
|
14586
15110
|
(_a, ref) => {
|
14587
15111
|
var _b = _a, { readOnly } = _b, props = __objRest(_b, ["readOnly"]);
|
14588
15112
|
var _a2;
|
14589
|
-
const defaultId =
|
15113
|
+
const defaultId = useId17();
|
14590
15114
|
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
14591
|
-
const errorMessageId =
|
15115
|
+
const errorMessageId = useId17();
|
14592
15116
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
14593
15117
|
const _b2 = getLabelControlProps(props), { "data-testid": dataTestId } = _b2, labelControlProps = __objRest(_b2, ["data-testid"]);
|
14594
|
-
const baseProps =
|
14595
|
-
return /* @__PURE__ */
|
15118
|
+
const baseProps = omit17(props, Object.keys(labelControlProps));
|
15119
|
+
return /* @__PURE__ */ React105.createElement(LabelControl, __spreadProps(__spreadValues({
|
14596
15120
|
id: `${id}-label`,
|
14597
15121
|
htmlFor: id,
|
14598
15122
|
messageId: errorMessageId
|
14599
15123
|
}, labelControlProps), {
|
14600
15124
|
className: "Aquarium-NativeSelect"
|
14601
|
-
}), /* @__PURE__ */
|
15125
|
+
}), /* @__PURE__ */ React105.createElement(NativeSelectBase, __spreadProps(__spreadValues(__spreadValues({
|
14602
15126
|
ref
|
14603
15127
|
}, baseProps), errorProps), {
|
14604
15128
|
id,
|
@@ -14612,63 +15136,63 @@ var NativeSelect = React95.forwardRef(
|
|
14612
15136
|
}
|
14613
15137
|
);
|
14614
15138
|
NativeSelect.displayName = "NativeSelect";
|
14615
|
-
var Option =
|
15139
|
+
var Option = React105.forwardRef((_a, ref) => {
|
14616
15140
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
14617
|
-
return /* @__PURE__ */
|
15141
|
+
return /* @__PURE__ */ React105.createElement("option", __spreadValues({
|
14618
15142
|
ref
|
14619
15143
|
}, props), children);
|
14620
15144
|
});
|
14621
15145
|
Option.displayName = "Option";
|
14622
|
-
var NativeSelectSkeleton = () => /* @__PURE__ */
|
15146
|
+
var NativeSelectSkeleton = () => /* @__PURE__ */ React105.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React105.createElement(NativeSelectBase.Skeleton, null), /* @__PURE__ */ React105.createElement("div", {
|
14623
15147
|
style: { height: "1px" }
|
14624
15148
|
}));
|
14625
15149
|
NativeSelect.Skeleton = NativeSelectSkeleton;
|
14626
15150
|
NativeSelect.Skeleton.displayName = "NativeSelect.Skeleton";
|
14627
15151
|
|
14628
15152
|
// src/molecules/Navigation/Navigation.tsx
|
14629
|
-
import
|
15153
|
+
import React107 from "react";
|
14630
15154
|
import classNames12 from "classnames";
|
14631
15155
|
|
14632
15156
|
// src/atoms/Navigation/Navigation.tsx
|
14633
|
-
import
|
15157
|
+
import React106 from "react";
|
14634
15158
|
var Navigation = (_a) => {
|
14635
15159
|
var _b = _a, { className, children } = _b, rest = __objRest(_b, ["className", "children"]);
|
14636
|
-
return /* @__PURE__ */
|
15160
|
+
return /* @__PURE__ */ React106.createElement("nav", {
|
14637
15161
|
className: classNames(tw("bg-muted h-full"))
|
14638
|
-
}, /* @__PURE__ */
|
15162
|
+
}, /* @__PURE__ */ React106.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
14639
15163
|
className: classNames(tw("flex flex-col h-full"), className),
|
14640
15164
|
role: "menubar"
|
14641
15165
|
}), children));
|
14642
15166
|
};
|
14643
15167
|
var Header = (_a) => {
|
14644
15168
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14645
|
-
return /* @__PURE__ */
|
15169
|
+
return /* @__PURE__ */ React106.createElement("li", __spreadProps(__spreadValues({}, rest), {
|
14646
15170
|
role: "presentation",
|
14647
15171
|
className: classNames(tw("px-6 py-5"), className)
|
14648
15172
|
}));
|
14649
15173
|
};
|
14650
15174
|
var Footer = (_a) => {
|
14651
15175
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14652
|
-
return /* @__PURE__ */
|
15176
|
+
return /* @__PURE__ */ React106.createElement("li", __spreadProps(__spreadValues({}, rest), {
|
14653
15177
|
role: "presentation",
|
14654
15178
|
className: classNames(tw("px-6 py-5 mt-auto"), className)
|
14655
15179
|
}));
|
14656
15180
|
};
|
14657
15181
|
var Section2 = (_a) => {
|
14658
15182
|
var _b = _a, { title, className } = _b, rest = __objRest(_b, ["title", "className"]);
|
14659
|
-
return /* @__PURE__ */
|
15183
|
+
return /* @__PURE__ */ React106.createElement("li", {
|
14660
15184
|
role: "presentation",
|
14661
15185
|
className: tw("py-5")
|
14662
|
-
}, title && /* @__PURE__ */
|
15186
|
+
}, title && /* @__PURE__ */ React106.createElement("div", {
|
14663
15187
|
className: classNames(className, "py-2 px-6 text-inactive uppercase cursor-default typography-caption")
|
14664
|
-
}, title), /* @__PURE__ */
|
15188
|
+
}, title), /* @__PURE__ */ React106.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
14665
15189
|
role: "group",
|
14666
15190
|
className: classNames(tw("flex flex-col"), className)
|
14667
15191
|
})));
|
14668
15192
|
};
|
14669
15193
|
var Divider3 = (_a) => {
|
14670
15194
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14671
|
-
return /* @__PURE__ */
|
15195
|
+
return /* @__PURE__ */ React106.createElement("li", __spreadProps(__spreadValues({
|
14672
15196
|
role: "separator"
|
14673
15197
|
}, rest), {
|
14674
15198
|
className: classNames(tw("border-t-2 border-muted"), className)
|
@@ -14676,9 +15200,9 @@ var Divider3 = (_a) => {
|
|
14676
15200
|
};
|
14677
15201
|
var Item5 = (_a) => {
|
14678
15202
|
var _b = _a, { className, active } = _b, rest = __objRest(_b, ["className", "active"]);
|
14679
|
-
return /* @__PURE__ */
|
15203
|
+
return /* @__PURE__ */ React106.createElement("li", {
|
14680
15204
|
role: "presentation"
|
14681
|
-
}, /* @__PURE__ */
|
15205
|
+
}, /* @__PURE__ */ React106.createElement("a", __spreadProps(__spreadValues({}, rest), {
|
14682
15206
|
role: "menuitem",
|
14683
15207
|
className: classNames(
|
14684
15208
|
tw("py-3 px-6 hover:bg-default cursor-pointer flex gap-4 items-center typography-small focusable", {
|
@@ -14698,7 +15222,7 @@ Navigation.Divider = Divider3;
|
|
14698
15222
|
// src/molecules/Navigation/Navigation.tsx
|
14699
15223
|
var Navigation2 = (_a) => {
|
14700
15224
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
14701
|
-
return /* @__PURE__ */
|
15225
|
+
return /* @__PURE__ */ React107.createElement(Navigation, __spreadValues({
|
14702
15226
|
className: classNames12("Aquarium-Navigation", className)
|
14703
15227
|
}, props));
|
14704
15228
|
};
|
@@ -14712,11 +15236,11 @@ var Item6 = (_a) => {
|
|
14712
15236
|
"icon",
|
14713
15237
|
"showNotification"
|
14714
15238
|
]);
|
14715
|
-
return /* @__PURE__ */
|
15239
|
+
return /* @__PURE__ */ React107.createElement(Navigation.Item, __spreadValues({}, rest), icon && showNotification && /* @__PURE__ */ React107.createElement(Badge.Notification, null, /* @__PURE__ */ React107.createElement(InlineIcon, {
|
14716
15240
|
icon,
|
14717
15241
|
width: "20px",
|
14718
15242
|
height: "20px"
|
14719
|
-
})), icon && !showNotification && /* @__PURE__ */
|
15243
|
+
})), icon && !showNotification && /* @__PURE__ */ React107.createElement(InlineIcon, {
|
14720
15244
|
icon,
|
14721
15245
|
width: "20px",
|
14722
15246
|
height: "20px"
|
@@ -14729,32 +15253,32 @@ Navigation2.Header = Navigation.Header;
|
|
14729
15253
|
Navigation2.Section = Navigation.Section;
|
14730
15254
|
|
14731
15255
|
// src/molecules/PageHeader/PageHeader.tsx
|
14732
|
-
import
|
15256
|
+
import React109 from "react";
|
14733
15257
|
import castArray6 from "lodash/castArray";
|
14734
15258
|
|
14735
15259
|
// src/atoms/PageHeader/PageHeader.tsx
|
14736
|
-
import
|
15260
|
+
import React108 from "react";
|
14737
15261
|
var PageHeader = (_a) => {
|
14738
15262
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14739
|
-
return /* @__PURE__ */
|
15263
|
+
return /* @__PURE__ */ React108.createElement("div", __spreadValues({
|
14740
15264
|
className: classNames(tw("flex flex-row gap-4 pb-6"), className)
|
14741
15265
|
}, rest), children);
|
14742
15266
|
};
|
14743
15267
|
PageHeader.Container = (_a) => {
|
14744
15268
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14745
|
-
return /* @__PURE__ */
|
15269
|
+
return /* @__PURE__ */ React108.createElement("div", __spreadValues({
|
14746
15270
|
className: classNames(tw("flex flex-col grow gap-0"), className)
|
14747
15271
|
}, rest), children);
|
14748
15272
|
};
|
14749
15273
|
PageHeader.TitleContainer = (_a) => {
|
14750
15274
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14751
|
-
return /* @__PURE__ */
|
15275
|
+
return /* @__PURE__ */ React108.createElement("div", __spreadValues({
|
14752
15276
|
className: classNames(tw("flex flex-col justify-center gap-2"), className)
|
14753
15277
|
}, rest), children);
|
14754
15278
|
};
|
14755
15279
|
PageHeader.Title = (_a) => {
|
14756
15280
|
var _b = _a, { isSubHeader = false, children } = _b, rest = __objRest(_b, ["isSubHeader", "children"]);
|
14757
|
-
return /* @__PURE__ */
|
15281
|
+
return /* @__PURE__ */ React108.createElement(Typography2, __spreadProps(__spreadValues({}, rest), {
|
14758
15282
|
color: "intense",
|
14759
15283
|
variant: isSubHeader ? "subheading" : "heading",
|
14760
15284
|
htmlTag: isSubHeader ? "h2" : "h1"
|
@@ -14762,19 +15286,19 @@ PageHeader.Title = (_a) => {
|
|
14762
15286
|
};
|
14763
15287
|
PageHeader.Subtitle = (_a) => {
|
14764
15288
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
14765
|
-
return /* @__PURE__ */
|
15289
|
+
return /* @__PURE__ */ React108.createElement(Typography2.Small, __spreadProps(__spreadValues({}, rest), {
|
14766
15290
|
color: "default"
|
14767
15291
|
}), children);
|
14768
15292
|
};
|
14769
15293
|
PageHeader.Chips = (_a) => {
|
14770
15294
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14771
|
-
return /* @__PURE__ */
|
15295
|
+
return /* @__PURE__ */ React108.createElement("div", __spreadValues({
|
14772
15296
|
className: classNames(tw("flex gap-3"), className)
|
14773
15297
|
}, rest), children);
|
14774
15298
|
};
|
14775
15299
|
PageHeader.Actions = (_a) => {
|
14776
15300
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14777
|
-
return /* @__PURE__ */
|
15301
|
+
return /* @__PURE__ */ React108.createElement("div", __spreadValues({
|
14778
15302
|
className: classNames(tw("flex flex-row gap-4 self-start"), className)
|
14779
15303
|
}, rest), children);
|
14780
15304
|
};
|
@@ -14798,64 +15322,64 @@ var CommonPageHeader = ({
|
|
14798
15322
|
onMenuOpenChange,
|
14799
15323
|
isSubHeader = false
|
14800
15324
|
}) => {
|
14801
|
-
return /* @__PURE__ */
|
15325
|
+
return /* @__PURE__ */ React109.createElement(PageHeader, {
|
14802
15326
|
className: "Aquarium-PageHeader"
|
14803
|
-
}, /* @__PURE__ */
|
15327
|
+
}, /* @__PURE__ */ React109.createElement(PageHeader.Container, null, breadcrumbs && /* @__PURE__ */ React109.createElement(Box, {
|
14804
15328
|
marginBottom: "3"
|
14805
|
-
}, /* @__PURE__ */
|
15329
|
+
}, /* @__PURE__ */ React109.createElement(Breadcrumbs, null, breadcrumbs)), /* @__PURE__ */ React109.createElement(Spacing, {
|
14806
15330
|
row: true,
|
14807
15331
|
gap: "5"
|
14808
|
-
}, image && /* @__PURE__ */
|
15332
|
+
}, image && /* @__PURE__ */ React109.createElement("img", {
|
14809
15333
|
src: image,
|
14810
15334
|
alt: imageAlt != null ? imageAlt : "",
|
14811
15335
|
className: tw("w-[56px] h-[56px]")
|
14812
|
-
}), /* @__PURE__ */
|
15336
|
+
}), /* @__PURE__ */ React109.createElement(PageHeader.TitleContainer, null, /* @__PURE__ */ React109.createElement(PageHeader.Title, {
|
14813
15337
|
isSubHeader
|
14814
|
-
}, title), chips.length > 0 && /* @__PURE__ */
|
15338
|
+
}, title), chips.length > 0 && /* @__PURE__ */ React109.createElement(PageHeader.Chips, null, chips.map((chip) => /* @__PURE__ */ React109.createElement(Chip2, {
|
14815
15339
|
key: chip,
|
14816
15340
|
dense: true,
|
14817
15341
|
text: chip
|
14818
|
-
}))), 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, {
|
14819
15343
|
alignItems: "center"
|
14820
|
-
}, /* @__PURE__ */
|
15344
|
+
}, /* @__PURE__ */ React109.createElement(DropdownMenu2, {
|
14821
15345
|
placement: defaultContextualMenuPlacement,
|
14822
15346
|
onAction: (action) => onAction == null ? void 0 : onAction(action),
|
14823
15347
|
onOpenChange: onMenuOpenChange
|
14824
|
-
}, /* @__PURE__ */
|
15348
|
+
}, /* @__PURE__ */ React109.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React109.createElement(Button.Icon, {
|
14825
15349
|
"aria-label": menuAriaLabel,
|
14826
15350
|
icon: import_more5.default
|
14827
15351
|
})), menu)), secondaryActions && castArray6(secondaryActions).filter(Boolean).map((secondaryAction2) => renderAction({ kind: "secondary", action: secondaryAction2 })), primaryAction && renderAction({ kind: "primary", action: primaryAction })));
|
14828
15352
|
};
|
14829
|
-
var PageHeader2 = (props) => /* @__PURE__ */
|
15353
|
+
var PageHeader2 = (props) => /* @__PURE__ */ React109.createElement(CommonPageHeader, __spreadValues({}, props));
|
14830
15354
|
PageHeader2.displayName = "PageHeader";
|
14831
|
-
var SubHeader = (props) => /* @__PURE__ */
|
15355
|
+
var SubHeader = (props) => /* @__PURE__ */ React109.createElement(CommonPageHeader, __spreadProps(__spreadValues({}, props), {
|
14832
15356
|
isSubHeader: true
|
14833
15357
|
}));
|
14834
15358
|
PageHeader2.SubHeader = SubHeader;
|
14835
15359
|
PageHeader2.SubHeader.displayName = "PageHeader.SubHeader";
|
14836
15360
|
|
14837
15361
|
// src/molecules/PopoverDialog/PopoverDialog.tsx
|
14838
|
-
import
|
14839
|
-
import
|
15362
|
+
import React111 from "react";
|
15363
|
+
import omit18 from "lodash/omit";
|
14840
15364
|
|
14841
15365
|
// src/atoms/PopoverDialog/PopoverDialog.tsx
|
14842
|
-
import
|
15366
|
+
import React110 from "react";
|
14843
15367
|
var Header2 = (_a) => {
|
14844
15368
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14845
|
-
return /* @__PURE__ */
|
15369
|
+
return /* @__PURE__ */ React110.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14846
15370
|
className: classNames(tw("p-5 gap-3 flex items-center"), className)
|
14847
15371
|
}), children);
|
14848
15372
|
};
|
14849
15373
|
var Title2 = (_a) => {
|
14850
15374
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14851
|
-
return /* @__PURE__ */
|
15375
|
+
return /* @__PURE__ */ React110.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
14852
15376
|
htmlTag: "h1",
|
14853
15377
|
variant: "small-strong"
|
14854
15378
|
}), children);
|
14855
15379
|
};
|
14856
15380
|
var Body = (_a) => {
|
14857
15381
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14858
|
-
return /* @__PURE__ */
|
15382
|
+
return /* @__PURE__ */ React110.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
14859
15383
|
htmlTag: "div",
|
14860
15384
|
variant: "caption",
|
14861
15385
|
className: classNames(tw("px-5 overflow-y-auto"), className)
|
@@ -14863,13 +15387,13 @@ var Body = (_a) => {
|
|
14863
15387
|
};
|
14864
15388
|
var Footer2 = (_a) => {
|
14865
15389
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14866
|
-
return /* @__PURE__ */
|
15390
|
+
return /* @__PURE__ */ React110.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14867
15391
|
className: classNames(tw("p-5"), className)
|
14868
15392
|
}), children);
|
14869
15393
|
};
|
14870
15394
|
var Actions2 = (_a) => {
|
14871
15395
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14872
|
-
return /* @__PURE__ */
|
15396
|
+
return /* @__PURE__ */ React110.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14873
15397
|
className: classNames(tw("flex gap-4"), className)
|
14874
15398
|
}), children);
|
14875
15399
|
};
|
@@ -14885,29 +15409,29 @@ var PopoverDialog = {
|
|
14885
15409
|
var PopoverDialog2 = ({ placement, open, title, secondaryAction, primaryAction, children }) => {
|
14886
15410
|
const wrapPromptWithBody = (child) => {
|
14887
15411
|
if (isComponentType(child, PopoverDialog2.Prompt)) {
|
14888
|
-
return /* @__PURE__ */
|
15412
|
+
return /* @__PURE__ */ React111.createElement(Popover3.Panel, {
|
14889
15413
|
className: classNames("Aquarium-PopoverDialog", tw("max-w-[300px]"))
|
14890
|
-
}, /* @__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({
|
14891
15415
|
kind: "secondary-ghost",
|
14892
15416
|
key: secondaryAction.text,
|
14893
15417
|
dense: true
|
14894
|
-
},
|
15418
|
+
}, omit18(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */ React111.createElement(Popover3.Button, __spreadValues({
|
14895
15419
|
kind: "ghost",
|
14896
15420
|
key: primaryAction.text,
|
14897
15421
|
dense: true
|
14898
|
-
},
|
15422
|
+
}, omit18(primaryAction, "text")), primaryAction.text))));
|
14899
15423
|
}
|
14900
15424
|
return child;
|
14901
15425
|
};
|
14902
|
-
return /* @__PURE__ */
|
15426
|
+
return /* @__PURE__ */ React111.createElement(Popover3, {
|
14903
15427
|
type: "dialog",
|
14904
15428
|
isOpen: open,
|
14905
15429
|
placement,
|
14906
15430
|
containFocus: true
|
14907
|
-
},
|
15431
|
+
}, React111.Children.map(children, wrapPromptWithBody));
|
14908
15432
|
};
|
14909
|
-
PopoverDialog2.Trigger =
|
14910
|
-
var Prompt = ({ children }) => /* @__PURE__ */
|
15433
|
+
PopoverDialog2.Trigger = Popover3.Trigger;
|
15434
|
+
var Prompt = ({ children }) => /* @__PURE__ */ React111.createElement(PopoverDialog.Body, null, children);
|
14911
15435
|
Prompt.displayName = "PopoverDialog.Prompt";
|
14912
15436
|
PopoverDialog2.Prompt = Prompt;
|
14913
15437
|
|
@@ -14916,14 +15440,14 @@ import { createPortal } from "react-dom";
|
|
14916
15440
|
var Portal = ({ children, to }) => createPortal(children, to);
|
14917
15441
|
|
14918
15442
|
// src/molecules/ProgressBar/ProgressBar.tsx
|
14919
|
-
import
|
15443
|
+
import React113 from "react";
|
14920
15444
|
|
14921
15445
|
// src/atoms/ProgressBar/ProgressBar.tsx
|
14922
|
-
import
|
15446
|
+
import React112 from "react";
|
14923
15447
|
import clamp3 from "lodash/clamp";
|
14924
15448
|
var ProgressBar = (_a) => {
|
14925
15449
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14926
|
-
return /* @__PURE__ */
|
15450
|
+
return /* @__PURE__ */ React112.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14927
15451
|
className: classNames(tw("relative flex items-center w-full bg-muted h-2 rounded-full overflow-hidden"), className)
|
14928
15452
|
}), children);
|
14929
15453
|
};
|
@@ -14936,7 +15460,7 @@ var STATUS_COLORS = {
|
|
14936
15460
|
ProgressBar.Indicator = (_a) => {
|
14937
15461
|
var _b = _a, { min, max, value, "aria-label": ariaLabel, status, className } = _b, rest = __objRest(_b, ["min", "max", "value", "aria-label", "status", "className"]);
|
14938
15462
|
const completedPercentage = clamp3((value - min) / (max - min) * 100, 0, 100);
|
14939
|
-
return /* @__PURE__ */
|
15463
|
+
return /* @__PURE__ */ React112.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14940
15464
|
className: classNames(
|
14941
15465
|
tw("h-2 rounded-full transition-all ease-in-out delay-150"),
|
14942
15466
|
STATUS_COLORS[status],
|
@@ -14952,11 +15476,11 @@ ProgressBar.Indicator = (_a) => {
|
|
14952
15476
|
};
|
14953
15477
|
ProgressBar.Labels = (_a) => {
|
14954
15478
|
var _b = _a, { children, startLabel, endLabel, className } = _b, rest = __objRest(_b, ["children", "startLabel", "endLabel", "className"]);
|
14955
|
-
return /* @__PURE__ */
|
15479
|
+
return /* @__PURE__ */ React112.createElement("div", {
|
14956
15480
|
className: classNames(tw("flex flex-row"), className)
|
14957
|
-
}, /* @__PURE__ */
|
15481
|
+
}, /* @__PURE__ */ React112.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
14958
15482
|
className: tw("grow text-default typography-caption")
|
14959
|
-
}), startLabel), /* @__PURE__ */
|
15483
|
+
}), startLabel), /* @__PURE__ */ React112.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
14960
15484
|
className: tw("grow text-default typography-caption text-right")
|
14961
15485
|
}), endLabel));
|
14962
15486
|
};
|
@@ -14974,7 +15498,7 @@ var ProgressBar2 = (props) => {
|
|
14974
15498
|
if (min > max) {
|
14975
15499
|
throw new Error("`min` value provided to `ProgressBar` is greater than `max` value.");
|
14976
15500
|
}
|
14977
|
-
const progress = /* @__PURE__ */
|
15501
|
+
const progress = /* @__PURE__ */ React113.createElement(ProgressBar, null, /* @__PURE__ */ React113.createElement(ProgressBar.Indicator, {
|
14978
15502
|
status: value === max ? completedStatus : progresStatus,
|
14979
15503
|
min,
|
14980
15504
|
max,
|
@@ -14984,15 +15508,15 @@ var ProgressBar2 = (props) => {
|
|
14984
15508
|
if (props.dense) {
|
14985
15509
|
return progress;
|
14986
15510
|
}
|
14987
|
-
return /* @__PURE__ */
|
15511
|
+
return /* @__PURE__ */ React113.createElement("div", {
|
14988
15512
|
className: "Aquarium-ProgressBar"
|
14989
|
-
}, progress, /* @__PURE__ */
|
15513
|
+
}, progress, /* @__PURE__ */ React113.createElement(ProgressBar.Labels, {
|
14990
15514
|
className: tw("py-2"),
|
14991
15515
|
startLabel: props.startLabel,
|
14992
15516
|
endLabel: props.endLabel
|
14993
15517
|
}));
|
14994
15518
|
};
|
14995
|
-
var ProgressBarSkeleton = () => /* @__PURE__ */
|
15519
|
+
var ProgressBarSkeleton = () => /* @__PURE__ */ React113.createElement(Skeleton, {
|
14996
15520
|
height: 4,
|
14997
15521
|
display: "block"
|
14998
15522
|
});
|
@@ -15000,13 +15524,13 @@ ProgressBar2.Skeleton = ProgressBarSkeleton;
|
|
15000
15524
|
ProgressBar2.Skeleton.displayName = "ProgressBar.Skeleton";
|
15001
15525
|
|
15002
15526
|
// src/molecules/RadioButton/RadioButton.tsx
|
15003
|
-
import
|
15004
|
-
var RadioButton2 =
|
15527
|
+
import React114 from "react";
|
15528
|
+
var RadioButton2 = React114.forwardRef(
|
15005
15529
|
(_a, ref) => {
|
15006
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"]);
|
15007
15531
|
var _a2;
|
15008
15532
|
const isChecked = (_a2 = props.checked) != null ? _a2 : props.defaultChecked;
|
15009
|
-
return !readOnly || isChecked ? /* @__PURE__ */
|
15533
|
+
return !readOnly || isChecked ? /* @__PURE__ */ React114.createElement(ControlLabel, {
|
15010
15534
|
htmlFor: id,
|
15011
15535
|
label: children,
|
15012
15536
|
"aria-label": ariaLabel,
|
@@ -15015,7 +15539,7 @@ var RadioButton2 = React104.forwardRef(
|
|
15015
15539
|
disabled,
|
15016
15540
|
style: { gap: "0 8px" },
|
15017
15541
|
className: "Aquarium-RadioButton"
|
15018
|
-
}, !readOnly && /* @__PURE__ */
|
15542
|
+
}, !readOnly && /* @__PURE__ */ React114.createElement(RadioButton, __spreadProps(__spreadValues({
|
15019
15543
|
id,
|
15020
15544
|
ref,
|
15021
15545
|
name
|
@@ -15026,12 +15550,12 @@ var RadioButton2 = React104.forwardRef(
|
|
15026
15550
|
}
|
15027
15551
|
);
|
15028
15552
|
RadioButton2.displayName = "RadioButton";
|
15029
|
-
var RadioButtonSkeleton = () => /* @__PURE__ */
|
15553
|
+
var RadioButtonSkeleton = () => /* @__PURE__ */ React114.createElement("div", {
|
15030
15554
|
className: tw("flex gap-3")
|
15031
|
-
}, /* @__PURE__ */
|
15555
|
+
}, /* @__PURE__ */ React114.createElement(Skeleton, {
|
15032
15556
|
height: 20,
|
15033
15557
|
width: 20
|
15034
|
-
}), /* @__PURE__ */
|
15558
|
+
}), /* @__PURE__ */ React114.createElement(Skeleton, {
|
15035
15559
|
height: 20,
|
15036
15560
|
width: 150
|
15037
15561
|
}));
|
@@ -15039,10 +15563,10 @@ RadioButton2.Skeleton = RadioButtonSkeleton;
|
|
15039
15563
|
RadioButton2.Skeleton.displayName = "RadioButton.Skeleton";
|
15040
15564
|
|
15041
15565
|
// src/molecules/RadioButtonGroup/RadioButtonGroup.tsx
|
15042
|
-
import
|
15043
|
-
import { useId as
|
15566
|
+
import React115 from "react";
|
15567
|
+
import { useId as useId18 } from "@react-aria/utils";
|
15044
15568
|
var isRadioButton = (c) => {
|
15045
|
-
return
|
15569
|
+
return React115.isValidElement(c) && c.type === RadioButton2;
|
15046
15570
|
};
|
15047
15571
|
var RadioButtonGroup = (_a) => {
|
15048
15572
|
var _b = _a, {
|
@@ -15065,8 +15589,8 @@ var RadioButtonGroup = (_a) => {
|
|
15065
15589
|
"children"
|
15066
15590
|
]);
|
15067
15591
|
var _a2;
|
15068
|
-
const [value, setValue] =
|
15069
|
-
const errorMessageId =
|
15592
|
+
const [value, setValue] = React115.useState((_a2 = _value != null ? _value : defaultValue) != null ? _a2 : "");
|
15593
|
+
const errorMessageId = useId18();
|
15070
15594
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
15071
15595
|
const labelControlProps = getLabelControlProps(props);
|
15072
15596
|
if (_value !== void 0 && _value !== value) {
|
@@ -15076,14 +15600,14 @@ var RadioButtonGroup = (_a) => {
|
|
15076
15600
|
setValue(e.target.value);
|
15077
15601
|
onChange == null ? void 0 : onChange(e.target.value);
|
15078
15602
|
};
|
15079
|
-
const content =
|
15603
|
+
const content = React115.Children.map(children, (c) => {
|
15080
15604
|
var _a3, _b2, _c;
|
15081
15605
|
if (!isRadioButton(c)) {
|
15082
15606
|
return null;
|
15083
15607
|
}
|
15084
15608
|
const defaultChecked = defaultValue === void 0 ? void 0 : c.props.value === defaultValue;
|
15085
15609
|
const checked = value === void 0 ? void 0 : c.props.value === value;
|
15086
|
-
return
|
15610
|
+
return React115.cloneElement(c, {
|
15087
15611
|
name,
|
15088
15612
|
defaultChecked: (_a3 = c.props.defaultChecked) != null ? _a3 : defaultChecked,
|
15089
15613
|
checked: (_b2 = c.props.checked) != null ? _b2 : checked,
|
@@ -15092,13 +15616,13 @@ var RadioButtonGroup = (_a) => {
|
|
15092
15616
|
readOnly
|
15093
15617
|
});
|
15094
15618
|
});
|
15095
|
-
return /* @__PURE__ */
|
15619
|
+
return /* @__PURE__ */ React115.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({
|
15096
15620
|
fieldset: true
|
15097
15621
|
}, labelControlProps), errorProps), {
|
15098
15622
|
className: "Aquarium-RadioButtonGroup"
|
15099
|
-
}), cols && /* @__PURE__ */
|
15623
|
+
}), cols && /* @__PURE__ */ React115.createElement(InputGroup, {
|
15100
15624
|
cols
|
15101
|
-
}, content), !cols && /* @__PURE__ */
|
15625
|
+
}, content), !cols && /* @__PURE__ */ React115.createElement(Flexbox, {
|
15102
15626
|
direction,
|
15103
15627
|
alignItems: "flex-start",
|
15104
15628
|
colGap: "8",
|
@@ -15107,12 +15631,12 @@ var RadioButtonGroup = (_a) => {
|
|
15107
15631
|
}, content));
|
15108
15632
|
};
|
15109
15633
|
var RadioButtonGroupSkeleton = ({ direction = "row", options = 2 }) => {
|
15110
|
-
return /* @__PURE__ */
|
15634
|
+
return /* @__PURE__ */ React115.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React115.createElement("div", {
|
15111
15635
|
className: tw("flex flex-wrap", {
|
15112
15636
|
"flex-row gap-8": direction === "row",
|
15113
15637
|
"flex-col gap-2": direction === "column"
|
15114
15638
|
})
|
15115
|
-
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */
|
15639
|
+
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */ React115.createElement(RadioButton2.Skeleton, {
|
15116
15640
|
key
|
15117
15641
|
}))));
|
15118
15642
|
};
|
@@ -15120,25 +15644,25 @@ RadioButtonGroup.Skeleton = RadioButtonGroupSkeleton;
|
|
15120
15644
|
RadioButtonGroup.Skeleton.displayName = "RadioButtonGroup.Skeleton";
|
15121
15645
|
|
15122
15646
|
// src/molecules/Section/Section.tsx
|
15123
|
-
import
|
15647
|
+
import React120, { useRef as useRef14 } from "react";
|
15124
15648
|
import { useButton as useButton4 } from "@react-aria/button";
|
15125
|
-
import { useId as
|
15649
|
+
import { useId as useId19 } from "@react-aria/utils";
|
15126
15650
|
import { animated as animated6, useSpring as useSpring5 } from "@react-spring/web";
|
15127
15651
|
import castArray7 from "lodash/castArray";
|
15128
15652
|
import isUndefined9 from "lodash/isUndefined";
|
15129
15653
|
|
15130
15654
|
// src/molecules/Switch/Switch.tsx
|
15131
|
-
import
|
15655
|
+
import React117 from "react";
|
15132
15656
|
|
15133
15657
|
// src/atoms/Switch/Switch.tsx
|
15134
|
-
import
|
15658
|
+
import React116 from "react";
|
15135
15659
|
var import_ban2 = __toESM(require_ban());
|
15136
|
-
var Switch =
|
15660
|
+
var Switch = React116.forwardRef(
|
15137
15661
|
(_a, ref) => {
|
15138
15662
|
var _b = _a, { id, children, name, disabled = false, readOnly = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly"]);
|
15139
|
-
return /* @__PURE__ */
|
15663
|
+
return /* @__PURE__ */ React116.createElement("span", {
|
15140
15664
|
className: tw("relative inline-flex justify-center items-center self-center group")
|
15141
|
-
}, /* @__PURE__ */
|
15665
|
+
}, /* @__PURE__ */ React116.createElement("input", __spreadProps(__spreadValues({
|
15142
15666
|
id,
|
15143
15667
|
ref,
|
15144
15668
|
type: "checkbox",
|
@@ -15157,7 +15681,7 @@ var Switch = React106.forwardRef(
|
|
15157
15681
|
),
|
15158
15682
|
readOnly,
|
15159
15683
|
disabled
|
15160
|
-
})), /* @__PURE__ */
|
15684
|
+
})), /* @__PURE__ */ React116.createElement("span", {
|
15161
15685
|
className: tw(
|
15162
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",
|
15163
15687
|
"bg-white left-2 peer-checked/switch:left-1 text-inactive peer-checked/switch:text-primary-muted",
|
@@ -15165,7 +15689,7 @@ var Switch = React106.forwardRef(
|
|
15165
15689
|
"shadow-4dp": !disabled
|
15166
15690
|
}
|
15167
15691
|
)
|
15168
|
-
}, disabled && /* @__PURE__ */
|
15692
|
+
}, disabled && /* @__PURE__ */ React116.createElement(Icon, {
|
15169
15693
|
icon: import_ban2.default,
|
15170
15694
|
width: "10px",
|
15171
15695
|
height: "10px"
|
@@ -15174,7 +15698,7 @@ var Switch = React106.forwardRef(
|
|
15174
15698
|
);
|
15175
15699
|
|
15176
15700
|
// src/molecules/Switch/Switch.tsx
|
15177
|
-
var Switch2 =
|
15701
|
+
var Switch2 = React117.forwardRef(
|
15178
15702
|
(_a, ref) => {
|
15179
15703
|
var _b = _a, {
|
15180
15704
|
id,
|
@@ -15197,7 +15721,7 @@ var Switch2 = React107.forwardRef(
|
|
15197
15721
|
]);
|
15198
15722
|
var _a2;
|
15199
15723
|
const isChecked = (_a2 = props.checked) != null ? _a2 : props.defaultChecked;
|
15200
|
-
return !readOnly || isChecked ? /* @__PURE__ */
|
15724
|
+
return !readOnly || isChecked ? /* @__PURE__ */ React117.createElement(ControlLabel, {
|
15201
15725
|
htmlFor: id,
|
15202
15726
|
label: children,
|
15203
15727
|
"aria-label": ariaLabel,
|
@@ -15207,7 +15731,7 @@ var Switch2 = React107.forwardRef(
|
|
15207
15731
|
style: { gap: "0 8px" },
|
15208
15732
|
labelPlacement,
|
15209
15733
|
className: "Aquarium-Switch"
|
15210
|
-
}, !readOnly && /* @__PURE__ */
|
15734
|
+
}, !readOnly && /* @__PURE__ */ React117.createElement(Switch, __spreadProps(__spreadValues({
|
15211
15735
|
id,
|
15212
15736
|
ref,
|
15213
15737
|
name
|
@@ -15218,12 +15742,12 @@ var Switch2 = React107.forwardRef(
|
|
15218
15742
|
}
|
15219
15743
|
);
|
15220
15744
|
Switch2.displayName = "Switch";
|
15221
|
-
var SwitchSkeleton = () => /* @__PURE__ */
|
15745
|
+
var SwitchSkeleton = () => /* @__PURE__ */ React117.createElement("div", {
|
15222
15746
|
className: tw("flex gap-3")
|
15223
|
-
}, /* @__PURE__ */
|
15747
|
+
}, /* @__PURE__ */ React117.createElement(Skeleton, {
|
15224
15748
|
height: 20,
|
15225
15749
|
width: 35
|
15226
|
-
}), /* @__PURE__ */
|
15750
|
+
}), /* @__PURE__ */ React117.createElement(Skeleton, {
|
15227
15751
|
height: 20,
|
15228
15752
|
width: 150
|
15229
15753
|
}));
|
@@ -15231,7 +15755,7 @@ Switch2.Skeleton = SwitchSkeleton;
|
|
15231
15755
|
Switch2.Skeleton.displayName = "Switch.Skeleton ";
|
15232
15756
|
|
15233
15757
|
// src/molecules/TagLabel/TagLabel.tsx
|
15234
|
-
import
|
15758
|
+
import React118 from "react";
|
15235
15759
|
var getVariantClassNames = (variant = "primary") => {
|
15236
15760
|
switch (variant) {
|
15237
15761
|
case "neutral":
|
@@ -15247,7 +15771,7 @@ var getVariantClassNames = (variant = "primary") => {
|
|
15247
15771
|
};
|
15248
15772
|
var TagLabel = (_a) => {
|
15249
15773
|
var _b = _a, { title, dense = false, variant } = _b, rest = __objRest(_b, ["title", "dense", "variant"]);
|
15250
|
-
return /* @__PURE__ */
|
15774
|
+
return /* @__PURE__ */ React118.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
15251
15775
|
className: classNames(
|
15252
15776
|
"Aquarium-TagLabel",
|
15253
15777
|
getVariantClassNames(variant),
|
@@ -15261,11 +15785,11 @@ var TagLabel = (_a) => {
|
|
15261
15785
|
};
|
15262
15786
|
|
15263
15787
|
// src/atoms/Section/Section.tsx
|
15264
|
-
import
|
15788
|
+
import React119 from "react";
|
15265
15789
|
var import_caretUp2 = __toESM(require_caretUp());
|
15266
15790
|
var Section3 = (_a) => {
|
15267
15791
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
15268
|
-
return /* @__PURE__ */
|
15792
|
+
return /* @__PURE__ */ React119.createElement(Box, __spreadValues({
|
15269
15793
|
component: "section",
|
15270
15794
|
borderColor: "grey-5",
|
15271
15795
|
borderWidth: "1px"
|
@@ -15273,7 +15797,7 @@ var Section3 = (_a) => {
|
|
15273
15797
|
};
|
15274
15798
|
Section3.Header = (_a) => {
|
15275
15799
|
var _b = _a, { children, className, expanded } = _b, rest = __objRest(_b, ["children", "className", "expanded"]);
|
15276
|
-
return /* @__PURE__ */
|
15800
|
+
return /* @__PURE__ */ React119.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15277
15801
|
className: classNames(
|
15278
15802
|
tw("px-6 flex gap-5 justify-between items-center h-[72px]", {
|
15279
15803
|
"bg-muted": expanded
|
@@ -15282,10 +15806,10 @@ Section3.Header = (_a) => {
|
|
15282
15806
|
)
|
15283
15807
|
}), children);
|
15284
15808
|
};
|
15285
|
-
Section3.TitleContainer =
|
15809
|
+
Section3.TitleContainer = React119.forwardRef(
|
15286
15810
|
(_a, ref) => {
|
15287
15811
|
var _b = _a, { children, className, collapsible } = _b, rest = __objRest(_b, ["children", "className", "collapsible"]);
|
15288
|
-
return /* @__PURE__ */
|
15812
|
+
return /* @__PURE__ */ React119.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15289
15813
|
ref,
|
15290
15814
|
className: classNames(
|
15291
15815
|
tw("grow grid grid-cols-[auto_1fr] gap-x-3 items-center", {
|
@@ -15296,14 +15820,14 @@ Section3.TitleContainer = React109.forwardRef(
|
|
15296
15820
|
}), children);
|
15297
15821
|
}
|
15298
15822
|
);
|
15299
|
-
Section3.Toggle = (props) => /* @__PURE__ */
|
15823
|
+
Section3.Toggle = (props) => /* @__PURE__ */ React119.createElement(Icon, __spreadProps(__spreadValues({}, props), {
|
15300
15824
|
icon: import_caretUp2.default,
|
15301
15825
|
height: 22,
|
15302
15826
|
width: 22
|
15303
15827
|
}));
|
15304
15828
|
Section3.Title = (_a) => {
|
15305
15829
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
15306
|
-
return /* @__PURE__ */
|
15830
|
+
return /* @__PURE__ */ React119.createElement(Typography2.Large, __spreadProps(__spreadValues({}, rest), {
|
15307
15831
|
htmlTag: "h2",
|
15308
15832
|
color: "intense",
|
15309
15833
|
className: "flex gap-3 items-center"
|
@@ -15311,21 +15835,21 @@ Section3.Title = (_a) => {
|
|
15311
15835
|
};
|
15312
15836
|
Section3.Subtitle = (_a) => {
|
15313
15837
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
15314
|
-
return /* @__PURE__ */
|
15838
|
+
return /* @__PURE__ */ React119.createElement(Typography2.Small, __spreadProps(__spreadValues({}, rest), {
|
15315
15839
|
color: "default"
|
15316
15840
|
}), children);
|
15317
15841
|
};
|
15318
15842
|
Section3.Actions = (_a) => {
|
15319
15843
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
15320
|
-
return /* @__PURE__ */
|
15844
|
+
return /* @__PURE__ */ React119.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15321
15845
|
className: classNames(tw("flex gap-4 justify-end"), className)
|
15322
15846
|
}), children);
|
15323
15847
|
};
|
15324
15848
|
Section3.Body = (_a) => {
|
15325
15849
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
15326
|
-
return /* @__PURE__ */
|
15850
|
+
return /* @__PURE__ */ React119.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15327
15851
|
className: classNames(tw("p-6"), className)
|
15328
|
-
}), /* @__PURE__ */
|
15852
|
+
}), /* @__PURE__ */ React119.createElement(Typography, {
|
15329
15853
|
htmlTag: "div",
|
15330
15854
|
color: "default"
|
15331
15855
|
}, children));
|
@@ -15339,7 +15863,7 @@ var Section4 = (props) => {
|
|
15339
15863
|
const _collapsible = title ? (_a = props.collapsible) != null ? _a : false : false;
|
15340
15864
|
const _collapsed = title ? props.collapsed : void 0;
|
15341
15865
|
const _defaultCollapsed = title ? (_b = props.defaultCollapsed) != null ? _b : false : false;
|
15342
|
-
const [isCollapsed, setCollapsed] =
|
15866
|
+
const [isCollapsed, setCollapsed] = React120.useState(_collapsed != null ? _collapsed : _defaultCollapsed);
|
15343
15867
|
const [ref, { height }] = useMeasure();
|
15344
15868
|
const toggleAreaRef = useRef14(null);
|
15345
15869
|
const menu = title ? (_c = props.menu) != null ? _c : void 0 : void 0;
|
@@ -15371,20 +15895,20 @@ var Section4 = (props) => {
|
|
15371
15895
|
},
|
15372
15896
|
immediate: !_collapsible
|
15373
15897
|
}), { transform, backgroundColor } = _f, spring = __objRest(_f, ["transform", "backgroundColor"]);
|
15374
|
-
const toggleId =
|
15375
|
-
const regionId =
|
15376
|
-
const titleId =
|
15898
|
+
const toggleId = useId19();
|
15899
|
+
const regionId = useId19();
|
15900
|
+
const titleId = useId19();
|
15377
15901
|
const hasTabs = isComponentType(children, Tabs);
|
15378
15902
|
const { buttonProps } = useButton4(
|
15379
15903
|
{ "elementType": "div", "onPress": handleTitleClick, "aria-expanded": !isCollapsed, "aria-controls": regionId },
|
15380
15904
|
toggleAreaRef
|
15381
15905
|
);
|
15382
|
-
return /* @__PURE__ */
|
15906
|
+
return /* @__PURE__ */ React120.createElement(Section3, {
|
15383
15907
|
"aria-label": title,
|
15384
15908
|
className: "Aquarium-Section"
|
15385
|
-
}, title && /* @__PURE__ */
|
15909
|
+
}, title && /* @__PURE__ */ React120.createElement(React120.Fragment, null, /* @__PURE__ */ React120.createElement(Section3.Header, {
|
15386
15910
|
expanded: _collapsible && !isCollapsed
|
15387
|
-
}, /* @__PURE__ */
|
15911
|
+
}, /* @__PURE__ */ React120.createElement(Section3.TitleContainer, __spreadProps(__spreadValues({}, _collapsible ? __spreadProps(__spreadValues({}, buttonProps), {
|
15388
15912
|
onPointerDown: (e) => {
|
15389
15913
|
e.preventDefault();
|
15390
15914
|
handleTitleClick();
|
@@ -15393,49 +15917,49 @@ var Section4 = (props) => {
|
|
15393
15917
|
ref: _collapsible ? toggleAreaRef : void 0,
|
15394
15918
|
id: toggleId,
|
15395
15919
|
collapsible: _collapsible
|
15396
|
-
}), _collapsible && /* @__PURE__ */
|
15920
|
+
}), _collapsible && /* @__PURE__ */ React120.createElement(animated6.div, {
|
15397
15921
|
style: { transform }
|
15398
|
-
}, /* @__PURE__ */
|
15922
|
+
}, /* @__PURE__ */ React120.createElement(Section3.Toggle, null)), /* @__PURE__ */ React120.createElement(Section3.Title, {
|
15399
15923
|
id: titleId
|
15400
|
-
}, /* @__PURE__ */
|
15924
|
+
}, /* @__PURE__ */ React120.createElement(LineClamp2, {
|
15401
15925
|
lines: 1
|
15402
|
-
}, title), props.tag && /* @__PURE__ */
|
15926
|
+
}, title), props.tag && /* @__PURE__ */ React120.createElement(TagLabel, __spreadValues({}, props.tag)), props.badge && /* @__PURE__ */ React120.createElement(Chip2, {
|
15403
15927
|
text: props.badge
|
15404
|
-
}), props.chip && /* @__PURE__ */
|
15928
|
+
}), props.chip && /* @__PURE__ */ React120.createElement(StatusChip, __spreadValues({}, props.chip))), subtitle && /* @__PURE__ */ React120.createElement(Section3.Subtitle, {
|
15405
15929
|
className: tw("row-start-2", { "col-start-2": _collapsible })
|
15406
|
-
}, /* @__PURE__ */
|
15930
|
+
}, /* @__PURE__ */ React120.createElement(LineClamp2, {
|
15407
15931
|
lines: 1
|
15408
|
-
}, subtitle))), !isCollapsed && /* @__PURE__ */
|
15932
|
+
}, subtitle))), !isCollapsed && /* @__PURE__ */ React120.createElement(Section3.Actions, null, menu && /* @__PURE__ */ React120.createElement(Box.Flex, {
|
15409
15933
|
alignItems: "center"
|
15410
|
-
}, /* @__PURE__ */
|
15934
|
+
}, /* @__PURE__ */ React120.createElement(DropdownMenu2, {
|
15411
15935
|
onAction: (action) => onAction == null ? void 0 : onAction(action),
|
15412
15936
|
onOpenChange: onMenuOpenChange,
|
15413
15937
|
placement: defaultContextualMenuPlacement
|
15414
|
-
}, /* @__PURE__ */
|
15938
|
+
}, /* @__PURE__ */ React120.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React120.createElement(Button.Icon, {
|
15415
15939
|
"aria-label": menuAriaLabel,
|
15416
15940
|
icon: import_more6.default
|
15417
|
-
})), 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({
|
15418
15942
|
"aria-labelledby": titleId
|
15419
|
-
}, props.select)))), !hasTabs && !isCollapsed && /* @__PURE__ */
|
15943
|
+
}, props.select)))), !hasTabs && !isCollapsed && /* @__PURE__ */ React120.createElement(animated6.div, {
|
15420
15944
|
className: tw(`h-[1px]`),
|
15421
15945
|
style: { backgroundColor }
|
15422
|
-
})), /* @__PURE__ */
|
15946
|
+
})), /* @__PURE__ */ React120.createElement(animated6.div, {
|
15423
15947
|
id: regionId,
|
15424
15948
|
"aria-hidden": _collapsible ? isCollapsed ? true : void 0 : void 0,
|
15425
15949
|
style: spring,
|
15426
15950
|
className: tw({ "overflow-hidden": _collapsible })
|
15427
|
-
}, /* @__PURE__ */
|
15951
|
+
}, /* @__PURE__ */ React120.createElement("div", {
|
15428
15952
|
ref
|
15429
|
-
}, hasTabs ? /* @__PURE__ */
|
15953
|
+
}, hasTabs ? /* @__PURE__ */ React120.createElement(SectionTabs, __spreadProps(__spreadValues({}, children.props), {
|
15430
15954
|
className: tw("[&>div:first-child]:px-3 grow flex flex-col overflow-y-auto", { "mt-4": _collapsible })
|
15431
|
-
})) : /* @__PURE__ */
|
15955
|
+
})) : /* @__PURE__ */ React120.createElement(Section3.Body, null, children))));
|
15432
15956
|
};
|
15433
|
-
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(
|
15434
15958
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
15435
15959
|
)));
|
15436
15960
|
|
15437
15961
|
// src/molecules/SegmentedControl/SegmentedControl.tsx
|
15438
|
-
import
|
15962
|
+
import React121 from "react";
|
15439
15963
|
var SegmentedControl = (_a) => {
|
15440
15964
|
var _b = _a, {
|
15441
15965
|
children,
|
@@ -15452,7 +15976,7 @@ var SegmentedControl = (_a) => {
|
|
15452
15976
|
"selected",
|
15453
15977
|
"className"
|
15454
15978
|
]);
|
15455
|
-
return /* @__PURE__ */
|
15979
|
+
return /* @__PURE__ */ React121.createElement("li", null, /* @__PURE__ */ React121.createElement("button", __spreadProps(__spreadValues({
|
15456
15980
|
type: "button"
|
15457
15981
|
}, rest), {
|
15458
15982
|
className: classNames(getBaseSegmentedControlClassNames(selected), className),
|
@@ -15477,16 +16001,16 @@ var SegmentedControlGroup = (_a) => {
|
|
15477
16001
|
"className",
|
15478
16002
|
"ariaLabel"
|
15479
16003
|
]);
|
15480
|
-
return /* @__PURE__ */
|
16004
|
+
return /* @__PURE__ */ React121.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
15481
16005
|
"aria-label": ariaLabel,
|
15482
16006
|
className: classNames(
|
15483
16007
|
"Aquarium-SegmentedControl",
|
15484
16008
|
"flex border border-default rounded-sm divide-x divide-grey-20",
|
15485
16009
|
className
|
15486
16010
|
)
|
15487
|
-
}),
|
16011
|
+
}), React121.Children.map(
|
15488
16012
|
children,
|
15489
|
-
(child) =>
|
16013
|
+
(child) => React121.cloneElement(child, {
|
15490
16014
|
onClick: () => onChange(child.props.value),
|
15491
16015
|
selected: child.props.value === value
|
15492
16016
|
})
|
@@ -15503,14 +16027,14 @@ var getBaseSegmentedControlClassNames = (selected) => tw(
|
|
15503
16027
|
);
|
15504
16028
|
|
15505
16029
|
// src/molecules/Stepper/Stepper.tsx
|
15506
|
-
import
|
16030
|
+
import React123 from "react";
|
15507
16031
|
|
15508
16032
|
// src/atoms/Stepper/Stepper.tsx
|
15509
|
-
import
|
16033
|
+
import React122 from "react";
|
15510
16034
|
var import_tick6 = __toESM(require_tick());
|
15511
16035
|
var Stepper = (_a) => {
|
15512
16036
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15513
|
-
return /* @__PURE__ */
|
16037
|
+
return /* @__PURE__ */ React122.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15514
16038
|
className: classNames(className)
|
15515
16039
|
}));
|
15516
16040
|
};
|
@@ -15524,7 +16048,7 @@ var ConnectorContainer = (_a) => {
|
|
15524
16048
|
"completed",
|
15525
16049
|
"dense"
|
15526
16050
|
]);
|
15527
|
-
return /* @__PURE__ */
|
16051
|
+
return /* @__PURE__ */ React122.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15528
16052
|
className: classNames(
|
15529
16053
|
tw("absolute w-full -left-1/2", {
|
15530
16054
|
"top-[3px] px-[14px]": Boolean(dense),
|
@@ -15536,7 +16060,7 @@ var ConnectorContainer = (_a) => {
|
|
15536
16060
|
};
|
15537
16061
|
var Connector = (_a) => {
|
15538
16062
|
var _b = _a, { children, className, completed, dense } = _b, rest = __objRest(_b, ["children", "className", "completed", "dense"]);
|
15539
|
-
return /* @__PURE__ */
|
16063
|
+
return /* @__PURE__ */ React122.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15540
16064
|
className: classNames(
|
15541
16065
|
tw("w-full", {
|
15542
16066
|
"bg-intense": !completed,
|
@@ -15550,7 +16074,7 @@ var Connector = (_a) => {
|
|
15550
16074
|
};
|
15551
16075
|
var Step = (_a) => {
|
15552
16076
|
var _b = _a, { className, state } = _b, rest = __objRest(_b, ["className", "state"]);
|
15553
|
-
return /* @__PURE__ */
|
16077
|
+
return /* @__PURE__ */ React122.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15554
16078
|
className: classNames(
|
15555
16079
|
tw("flex flex-col items-center relative text-center", {
|
15556
16080
|
"text-intense": state !== "inactive",
|
@@ -15572,13 +16096,13 @@ var getDenseClassNames = (state) => tw("h-[8px] w-[8px]", {
|
|
15572
16096
|
});
|
15573
16097
|
var Indicator = (_a) => {
|
15574
16098
|
var _b = _a, { children, className, state, dense } = _b, rest = __objRest(_b, ["children", "className", "state", "dense"]);
|
15575
|
-
return /* @__PURE__ */
|
16099
|
+
return /* @__PURE__ */ React122.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15576
16100
|
className: classNames(
|
15577
16101
|
tw("rounded-full flex justify-center items-center mx-2 mb-3"),
|
15578
16102
|
dense ? getDenseClassNames(state) : getClassNames(state),
|
15579
16103
|
className
|
15580
16104
|
)
|
15581
|
-
}), state === "completed" ? /* @__PURE__ */
|
16105
|
+
}), state === "completed" ? /* @__PURE__ */ React122.createElement(InlineIcon, {
|
15582
16106
|
icon: import_tick6.default
|
15583
16107
|
}) : dense ? null : children);
|
15584
16108
|
};
|
@@ -15589,26 +16113,26 @@ Stepper.ConnectorContainer = ConnectorContainer;
|
|
15589
16113
|
|
15590
16114
|
// src/molecules/Stepper/Stepper.tsx
|
15591
16115
|
var Stepper2 = ({ children, activeIndex, dense }) => {
|
15592
|
-
const steps =
|
15593
|
-
return /* @__PURE__ */
|
16116
|
+
const steps = React123.Children.count(children);
|
16117
|
+
return /* @__PURE__ */ React123.createElement(Stepper, {
|
15594
16118
|
role: "list",
|
15595
16119
|
className: "Aquarium-Stepper"
|
15596
|
-
}, /* @__PURE__ */
|
16120
|
+
}, /* @__PURE__ */ React123.createElement(Template, {
|
15597
16121
|
columns: steps
|
15598
|
-
},
|
16122
|
+
}, React123.Children.map(children, (child, index) => {
|
15599
16123
|
if (!isComponentType(child, Step2)) {
|
15600
16124
|
throw new Error("<Stepper> can only have <Stepper.Step> components as children");
|
15601
16125
|
} else {
|
15602
16126
|
const state = index > activeIndex ? "inactive" : index === activeIndex ? "active" : "completed";
|
15603
|
-
return /* @__PURE__ */
|
16127
|
+
return /* @__PURE__ */ React123.createElement(Stepper.Step, {
|
15604
16128
|
state,
|
15605
16129
|
"aria-current": state === "active" ? "step" : false,
|
15606
16130
|
role: "listitem"
|
15607
|
-
}, index > 0 && index <= steps && /* @__PURE__ */
|
16131
|
+
}, index > 0 && index <= steps && /* @__PURE__ */ React123.createElement(Stepper.ConnectorContainer, {
|
15608
16132
|
dense
|
15609
|
-
}, /* @__PURE__ */
|
16133
|
+
}, /* @__PURE__ */ React123.createElement(Stepper.ConnectorContainer.Connector, {
|
15610
16134
|
completed: state === "completed" || state === "active"
|
15611
|
-
})), /* @__PURE__ */
|
16135
|
+
})), /* @__PURE__ */ React123.createElement(Stepper.Step.Indicator, {
|
15612
16136
|
state,
|
15613
16137
|
dense
|
15614
16138
|
}, index + 1), child.props.children);
|
@@ -15621,8 +16145,8 @@ Step2.displayName = "Stepper.Step";
|
|
15621
16145
|
Stepper2.Step = Step2;
|
15622
16146
|
|
15623
16147
|
// src/molecules/SwitchGroup/SwitchGroup.tsx
|
15624
|
-
import
|
15625
|
-
import { useId as
|
16148
|
+
import React124, { useState as useState14 } from "react";
|
16149
|
+
import { useId as useId20 } from "@react-aria/utils";
|
15626
16150
|
var SwitchGroup = (_a) => {
|
15627
16151
|
var _b = _a, {
|
15628
16152
|
value,
|
@@ -15644,7 +16168,7 @@ var SwitchGroup = (_a) => {
|
|
15644
16168
|
if (value !== void 0 && value !== selectedItems) {
|
15645
16169
|
setSelectedItems(value);
|
15646
16170
|
}
|
15647
|
-
const errorMessageId =
|
16171
|
+
const errorMessageId = useId20();
|
15648
16172
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
15649
16173
|
const labelControlProps = getLabelControlProps(props);
|
15650
16174
|
const handleChange = (e) => {
|
@@ -15653,13 +16177,13 @@ var SwitchGroup = (_a) => {
|
|
15653
16177
|
setSelectedItems(updated);
|
15654
16178
|
onChange == null ? void 0 : onChange(updated);
|
15655
16179
|
};
|
15656
|
-
return /* @__PURE__ */
|
16180
|
+
return /* @__PURE__ */ React124.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({
|
15657
16181
|
fieldset: true
|
15658
16182
|
}, labelControlProps), errorProps), {
|
15659
16183
|
className: "Aquarium-SwitchGroup"
|
15660
|
-
}), /* @__PURE__ */
|
16184
|
+
}), /* @__PURE__ */ React124.createElement(InputGroup, {
|
15661
16185
|
cols
|
15662
|
-
},
|
16186
|
+
}, React124.Children.map(children, (c) => {
|
15663
16187
|
var _a3, _b2, _c, _d;
|
15664
16188
|
if (!isComponentType(c, Switch2)) {
|
15665
16189
|
return null;
|
@@ -15667,7 +16191,7 @@ var SwitchGroup = (_a) => {
|
|
15667
16191
|
const str = (_a3 = c.props.value) == null ? void 0 : _a3.toString();
|
15668
16192
|
const defaultChecked = defaultValue === void 0 ? void 0 : str !== void 0 && defaultValue.includes(str);
|
15669
16193
|
const checked = value === void 0 ? void 0 : str !== void 0 && value.includes(str);
|
15670
|
-
return
|
16194
|
+
return React124.cloneElement(c, {
|
15671
16195
|
defaultChecked: (_b2 = c.props.defaultChecked) != null ? _b2 : defaultChecked,
|
15672
16196
|
checked: (_c = c.props.checked) != null ? _c : checked,
|
15673
16197
|
onChange: (_d = c.props.onChange) != null ? _d : handleChange,
|
@@ -15677,9 +16201,9 @@ var SwitchGroup = (_a) => {
|
|
15677
16201
|
})));
|
15678
16202
|
};
|
15679
16203
|
var SwitchGroupSkeleton = ({ options = 2 }) => {
|
15680
|
-
return /* @__PURE__ */
|
16204
|
+
return /* @__PURE__ */ React124.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React124.createElement("div", {
|
15681
16205
|
className: tw("flex flex-wrap flex-col gap-2")
|
15682
|
-
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */
|
16206
|
+
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */ React124.createElement(Switch2.Skeleton, {
|
15683
16207
|
key
|
15684
16208
|
}))));
|
15685
16209
|
};
|
@@ -15687,14 +16211,14 @@ SwitchGroup.Skeleton = SwitchGroupSkeleton;
|
|
15687
16211
|
SwitchGroup.Skeleton.displayName = "SwitchGroup.Skeleton";
|
15688
16212
|
|
15689
16213
|
// src/molecules/Textarea/Textarea.tsx
|
15690
|
-
import
|
15691
|
-
import { useId as
|
15692
|
-
import
|
16214
|
+
import React125, { useState as useState15 } from "react";
|
16215
|
+
import { useId as useId21 } from "@react-aria/utils";
|
16216
|
+
import omit19 from "lodash/omit";
|
15693
16217
|
import toString2 from "lodash/toString";
|
15694
|
-
var TextareaBase =
|
16218
|
+
var TextareaBase = React125.forwardRef(
|
15695
16219
|
(_a, ref) => {
|
15696
16220
|
var _b = _a, { readOnly = false, valid = true } = _b, props = __objRest(_b, ["readOnly", "valid"]);
|
15697
|
-
return /* @__PURE__ */
|
16221
|
+
return /* @__PURE__ */ React125.createElement("textarea", __spreadProps(__spreadValues({
|
15698
16222
|
ref
|
15699
16223
|
}, props), {
|
15700
16224
|
readOnly,
|
@@ -15702,26 +16226,26 @@ var TextareaBase = React115.forwardRef(
|
|
15702
16226
|
}));
|
15703
16227
|
}
|
15704
16228
|
);
|
15705
|
-
TextareaBase.Skeleton = () => /* @__PURE__ */
|
16229
|
+
TextareaBase.Skeleton = () => /* @__PURE__ */ React125.createElement(Skeleton, {
|
15706
16230
|
height: 58
|
15707
16231
|
});
|
15708
|
-
var Textarea =
|
16232
|
+
var Textarea = React125.forwardRef((props, ref) => {
|
15709
16233
|
var _a, _b, _c;
|
15710
16234
|
const [value, setValue] = useState15((_b = (_a = props.value) != null ? _a : props.defaultValue) != null ? _b : "");
|
15711
|
-
const defaultId =
|
16235
|
+
const defaultId = useId21();
|
15712
16236
|
const id = (_c = props.id) != null ? _c : defaultId;
|
15713
|
-
const errorMessageId =
|
16237
|
+
const errorMessageId = useId21();
|
15714
16238
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
15715
16239
|
const _d = getLabelControlProps(props), { "data-testid": dataTestId } = _d, labelControlProps = __objRest(_d, ["data-testid"]);
|
15716
|
-
const baseProps =
|
15717
|
-
return /* @__PURE__ */
|
16240
|
+
const baseProps = omit19(props, Object.keys(labelControlProps));
|
16241
|
+
return /* @__PURE__ */ React125.createElement(LabelControl, __spreadProps(__spreadValues({
|
15718
16242
|
id: `${id}-label`,
|
15719
16243
|
htmlFor: id,
|
15720
16244
|
messageId: errorMessageId,
|
15721
16245
|
length: value !== void 0 ? toString2(value).length : void 0
|
15722
16246
|
}, labelControlProps), {
|
15723
16247
|
className: "Aquarium-Textarea"
|
15724
|
-
}), /* @__PURE__ */
|
16248
|
+
}), /* @__PURE__ */ React125.createElement(TextareaBase, __spreadProps(__spreadValues(__spreadValues({
|
15725
16249
|
ref
|
15726
16250
|
}, baseProps), errorProps), {
|
15727
16251
|
id,
|
@@ -15738,48 +16262,48 @@ var Textarea = React115.forwardRef((props, ref) => {
|
|
15738
16262
|
})));
|
15739
16263
|
});
|
15740
16264
|
Textarea.displayName = "Textarea";
|
15741
|
-
var TextAreaSkeleton = () => /* @__PURE__ */
|
16265
|
+
var TextAreaSkeleton = () => /* @__PURE__ */ React125.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React125.createElement(TextareaBase.Skeleton, null));
|
15742
16266
|
Textarea.Skeleton = TextAreaSkeleton;
|
15743
16267
|
Textarea.Skeleton.displayName = "Textarea.Skeleton";
|
15744
16268
|
|
15745
16269
|
// src/molecules/Timeline/Timeline.tsx
|
15746
|
-
import
|
16270
|
+
import React127 from "react";
|
15747
16271
|
|
15748
16272
|
// src/atoms/Timeline/Timeline.tsx
|
15749
|
-
import
|
16273
|
+
import React126 from "react";
|
15750
16274
|
var Timeline = (_a) => {
|
15751
16275
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15752
|
-
return /* @__PURE__ */
|
16276
|
+
return /* @__PURE__ */ React126.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15753
16277
|
className: classNames(tw("grid grid-cols-[16px_1fr] gap-x-4"), className)
|
15754
16278
|
}));
|
15755
16279
|
};
|
15756
16280
|
var Content2 = (_a) => {
|
15757
16281
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15758
|
-
return /* @__PURE__ */
|
16282
|
+
return /* @__PURE__ */ React126.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15759
16283
|
className: classNames(tw("pb-6"), className)
|
15760
16284
|
}));
|
15761
16285
|
};
|
15762
16286
|
var Separator2 = (_a) => {
|
15763
16287
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15764
|
-
return /* @__PURE__ */
|
16288
|
+
return /* @__PURE__ */ React126.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15765
16289
|
className: classNames(tw("flex items-center justify-center h-5 w-5"), className)
|
15766
16290
|
}));
|
15767
16291
|
};
|
15768
16292
|
var LineContainer = (_a) => {
|
15769
16293
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15770
|
-
return /* @__PURE__ */
|
16294
|
+
return /* @__PURE__ */ React126.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15771
16295
|
className: classNames(tw("flex justify-center py-1"), className)
|
15772
16296
|
}));
|
15773
16297
|
};
|
15774
16298
|
var Line = (_a) => {
|
15775
16299
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15776
|
-
return /* @__PURE__ */
|
16300
|
+
return /* @__PURE__ */ React126.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15777
16301
|
className: classNames(tw("w-1 bg-default h-full justify-self-center"), className)
|
15778
16302
|
}));
|
15779
16303
|
};
|
15780
16304
|
var Dot = (_a) => {
|
15781
16305
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15782
|
-
return /* @__PURE__ */
|
16306
|
+
return /* @__PURE__ */ React126.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15783
16307
|
className: classNames(tw("bg-intense h-[6px] w-[6px] rounded"), className)
|
15784
16308
|
}));
|
15785
16309
|
};
|
@@ -15794,64 +16318,68 @@ var import_error5 = __toESM(require_error());
|
|
15794
16318
|
var import_time2 = __toESM(require_time());
|
15795
16319
|
var import_warningSign5 = __toESM(require_warningSign());
|
15796
16320
|
var TimelineItem = () => null;
|
15797
|
-
var Timeline2 = ({ children }) => /* @__PURE__ */
|
16321
|
+
var Timeline2 = ({ children }) => /* @__PURE__ */ React127.createElement("div", {
|
15798
16322
|
className: "Aquarium-Timeline"
|
15799
|
-
},
|
16323
|
+
}, React127.Children.map(children, (item) => {
|
15800
16324
|
if (!isComponentType(item, TimelineItem)) {
|
15801
16325
|
throw new Error("<Timeline> can only have <Timeline.Item> components as children");
|
15802
16326
|
} else {
|
15803
16327
|
const { props, key } = item;
|
15804
|
-
return /* @__PURE__ */
|
16328
|
+
return /* @__PURE__ */ React127.createElement(Timeline, {
|
15805
16329
|
key: key != null ? key : props.title
|
15806
|
-
}, /* @__PURE__ */
|
16330
|
+
}, /* @__PURE__ */ React127.createElement(Timeline.Separator, null, props.variant === "error" ? /* @__PURE__ */ React127.createElement(Icon, {
|
15807
16331
|
icon: import_error5.default,
|
15808
16332
|
color: "danger-default"
|
15809
|
-
}) : props.variant === "warning" ? /* @__PURE__ */
|
16333
|
+
}) : props.variant === "warning" ? /* @__PURE__ */ React127.createElement(Icon, {
|
15810
16334
|
icon: import_warningSign5.default,
|
15811
16335
|
color: "warning-default"
|
15812
|
-
}) : props.variant === "info" ? /* @__PURE__ */
|
16336
|
+
}) : props.variant === "info" ? /* @__PURE__ */ React127.createElement(Icon, {
|
15813
16337
|
icon: import_time2.default,
|
15814
16338
|
color: "info-default"
|
15815
|
-
}) : /* @__PURE__ */
|
16339
|
+
}) : /* @__PURE__ */ React127.createElement(Timeline.Separator.Dot, null)), /* @__PURE__ */ React127.createElement(Typography2.Caption, {
|
15816
16340
|
color: "muted"
|
15817
|
-
}, 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)));
|
15818
16342
|
}
|
15819
16343
|
}));
|
15820
|
-
var TimelineItemSkeleton = () => /* @__PURE__ */
|
16344
|
+
var TimelineItemSkeleton = () => /* @__PURE__ */ React127.createElement(Timeline, null, /* @__PURE__ */ React127.createElement(Timeline.Separator, null, /* @__PURE__ */ React127.createElement(Skeleton, {
|
15821
16345
|
width: 6,
|
15822
16346
|
height: 6,
|
15823
16347
|
rounded: true
|
15824
|
-
})), /* @__PURE__ */
|
16348
|
+
})), /* @__PURE__ */ React127.createElement(Skeleton, {
|
15825
16349
|
height: 12,
|
15826
16350
|
width: 120
|
15827
|
-
}), /* @__PURE__ */
|
16351
|
+
}), /* @__PURE__ */ React127.createElement(Timeline.LineContainer, null, /* @__PURE__ */ React127.createElement(Skeleton, {
|
15828
16352
|
width: 2,
|
15829
16353
|
height: "100%"
|
15830
|
-
})), /* @__PURE__ */
|
16354
|
+
})), /* @__PURE__ */ React127.createElement(Timeline.Content, null, /* @__PURE__ */ React127.createElement(Box, {
|
15831
16355
|
display: "flex",
|
15832
16356
|
flexDirection: "column",
|
15833
16357
|
gap: "3"
|
15834
|
-
}, /* @__PURE__ */
|
16358
|
+
}, /* @__PURE__ */ React127.createElement(Skeleton, {
|
15835
16359
|
height: 32,
|
15836
16360
|
width: "100%"
|
15837
|
-
}), /* @__PURE__ */
|
16361
|
+
}), /* @__PURE__ */ React127.createElement(Skeleton, {
|
15838
16362
|
height: 32,
|
15839
16363
|
width: "73%"
|
15840
|
-
}), /* @__PURE__ */
|
16364
|
+
}), /* @__PURE__ */ React127.createElement(Skeleton, {
|
15841
16365
|
height: 32,
|
15842
16366
|
width: "80%"
|
15843
16367
|
}))));
|
15844
|
-
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, {
|
15845
16369
|
key
|
15846
16370
|
})));
|
15847
16371
|
Timeline2.Item = TimelineItem;
|
15848
16372
|
Timeline2.Skeleton = TimelineSkeleton;
|
15849
16373
|
Timeline2.Skeleton.displayName = "Timeline.Skeleton";
|
15850
16374
|
|
16375
|
+
// src/molecules/TimePicker/TimePicker.tsx
|
16376
|
+
import React128 from "react";
|
16377
|
+
var TimePicker = (props) => /* @__PURE__ */ React128.createElement(TimeField, __spreadValues({}, props));
|
16378
|
+
|
15851
16379
|
// src/utils/table/useTableSelect.ts
|
15852
|
-
import
|
16380
|
+
import React129 from "react";
|
15853
16381
|
var useTableSelect = (data, { key }) => {
|
15854
|
-
const [selected, setSelected] =
|
16382
|
+
const [selected, setSelected] = React129.useState([]);
|
15855
16383
|
const allSelected = selected.length === data.length;
|
15856
16384
|
const isSelected = (dot) => selected.includes(dot[key]);
|
15857
16385
|
const selectAll = () => setSelected(data.map((dot) => dot[key]));
|
@@ -16017,8 +16545,16 @@ export {
|
|
16017
16545
|
ControlLabel,
|
16018
16546
|
DataList2 as DataList,
|
16019
16547
|
DataTable,
|
16548
|
+
DatePicker,
|
16549
|
+
DatePickerBase,
|
16550
|
+
DateRangePicker,
|
16551
|
+
DateRangePickerBase,
|
16552
|
+
DateTimePicker,
|
16553
|
+
DateTimePickerBase,
|
16554
|
+
DateTimeRangePicker,
|
16555
|
+
DateTimeRangePickerBase,
|
16020
16556
|
DesignSystemContext,
|
16021
|
-
Dialog,
|
16557
|
+
Dialog2 as Dialog,
|
16022
16558
|
Divider2 as Divider,
|
16023
16559
|
Drawer,
|
16024
16560
|
Dropdown,
|
@@ -16063,7 +16599,7 @@ export {
|
|
16063
16599
|
Option,
|
16064
16600
|
PageHeader2 as PageHeader,
|
16065
16601
|
Pagination,
|
16066
|
-
|
16602
|
+
Popover3 as Popover,
|
16067
16603
|
PopoverDialog2 as PopoverDialog,
|
16068
16604
|
Portal,
|
16069
16605
|
PositionerPlacement,
|
@@ -16098,6 +16634,7 @@ export {
|
|
16098
16634
|
TextButton,
|
16099
16635
|
Textarea,
|
16100
16636
|
TextareaBase,
|
16637
|
+
TimePicker,
|
16101
16638
|
Timeline2 as Timeline,
|
16102
16639
|
ToastComponent,
|
16103
16640
|
ToastProvider,
|