@aivenio/aquarium 1.78.0 → 1.80.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 +124 -24
- package/dist/atoms.mjs +124 -24
- package/dist/charts.cjs +1 -0
- package/dist/charts.mjs +1 -0
- package/dist/src/atoms/Section/Section.js +3 -3
- package/dist/src/atoms/utils/index.d.ts +234 -0
- package/dist/src/atoms/utils/index.js +32 -0
- package/dist/src/molecules/Combobox/Combobox.js +6 -1
- package/dist/src/molecules/Context/Context.d.ts +2 -1
- package/dist/src/molecules/Context/Context.js +6 -4
- package/dist/src/molecules/DataList/DataList.d.ts +5 -1
- package/dist/src/molecules/DataList/DataList.js +60 -60
- package/dist/src/molecules/DataList/DataListComponents.d.ts +2 -1
- package/dist/src/molecules/DataList/DataListComponents.js +3 -3
- package/dist/src/molecules/DataList/DataListGroup.d.ts +1 -1
- package/dist/src/molecules/DataList/DataListGroup.js +3 -3
- package/dist/src/molecules/DataTable/DataTable.d.ts +5 -1
- package/dist/src/molecules/DataTable/DataTable.js +36 -36
- 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/MultiSelect/MultiSelect.js +6 -1
- package/dist/src/molecules/Popover/PopoverOverlay.d.ts +1 -1
- package/dist/src/molecules/Section/Section.js +4 -6
- package/dist/src/molecules/Select/Select.js +6 -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/Tooltip/Tooltip.d.ts +5 -0
- package/dist/src/molecules/Tooltip/Tooltip.js +4 -2
- package/dist/src/molecules/index.d.ts +3 -0
- package/dist/src/molecules/index.js +4 -1
- package/dist/src/utils/mocks/mockScrollIntoView.d.ts +1 -0
- package/dist/src/utils/mocks/mockScrollIntoView.js +11 -0
- package/dist/src/utils/setupTests.js +3 -1
- package/dist/src/utils/tailwind.d.ts +1 -0
- package/dist/src/utils/tailwind.js +6 -1
- package/dist/styles.css +1942 -1489
- package/dist/system.cjs +1094 -548
- package/dist/system.mjs +1080 -517
- 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 +8 -15
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
|
@@ -6769,7 +6870,9 @@ function useTooltipTriggerState(props = {}) {
|
|
6769
6870
|
// src/molecules/Tooltip/Tooltip.tsx
|
6770
6871
|
var Tooltip = (_a) => {
|
6771
6872
|
var _b = _a, { inline = true, delay = 200 } = _b, props = __objRest(_b, ["inline", "delay"]);
|
6873
|
+
var _a2;
|
6772
6874
|
const { placement: _placement = "top", content, disabled: isDisabled, shouldFlip = true } = props;
|
6875
|
+
const display = (_a2 = props.display) != null ? _a2 : inline ? "inline-block" : "block";
|
6773
6876
|
const triggerRef = React8.useRef(null);
|
6774
6877
|
const overlayRef = React8.useRef(null);
|
6775
6878
|
const state = useTooltipTriggerState(__spreadValues({ isDisabled, delay }, props));
|
@@ -6786,41 +6889,41 @@ var Tooltip = (_a) => {
|
|
6786
6889
|
onFocusWithinChange: (isFocusWithin) => isFocusWithin ? state.open() : state.close()
|
6787
6890
|
});
|
6788
6891
|
const handleClick = (e) => {
|
6789
|
-
var
|
6790
|
-
(
|
6892
|
+
var _a3, _b2;
|
6893
|
+
(_a3 = props.onClick) == null ? void 0 : _a3.call(props, e);
|
6791
6894
|
(_b2 = triggerProps.onClick) == null ? void 0 : _b2.call(triggerProps, e);
|
6792
6895
|
};
|
6793
6896
|
const handleMouseDown = (e) => {
|
6794
|
-
var
|
6795
|
-
(
|
6897
|
+
var _a3, _b2;
|
6898
|
+
(_a3 = props.onMouseDown) == null ? void 0 : _a3.call(props, e);
|
6796
6899
|
(_b2 = triggerProps.onMouseDown) == null ? void 0 : _b2.call(triggerProps, e);
|
6797
6900
|
};
|
6798
6901
|
const handleMouseUp = (e) => {
|
6799
|
-
var
|
6800
|
-
(
|
6902
|
+
var _a3, _b2;
|
6903
|
+
(_a3 = props.onMouseUp) == null ? void 0 : _a3.call(props, e);
|
6801
6904
|
(_b2 = triggerProps.onMouseUp) == null ? void 0 : _b2.call(triggerProps, e);
|
6802
6905
|
};
|
6803
6906
|
const handlePointerDown = (e) => {
|
6804
|
-
var
|
6805
|
-
(
|
6907
|
+
var _a3, _b2;
|
6908
|
+
(_a3 = props.onPointerDown) == null ? void 0 : _a3.call(props, e);
|
6806
6909
|
(_b2 = triggerProps.onPointerDown) == null ? void 0 : _b2.call(triggerProps, e);
|
6807
6910
|
};
|
6808
6911
|
const handlePointerUp = (e) => {
|
6809
|
-
var
|
6810
|
-
(
|
6912
|
+
var _a3, _b2;
|
6913
|
+
(_a3 = props.onPointerUp) == null ? void 0 : _a3.call(props, e);
|
6811
6914
|
(_b2 = triggerProps.onPointerUp) == null ? void 0 : _b2.call(triggerProps, e);
|
6812
6915
|
};
|
6813
6916
|
return /* @__PURE__ */ React8.createElement("div", __spreadProps(__spreadValues({
|
6814
|
-
className:
|
6917
|
+
className: display
|
6815
6918
|
}, triggerProps), {
|
6816
6919
|
onFocus: (e) => {
|
6817
|
-
var
|
6818
|
-
(
|
6920
|
+
var _a3, _b2;
|
6921
|
+
(_a3 = triggerProps.onFocus) == null ? void 0 : _a3.call(triggerProps, e);
|
6819
6922
|
(_b2 = focusWithinProps.onFocus) == null ? void 0 : _b2.call(focusWithinProps, e);
|
6820
6923
|
},
|
6821
6924
|
onBlur: (e) => {
|
6822
|
-
var
|
6823
|
-
(
|
6925
|
+
var _a3, _b2;
|
6926
|
+
(_a3 = triggerProps.onBlur) == null ? void 0 : _a3.call(triggerProps, e);
|
6824
6927
|
(_b2 = focusWithinProps.onBlur) == null ? void 0 : _b2.call(focusWithinProps, e);
|
6825
6928
|
},
|
6826
6929
|
onClick: handleClick,
|
@@ -7362,7 +7465,7 @@ var ToastConsumer = () => {
|
|
7362
7465
|
};
|
7363
7466
|
|
7364
7467
|
// src/molecules/Context/Context.tsx
|
7365
|
-
var Context = ({ children }) => {
|
7468
|
+
var Context = ({ children, locale = "en-GB" }) => {
|
7366
7469
|
const windowSize = useWindowSize();
|
7367
7470
|
const [breakpointMatches, setBreakpointMatches] = React15.useState(getMatches(windowSize));
|
7368
7471
|
React15.useEffect(() => {
|
@@ -7370,7 +7473,9 @@ var Context = ({ children }) => {
|
|
7370
7473
|
}, [windowSize]);
|
7371
7474
|
return /* @__PURE__ */ React15.createElement(DesignSystemContext.Provider, {
|
7372
7475
|
value: { breakpointMatches }
|
7373
|
-
}, /* @__PURE__ */ React15.createElement(
|
7476
|
+
}, /* @__PURE__ */ React15.createElement(I18nProvider, {
|
7477
|
+
locale
|
7478
|
+
}, /* @__PURE__ */ React15.createElement(ModalProvider, null, /* @__PURE__ */ React15.createElement(ToastProvider, null, children))));
|
7374
7479
|
};
|
7375
7480
|
var context = {
|
7376
7481
|
breakpointMatches: getMatches(void 0)
|
@@ -10165,7 +10270,8 @@ var ComboboxBase = (_a) => {
|
|
10165
10270
|
onInputValueChange: ({ selectedItem: selectedItem2, inputValue: inputValue2 }) => {
|
10166
10271
|
updateInputItems(inputValue2, selectedItem2);
|
10167
10272
|
onSearchChange == null ? void 0 : onSearchChange(inputValue2);
|
10168
|
-
}
|
10273
|
+
},
|
10274
|
+
scrollIntoView: (node, _menuNode) => node.scrollIntoView({ block: "nearest" })
|
10169
10275
|
});
|
10170
10276
|
const state = {
|
10171
10277
|
isOpen,
|
@@ -10631,7 +10737,8 @@ var _SelectBase = (props) => {
|
|
10631
10737
|
isItemDisabled: (item, index) => isOptionDisabled(item, index),
|
10632
10738
|
items,
|
10633
10739
|
itemToString,
|
10634
|
-
onSelectedItemChange: (e) => onChange == null ? void 0 : onChange(e.selectedItem)
|
10740
|
+
onSelectedItemChange: (e) => onChange == null ? void 0 : onChange(e.selectedItem),
|
10741
|
+
scrollIntoView: (node, _menuNode) => node.scrollIntoView({ block: "nearest" })
|
10635
10742
|
});
|
10636
10743
|
const state = {
|
10637
10744
|
isOpen,
|
@@ -11906,6 +12013,7 @@ var DataListRow = ({
|
|
11906
12013
|
menu,
|
11907
12014
|
active,
|
11908
12015
|
disabled,
|
12016
|
+
rowClassName,
|
11909
12017
|
renderFirstColumn,
|
11910
12018
|
additionalRowProps = () => ({}),
|
11911
12019
|
additionalColumnProps = () => ({}),
|
@@ -11920,14 +12028,16 @@ var DataListRow = ({
|
|
11920
12028
|
}, additionalRowProps(row, index, rows)), renderFirstColumn == null ? void 0 : renderFirstColumn(row, index, rows), /* @__PURE__ */ React68.createElement(List, {
|
11921
12029
|
items: columns,
|
11922
12030
|
renderItem: (column, columnIndex) => {
|
11923
|
-
const
|
12031
|
+
const cell2 = /* @__PURE__ */ React68.createElement(DataList.Cell, __spreadProps(__spreadValues(__spreadValues({}, cellProps(column)), additionalColumnProps(column, columnIndex, columns, row)), {
|
12032
|
+
className: rowClassName == null ? void 0 : rowClassName(row, index, rows)
|
12033
|
+
}), /* @__PURE__ */ React68.createElement(DataListCell, {
|
11924
12034
|
column,
|
11925
12035
|
row,
|
11926
12036
|
index,
|
11927
12037
|
rows
|
11928
12038
|
}));
|
11929
12039
|
return createAnimatedCell({
|
11930
|
-
cellElement:
|
12040
|
+
cellElement: cell2,
|
11931
12041
|
stickyStyles,
|
11932
12042
|
stickyColumn: cellProps(column).stickyColumn
|
11933
12043
|
});
|
@@ -12029,6 +12139,7 @@ var DataListGroup = (_a) => {
|
|
12029
12139
|
const {
|
12030
12140
|
columns,
|
12031
12141
|
disabled,
|
12142
|
+
rowClassName,
|
12032
12143
|
expandedGroupIds,
|
12033
12144
|
getGroupRow,
|
12034
12145
|
renderGroupName = renderDefaultGroupName,
|
@@ -12080,6 +12191,7 @@ var DataListGroup = (_a) => {
|
|
12080
12191
|
menuAriaLabel
|
12081
12192
|
}),
|
12082
12193
|
disabled,
|
12194
|
+
rowClassName,
|
12083
12195
|
additionalRowProps: () => selectable ? {
|
12084
12196
|
"aria-selected": isChecked
|
12085
12197
|
} : {},
|
@@ -12259,6 +12371,7 @@ var DataList2 = (_a) => {
|
|
12259
12371
|
rowDetails,
|
12260
12372
|
group,
|
12261
12373
|
disabled,
|
12374
|
+
rowClassName,
|
12262
12375
|
getGroupRow,
|
12263
12376
|
renderGroupName,
|
12264
12377
|
renderEmptyGroup,
|
@@ -12288,6 +12401,7 @@ var DataList2 = (_a) => {
|
|
12288
12401
|
"rowDetails",
|
12289
12402
|
"group",
|
12290
12403
|
"disabled",
|
12404
|
+
"rowClassName",
|
12291
12405
|
"getGroupRow",
|
12292
12406
|
"renderGroupName",
|
12293
12407
|
"renderEmptyGroup",
|
@@ -12353,15 +12467,7 @@ var DataList2 = (_a) => {
|
|
12353
12467
|
)
|
12354
12468
|
);
|
12355
12469
|
const allRowsSelected = totalSelected >= allEnabledRowIds.length;
|
12356
|
-
|
12357
|
-
value: {
|
12358
|
-
rows: isArray3(rows) ? sortedRows : rows,
|
12359
|
-
selectedRows: selected
|
12360
|
-
}
|
12361
|
-
}, /* @__PURE__ */ React72.createElement("div", {
|
12362
|
-
className: "relative w-full overflow-x-auto",
|
12363
|
-
ref: containerRef
|
12364
|
-
}, /* @__PURE__ */ React72.createElement(Template, {
|
12470
|
+
const componentContent = /* @__PURE__ */ React72.createElement(Template, {
|
12365
12471
|
className: "Aquarium-DataList",
|
12366
12472
|
columns: templateColumns,
|
12367
12473
|
role: "table"
|
@@ -12399,7 +12505,7 @@ var DataList2 = (_a) => {
|
|
12399
12505
|
color: "default",
|
12400
12506
|
"aria-hidden": true
|
12401
12507
|
}), content) : content;
|
12402
|
-
const
|
12508
|
+
const cell2 = columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */ React72.createElement(DataList.SortCell, __spreadValues({
|
12403
12509
|
direction: sort && sort.column.headerName === column.headerName ? sort.direction : "none",
|
12404
12510
|
onClick: () => updateSort(column),
|
12405
12511
|
sticky
|
@@ -12407,7 +12513,7 @@ var DataList2 = (_a) => {
|
|
12407
12513
|
sticky
|
12408
12514
|
}), headerContentAndIcon);
|
12409
12515
|
return createAnimatedCell({
|
12410
|
-
cellElement:
|
12516
|
+
cellElement: cell2,
|
12411
12517
|
stickyStyles,
|
12412
12518
|
stickyColumn: cellProps(column).stickyColumn
|
12413
12519
|
});
|
@@ -12418,6 +12524,7 @@ var DataList2 = (_a) => {
|
|
12418
12524
|
}, menuHeaderName)), toolbar), groups && /* @__PURE__ */ React72.createElement(DataListGroup, {
|
12419
12525
|
columns,
|
12420
12526
|
disabled,
|
12527
|
+
rowClassName,
|
12421
12528
|
getGroupRow,
|
12422
12529
|
renderGroupName,
|
12423
12530
|
renderEmptyGroup,
|
@@ -12463,6 +12570,7 @@ var DataList2 = (_a) => {
|
|
12463
12570
|
menuAriaLabel
|
12464
12571
|
}),
|
12465
12572
|
disabled,
|
12573
|
+
rowClassName,
|
12466
12574
|
additionalRowProps: (row2) => {
|
12467
12575
|
var _a4;
|
12468
12576
|
return selectable ? {
|
@@ -12496,7 +12604,17 @@ var DataList2 = (_a) => {
|
|
12496
12604
|
role: "cell"
|
12497
12605
|
}, details)));
|
12498
12606
|
}
|
12499
|
-
})))
|
12607
|
+
})));
|
12608
|
+
const wrappedContent = hasStickyColumns ? /* @__PURE__ */ React72.createElement("div", {
|
12609
|
+
className: "relative w-full h-full overflow-auto",
|
12610
|
+
ref: containerRef
|
12611
|
+
}, componentContent) : componentContent;
|
12612
|
+
return /* @__PURE__ */ React72.createElement(DataListContext.Provider, {
|
12613
|
+
value: {
|
12614
|
+
rows: isArray3(rows) ? sortedRows : rows,
|
12615
|
+
selectedRows: selected
|
12616
|
+
}
|
12617
|
+
}, wrappedContent);
|
12500
12618
|
};
|
12501
12619
|
DataList2.Skeleton = DataListSkeleton;
|
12502
12620
|
DataList2.Toolbar = DataListToolbar;
|
@@ -12566,6 +12684,7 @@ var DataTable = (_a) => {
|
|
12566
12684
|
onAction,
|
12567
12685
|
onMenuOpenChange,
|
12568
12686
|
disabled,
|
12687
|
+
rowClassName,
|
12569
12688
|
defaultSort,
|
12570
12689
|
onSortChanged,
|
12571
12690
|
ariaLabel,
|
@@ -12584,6 +12703,7 @@ var DataTable = (_a) => {
|
|
12584
12703
|
"onAction",
|
12585
12704
|
"onMenuOpenChange",
|
12586
12705
|
"disabled",
|
12706
|
+
"rowClassName",
|
12587
12707
|
"defaultSort",
|
12588
12708
|
"onSortChanged",
|
12589
12709
|
"ariaLabel",
|
@@ -12605,10 +12725,7 @@ var DataTable = (_a) => {
|
|
12605
12725
|
}, children))),
|
12606
12726
|
[amountOfColumns]
|
12607
12727
|
);
|
12608
|
-
|
12609
|
-
className: "relative w-full overflow-x-auto",
|
12610
|
-
ref: containerRef
|
12611
|
-
}, /* @__PURE__ */ React75.createElement(Table2, {
|
12728
|
+
const compponentContent = /* @__PURE__ */ React75.createElement(Table2, {
|
12612
12729
|
ariaLabel,
|
12613
12730
|
onNext,
|
12614
12731
|
onPrev,
|
@@ -12638,7 +12755,7 @@ var DataTable = (_a) => {
|
|
12638
12755
|
color: "default",
|
12639
12756
|
"aria-hidden": true
|
12640
12757
|
}), content) : content;
|
12641
|
-
const
|
12758
|
+
const cell2 = columnIsFieldColumn(column) && column.sortable || column.sort ? /* @__PURE__ */ React75.createElement(Table2.SortCell, __spreadValues({
|
12642
12759
|
direction: sort && sort.column.headerName === column.headerName ? sort.direction : "none",
|
12643
12760
|
onClick: () => updateSort(column),
|
12644
12761
|
style: { width: column.width },
|
@@ -12648,7 +12765,7 @@ var DataTable = (_a) => {
|
|
12648
12765
|
"aria-label": column.headerInvisible ? column.headerName : void 0
|
12649
12766
|
}), headerContentAndIcon);
|
12650
12767
|
return createAnimatedCell({
|
12651
|
-
cellElement:
|
12768
|
+
cellElement: cell2,
|
12652
12769
|
stickyStyles,
|
12653
12770
|
stickyColumn: cellProps(column).stickyColumn
|
12654
12771
|
});
|
@@ -12673,14 +12790,20 @@ var DataTable = (_a) => {
|
|
12673
12790
|
items: columns,
|
12674
12791
|
renderItem: (column) => {
|
12675
12792
|
return createAnimatedCell({
|
12676
|
-
cellElement: /* @__PURE__ */ React75.createElement(Table2.Cell, __spreadValues({}, cellProps(column)),
|
12793
|
+
cellElement: /* @__PURE__ */ React75.createElement(Table2.Cell, __spreadProps(__spreadValues({}, cellProps(column)), {
|
12794
|
+
className: rowClassName == null ? void 0 : rowClassName(row, index, rows)
|
12795
|
+
}), renderCell(column, row, index, sortedRows)),
|
12677
12796
|
stickyStyles,
|
12678
12797
|
stickyColumn: cellProps(column).stickyColumn
|
12679
12798
|
});
|
12680
12799
|
}
|
12681
12800
|
}), renderRowMenu(row, index, { menu, menuAriaLabel, onAction, onMenuOpenChange }));
|
12682
12801
|
}
|
12683
|
-
})))
|
12802
|
+
})));
|
12803
|
+
return hasStickyColumns ? /* @__PURE__ */ React75.createElement("div", {
|
12804
|
+
className: "relative w-full overflow-x-auto",
|
12805
|
+
ref: containerRef
|
12806
|
+
}, compponentContent) : compponentContent;
|
12684
12807
|
};
|
12685
12808
|
var renderRowMenu = (row, index, {
|
12686
12809
|
menu,
|
@@ -12736,13 +12859,434 @@ var renderCell = (column, row, index, rows) => {
|
|
12736
12859
|
};
|
12737
12860
|
DataTable.Skeleton = DataListSkeleton;
|
12738
12861
|
|
12739
|
-
// src/molecules/
|
12862
|
+
// src/molecules/DatePicker/DatePicker.tsx
|
12863
|
+
import React83 from "react";
|
12864
|
+
import {
|
12865
|
+
DatePicker as AriaDatePicker,
|
12866
|
+
DatePickerStateContext
|
12867
|
+
} from "react-aria-components";
|
12868
|
+
import { useLabel as useLabel2 } from "@react-aria/label";
|
12869
|
+
import { useId as useId10 } from "@react-aria/utils";
|
12870
|
+
import omit9 from "lodash/omit";
|
12871
|
+
|
12872
|
+
// src/molecules/DateField/DateInput.tsx
|
12873
|
+
import React76 from "react";
|
12874
|
+
import { DateInput as AriaDateInput, DateSegment } from "react-aria-components";
|
12875
|
+
import { tv as tv2 } from "tailwind-variants";
|
12876
|
+
|
12877
|
+
// src/atoms/utils/index.ts
|
12878
|
+
import { tv } from "tailwind-variants";
|
12879
|
+
var focusRing = tv({
|
12880
|
+
base: "outline outline-primary-default outline-offset-2",
|
12881
|
+
variants: {
|
12882
|
+
isFocusVisible: {
|
12883
|
+
false: "outline-0",
|
12884
|
+
true: "outline-2"
|
12885
|
+
}
|
12886
|
+
}
|
12887
|
+
});
|
12888
|
+
var fieldBorder = tv({
|
12889
|
+
variants: {
|
12890
|
+
isReadOnly: {
|
12891
|
+
true: "bg-primary-muted"
|
12892
|
+
},
|
12893
|
+
isFocusWithin: {
|
12894
|
+
false: "border-default hover:border-intense",
|
12895
|
+
true: "border-info-default"
|
12896
|
+
},
|
12897
|
+
isInvalid: {
|
12898
|
+
true: "border-danger-default"
|
12899
|
+
},
|
12900
|
+
isDisabled: {
|
12901
|
+
true: "bg-default cursor-not-allowed text-inactive"
|
12902
|
+
}
|
12903
|
+
}
|
12904
|
+
});
|
12905
|
+
var fieldGroup = tv({
|
12906
|
+
base: "group flex items-center bg-body border rounded-sm typography-small text-default px-3 py-3 overflow-hidden",
|
12907
|
+
variants: fieldBorder.variants
|
12908
|
+
});
|
12909
|
+
|
12910
|
+
// src/molecules/DateField/DateInput.tsx
|
12911
|
+
var segmentStyles = tv2({
|
12912
|
+
base: "inline p-0.5 rounded outline outline-0 caret-transparent text-default",
|
12913
|
+
variants: {
|
12914
|
+
isPlaceholder: {
|
12915
|
+
true: "text-inactive"
|
12916
|
+
},
|
12917
|
+
isDisabled: {
|
12918
|
+
true: "text-inactive"
|
12919
|
+
},
|
12920
|
+
isFocused: {
|
12921
|
+
true: "bg-info-muted"
|
12922
|
+
}
|
12923
|
+
}
|
12924
|
+
});
|
12925
|
+
function DateInput(props) {
|
12926
|
+
return /* @__PURE__ */ React76.createElement(AriaDateInput, __spreadValues({
|
12927
|
+
className: (renderProps) => fieldGroup(__spreadProps(__spreadValues({}, renderProps), { class: "block min-w-[150px]" }))
|
12928
|
+
}, props), (segment) => /* @__PURE__ */ React76.createElement(DateSegment, {
|
12929
|
+
segment,
|
12930
|
+
className: segmentStyles
|
12931
|
+
}));
|
12932
|
+
}
|
12933
|
+
|
12934
|
+
// src/molecules/Field/Field.tsx
|
12740
12935
|
import React77 from "react";
|
12936
|
+
import { Group as Group3 } from "react-aria-components";
|
12937
|
+
var FieldGroup = (props) => {
|
12938
|
+
return /* @__PURE__ */ React77.createElement(Group3, __spreadProps(__spreadValues({}, props), {
|
12939
|
+
className: (renderProps) => fieldGroup(renderProps)
|
12940
|
+
}));
|
12941
|
+
};
|
12942
|
+
|
12943
|
+
// src/molecules/TimeField/TimeField.tsx
|
12944
|
+
import React78 from "react";
|
12945
|
+
import {
|
12946
|
+
TimeField as AriaTimeField
|
12947
|
+
} from "react-aria-components";
|
12948
|
+
import { useLabel } from "@react-aria/label";
|
12949
|
+
import { useId as useId9 } from "@react-aria/utils";
|
12950
|
+
import omit8 from "lodash/omit";
|
12951
|
+
function TimeFieldBase(_a) {
|
12952
|
+
var _b = _a, { disabled, valid } = _b, props = __objRest(_b, ["disabled", "valid"]);
|
12953
|
+
return /* @__PURE__ */ React78.createElement(AriaTimeField, __spreadProps(__spreadValues({}, props), {
|
12954
|
+
isInvalid: valid === false,
|
12955
|
+
isDisabled: disabled
|
12956
|
+
}), /* @__PURE__ */ React78.createElement(DateInput, null));
|
12957
|
+
}
|
12958
|
+
function TimeField(props) {
|
12959
|
+
const { labelProps, fieldProps } = useLabel({ label: props.labelText });
|
12960
|
+
const errorMessageId = useId9();
|
12961
|
+
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
12962
|
+
const _a = getLabelControlProps(props), { "data-testid": dataTestId } = _a, labelControlProps = __objRest(_a, ["data-testid"]);
|
12963
|
+
const baseProps = omit8(props, Object.keys(labelControlProps));
|
12964
|
+
return /* @__PURE__ */ React78.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({}, labelProps), labelControlProps), {
|
12965
|
+
messageId: errorMessageId,
|
12966
|
+
className: "Aquarium-DateField"
|
12967
|
+
}), /* @__PURE__ */ React78.createElement(TimeFieldBase, __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, baseProps), fieldProps), errorProps), {
|
12968
|
+
disabled: props.disabled,
|
12969
|
+
valid: props.valid
|
12970
|
+
})));
|
12971
|
+
}
|
12972
|
+
|
12973
|
+
// src/molecules/DatePicker/DatePicker.tsx
|
12974
|
+
var import_calendar2 = __toESM(require_calendar());
|
12975
|
+
|
12976
|
+
// src/molecules/DatePicker/Button.tsx
|
12977
|
+
import React79 from "react";
|
12978
|
+
import { Button as AriaButton } from "react-aria-components";
|
12979
|
+
import { composeRenderProps as composeRenderProps2 } from "react-aria-components";
|
12980
|
+
import { tv as tv3 } from "tailwind-variants";
|
12981
|
+
var button = tv3({
|
12982
|
+
extend: focusRing
|
12983
|
+
});
|
12984
|
+
function Button2(props) {
|
12985
|
+
return /* @__PURE__ */ React79.createElement(AriaButton, __spreadProps(__spreadValues({}, props), {
|
12986
|
+
className: composeRenderProps2(props.className, (className, renderProps) => button(__spreadProps(__spreadValues({}, renderProps), { className })))
|
12987
|
+
}));
|
12988
|
+
}
|
12989
|
+
|
12990
|
+
// src/molecules/DatePicker/Calendar.tsx
|
12991
|
+
import React80 from "react";
|
12992
|
+
import {
|
12993
|
+
Calendar as AriaCalendar,
|
12994
|
+
CalendarCell,
|
12995
|
+
CalendarGrid,
|
12996
|
+
CalendarGridBody,
|
12997
|
+
CalendarGridHeader as AriaCalendarGridHeader,
|
12998
|
+
CalendarHeaderCell,
|
12999
|
+
Heading
|
13000
|
+
} from "react-aria-components";
|
13001
|
+
import { tv as tv4 } from "tailwind-variants";
|
13002
|
+
var import_chevronLeft4 = __toESM(require_chevronLeft());
|
13003
|
+
var import_chevronRight4 = __toESM(require_chevronRight());
|
13004
|
+
var cellStyles = tv4({
|
13005
|
+
extend: focusRing,
|
13006
|
+
base: "w-8 h-8 typography-small cursor-default rounded flex items-center justify-center",
|
13007
|
+
variants: {
|
13008
|
+
isSelected: {
|
13009
|
+
false: "text-default hover:bg-default pressed:bg-intense",
|
13010
|
+
true: "bg-primary-default invalid:bg-danger-default text-white"
|
13011
|
+
},
|
13012
|
+
isUnavailable: {
|
13013
|
+
true: "text-inactive"
|
13014
|
+
},
|
13015
|
+
isDisabled: {
|
13016
|
+
true: "text-inactive"
|
13017
|
+
}
|
13018
|
+
}
|
13019
|
+
});
|
13020
|
+
var Calendar = (props) => {
|
13021
|
+
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, {
|
13022
|
+
date,
|
13023
|
+
className: cellStyles
|
13024
|
+
}))));
|
13025
|
+
};
|
13026
|
+
var CalendarHeader = () => {
|
13027
|
+
return /* @__PURE__ */ React80.createElement("header", {
|
13028
|
+
className: "flex items-center gap-1 pb-5 w-full"
|
13029
|
+
}, /* @__PURE__ */ React80.createElement(Button2, {
|
13030
|
+
slot: "previous",
|
13031
|
+
className: "p-3"
|
13032
|
+
}, /* @__PURE__ */ React80.createElement(Icon, {
|
13033
|
+
icon: import_chevronLeft4.default
|
13034
|
+
})), /* @__PURE__ */ React80.createElement(Heading, {
|
13035
|
+
className: tw("flex-1 typography-default-strong text-center")
|
13036
|
+
}), /* @__PURE__ */ React80.createElement(Button2, {
|
13037
|
+
slot: "next",
|
13038
|
+
className: "p-3"
|
13039
|
+
}, /* @__PURE__ */ React80.createElement(Icon, {
|
13040
|
+
icon: import_chevronRight4.default
|
13041
|
+
})));
|
13042
|
+
};
|
13043
|
+
var CalendarGridHeader = () => {
|
13044
|
+
return /* @__PURE__ */ React80.createElement(AriaCalendarGridHeader, null, (day) => /* @__PURE__ */ React80.createElement(CalendarHeaderCell, {
|
13045
|
+
className: "text-xs text-inactive typography-caption"
|
13046
|
+
}, day));
|
13047
|
+
};
|
13048
|
+
|
13049
|
+
// src/molecules/DatePicker/Dialog.tsx
|
13050
|
+
import React81 from "react";
|
13051
|
+
import { Dialog as AriaDialog } from "react-aria-components";
|
13052
|
+
function Dialog(props) {
|
13053
|
+
return /* @__PURE__ */ React81.createElement(AriaDialog, __spreadProps(__spreadValues({}, props), {
|
13054
|
+
className: classNames(
|
13055
|
+
props.className,
|
13056
|
+
tw(
|
13057
|
+
"outline outline-0 p-5 [[data-placement]>&]:px-5 [[data-placement]>&]:py-6 max-h-[inherit] overflow-auto relative"
|
13058
|
+
)
|
13059
|
+
)
|
13060
|
+
}));
|
13061
|
+
}
|
13062
|
+
|
13063
|
+
// src/molecules/DatePicker/Popover.tsx
|
13064
|
+
import React82 from "react";
|
13065
|
+
import {
|
13066
|
+
OverlayArrow,
|
13067
|
+
Popover as AriaPopover,
|
13068
|
+
PopoverContext,
|
13069
|
+
useSlottedContext
|
13070
|
+
} from "react-aria-components";
|
13071
|
+
var Popover2 = (_a) => {
|
13072
|
+
var _b = _a, { children, showArrow, className } = _b, props = __objRest(_b, ["children", "showArrow", "className"]);
|
13073
|
+
const popoverContext = useSlottedContext(PopoverContext);
|
13074
|
+
const isSubmenu = (popoverContext == null ? void 0 : popoverContext.trigger) === "SubmenuTrigger";
|
13075
|
+
let offset = showArrow ? 12 : 8;
|
13076
|
+
offset = isSubmenu ? offset - 6 : offset;
|
13077
|
+
return /* @__PURE__ */ React82.createElement(AriaPopover, __spreadProps(__spreadValues({
|
13078
|
+
offset
|
13079
|
+
}, props), {
|
13080
|
+
className: tw(
|
13081
|
+
"rounded-sm shadow-16dp bg-popover-content mt-1 overflow-y-auto flex flex-col border border-default outline-none"
|
13082
|
+
)
|
13083
|
+
}), showArrow && /* @__PURE__ */ React82.createElement(OverlayArrow, {
|
13084
|
+
className: "group"
|
13085
|
+
}, /* @__PURE__ */ React82.createElement("svg", {
|
13086
|
+
width: 12,
|
13087
|
+
height: 12,
|
13088
|
+
viewBox: "0 0 12 12",
|
13089
|
+
className: "block fill-white stroke-1 stroke-black group-placement-bottom:rotate-180 group-placement-left:-rotate-90 group-placement-right:rotate-90"
|
13090
|
+
}, /* @__PURE__ */ React82.createElement("path", {
|
13091
|
+
d: "M0 0 L6 6 L12 0"
|
13092
|
+
}))), children);
|
13093
|
+
};
|
13094
|
+
|
13095
|
+
// src/molecules/DatePicker/DatePicker.tsx
|
13096
|
+
var createDatePickerBase = (variant) => (_a) => {
|
13097
|
+
var _b = _a, { disabled, valid, granularity, shouldCloseOnSelect } = _b, props = __objRest(_b, ["disabled", "valid", "granularity", "shouldCloseOnSelect"]);
|
13098
|
+
const hasSomeValue = props.value || props.defaultValue || props.placeholderValue;
|
13099
|
+
return /* @__PURE__ */ React83.createElement(AriaDatePicker, __spreadProps(__spreadValues({}, props), {
|
13100
|
+
shouldCloseOnSelect: shouldCloseOnSelect != null ? shouldCloseOnSelect : variant === "date",
|
13101
|
+
isDisabled: disabled,
|
13102
|
+
isInvalid: valid === false,
|
13103
|
+
granularity: granularity != null ? granularity : variant === "datetime" && !hasSomeValue ? "minute" : void 0
|
13104
|
+
}), /* @__PURE__ */ React83.createElement(FieldGroup, {
|
13105
|
+
className: tw("min-w-[210px] w-auto")
|
13106
|
+
}, /* @__PURE__ */ React83.createElement(DateInput, {
|
13107
|
+
className: tw("flex-1")
|
13108
|
+
}), /* @__PURE__ */ React83.createElement(Button2, null, /* @__PURE__ */ React83.createElement(Icon, {
|
13109
|
+
icon: import_calendar2.default
|
13110
|
+
}))), /* @__PURE__ */ React83.createElement(Popover2, {
|
13111
|
+
offset: 1
|
13112
|
+
}, /* @__PURE__ */ React83.createElement(Dialog, null, /* @__PURE__ */ React83.createElement(Spacing, {
|
13113
|
+
gap: "6"
|
13114
|
+
}, /* @__PURE__ */ React83.createElement(Calendar, null), variant === "datetime" && /* @__PURE__ */ React83.createElement(PickerTimeField, {
|
13115
|
+
granularity
|
13116
|
+
})))));
|
13117
|
+
};
|
13118
|
+
var DatePickerBase = createDatePickerBase("date");
|
13119
|
+
var DateTimePickerBase = createDatePickerBase("datetime");
|
13120
|
+
var PickerTimeField = ({ granularity }) => {
|
13121
|
+
const state = React83.useContext(DatePickerStateContext);
|
13122
|
+
return /* @__PURE__ */ React83.createElement(TimeField, {
|
13123
|
+
labelText: "Time",
|
13124
|
+
granularity: granularity !== "day" ? granularity : void 0,
|
13125
|
+
value: state.timeValue,
|
13126
|
+
onChange: state.setTimeValue,
|
13127
|
+
reserveSpaceForError: false
|
13128
|
+
});
|
13129
|
+
};
|
13130
|
+
var createDatePicker = (variant) => (props) => {
|
13131
|
+
const { labelProps, fieldProps } = useLabel2({ label: props.labelText });
|
13132
|
+
const errorMessageId = useId10();
|
13133
|
+
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13134
|
+
const _a = getLabelControlProps(props), { "data-testid": dataTestId } = _a, labelControlProps = __objRest(_a, ["data-testid"]);
|
13135
|
+
const baseProps = omit9(props, Object.keys(labelControlProps));
|
13136
|
+
const allProps = __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, baseProps), fieldProps), errorProps), { disabled: props.disabled, valid: props.valid });
|
13137
|
+
return /* @__PURE__ */ React83.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({}, labelProps), labelControlProps), {
|
13138
|
+
messageId: errorMessageId,
|
13139
|
+
className: "Aquarium-DatePicker"
|
13140
|
+
}), variant === "date" ? /* @__PURE__ */ React83.createElement(DatePickerBase, __spreadValues({}, allProps)) : /* @__PURE__ */ React83.createElement(DateTimePickerBase, __spreadValues({}, allProps)));
|
13141
|
+
};
|
13142
|
+
var DatePicker = createDatePicker("date");
|
13143
|
+
var DateTimePicker = createDatePicker("datetime");
|
13144
|
+
|
13145
|
+
// src/molecules/DatePicker/DateRangePicker.tsx
|
13146
|
+
import React85 from "react";
|
13147
|
+
import {
|
13148
|
+
DateRangePicker as AriaDateRangePicker,
|
13149
|
+
DateRangePickerStateContext
|
13150
|
+
} from "react-aria-components";
|
13151
|
+
import { useLabel as useLabel3 } from "@react-aria/label";
|
13152
|
+
import { useId as useId11 } from "@react-aria/utils";
|
13153
|
+
import omit10 from "lodash/omit";
|
13154
|
+
var import_calendar3 = __toESM(require_calendar());
|
13155
|
+
|
13156
|
+
// src/molecules/DatePicker/RangeCalendar.tsx
|
13157
|
+
import React84 from "react";
|
13158
|
+
import {
|
13159
|
+
CalendarCell as CalendarCell2,
|
13160
|
+
CalendarGrid as CalendarGrid2,
|
13161
|
+
CalendarGridBody as CalendarGridBody2,
|
13162
|
+
RangeCalendar as AriaRangeCalendar
|
13163
|
+
} from "react-aria-components";
|
13164
|
+
import { tv as tv5 } from "tailwind-variants";
|
13165
|
+
var cell = tv5({
|
13166
|
+
extend: focusRing,
|
13167
|
+
base: "w-full h-full flex items-center justify-center rounded text-default",
|
13168
|
+
variants: {
|
13169
|
+
selectionState: {
|
13170
|
+
none: "group-hover:bg-default group-pressed:bg-intense",
|
13171
|
+
middle: [
|
13172
|
+
"text-white",
|
13173
|
+
"group-hover:bg-primary-default",
|
13174
|
+
"group-invalid:group-hover:bg-danger-default",
|
13175
|
+
"group-pressed:bg-primary-intense",
|
13176
|
+
"group-invalid:group-pressed:bg-danger-intense"
|
13177
|
+
],
|
13178
|
+
cap: "text-white bg-primary-default group-invalid:bg-danger-default"
|
13179
|
+
},
|
13180
|
+
isUnavailable: {
|
13181
|
+
true: "text-inactive"
|
13182
|
+
},
|
13183
|
+
isDisabled: {
|
13184
|
+
true: "text-inactive"
|
13185
|
+
}
|
13186
|
+
}
|
13187
|
+
});
|
13188
|
+
function RangeCalendar(props) {
|
13189
|
+
return /* @__PURE__ */ React84.createElement(AriaRangeCalendar, __spreadValues({}, props), /* @__PURE__ */ React84.createElement(CalendarHeader, null), /* @__PURE__ */ React84.createElement(CalendarGrid2, {
|
13190
|
+
className: "[&_td]:px-0"
|
13191
|
+
}, /* @__PURE__ */ React84.createElement(CalendarGridHeader, null), /* @__PURE__ */ React84.createElement(CalendarGridBody2, null, (date) => /* @__PURE__ */ React84.createElement(CalendarCell2, {
|
13192
|
+
date,
|
13193
|
+
className: tw(
|
13194
|
+
"group w-8 h-8 typography-small outline outline-0 cursor-default",
|
13195
|
+
"outside-month:text-inactive selected:bg-primary-default",
|
13196
|
+
"invalid:selected:bg-danger-default",
|
13197
|
+
"selection-start:rounded-s selection-end:rounded-e"
|
13198
|
+
)
|
13199
|
+
}, (_a) => {
|
13200
|
+
var _b = _a, { formattedDate, isSelected, isSelectionStart, isSelectionEnd } = _b, rest = __objRest(_b, ["formattedDate", "isSelected", "isSelectionStart", "isSelectionEnd"]);
|
13201
|
+
return /* @__PURE__ */ React84.createElement("span", {
|
13202
|
+
className: cell(__spreadValues({
|
13203
|
+
selectionState: isSelected && (isSelectionStart || isSelectionEnd) ? "cap" : isSelected ? "middle" : "none"
|
13204
|
+
}, rest))
|
13205
|
+
}, formattedDate);
|
13206
|
+
}))));
|
13207
|
+
}
|
13208
|
+
|
13209
|
+
// src/molecules/DatePicker/DateRangePicker.tsx
|
13210
|
+
var createDateRangePickerBase = (variant) => (_a) => {
|
13211
|
+
var _b = _a, {
|
13212
|
+
disabled,
|
13213
|
+
valid,
|
13214
|
+
granularity,
|
13215
|
+
shouldCloseOnSelect
|
13216
|
+
} = _b, props = __objRest(_b, [
|
13217
|
+
"disabled",
|
13218
|
+
"valid",
|
13219
|
+
"granularity",
|
13220
|
+
"shouldCloseOnSelect"
|
13221
|
+
]);
|
13222
|
+
const hasSomeValue = props.value || props.defaultValue || props.placeholderValue;
|
13223
|
+
return /* @__PURE__ */ React85.createElement(AriaDateRangePicker, __spreadProps(__spreadValues({}, props), {
|
13224
|
+
shouldCloseOnSelect: shouldCloseOnSelect != null ? shouldCloseOnSelect : variant === "date",
|
13225
|
+
isDisabled: disabled,
|
13226
|
+
isInvalid: valid === false,
|
13227
|
+
granularity: granularity != null ? granularity : variant === "datetime" && !hasSomeValue ? "minute" : void 0,
|
13228
|
+
className: tw("group flex flex-col gap-1")
|
13229
|
+
}), /* @__PURE__ */ React85.createElement(FieldGroup, {
|
13230
|
+
className: tw("min-w-[200px] w-auto")
|
13231
|
+
}, /* @__PURE__ */ React85.createElement(DateInput, {
|
13232
|
+
slot: "start",
|
13233
|
+
className: tw("px-2 py-1")
|
13234
|
+
}), /* @__PURE__ */ React85.createElement("span", {
|
13235
|
+
"aria-hidden": true,
|
13236
|
+
className: tw("text-muted")
|
13237
|
+
}, "-"), /* @__PURE__ */ React85.createElement(DateInput, {
|
13238
|
+
slot: "end",
|
13239
|
+
className: tw("flex-1 px-2 py-1")
|
13240
|
+
}), /* @__PURE__ */ React85.createElement(Button2, null, /* @__PURE__ */ React85.createElement(Icon, {
|
13241
|
+
icon: import_calendar3.default
|
13242
|
+
}))), /* @__PURE__ */ React85.createElement(Popover2, null, /* @__PURE__ */ React85.createElement(Dialog, null, /* @__PURE__ */ React85.createElement(Spacing, {
|
13243
|
+
gap: "6"
|
13244
|
+
}, /* @__PURE__ */ React85.createElement(RangeCalendar, null), variant === "datetime" && /* @__PURE__ */ React85.createElement(Spacing, {
|
13245
|
+
gap: "6",
|
13246
|
+
row: true
|
13247
|
+
}, /* @__PURE__ */ React85.createElement(PickerTimeField2, {
|
13248
|
+
granularity,
|
13249
|
+
part: "start"
|
13250
|
+
}), /* @__PURE__ */ React85.createElement(PickerTimeField2, {
|
13251
|
+
granularity,
|
13252
|
+
part: "end"
|
13253
|
+
}))))));
|
13254
|
+
};
|
13255
|
+
var PickerTimeField2 = ({ granularity, part }) => {
|
13256
|
+
var _a;
|
13257
|
+
const { timeRange, setTime } = React85.useContext(DateRangePickerStateContext);
|
13258
|
+
return /* @__PURE__ */ React85.createElement(TimeField, {
|
13259
|
+
labelText: part === "start" ? "Start time" : "End time",
|
13260
|
+
granularity: granularity !== "day" ? granularity : void 0,
|
13261
|
+
value: (_a = timeRange == null ? void 0 : timeRange[part]) != null ? _a : null,
|
13262
|
+
onChange: (value) => setTime(part, value),
|
13263
|
+
reserveSpaceForError: false
|
13264
|
+
});
|
13265
|
+
};
|
13266
|
+
var DateRangePickerBase = createDateRangePickerBase("date");
|
13267
|
+
var DateTimeRangePickerBase = createDateRangePickerBase("datetime");
|
13268
|
+
var createDateRangePicker = (variant) => (props) => {
|
13269
|
+
const { labelProps, fieldProps } = useLabel3({ label: props.labelText });
|
13270
|
+
const errorMessageId = useId11();
|
13271
|
+
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
13272
|
+
const _a = getLabelControlProps(props), { "data-testid": dataTestId } = _a, labelControlProps = __objRest(_a, ["data-testid"]);
|
13273
|
+
const baseProps = omit10(props, Object.keys(labelControlProps));
|
13274
|
+
const allProps = __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, baseProps), fieldProps), errorProps), { disabled: props.disabled, valid: props.valid });
|
13275
|
+
return /* @__PURE__ */ React85.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({}, labelProps), labelControlProps), {
|
13276
|
+
messageId: errorMessageId,
|
13277
|
+
className: "Aquarium-DatePicker"
|
13278
|
+
}), variant === "date" ? /* @__PURE__ */ React85.createElement(DateRangePickerBase, __spreadValues({}, allProps)) : /* @__PURE__ */ React85.createElement(DateTimeRangePickerBase, __spreadValues({}, allProps)));
|
13279
|
+
};
|
13280
|
+
var DateRangePicker = createDateRangePicker("date");
|
13281
|
+
var DateTimeRangePicker = createDateRangePicker("datetime");
|
13282
|
+
|
13283
|
+
// src/molecules/Dialog/Dialog.tsx
|
13284
|
+
import React87 from "react";
|
12741
13285
|
import { useDialog } from "@react-aria/dialog";
|
12742
13286
|
import { Overlay as Overlay2, useModalOverlay } from "@react-aria/overlays";
|
12743
|
-
import { useId as
|
13287
|
+
import { useId as useId12 } from "@react-aria/utils";
|
12744
13288
|
import { useOverlayTriggerState as useOverlayTriggerState2 } from "@react-stately/overlays";
|
12745
|
-
import
|
13289
|
+
import omit11 from "lodash/omit";
|
12746
13290
|
|
12747
13291
|
// src/atoms/Dialog/Dialog.tsx
|
12748
13292
|
var import_confirm2 = __toESM(require_confirm());
|
@@ -12764,7 +13308,7 @@ var DIALOG_ICONS_AND_COLORS = {
|
|
12764
13308
|
};
|
12765
13309
|
|
12766
13310
|
// src/atoms/Modal/Modal.tsx
|
12767
|
-
import
|
13311
|
+
import React86 from "react";
|
12768
13312
|
var Modal = (_a) => {
|
12769
13313
|
var _b = _a, {
|
12770
13314
|
children,
|
@@ -12777,7 +13321,7 @@ var Modal = (_a) => {
|
|
12777
13321
|
"className",
|
12778
13322
|
"open"
|
12779
13323
|
]);
|
12780
|
-
return open ? /* @__PURE__ */
|
13324
|
+
return open ? /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12781
13325
|
className: classNames(
|
12782
13326
|
tw("inset-0 overflow-y-auto z-modal fixed"),
|
12783
13327
|
{
|
@@ -12789,11 +13333,11 @@ var Modal = (_a) => {
|
|
12789
13333
|
};
|
12790
13334
|
Modal.BackDrop = (_a) => {
|
12791
13335
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
12792
|
-
return /* @__PURE__ */
|
13336
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12793
13337
|
className: classNames(tw("-z-10 fixed min-w-full min-h-full bg-body-intense opacity-70"), className)
|
12794
13338
|
}));
|
12795
13339
|
};
|
12796
|
-
Modal.Dialog =
|
13340
|
+
Modal.Dialog = React86.forwardRef(
|
12797
13341
|
(_a, ref) => {
|
12798
13342
|
var _b = _a, { kind = "dialog", children, className, size = "sm" } = _b, rest = __objRest(_b, ["kind", "children", "className", "size"]);
|
12799
13343
|
const commonClasses = tw("bg-popover-content max-h-full flex flex-col");
|
@@ -12807,7 +13351,7 @@ Modal.Dialog = React76.forwardRef(
|
|
12807
13351
|
"w-[560px]": size === "md",
|
12808
13352
|
"w-[1080px]": size === "full"
|
12809
13353
|
});
|
12810
|
-
return /* @__PURE__ */
|
13354
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({
|
12811
13355
|
ref,
|
12812
13356
|
"aria-modal": "true"
|
12813
13357
|
}, rest), {
|
@@ -12817,31 +13361,31 @@ Modal.Dialog = React76.forwardRef(
|
|
12817
13361
|
);
|
12818
13362
|
Modal.Header = (_a) => {
|
12819
13363
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12820
|
-
return /* @__PURE__ */
|
13364
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12821
13365
|
className: classNames(tw("pl-7 pr-[64px] py-6 gap-3 flex items-center"), className)
|
12822
13366
|
}), children);
|
12823
13367
|
};
|
12824
13368
|
Modal.HeaderImage = (_a) => {
|
12825
13369
|
var _b = _a, { backgroundImage, className } = _b, rest = __objRest(_b, ["backgroundImage", "className"]);
|
12826
13370
|
const common = tw("h-[120px] min-h-[120px] w-full ");
|
12827
|
-
return backgroundImage ? /* @__PURE__ */
|
13371
|
+
return backgroundImage ? /* @__PURE__ */ React86.createElement("img", __spreadProps(__spreadValues({
|
12828
13372
|
"aria-hidden": true,
|
12829
13373
|
src: backgroundImage != null ? backgroundImage : void 0
|
12830
13374
|
}, rest), {
|
12831
13375
|
className: classNames(common, tw("object-cover"), className)
|
12832
|
-
})) : /* @__PURE__ */
|
13376
|
+
})) : /* @__PURE__ */ React86.createElement("div", {
|
12833
13377
|
className: classNames(common, tw("bg-default"), className)
|
12834
13378
|
});
|
12835
13379
|
};
|
12836
13380
|
Modal.CloseButtonContainer = (_a) => {
|
12837
13381
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
12838
|
-
return /* @__PURE__ */
|
13382
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12839
13383
|
className: classNames(tw("absolute top-[24px] right-[28px]"), className)
|
12840
13384
|
}));
|
12841
13385
|
};
|
12842
13386
|
Modal.Title = (_a) => {
|
12843
13387
|
var _b = _a, { kind = "dialog", children, className } = _b, rest = __objRest(_b, ["kind", "children", "className"]);
|
12844
|
-
return /* @__PURE__ */
|
13388
|
+
return /* @__PURE__ */ React86.createElement(Typography, __spreadValues({
|
12845
13389
|
htmlTag: "h2",
|
12846
13390
|
variant: "subheading",
|
12847
13391
|
color: "intense",
|
@@ -12855,40 +13399,40 @@ Modal.Title = (_a) => {
|
|
12855
13399
|
};
|
12856
13400
|
Modal.Subtitle = (_a) => {
|
12857
13401
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
12858
|
-
return /* @__PURE__ */
|
13402
|
+
return /* @__PURE__ */ React86.createElement(Typography, __spreadValues({
|
12859
13403
|
variant: "small",
|
12860
13404
|
color: "default"
|
12861
13405
|
}, rest), children);
|
12862
13406
|
};
|
12863
13407
|
Modal.TitleContainer = (_a) => {
|
12864
13408
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12865
|
-
return /* @__PURE__ */
|
13409
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12866
13410
|
className: classNames(tw("flex flex-col grow"), className)
|
12867
13411
|
}), children);
|
12868
13412
|
};
|
12869
13413
|
Modal.Body = (_a) => {
|
12870
13414
|
var _b = _a, { children, className, noFooter = false, maxHeight, style } = _b, rest = __objRest(_b, ["children", "className", "noFooter", "maxHeight", "style"]);
|
12871
|
-
return /* @__PURE__ */
|
13415
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12872
13416
|
className: classNames(tw("px-7 grow overflow-y-auto text-default", { "pb-6": noFooter }), className),
|
12873
13417
|
style: __spreadValues({ maxHeight }, style)
|
12874
13418
|
}), children);
|
12875
13419
|
};
|
12876
13420
|
Modal.Footer = (_a) => {
|
12877
13421
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12878
|
-
return /* @__PURE__ */
|
13422
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12879
13423
|
className: classNames(tw("px-7 py-6"), className)
|
12880
13424
|
}), children);
|
12881
13425
|
};
|
12882
13426
|
Modal.Actions = (_a) => {
|
12883
13427
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
12884
|
-
return /* @__PURE__ */
|
13428
|
+
return /* @__PURE__ */ React86.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12885
13429
|
className: classNames(tw("flex gap-4 justify-end"), className)
|
12886
13430
|
}), children);
|
12887
13431
|
};
|
12888
13432
|
|
12889
13433
|
// src/molecules/Dialog/Dialog.tsx
|
12890
|
-
var
|
12891
|
-
const ref =
|
13434
|
+
var Dialog2 = (props) => {
|
13435
|
+
const ref = React87.useRef(null);
|
12892
13436
|
const { open, onClose } = props;
|
12893
13437
|
const state = useOverlayTriggerState2({ isOpen: open, onOpenChange: (isOpen) => !isOpen && (onClose == null ? void 0 : onClose()) });
|
12894
13438
|
const { modalProps, underlayProps } = useModalOverlay(
|
@@ -12899,13 +13443,13 @@ var Dialog = (props) => {
|
|
12899
13443
|
if (!state.isOpen) {
|
12900
13444
|
return null;
|
12901
13445
|
}
|
12902
|
-
return /* @__PURE__ */
|
13446
|
+
return /* @__PURE__ */ React87.createElement(Overlay2, null, /* @__PURE__ */ React87.createElement(Modal, {
|
12903
13447
|
className: "Aquarium-Dialog",
|
12904
13448
|
open: true
|
12905
|
-
}, /* @__PURE__ */
|
13449
|
+
}, /* @__PURE__ */ React87.createElement(Modal.BackDrop, __spreadValues({}, underlayProps)), /* @__PURE__ */ React87.createElement(Modal.Dialog, __spreadValues({
|
12906
13450
|
ref,
|
12907
13451
|
size: "sm"
|
12908
|
-
}, modalProps), /* @__PURE__ */
|
13452
|
+
}, modalProps), /* @__PURE__ */ React87.createElement(DialogWrapper, __spreadValues({}, props)))));
|
12909
13453
|
};
|
12910
13454
|
var DialogWrapper = ({
|
12911
13455
|
title,
|
@@ -12914,9 +13458,9 @@ var DialogWrapper = ({
|
|
12914
13458
|
primaryAction,
|
12915
13459
|
secondaryAction
|
12916
13460
|
}) => {
|
12917
|
-
const ref =
|
12918
|
-
const labelledBy =
|
12919
|
-
const describedBy =
|
13461
|
+
const ref = React87.useRef(null);
|
13462
|
+
const labelledBy = useId12();
|
13463
|
+
const describedBy = useId12();
|
12920
13464
|
const { dialogProps } = useDialog(
|
12921
13465
|
{
|
12922
13466
|
"role": "alertdialog",
|
@@ -12925,52 +13469,52 @@ var DialogWrapper = ({
|
|
12925
13469
|
},
|
12926
13470
|
ref
|
12927
13471
|
);
|
12928
|
-
return /* @__PURE__ */
|
13472
|
+
return /* @__PURE__ */ React87.createElement("div", __spreadProps(__spreadValues({
|
12929
13473
|
ref
|
12930
13474
|
}, dialogProps), {
|
12931
13475
|
className: tw("outline-none")
|
12932
|
-
}), /* @__PURE__ */
|
13476
|
+
}), /* @__PURE__ */ React87.createElement(Modal.Header, {
|
12933
13477
|
className: tw("icon-stroke-2")
|
12934
|
-
}, /* @__PURE__ */
|
13478
|
+
}, /* @__PURE__ */ React87.createElement(Icon, {
|
12935
13479
|
icon: DIALOG_ICONS_AND_COLORS[type].icon,
|
12936
13480
|
color: DIALOG_ICONS_AND_COLORS[type].color,
|
12937
13481
|
fontSize: 20
|
12938
|
-
}), /* @__PURE__ */
|
13482
|
+
}), /* @__PURE__ */ React87.createElement(Modal.Title, {
|
12939
13483
|
id: labelledBy,
|
12940
13484
|
variant: "large",
|
12941
13485
|
color: DIALOG_ICONS_AND_COLORS[type].color
|
12942
|
-
}, title)), /* @__PURE__ */
|
13486
|
+
}, title)), /* @__PURE__ */ React87.createElement(Modal.Body, {
|
12943
13487
|
id: describedBy
|
12944
|
-
}, /* @__PURE__ */
|
13488
|
+
}, /* @__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
13489
|
key: secondaryAction.text
|
12946
|
-
},
|
13490
|
+
}, omit11(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */ React87.createElement(Button.Secondary, __spreadValues({
|
12947
13491
|
key: primaryAction.text
|
12948
|
-
},
|
13492
|
+
}, omit11(primaryAction, "text")), primaryAction.text))));
|
12949
13493
|
};
|
12950
13494
|
|
12951
13495
|
// src/molecules/Drawer/Drawer.tsx
|
12952
|
-
import
|
13496
|
+
import React89 from "react";
|
12953
13497
|
import { useOverlayTriggerState as useOverlayTriggerState3 } from "react-stately";
|
12954
13498
|
import { useDialog as useDialog2 } from "@react-aria/dialog";
|
12955
13499
|
import { Overlay as Overlay3, useModalOverlay as useModalOverlay2 } from "@react-aria/overlays";
|
12956
|
-
import { useId as
|
13500
|
+
import { useId as useId13 } from "@react-aria/utils";
|
12957
13501
|
import { animated as animated5, useSpring as useSpring4 } from "@react-spring/web";
|
12958
13502
|
import castArray3 from "lodash/castArray";
|
12959
|
-
import
|
13503
|
+
import omit12 from "lodash/omit";
|
12960
13504
|
|
12961
13505
|
// src/molecules/Tabs/Tabs.tsx
|
12962
|
-
import
|
13506
|
+
import React88, { useEffect as useEffect8, useLayoutEffect as useLayoutEffect2, useRef as useRef10, useState as useState11 } from "react";
|
12963
13507
|
import isNumber5 from "lodash/isNumber";
|
12964
13508
|
import kebabCase from "lodash/kebabCase";
|
12965
|
-
var
|
12966
|
-
var
|
13509
|
+
var import_chevronLeft5 = __toESM(require_chevronLeft());
|
13510
|
+
var import_chevronRight5 = __toESM(require_chevronRight());
|
12967
13511
|
var import_warningSign4 = __toESM(require_warningSign());
|
12968
13512
|
var isTabComponent = (c) => {
|
12969
|
-
return
|
13513
|
+
return React88.isValidElement(c) && (c.type === Tab || c.type === ModalTab);
|
12970
13514
|
};
|
12971
|
-
var Tab =
|
13515
|
+
var Tab = React88.forwardRef(
|
12972
13516
|
({ className, id, title, children }, ref) => {
|
12973
|
-
return /* @__PURE__ */
|
13517
|
+
return /* @__PURE__ */ React88.createElement("div", {
|
12974
13518
|
ref,
|
12975
13519
|
id: `${id != null ? id : kebabCase(title)}-panel`,
|
12976
13520
|
className,
|
@@ -12982,14 +13526,14 @@ var Tab = React78.forwardRef(
|
|
12982
13526
|
);
|
12983
13527
|
var TabContainer = (_a) => {
|
12984
13528
|
var _b = _a, { className, children } = _b, rest = __objRest(_b, ["className", "children"]);
|
12985
|
-
return /* @__PURE__ */
|
13529
|
+
return /* @__PURE__ */ React88.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
12986
13530
|
className: classNames("py-6 z-0", className)
|
12987
13531
|
}), children);
|
12988
13532
|
};
|
12989
13533
|
var ModalTab = Tab;
|
12990
13534
|
var ModalTabContainer = TabContainer;
|
12991
13535
|
var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
12992
|
-
const Tab2 =
|
13536
|
+
const Tab2 = React88.forwardRef(
|
12993
13537
|
(_a, ref) => {
|
12994
13538
|
var _b = _a, {
|
12995
13539
|
id,
|
@@ -13021,17 +13565,17 @@ var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
|
13021
13565
|
const _id = id != null ? id : kebabCase(title);
|
13022
13566
|
let statusIcon = void 0;
|
13023
13567
|
if (status === "warning") {
|
13024
|
-
statusIcon = /* @__PURE__ */
|
13568
|
+
statusIcon = /* @__PURE__ */ React88.createElement(InlineIcon, {
|
13025
13569
|
icon: import_warningSign4.default,
|
13026
13570
|
color: selected ? void 0 : "warning-default"
|
13027
13571
|
});
|
13028
13572
|
} else if (status === "error") {
|
13029
|
-
statusIcon = /* @__PURE__ */
|
13573
|
+
statusIcon = /* @__PURE__ */ React88.createElement(InlineIcon, {
|
13030
13574
|
icon: import_warningSign4.default,
|
13031
13575
|
color: selected ? void 0 : "danger-default"
|
13032
13576
|
});
|
13033
13577
|
}
|
13034
|
-
const tab = /* @__PURE__ */
|
13578
|
+
const tab = /* @__PURE__ */ React88.createElement(Component, __spreadValues({
|
13035
13579
|
ref,
|
13036
13580
|
id: `${_id}-tab`,
|
13037
13581
|
onClick: () => !disabled && onSelected(value != null ? value : index),
|
@@ -13048,29 +13592,29 @@ var asTabItem = (Component, displayName, { defaultUnderlineHidden } = {}) => {
|
|
13048
13592
|
"aria-selected": selected,
|
13049
13593
|
"aria-controls": `${_id}-panel`,
|
13050
13594
|
tabIndex: disabled ? void 0 : 0
|
13051
|
-
}, rest), /* @__PURE__ */
|
13595
|
+
}, rest), /* @__PURE__ */ React88.createElement(Typography2, {
|
13052
13596
|
htmlTag: "div",
|
13053
13597
|
variant: "small-strong",
|
13054
13598
|
color: selected ? "primary-default" : disabled ? "default" : "current",
|
13055
13599
|
className: tw("inline-flex items-center gap-3")
|
13056
|
-
}, showNotification ? /* @__PURE__ */
|
13600
|
+
}, showNotification ? /* @__PURE__ */ React88.createElement(Badge.Notification, {
|
13057
13601
|
right: "-4px",
|
13058
13602
|
top: "3px"
|
13059
|
-
}, /* @__PURE__ */
|
13603
|
+
}, /* @__PURE__ */ React88.createElement("span", {
|
13060
13604
|
className: tw("whitespace-nowrap")
|
13061
|
-
}, title)) : /* @__PURE__ */
|
13605
|
+
}, title)) : /* @__PURE__ */ React88.createElement("span", {
|
13062
13606
|
className: tw("whitespace-nowrap")
|
13063
|
-
}, title), isNumber5(badge) && /* @__PURE__ */
|
13607
|
+
}, title), isNumber5(badge) && /* @__PURE__ */ React88.createElement(Typography2, {
|
13064
13608
|
htmlTag: "span",
|
13065
13609
|
variant: "small",
|
13066
13610
|
color: selected ? "primary-intense" : "grey-5",
|
13067
13611
|
className: "leading-none"
|
13068
|
-
}, /* @__PURE__ */
|
13612
|
+
}, /* @__PURE__ */ React88.createElement(TabBadge, {
|
13069
13613
|
kind: "filled",
|
13070
13614
|
value: badge,
|
13071
13615
|
textClassname: classNames({ "text-white": selected, "text-muted": !selected })
|
13072
13616
|
})), statusIcon));
|
13073
|
-
return tooltip ? /* @__PURE__ */
|
13617
|
+
return tooltip ? /* @__PURE__ */ React88.createElement(Tooltip, {
|
13074
13618
|
content: tooltip
|
13075
13619
|
}, tab) : tab;
|
13076
13620
|
}
|
@@ -13084,7 +13628,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
13084
13628
|
const Tabs2 = (props) => {
|
13085
13629
|
var _a, _b;
|
13086
13630
|
const { className, value, defaultValue, onChange, children } = props;
|
13087
|
-
const childArr =
|
13631
|
+
const childArr = React88.Children.toArray(children);
|
13088
13632
|
const firstTab = childArr[0];
|
13089
13633
|
const firstTabValue = isTabComponent(firstTab) ? firstTab.props.value : -1;
|
13090
13634
|
const [selected, setSelected] = useState11((_b = (_a = value != null ? value : defaultValue) != null ? _a : firstTabValue) != null ? _b : 0);
|
@@ -13097,7 +13641,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
13097
13641
|
var _a2, _b2;
|
13098
13642
|
const container = containerRef.current;
|
13099
13643
|
const tabs = tabsRef.current;
|
13100
|
-
const values =
|
13644
|
+
const values = React88.Children.map(
|
13101
13645
|
children,
|
13102
13646
|
(tab, i) => {
|
13103
13647
|
var _a3;
|
@@ -13138,7 +13682,7 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
13138
13682
|
updateCarets();
|
13139
13683
|
setSelected(value);
|
13140
13684
|
revealSelectedTab({ smooth: value !== selected });
|
13141
|
-
}, [value,
|
13685
|
+
}, [value, React88.Children.count(children)]);
|
13142
13686
|
useLayoutEffect2(() => {
|
13143
13687
|
var _a2;
|
13144
13688
|
updateCarets();
|
@@ -13202,27 +13746,27 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
13202
13746
|
const handleSelected = (key) => {
|
13203
13747
|
(onChange != null ? onChange : setSelected)(key);
|
13204
13748
|
};
|
13205
|
-
|
13749
|
+
React88.Children.forEach(children, (c) => {
|
13206
13750
|
if (c && !isTabComponent(c)) {
|
13207
13751
|
throw new Error("<Tabs> can only have <Tabs.Tab> components as children");
|
13208
13752
|
}
|
13209
13753
|
});
|
13210
|
-
return /* @__PURE__ */
|
13754
|
+
return /* @__PURE__ */ React88.createElement("div", {
|
13211
13755
|
ref: parentRef,
|
13212
13756
|
className: classNames("Aquarium-Tabs", tw("h-full"), className)
|
13213
|
-
}, /* @__PURE__ */
|
13757
|
+
}, /* @__PURE__ */ React88.createElement("div", {
|
13214
13758
|
className: tw("relative flex items-center border-b-2 border-default")
|
13215
|
-
}, /* @__PURE__ */
|
13759
|
+
}, /* @__PURE__ */ React88.createElement("div", {
|
13216
13760
|
ref: containerRef,
|
13217
13761
|
className: tw("overflow-y-auto scrollbar-hide mb-[-2px] h-auto")
|
13218
|
-
}, /* @__PURE__ */
|
13762
|
+
}, /* @__PURE__ */ React88.createElement("div", {
|
13219
13763
|
ref: tabsRef,
|
13220
13764
|
role: "tablist",
|
13221
13765
|
"aria-label": "tabs",
|
13222
13766
|
className: tw("inline-flex items-center cursor-pointer font-normal h-full")
|
13223
|
-
},
|
13767
|
+
}, React88.Children.map(
|
13224
13768
|
children,
|
13225
|
-
(tab, index) => tab ? /* @__PURE__ */
|
13769
|
+
(tab, index) => tab ? /* @__PURE__ */ React88.createElement(TabItemComponent, __spreadProps(__spreadValues({
|
13226
13770
|
key: tab.props.value
|
13227
13771
|
}, tab.props), {
|
13228
13772
|
index,
|
@@ -13230,28 +13774,28 @@ var createTabsComponent = (TabComponent, TabItemComponent, displayName, renderCh
|
|
13230
13774
|
onKeyDown: handleKeyDown,
|
13231
13775
|
onSelected: handleSelected
|
13232
13776
|
})) : void 0
|
13233
|
-
))), leftCaret && /* @__PURE__ */
|
13777
|
+
))), leftCaret && /* @__PURE__ */ React88.createElement("div", {
|
13234
13778
|
className: tw("absolute left-0 bg-gradient-to-r from-white via-white z-20 py-3 pr-4")
|
13235
|
-
}, /* @__PURE__ */
|
13779
|
+
}, /* @__PURE__ */ React88.createElement("div", {
|
13236
13780
|
onClick: () => handleScrollToNext("left"),
|
13237
13781
|
className: tw("hover:bg-muted p-2 leading-none cursor-pointer")
|
13238
|
-
}, /* @__PURE__ */
|
13239
|
-
icon:
|
13240
|
-
}))), rightCaret && /* @__PURE__ */
|
13782
|
+
}, /* @__PURE__ */ React88.createElement(InlineIcon, {
|
13783
|
+
icon: import_chevronLeft5.default
|
13784
|
+
}))), rightCaret && /* @__PURE__ */ React88.createElement("div", {
|
13241
13785
|
onClick: () => handleScrollToNext("right"),
|
13242
13786
|
className: tw("absolute right-0 bg-gradient-to-l from-white via-white z-20 py-3 pl-4")
|
13243
|
-
}, /* @__PURE__ */
|
13787
|
+
}, /* @__PURE__ */ React88.createElement("div", {
|
13244
13788
|
onClick: () => handleScrollToNext("right"),
|
13245
13789
|
className: tw("hover:bg-muted p-2 leading-none cursor-pointer")
|
13246
|
-
}, /* @__PURE__ */
|
13247
|
-
icon:
|
13790
|
+
}, /* @__PURE__ */ React88.createElement(InlineIcon, {
|
13791
|
+
icon: import_chevronRight5.default
|
13248
13792
|
})))), renderChildren(children, selected, props));
|
13249
13793
|
};
|
13250
13794
|
Tabs2.displayName = displayName;
|
13251
13795
|
Tabs2.Tab = TabComponent;
|
13252
13796
|
return Tabs2;
|
13253
13797
|
};
|
13254
|
-
var Tabs = createTabsComponent(Tab, TabItem, "Tabs", (children, selected) => /* @__PURE__ */
|
13798
|
+
var Tabs = createTabsComponent(Tab, TabItem, "Tabs", (children, selected) => /* @__PURE__ */ React88.createElement(TabContainer, null, children.find(
|
13255
13799
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
13256
13800
|
)));
|
13257
13801
|
|
@@ -13268,8 +13812,8 @@ var WIDTHS = {
|
|
13268
13812
|
var Drawer = (_a) => {
|
13269
13813
|
var _b = _a, { open, closeOnEsc = true } = _b, props = __objRest(_b, ["open", "closeOnEsc"]);
|
13270
13814
|
const { onClose, size = "sm", portalContainer } = props;
|
13271
|
-
const [hidden, setHidden] =
|
13272
|
-
const ref =
|
13815
|
+
const [hidden, setHidden] = React89.useState(!open);
|
13816
|
+
const ref = React89.useRef(null);
|
13273
13817
|
const state = useOverlayTriggerState3({ isOpen: !hidden, onOpenChange: (isOpen) => !isOpen && onClose() });
|
13274
13818
|
if (open && hidden) {
|
13275
13819
|
setHidden(!open);
|
@@ -13296,21 +13840,21 @@ var Drawer = (_a) => {
|
|
13296
13840
|
if (!state.isOpen) {
|
13297
13841
|
return null;
|
13298
13842
|
}
|
13299
|
-
return /* @__PURE__ */
|
13843
|
+
return /* @__PURE__ */ React89.createElement(Overlay3, {
|
13300
13844
|
portalContainer
|
13301
|
-
}, /* @__PURE__ */
|
13845
|
+
}, /* @__PURE__ */ React89.createElement(Modal, {
|
13302
13846
|
kind: "drawer",
|
13303
13847
|
className: "Aquarium-Drawer overflow-x-hidden",
|
13304
13848
|
open: true
|
13305
|
-
}, /* @__PURE__ */
|
13849
|
+
}, /* @__PURE__ */ React89.createElement(AnimatedBackDrop, __spreadValues({
|
13306
13850
|
style: { opacity }
|
13307
|
-
}, underlayProps)), /* @__PURE__ */
|
13851
|
+
}, underlayProps)), /* @__PURE__ */ React89.createElement(DrawerWrapper, __spreadProps(__spreadValues(__spreadValues({
|
13308
13852
|
ref
|
13309
13853
|
}, props), modalProps), {
|
13310
13854
|
spring: { right }
|
13311
13855
|
}))));
|
13312
13856
|
};
|
13313
|
-
var DrawerWrapper =
|
13857
|
+
var DrawerWrapper = React89.forwardRef(
|
13314
13858
|
(_a, ref) => {
|
13315
13859
|
var _b = _a, {
|
13316
13860
|
title,
|
@@ -13340,83 +13884,83 @@ var DrawerWrapper = React79.forwardRef(
|
|
13340
13884
|
"menuAriaLabel"
|
13341
13885
|
]);
|
13342
13886
|
var _a2;
|
13343
|
-
const labelledBy =
|
13344
|
-
const describedBy =
|
13887
|
+
const labelledBy = useId13();
|
13888
|
+
const describedBy = useId13();
|
13345
13889
|
const { dialogProps } = useDialog2(
|
13346
13890
|
{ "role": "dialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
13347
13891
|
ref
|
13348
13892
|
);
|
13349
13893
|
const dialogSize = size === "lg" ? "full" : size;
|
13350
|
-
const childElements =
|
13894
|
+
const childElements = React89.Children.toArray(children).filter(React89.isValidElement);
|
13351
13895
|
const onlyChild = childElements.length === 1 ? childElements[0] : null;
|
13352
13896
|
const hasTabs = isComponentType(onlyChild, Tabs);
|
13353
|
-
return /* @__PURE__ */
|
13897
|
+
return /* @__PURE__ */ React89.createElement(AnimatedDialog, __spreadProps(__spreadValues(__spreadValues({
|
13354
13898
|
ref,
|
13355
13899
|
kind: "drawer",
|
13356
13900
|
"aria-modal": "true",
|
13357
13901
|
size: dialogSize
|
13358
13902
|
}, props), dialogProps), {
|
13359
13903
|
style: { position: "fixed", right: spring.right }
|
13360
|
-
}), /* @__PURE__ */
|
13904
|
+
}), /* @__PURE__ */ React89.createElement(Modal.CloseButtonContainer, null, /* @__PURE__ */ React89.createElement(Button.Icon, {
|
13361
13905
|
"aria-label": "Close",
|
13362
13906
|
icon: import_cross6.default,
|
13363
13907
|
onClick: onClose
|
13364
|
-
})), /* @__PURE__ */
|
13908
|
+
})), /* @__PURE__ */ React89.createElement(Modal.Header, {
|
13365
13909
|
className: tw({ "pb-3": hasTabs })
|
13366
|
-
}, /* @__PURE__ */
|
13910
|
+
}, /* @__PURE__ */ React89.createElement(Modal.Title, {
|
13367
13911
|
id: labelledBy,
|
13368
13912
|
kind: "drawer"
|
13369
|
-
}, title)), hasTabs ? /* @__PURE__ */
|
13913
|
+
}, title)), hasTabs ? /* @__PURE__ */ React89.createElement(DrawerTabs, __spreadProps(__spreadValues({}, onlyChild.props), {
|
13370
13914
|
className: tw("[&>div:first-child]:px-5 grow flex flex-col overflow-y-auto")
|
13371
|
-
})) : /* @__PURE__ */
|
13915
|
+
})) : /* @__PURE__ */ React89.createElement(Modal.Body, {
|
13372
13916
|
id: describedBy,
|
13373
13917
|
tabIndex: 0,
|
13374
13918
|
noFooter: !(secondaryActions || primaryAction)
|
13375
|
-
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */
|
13919
|
+
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */ React89.createElement(Modal.Footer, null, /* @__PURE__ */ React89.createElement(Modal.Actions, {
|
13376
13920
|
className: size === "sm" ? tw("flex-col") : void 0
|
13377
|
-
}, size !== "sm" && menu && /* @__PURE__ */
|
13921
|
+
}, size !== "sm" && menu && /* @__PURE__ */ React89.createElement(Box.Flex, {
|
13378
13922
|
alignItems: "center"
|
13379
|
-
}, /* @__PURE__ */
|
13923
|
+
}, /* @__PURE__ */ React89.createElement(DropdownMenu2, {
|
13380
13924
|
onAction: (action) => onAction == null ? void 0 : onAction(action),
|
13381
13925
|
onOpenChange: onMenuOpenChange
|
13382
|
-
}, /* @__PURE__ */
|
13926
|
+
}, /* @__PURE__ */ React89.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React89.createElement(Button.Icon, {
|
13383
13927
|
"aria-label": (_a2 = menuAriaLabel != null ? menuAriaLabel : menuLabel) != null ? _a2 : "Context menu",
|
13384
13928
|
icon: import_more4.default
|
13385
13929
|
})), menu)), secondaryActions && castArray3(secondaryActions).filter(Boolean).map((_b2) => {
|
13386
13930
|
var _c = _b2, { text } = _c, action = __objRest(_c, ["text"]);
|
13387
|
-
return /* @__PURE__ */
|
13931
|
+
return /* @__PURE__ */ React89.createElement(Button.Secondary, __spreadValues({
|
13388
13932
|
key: text
|
13389
13933
|
}, action), text);
|
13390
|
-
}), primaryAction && /* @__PURE__ */
|
13934
|
+
}), primaryAction && /* @__PURE__ */ React89.createElement(Button.Primary, __spreadValues({
|
13391
13935
|
key: primaryAction.text
|
13392
|
-
},
|
13936
|
+
}, omit12(primaryAction, "text")), primaryAction.text))));
|
13393
13937
|
}
|
13394
13938
|
);
|
13395
|
-
var DrawerTabs = createTabsComponent(ModalTab, TabItem, "DrawerTabs", (children, selected) => /* @__PURE__ */
|
13939
|
+
var DrawerTabs = createTabsComponent(ModalTab, TabItem, "DrawerTabs", (children, selected) => /* @__PURE__ */ React89.createElement(Modal.Body, {
|
13396
13940
|
className: tw("h-full")
|
13397
|
-
}, /* @__PURE__ */
|
13941
|
+
}, /* @__PURE__ */ React89.createElement(ModalTabContainer, null, children.find(
|
13398
13942
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
13399
13943
|
))));
|
13400
13944
|
|
13401
13945
|
// src/molecules/Dropdown/Dropdown.tsx
|
13402
|
-
import
|
13946
|
+
import React92 from "react";
|
13403
13947
|
|
13404
13948
|
// src/molecules/Popover/Popover.tsx
|
13405
|
-
import
|
13949
|
+
import React91, { useRef as useRef11 } from "react";
|
13406
13950
|
import { PressResponder as PressResponder2, usePress as usePress2 } from "@react-aria/interactions";
|
13407
13951
|
import { useOverlayTrigger } from "@react-aria/overlays";
|
13408
13952
|
import { mergeProps as mergeProps3 } from "@react-aria/utils";
|
13409
13953
|
import { useOverlayTriggerState as useOverlayTriggerState4 } from "@react-stately/overlays";
|
13410
13954
|
import classNames10 from "classnames";
|
13411
|
-
import
|
13955
|
+
import omit13 from "lodash/omit";
|
13412
13956
|
|
13413
13957
|
// src/molecules/Popover/Dialog.tsx
|
13414
|
-
import
|
13958
|
+
import React90 from "react";
|
13415
13959
|
import { useDialog as useDialog3 } from "@react-aria/dialog";
|
13416
|
-
var
|
13417
|
-
const ref =
|
13960
|
+
var Dialog3 = ({ children }) => {
|
13961
|
+
const ref = React90.useRef(null);
|
13418
13962
|
const { dialogProps } = useDialog3({}, ref);
|
13419
|
-
return /* @__PURE__ */
|
13963
|
+
return /* @__PURE__ */ React90.createElement("div", __spreadProps(__spreadValues({
|
13420
13964
|
ref
|
13421
13965
|
}, dialogProps), {
|
13422
13966
|
className: tw("outline-none")
|
@@ -13425,9 +13969,9 @@ var Dialog2 = ({ children }) => {
|
|
13425
13969
|
|
13426
13970
|
// src/molecules/Popover/PopoverContext.tsx
|
13427
13971
|
import { createContext as createContext4, useContext as useContext7 } from "react";
|
13428
|
-
var
|
13972
|
+
var PopoverContext2 = createContext4(null);
|
13429
13973
|
var usePopoverContext = () => {
|
13430
|
-
const ctx = useContext7(
|
13974
|
+
const ctx = useContext7(PopoverContext2);
|
13431
13975
|
if (ctx === null) {
|
13432
13976
|
throw new Error("PopoverContext was used outside of provider.");
|
13433
13977
|
}
|
@@ -13435,7 +13979,7 @@ var usePopoverContext = () => {
|
|
13435
13979
|
};
|
13436
13980
|
|
13437
13981
|
// src/molecules/Popover/Popover.tsx
|
13438
|
-
var
|
13982
|
+
var Popover3 = (props) => {
|
13439
13983
|
const {
|
13440
13984
|
id,
|
13441
13985
|
type,
|
@@ -13456,22 +14000,22 @@ var Popover2 = (props) => {
|
|
13456
14000
|
}
|
13457
14001
|
}));
|
13458
14002
|
const { triggerProps, overlayProps } = useOverlayTrigger({ type: type != null ? type : "dialog" }, state, triggerRef);
|
13459
|
-
return /* @__PURE__ */
|
14003
|
+
return /* @__PURE__ */ React91.createElement(PopoverContext2.Provider, {
|
13460
14004
|
value: {
|
13461
14005
|
state
|
13462
14006
|
}
|
13463
|
-
},
|
13464
|
-
if (isComponentType(child,
|
13465
|
-
return /* @__PURE__ */
|
14007
|
+
}, React91.Children.map(props.children, (child) => {
|
14008
|
+
if (isComponentType(child, Popover3.Trigger)) {
|
14009
|
+
return /* @__PURE__ */ React91.createElement(PressResponder2, __spreadValues({
|
13466
14010
|
ref: triggerRef
|
13467
|
-
},
|
14011
|
+
}, omit13(triggerProps, "aria-expanded")), /* @__PURE__ */ React91.createElement(PopoverTriggerWrapper, {
|
13468
14012
|
"data-testid": props["data-testid"],
|
13469
14013
|
"aria-controls": id,
|
13470
14014
|
"aria-expanded": triggerProps["aria-expanded"]
|
13471
14015
|
}, child.props.children));
|
13472
14016
|
}
|
13473
|
-
if (isComponentType(child,
|
13474
|
-
return state.isOpen && /* @__PURE__ */
|
14017
|
+
if (isComponentType(child, Popover3.Panel)) {
|
14018
|
+
return state.isOpen && /* @__PURE__ */ React91.createElement(PopoverOverlay, __spreadValues({
|
13475
14019
|
triggerRef: targetRef != null ? targetRef : triggerRef,
|
13476
14020
|
state,
|
13477
14021
|
placement,
|
@@ -13482,17 +14026,17 @@ var Popover2 = (props) => {
|
|
13482
14026
|
offset,
|
13483
14027
|
crossOffset,
|
13484
14028
|
shouldFlip
|
13485
|
-
}, overlayProps), containFocus ? /* @__PURE__ */
|
14029
|
+
}, overlayProps), containFocus ? /* @__PURE__ */ React91.createElement(Dialog3, null, child.props.children) : child.props.children);
|
13486
14030
|
}
|
13487
14031
|
throw new Error("Invalid children element type");
|
13488
14032
|
}));
|
13489
14033
|
};
|
13490
14034
|
var Trigger = () => null;
|
13491
14035
|
Trigger.displayName = "Popover.Trigger";
|
13492
|
-
|
14036
|
+
Popover3.Trigger = Trigger;
|
13493
14037
|
var Panel = () => null;
|
13494
14038
|
Panel.displayName = "Popover.Panel";
|
13495
|
-
|
14039
|
+
Popover3.Panel = Panel;
|
13496
14040
|
var asPopoverButton = (Component, displayName) => {
|
13497
14041
|
const PopoverButton2 = (props) => {
|
13498
14042
|
const { onClick } = props;
|
@@ -13501,7 +14045,7 @@ var asPopoverButton = (Component, displayName) => {
|
|
13501
14045
|
state.close();
|
13502
14046
|
onClick == null ? void 0 : onClick(e);
|
13503
14047
|
};
|
13504
|
-
return /* @__PURE__ */
|
14048
|
+
return /* @__PURE__ */ React91.createElement(Component, __spreadProps(__spreadValues({}, props), {
|
13505
14049
|
onClick: handleClick
|
13506
14050
|
}));
|
13507
14051
|
};
|
@@ -13509,14 +14053,14 @@ var asPopoverButton = (Component, displayName) => {
|
|
13509
14053
|
return PopoverButton2;
|
13510
14054
|
};
|
13511
14055
|
var PopoverButton = asPopoverButton(Button, "PopoverButton");
|
13512
|
-
|
14056
|
+
Popover3.Button = PopoverButton;
|
13513
14057
|
var PopoverTriggerWrapper = (_a) => {
|
13514
14058
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
13515
14059
|
var _a2;
|
13516
14060
|
const ref = useRef11(null);
|
13517
|
-
const trigger =
|
14061
|
+
const trigger = React91.Children.only(children);
|
13518
14062
|
const { pressProps } = usePress2(__spreadProps(__spreadValues({}, rest), { ref }));
|
13519
|
-
return
|
14063
|
+
return React91.cloneElement(trigger, __spreadProps(__spreadValues({
|
13520
14064
|
"ref": ref
|
13521
14065
|
}, mergeProps3(pressProps, trigger.props)), {
|
13522
14066
|
"aria-controls": (_a2 = rest["aria-controls"]) != null ? _a2 : pressProps["aria-controls"]
|
@@ -13525,10 +14069,10 @@ var PopoverTriggerWrapper = (_a) => {
|
|
13525
14069
|
|
13526
14070
|
// src/molecules/Dropdown/Dropdown.tsx
|
13527
14071
|
var Dropdown = ({ children, content, placement = "bottom-left" }) => {
|
13528
|
-
return /* @__PURE__ */
|
14072
|
+
return /* @__PURE__ */ React92.createElement(Popover3, {
|
13529
14073
|
type: "menu",
|
13530
14074
|
placement
|
13531
|
-
}, /* @__PURE__ */
|
14075
|
+
}, /* @__PURE__ */ React92.createElement(Popover3.Trigger, null, children), /* @__PURE__ */ React92.createElement(Popover3.Panel, {
|
13532
14076
|
className: "Aquarium-Dropdown"
|
13533
14077
|
}, content));
|
13534
14078
|
};
|
@@ -13539,26 +14083,26 @@ var DropdownMenu3 = ({
|
|
13539
14083
|
triggerId,
|
13540
14084
|
setClose = () => void 0
|
13541
14085
|
}) => {
|
13542
|
-
const menuRef =
|
13543
|
-
|
14086
|
+
const menuRef = React92.useRef(null);
|
14087
|
+
React92.useEffect(() => {
|
13544
14088
|
const id = setTimeout(() => {
|
13545
14089
|
var _a, _b, _c;
|
13546
14090
|
return (_c = (_b = (_a = menuRef.current) == null ? void 0 : _a.children) == null ? void 0 : _b[0]) == null ? void 0 : _c.focus();
|
13547
14091
|
});
|
13548
14092
|
return () => clearTimeout(id);
|
13549
14093
|
}, [menuRef.current]);
|
13550
|
-
return /* @__PURE__ */
|
14094
|
+
return /* @__PURE__ */ React92.createElement("div", {
|
13551
14095
|
style: { minWidth: "250px" },
|
13552
14096
|
className: tw("py-3 bg-popover-content")
|
13553
|
-
}, !!title && /* @__PURE__ */
|
14097
|
+
}, !!title && /* @__PURE__ */ React92.createElement("div", {
|
13554
14098
|
className: tw("px-4 py-4 text-left text-intense typography-default-strong")
|
13555
|
-
}, title), /* @__PURE__ */
|
14099
|
+
}, title), /* @__PURE__ */ React92.createElement("ol", {
|
13556
14100
|
role: "menu",
|
13557
14101
|
ref: menuRef,
|
13558
14102
|
id: contentId,
|
13559
14103
|
"aria-labelledby": triggerId
|
13560
|
-
},
|
13561
|
-
return
|
14104
|
+
}, React92.Children.map(children, (child) => {
|
14105
|
+
return React92.cloneElement(child, { setClose });
|
13562
14106
|
})));
|
13563
14107
|
};
|
13564
14108
|
var DropdownItem = (_a) => {
|
@@ -13613,10 +14157,10 @@ var DropdownItem = (_a) => {
|
|
13613
14157
|
handleSelect();
|
13614
14158
|
}
|
13615
14159
|
};
|
13616
|
-
const itemContent = /* @__PURE__ */
|
14160
|
+
const itemContent = /* @__PURE__ */ React92.createElement("div", {
|
13617
14161
|
className: tw("py-3 px-4")
|
13618
14162
|
}, children);
|
13619
|
-
return /* @__PURE__ */
|
14163
|
+
return /* @__PURE__ */ React92.createElement("li", __spreadProps(__spreadValues({
|
13620
14164
|
role: "menuitem",
|
13621
14165
|
tabIndex: -1,
|
13622
14166
|
onClick: handleClick,
|
@@ -13630,11 +14174,11 @@ var DropdownItem = (_a) => {
|
|
13630
14174
|
"text-danger-default": color === "danger" && !disabled
|
13631
14175
|
})
|
13632
14176
|
)
|
13633
|
-
}), tooltip ? /* @__PURE__ */
|
14177
|
+
}), tooltip ? /* @__PURE__ */ React92.createElement(Tooltip, {
|
13634
14178
|
content: tooltip,
|
13635
14179
|
placement: tooltipPlacement,
|
13636
14180
|
inline: false
|
13637
|
-
}, /* @__PURE__ */
|
14181
|
+
}, /* @__PURE__ */ React92.createElement("div", {
|
13638
14182
|
tabIndex: 0,
|
13639
14183
|
className: tw("grow")
|
13640
14184
|
}, itemContent)) : itemContent);
|
@@ -13643,7 +14187,7 @@ Dropdown.Menu = DropdownMenu3;
|
|
13643
14187
|
Dropdown.Item = DropdownItem;
|
13644
14188
|
|
13645
14189
|
// src/molecules/EmptyState/EmptyState.tsx
|
13646
|
-
import
|
14190
|
+
import React93 from "react";
|
13647
14191
|
var EmptyStateLayout = /* @__PURE__ */ ((EmptyStateLayout2) => {
|
13648
14192
|
EmptyStateLayout2["Vertical"] = "vertical";
|
13649
14193
|
EmptyStateLayout2["Horizontal"] = "horizontal";
|
@@ -13700,7 +14244,7 @@ var EmptyState = ({
|
|
13700
14244
|
fullHeight = isVerticalLayout(layout) ? true : false
|
13701
14245
|
}) => {
|
13702
14246
|
const template = layoutStyle(layout);
|
13703
|
-
return /* @__PURE__ */
|
14247
|
+
return /* @__PURE__ */ React93.createElement(Box, {
|
13704
14248
|
className: classNames(
|
13705
14249
|
"Aquarium-EmptyState",
|
13706
14250
|
tw("rounded p-[56px]", {
|
@@ -13713,39 +14257,39 @@ var EmptyState = ({
|
|
13713
14257
|
),
|
13714
14258
|
backgroundColor: "transparent",
|
13715
14259
|
borderColor: "default"
|
13716
|
-
}, /* @__PURE__ */
|
14260
|
+
}, /* @__PURE__ */ React93.createElement(Box.Flex, {
|
13717
14261
|
style: { gap: "56px" },
|
13718
14262
|
flexDirection: template.layout,
|
13719
14263
|
justifyContent: template.justifyContent,
|
13720
14264
|
alignItems: template.layout === "row" ? "center" : template.alignItems,
|
13721
14265
|
height: fullHeight ? "full" : void 0
|
13722
|
-
}, image && /* @__PURE__ */
|
14266
|
+
}, image && /* @__PURE__ */ React93.createElement("img", {
|
13723
14267
|
src: image,
|
13724
14268
|
alt: imageAlt,
|
13725
14269
|
style: { width: imageWidth ? `${imageWidth}px` : void 0, height: "auto" }
|
13726
|
-
}), /* @__PURE__ */
|
14270
|
+
}), /* @__PURE__ */ React93.createElement(Box.Flex, {
|
13727
14271
|
flexDirection: "column",
|
13728
14272
|
justifyContent: template.justifyContent,
|
13729
14273
|
alignItems: template.alignItems
|
13730
|
-
}, /* @__PURE__ */
|
14274
|
+
}, /* @__PURE__ */ React93.createElement(Typography2.Heading, {
|
13731
14275
|
htmlTag: "h2"
|
13732
|
-
}, title), (description || children) && /* @__PURE__ */
|
14276
|
+
}, title), (description || children) && /* @__PURE__ */ React93.createElement(Box, {
|
13733
14277
|
marginTop: "5"
|
13734
|
-
}, /* @__PURE__ */
|
14278
|
+
}, /* @__PURE__ */ React93.createElement(Typography2.Default, null, children || description)), (secondaryAction || primaryAction) && /* @__PURE__ */ React93.createElement(Box.Flex, {
|
13735
14279
|
marginTop: "7",
|
13736
14280
|
gap: "4",
|
13737
14281
|
justifyContent: "center",
|
13738
14282
|
alignItems: "center",
|
13739
14283
|
flexWrap: "wrap"
|
13740
|
-
}, primaryAction && renderAction({ kind: "primary", action: primaryAction }), secondaryAction && renderAction({ kind: "secondary", action: secondaryAction })), footer && /* @__PURE__ */
|
14284
|
+
}, primaryAction && renderAction({ kind: "primary", action: primaryAction }), secondaryAction && renderAction({ kind: "secondary", action: secondaryAction })), footer && /* @__PURE__ */ React93.createElement(Box, {
|
13741
14285
|
marginTop: "5"
|
13742
|
-
}, /* @__PURE__ */
|
14286
|
+
}, /* @__PURE__ */ React93.createElement(Typography2.Small, {
|
13743
14287
|
color: "default"
|
13744
14288
|
}, footer)))));
|
13745
14289
|
};
|
13746
14290
|
|
13747
14291
|
// src/molecules/Flexbox/FlexboxItem.tsx
|
13748
|
-
import
|
14292
|
+
import React94 from "react";
|
13749
14293
|
var FlexboxItem = Tailwindify(
|
13750
14294
|
({ htmlTag = "div", className, style, children, display, flex, grow, shrink, order, alignSelf }) => {
|
13751
14295
|
const hookStyle = useStyle({
|
@@ -13757,7 +14301,7 @@ var FlexboxItem = Tailwindify(
|
|
13757
14301
|
alignSelf
|
13758
14302
|
});
|
13759
14303
|
const HtmlElement = htmlTag;
|
13760
|
-
return /* @__PURE__ */
|
14304
|
+
return /* @__PURE__ */ React94.createElement(HtmlElement, {
|
13761
14305
|
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
13762
14306
|
className
|
13763
14307
|
}, children);
|
@@ -13765,7 +14309,7 @@ var FlexboxItem = Tailwindify(
|
|
13765
14309
|
);
|
13766
14310
|
|
13767
14311
|
// src/molecules/Grid/GridItem.tsx
|
13768
|
-
import
|
14312
|
+
import React95 from "react";
|
13769
14313
|
var GridItem2 = Tailwindify(
|
13770
14314
|
({
|
13771
14315
|
htmlTag = "div",
|
@@ -13796,7 +14340,7 @@ var GridItem2 = Tailwindify(
|
|
13796
14340
|
gridRowEnd: rowEnd
|
13797
14341
|
});
|
13798
14342
|
const HtmlElement = htmlTag;
|
13799
|
-
return /* @__PURE__ */
|
14343
|
+
return /* @__PURE__ */ React95.createElement(HtmlElement, {
|
13800
14344
|
style: __spreadValues(__spreadValues({}, hookStyle), style),
|
13801
14345
|
className
|
13802
14346
|
}, children);
|
@@ -13804,7 +14348,7 @@ var GridItem2 = Tailwindify(
|
|
13804
14348
|
);
|
13805
14349
|
|
13806
14350
|
// src/molecules/LineClamp/LineClamp.tsx
|
13807
|
-
import
|
14351
|
+
import React96 from "react";
|
13808
14352
|
var LineClamp2 = ({
|
13809
14353
|
lines,
|
13810
14354
|
children,
|
@@ -13813,10 +14357,10 @@ var LineClamp2 = ({
|
|
13813
14357
|
collapseLabel,
|
13814
14358
|
onClampedChange
|
13815
14359
|
}) => {
|
13816
|
-
const ref =
|
13817
|
-
const [clamped, setClamped] =
|
13818
|
-
const [isClampingEnabled, setClampingEnabled] =
|
13819
|
-
|
14360
|
+
const ref = React96.useRef(null);
|
14361
|
+
const [clamped, setClamped] = React96.useState(true);
|
14362
|
+
const [isClampingEnabled, setClampingEnabled] = React96.useState(false);
|
14363
|
+
React96.useEffect(() => {
|
13820
14364
|
var _a, _b;
|
13821
14365
|
const el = ref.current;
|
13822
14366
|
setClampingEnabled(((_a = el == null ? void 0 : el.scrollHeight) != null ? _a : 0) > ((_b = el == null ? void 0 : el.clientHeight) != null ? _b : 0));
|
@@ -13825,28 +14369,28 @@ var LineClamp2 = ({
|
|
13825
14369
|
setClamped(!clamped);
|
13826
14370
|
onClampedChange == null ? void 0 : onClampedChange(!clamped);
|
13827
14371
|
};
|
13828
|
-
return /* @__PURE__ */
|
14372
|
+
return /* @__PURE__ */ React96.createElement("div", {
|
13829
14373
|
className: "Aquarium-LineClamp"
|
13830
|
-
}, /* @__PURE__ */
|
14374
|
+
}, /* @__PURE__ */ React96.createElement(LineClamp, {
|
13831
14375
|
ref,
|
13832
14376
|
lines,
|
13833
14377
|
clamped,
|
13834
14378
|
wordBreak
|
13835
|
-
}, children), expandLabel && isClampingEnabled && /* @__PURE__ */
|
14379
|
+
}, children), expandLabel && isClampingEnabled && /* @__PURE__ */ React96.createElement(Button.Ghost, {
|
13836
14380
|
dense: true,
|
13837
14381
|
onClick: handleClampedChange
|
13838
14382
|
}, clamped ? expandLabel : collapseLabel));
|
13839
14383
|
};
|
13840
14384
|
|
13841
14385
|
// src/molecules/Link/Link.tsx
|
13842
|
-
import
|
14386
|
+
import React98 from "react";
|
13843
14387
|
import classNames11 from "classnames";
|
13844
14388
|
|
13845
14389
|
// src/atoms/Link/Link.tsx
|
13846
|
-
import
|
14390
|
+
import React97 from "react";
|
13847
14391
|
var Link = (_a) => {
|
13848
14392
|
var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
|
13849
|
-
return /* @__PURE__ */
|
14393
|
+
return /* @__PURE__ */ React97.createElement("a", __spreadValues({
|
13850
14394
|
className: classNames(className, linkStyle)
|
13851
14395
|
}, props), children);
|
13852
14396
|
};
|
@@ -13854,27 +14398,27 @@ var Link = (_a) => {
|
|
13854
14398
|
// src/molecules/Link/Link.tsx
|
13855
14399
|
var Link2 = (_a) => {
|
13856
14400
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
13857
|
-
return /* @__PURE__ */
|
14401
|
+
return /* @__PURE__ */ React98.createElement(Link, __spreadValues({
|
13858
14402
|
className: classNames11("Aquarium-Link", className)
|
13859
14403
|
}, props));
|
13860
14404
|
};
|
13861
14405
|
|
13862
14406
|
// src/molecules/List/useStaticInfiniteList.ts
|
13863
|
-
import
|
14407
|
+
import React99 from "react";
|
13864
14408
|
var useStaticInfiniteList = ({
|
13865
14409
|
items,
|
13866
14410
|
pageSize,
|
13867
14411
|
autoReset = true
|
13868
14412
|
}) => {
|
13869
|
-
const [currentPage, setCurrentPage] =
|
14413
|
+
const [currentPage, setCurrentPage] = React99.useState(1);
|
13870
14414
|
const numberOfVisible = currentPage * pageSize;
|
13871
|
-
const next =
|
14415
|
+
const next = React99.useCallback(() => {
|
13872
14416
|
setCurrentPage((page) => page + 1);
|
13873
14417
|
}, [setCurrentPage]);
|
13874
|
-
const reset =
|
14418
|
+
const reset = React99.useCallback(() => {
|
13875
14419
|
setCurrentPage(1);
|
13876
14420
|
}, [setCurrentPage]);
|
13877
|
-
|
14421
|
+
React99.useEffect(() => {
|
13878
14422
|
if (autoReset) {
|
13879
14423
|
setCurrentPage(1);
|
13880
14424
|
}
|
@@ -13889,17 +14433,17 @@ var useStaticInfiniteList = ({
|
|
13889
14433
|
};
|
13890
14434
|
|
13891
14435
|
// src/molecules/ListItem/ListItem.tsx
|
13892
|
-
import
|
14436
|
+
import React100 from "react";
|
13893
14437
|
var ListItem = ({ name, icon, active = false }) => {
|
13894
|
-
return /* @__PURE__ */
|
14438
|
+
return /* @__PURE__ */ React100.createElement(Box.Flex, {
|
13895
14439
|
className: "Aquarium-ListItem",
|
13896
14440
|
alignItems: "center"
|
13897
|
-
}, /* @__PURE__ */
|
14441
|
+
}, /* @__PURE__ */ React100.createElement(Typography2, {
|
13898
14442
|
variant: active ? "small-strong" : "small",
|
13899
14443
|
color: "default",
|
13900
14444
|
htmlTag: "span",
|
13901
14445
|
className: `px-4 py-2 rounded-full ${active ? "bg-default" : "hover:bg-muted"}`
|
13902
|
-
}, /* @__PURE__ */
|
14446
|
+
}, /* @__PURE__ */ React100.createElement("img", {
|
13903
14447
|
src: icon,
|
13904
14448
|
alt: "",
|
13905
14449
|
className: "inline mr-4",
|
@@ -13909,18 +14453,18 @@ var ListItem = ({ name, icon, active = false }) => {
|
|
13909
14453
|
};
|
13910
14454
|
|
13911
14455
|
// src/molecules/Modal/Modal.tsx
|
13912
|
-
import
|
14456
|
+
import React101 from "react";
|
13913
14457
|
import { useDialog as useDialog4 } from "@react-aria/dialog";
|
13914
14458
|
import { Overlay as Overlay4, useModalOverlay as useModalOverlay3 } from "@react-aria/overlays";
|
13915
|
-
import { useId as
|
14459
|
+
import { useId as useId14 } from "@react-aria/utils";
|
13916
14460
|
import { useOverlayTriggerState as useOverlayTriggerState5 } from "@react-stately/overlays";
|
13917
14461
|
import castArray4 from "lodash/castArray";
|
13918
|
-
import
|
14462
|
+
import omit14 from "lodash/omit";
|
13919
14463
|
var import_cross7 = __toESM(require_cross());
|
13920
14464
|
var Modal2 = (_a) => {
|
13921
14465
|
var _b = _a, { closeOnEsc = true } = _b, props = __objRest(_b, ["closeOnEsc"]);
|
13922
14466
|
const { open, onClose, size, portalContainer } = props;
|
13923
|
-
const ref =
|
14467
|
+
const ref = React101.useRef(null);
|
13924
14468
|
const state = useOverlayTriggerState5({ isOpen: open, onOpenChange: (isOpen) => !isOpen && onClose() });
|
13925
14469
|
const { modalProps, underlayProps } = useModalOverlay3(
|
13926
14470
|
{ isDismissable: false, isKeyboardDismissDisabled: !closeOnEsc },
|
@@ -13930,75 +14474,75 @@ var Modal2 = (_a) => {
|
|
13930
14474
|
if (!state.isOpen) {
|
13931
14475
|
return null;
|
13932
14476
|
}
|
13933
|
-
return /* @__PURE__ */
|
14477
|
+
return /* @__PURE__ */ React101.createElement(Overlay4, {
|
13934
14478
|
portalContainer
|
13935
|
-
}, /* @__PURE__ */
|
14479
|
+
}, /* @__PURE__ */ React101.createElement(Modal, {
|
13936
14480
|
className: "Aquarium-Modal",
|
13937
14481
|
open: true
|
13938
|
-
}, /* @__PURE__ */
|
14482
|
+
}, /* @__PURE__ */ React101.createElement(Modal.BackDrop, __spreadValues({}, underlayProps)), /* @__PURE__ */ React101.createElement(ModalWrapper, __spreadValues(__spreadValues({
|
13939
14483
|
ref,
|
13940
14484
|
size
|
13941
14485
|
}, props), modalProps))));
|
13942
14486
|
};
|
13943
|
-
var ModalWrapper =
|
14487
|
+
var ModalWrapper = React101.forwardRef(
|
13944
14488
|
(_a, ref) => {
|
13945
14489
|
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 =
|
14490
|
+
const labelledBy = useId14();
|
14491
|
+
const describedBy = useId14();
|
13948
14492
|
const { dialogProps } = useDialog4(
|
13949
14493
|
{ "role": "dialog", "aria-labelledby": labelledBy, "aria-describedby": describedBy },
|
13950
14494
|
ref
|
13951
14495
|
);
|
13952
|
-
return /* @__PURE__ */
|
14496
|
+
return /* @__PURE__ */ React101.createElement(Modal.Dialog, __spreadProps(__spreadValues(__spreadValues({
|
13953
14497
|
ref
|
13954
14498
|
}, props), dialogProps), {
|
13955
14499
|
tabIndex: -1
|
13956
|
-
}), /* @__PURE__ */
|
14500
|
+
}), /* @__PURE__ */ React101.createElement(Modal.CloseButtonContainer, null, /* @__PURE__ */ React101.createElement(IconButton, {
|
13957
14501
|
"aria-label": "Close",
|
13958
14502
|
icon: import_cross7.default,
|
13959
14503
|
onClick: onClose
|
13960
|
-
})), headerImage !== void 0 && /* @__PURE__ */
|
14504
|
+
})), headerImage !== void 0 && /* @__PURE__ */ React101.createElement(Modal.HeaderImage, {
|
13961
14505
|
backgroundImage: headerImage
|
13962
|
-
}), /* @__PURE__ */
|
14506
|
+
}), /* @__PURE__ */ React101.createElement(Modal.Header, {
|
13963
14507
|
className: tw({ "pb-3": isComponentType(children, ModalTabs) })
|
13964
|
-
}, /* @__PURE__ */
|
14508
|
+
}, /* @__PURE__ */ React101.createElement(Modal.TitleContainer, null, /* @__PURE__ */ React101.createElement(Modal.Title, {
|
13965
14509
|
id: labelledBy
|
13966
|
-
}, title), subtitle && /* @__PURE__ */
|
14510
|
+
}, 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
14511
|
id: describedBy,
|
13968
14512
|
tabIndex: 0,
|
13969
14513
|
noFooter: !(secondaryActions || primaryAction)
|
13970
|
-
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */
|
14514
|
+
}, children), (secondaryActions || primaryAction) && /* @__PURE__ */ React101.createElement(Modal.Footer, null, /* @__PURE__ */ React101.createElement(Modal.Actions, null, secondaryActions && castArray4(secondaryActions).filter(Boolean).map((_a2) => {
|
13971
14515
|
var _b2 = _a2, { text } = _b2, action = __objRest(_b2, ["text"]);
|
13972
|
-
return /* @__PURE__ */
|
14516
|
+
return /* @__PURE__ */ React101.createElement(Button.Secondary, __spreadValues({
|
13973
14517
|
key: text
|
13974
14518
|
}, action), text);
|
13975
|
-
}), primaryAction && /* @__PURE__ */
|
14519
|
+
}), primaryAction && /* @__PURE__ */ React101.createElement(Button.Primary, __spreadValues({
|
13976
14520
|
key: primaryAction.text
|
13977
|
-
},
|
14521
|
+
}, omit14(primaryAction, "text")), primaryAction.text))));
|
13978
14522
|
}
|
13979
14523
|
);
|
13980
14524
|
var ModalTabs = createTabsComponent(
|
13981
14525
|
ModalTab,
|
13982
14526
|
TabItem,
|
13983
14527
|
"ModalTabs",
|
13984
|
-
(children, selected, props) => /* @__PURE__ */
|
14528
|
+
(children, selected, props) => /* @__PURE__ */ React101.createElement(Modal.Body, {
|
13985
14529
|
maxHeight: props.maxHeight
|
13986
|
-
}, /* @__PURE__ */
|
14530
|
+
}, /* @__PURE__ */ React101.createElement(ModalTabContainer, null, children.find(
|
13987
14531
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
13988
14532
|
)))
|
13989
14533
|
);
|
13990
14534
|
|
13991
14535
|
// src/molecules/MultiInput/MultiInput.tsx
|
13992
|
-
import
|
13993
|
-
import { useId as
|
14536
|
+
import React103, { useEffect as useEffect9, useRef as useRef12, useState as useState12 } from "react";
|
14537
|
+
import { useId as useId15 } from "@react-aria/utils";
|
13994
14538
|
import castArray5 from "lodash/castArray";
|
13995
14539
|
import identity from "lodash/identity";
|
13996
|
-
import
|
14540
|
+
import omit15 from "lodash/omit";
|
13997
14541
|
|
13998
14542
|
// src/molecules/MultiInput/InputChip.tsx
|
13999
|
-
import
|
14543
|
+
import React102 from "react";
|
14000
14544
|
var import_smallCross3 = __toESM(require_smallCross());
|
14001
|
-
var InputChip =
|
14545
|
+
var InputChip = React102.forwardRef(
|
14002
14546
|
(_a, ref) => {
|
14003
14547
|
var _b = _a, { invalid = false, disabled, readOnly, className, onClick: _onClick, children } = _b, props = __objRest(_b, ["invalid", "disabled", "readOnly", "className", "onClick", "children"]);
|
14004
14548
|
const onClick = (e) => {
|
@@ -14006,18 +14550,18 @@ var InputChip = React92.forwardRef(
|
|
14006
14550
|
_onClick == null ? void 0 : _onClick(e);
|
14007
14551
|
}
|
14008
14552
|
};
|
14009
|
-
return /* @__PURE__ */
|
14553
|
+
return /* @__PURE__ */ React102.createElement("div", {
|
14010
14554
|
className: classNames(className, "inline-flex align-middle mx-1 items-stretch rounded-sm break-all", {
|
14011
14555
|
"bg-status-danger ": invalid,
|
14012
14556
|
"bg-muted ": !invalid && !disabled,
|
14013
14557
|
"bg-default": disabled
|
14014
14558
|
})
|
14015
|
-
}, /* @__PURE__ */
|
14559
|
+
}, /* @__PURE__ */ React102.createElement("div", {
|
14016
14560
|
className: tw("px-2 py-1")
|
14017
|
-
}, /* @__PURE__ */
|
14561
|
+
}, /* @__PURE__ */ React102.createElement(Typography2, {
|
14018
14562
|
variant: "small",
|
14019
14563
|
color: invalid ? "warning-default" : disabled ? "inactive" : "default"
|
14020
|
-
}, children)), !readOnly && /* @__PURE__ */
|
14564
|
+
}, children)), !readOnly && /* @__PURE__ */ React102.createElement("div", __spreadProps(__spreadValues({
|
14021
14565
|
ref
|
14022
14566
|
}, props), {
|
14023
14567
|
onClick,
|
@@ -14028,7 +14572,7 @@ var InputChip = React92.forwardRef(
|
|
14028
14572
|
}),
|
14029
14573
|
role: "button",
|
14030
14574
|
"aria-label": `Remove ${String(children)}`
|
14031
|
-
}), !disabled && /* @__PURE__ */
|
14575
|
+
}), !disabled && /* @__PURE__ */ React102.createElement(Icon, {
|
14032
14576
|
icon: import_smallCross3.default,
|
14033
14577
|
className: tw({
|
14034
14578
|
"text-danger-default": invalid,
|
@@ -14169,7 +14713,7 @@ var MultiInputBase = (_a) => {
|
|
14169
14713
|
};
|
14170
14714
|
const renderChips = () => items == null ? void 0 : items.map((item, index) => {
|
14171
14715
|
var _a3;
|
14172
|
-
return /* @__PURE__ */
|
14716
|
+
return /* @__PURE__ */ React103.createElement(InputChip, {
|
14173
14717
|
key: `${itemToString(item)}.${index}`,
|
14174
14718
|
invalid: !((_a3 = isItemValid == null ? void 0 : isItemValid(item, index)) != null ? _a3 : true),
|
14175
14719
|
readOnly,
|
@@ -14180,13 +14724,13 @@ var MultiInputBase = (_a) => {
|
|
14180
14724
|
}
|
14181
14725
|
}, itemToString(item));
|
14182
14726
|
});
|
14183
|
-
return /* @__PURE__ */
|
14727
|
+
return /* @__PURE__ */ React103.createElement("div", {
|
14184
14728
|
className: "Aquarium-MultiInputBase"
|
14185
|
-
}, /* @__PURE__ */
|
14729
|
+
}, /* @__PURE__ */ React103.createElement(Select.InputContainer, {
|
14186
14730
|
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default"
|
14187
|
-
}, /* @__PURE__ */
|
14731
|
+
}, /* @__PURE__ */ React103.createElement("div", {
|
14188
14732
|
className: "grow inline-flex flex-row flex-wrap gap-y-2"
|
14189
|
-
}, inline && renderChips(), /* @__PURE__ */
|
14733
|
+
}, inline && renderChips(), /* @__PURE__ */ React103.createElement(Select.Input, __spreadProps(__spreadValues({
|
14190
14734
|
ref: inputRef,
|
14191
14735
|
id: id != null ? id : name,
|
14192
14736
|
name,
|
@@ -14204,11 +14748,11 @@ var MultiInputBase = (_a) => {
|
|
14204
14748
|
onFocus: handleFocus,
|
14205
14749
|
onBlur: handleBlur,
|
14206
14750
|
autoComplete: "off"
|
14207
|
-
}))), endAdornment && /* @__PURE__ */
|
14751
|
+
}))), endAdornment && /* @__PURE__ */ React103.createElement(InputAdornment, null, endAdornment)), !inline && /* @__PURE__ */ React103.createElement("div", {
|
14208
14752
|
className: tw("flex flex-row flex-wrap gap-y-2 mt-2")
|
14209
14753
|
}, renderChips()));
|
14210
14754
|
};
|
14211
|
-
var BaseMultiInputSkeleton = () => /* @__PURE__ */
|
14755
|
+
var BaseMultiInputSkeleton = () => /* @__PURE__ */ React103.createElement(Skeleton, {
|
14212
14756
|
height: 38
|
14213
14757
|
});
|
14214
14758
|
MultiInputBase.Skeleton = BaseMultiInputSkeleton;
|
@@ -14220,13 +14764,13 @@ var MultiInput = (props) => {
|
|
14220
14764
|
var _a2;
|
14221
14765
|
setValue((_a2 = props.value) != null ? _a2 : []);
|
14222
14766
|
}, [JSON.stringify(props.value)]);
|
14223
|
-
const defaultId =
|
14767
|
+
const defaultId = useId15();
|
14224
14768
|
const id = (_e = (_d = props.id) != null ? _d : props.name) != null ? _e : defaultId;
|
14225
|
-
const errorMessageId =
|
14769
|
+
const errorMessageId = useId15();
|
14226
14770
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
14227
14771
|
const labelControlProps = getLabelControlProps(props);
|
14228
|
-
const baseProps =
|
14229
|
-
return /* @__PURE__ */
|
14772
|
+
const baseProps = omit15(props, Object.keys(labelControlProps));
|
14773
|
+
return /* @__PURE__ */ React103.createElement(LabelControl, __spreadProps(__spreadValues({
|
14230
14774
|
id: `${id}-label`,
|
14231
14775
|
htmlFor: `${id}-input`,
|
14232
14776
|
messageId: errorMessageId
|
@@ -14234,7 +14778,7 @@ var MultiInput = (props) => {
|
|
14234
14778
|
length: value.length,
|
14235
14779
|
maxLength,
|
14236
14780
|
className: "Aquarium-MultiInput"
|
14237
|
-
}), /* @__PURE__ */
|
14781
|
+
}), /* @__PURE__ */ React103.createElement(MultiInputBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
14238
14782
|
id: `${id}-input`,
|
14239
14783
|
onChange: (value2) => {
|
14240
14784
|
var _a2;
|
@@ -14246,20 +14790,20 @@ var MultiInput = (props) => {
|
|
14246
14790
|
valid: props.valid
|
14247
14791
|
})));
|
14248
14792
|
};
|
14249
|
-
var MultiInputSkeleton = () => /* @__PURE__ */
|
14793
|
+
var MultiInputSkeleton = () => /* @__PURE__ */ React103.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React103.createElement(MultiInputBase.Skeleton, null));
|
14250
14794
|
MultiInput.Skeleton = MultiInputSkeleton;
|
14251
14795
|
MultiInput.Skeleton.displayName = "MultiInput.Skeleton";
|
14252
14796
|
|
14253
14797
|
// src/molecules/MultiSelect/MultiSelect.tsx
|
14254
|
-
import
|
14798
|
+
import React104, { useEffect as useEffect10, useRef as useRef13, useState as useState13 } from "react";
|
14255
14799
|
import { ariaHideOutside as ariaHideOutside2 } from "@react-aria/overlays";
|
14256
|
-
import { useId as
|
14800
|
+
import { useId as useId16 } from "@react-aria/utils";
|
14257
14801
|
import { useCombobox as useCombobox2, useMultipleSelection } from "downshift";
|
14258
14802
|
import isArray4 from "lodash/isArray";
|
14259
14803
|
import isEqual from "lodash/isEqual";
|
14260
14804
|
import isNil2 from "lodash/isNil";
|
14261
14805
|
import isObject2 from "lodash/isObject";
|
14262
|
-
import
|
14806
|
+
import omit16 from "lodash/omit";
|
14263
14807
|
import omitBy from "lodash/omitBy";
|
14264
14808
|
import { matchSorter as matchSorter2 } from "match-sorter";
|
14265
14809
|
var isOptionGroup = (option) => {
|
@@ -14397,7 +14941,8 @@ var MultiSelectBase = (_a) => {
|
|
14397
14941
|
break;
|
14398
14942
|
}
|
14399
14943
|
}
|
14400
|
-
}
|
14944
|
+
},
|
14945
|
+
scrollIntoView: (node, _menuNode) => node.scrollIntoView({ block: "nearest" })
|
14401
14946
|
});
|
14402
14947
|
const state = {
|
14403
14948
|
isOpen,
|
@@ -14411,16 +14956,16 @@ var MultiSelectBase = (_a) => {
|
|
14411
14956
|
return ariaHideOutside2([inputRef.current, popoverRef.current]);
|
14412
14957
|
}
|
14413
14958
|
}, [state.isOpen, inputRef, popoverRef]);
|
14414
|
-
const renderItem = (item, index) => /* @__PURE__ */
|
14959
|
+
const renderItem = (item, index) => /* @__PURE__ */ React104.createElement(Select.Item, __spreadValues({
|
14415
14960
|
key: itemToString(item),
|
14416
14961
|
highlighted: index === highlightedIndex,
|
14417
14962
|
selected: selectedItems.includes(item)
|
14418
14963
|
}, getItemProps({ item, index })), renderOption(item));
|
14419
|
-
const renderGroup = (group) => group.options.length ? /* @__PURE__ */
|
14964
|
+
const renderGroup = (group) => group.options.length ? /* @__PURE__ */ React104.createElement(React104.Fragment, {
|
14420
14965
|
key: group.label
|
14421
|
-
}, /* @__PURE__ */
|
14966
|
+
}, /* @__PURE__ */ React104.createElement(Select.Group, null, group.label), group.options.map((opt) => renderItem(opt, flattenedOptions.indexOf(opt)))) : null;
|
14422
14967
|
const renderChips = () => {
|
14423
|
-
return selectedItems.map((selectedItem, index) => /* @__PURE__ */
|
14968
|
+
return selectedItems.map((selectedItem, index) => /* @__PURE__ */ React104.createElement(InputChip, __spreadProps(__spreadValues({
|
14424
14969
|
key: `${itemToString(selectedItem)}.chip`,
|
14425
14970
|
className: tw("mx-0"),
|
14426
14971
|
disabled,
|
@@ -14438,14 +14983,14 @@ var MultiSelectBase = (_a) => {
|
|
14438
14983
|
getDropdownProps({ ref: inputRef, disabled: disabled || readOnly, value: inputValue })
|
14439
14984
|
);
|
14440
14985
|
const menuProps = getMenuProps({ ref: menuRef }, { suppressRefError: !isOpen });
|
14441
|
-
return /* @__PURE__ */
|
14986
|
+
return /* @__PURE__ */ React104.createElement("div", {
|
14442
14987
|
className: classNames("Aquarium-MultiSelectBase", tw("relative"))
|
14443
|
-
}, /* @__PURE__ */
|
14988
|
+
}, /* @__PURE__ */ React104.createElement(Select.InputContainer, {
|
14444
14989
|
ref: targetRef,
|
14445
14990
|
variant: disabled ? "disabled" : !valid ? "error" : readOnly ? "readOnly" : hasFocus ? "focused" : "default"
|
14446
|
-
}, /* @__PURE__ */
|
14991
|
+
}, /* @__PURE__ */ React104.createElement("div", {
|
14447
14992
|
className: "grow inline-flex flex-row flex-wrap gap-2"
|
14448
|
-
}, !hideChips && inline && renderChips(), /* @__PURE__ */
|
14993
|
+
}, !hideChips && inline && renderChips(), /* @__PURE__ */ React104.createElement(Select.Input, __spreadProps(__spreadValues(__spreadValues({
|
14449
14994
|
name,
|
14450
14995
|
placeholder: selectedItems.length === 0 && !readOnly ? placeholder : ""
|
14451
14996
|
}, inputProps), props), {
|
@@ -14464,12 +15009,12 @@ var MultiSelectBase = (_a) => {
|
|
14464
15009
|
setFocus(false);
|
14465
15010
|
(_a3 = inputProps.onBlur) == null ? void 0 : _a3.call(inputProps, e);
|
14466
15011
|
}
|
14467
|
-
}))), !readOnly && /* @__PURE__ */
|
15012
|
+
}))), !readOnly && /* @__PURE__ */ React104.createElement(Select.Toggle, __spreadValues({
|
14468
15013
|
hasFocus,
|
14469
15014
|
isOpen
|
14470
|
-
}, getToggleButtonProps({ disabled })))), !hideChips && !inline && /* @__PURE__ */
|
15015
|
+
}, getToggleButtonProps({ disabled })))), !hideChips && !inline && /* @__PURE__ */ React104.createElement("div", {
|
14471
15016
|
className: tw("flex flex-row flex-wrap gap-2 mt-2")
|
14472
|
-
}, renderChips()), isOpen && /* @__PURE__ */
|
15017
|
+
}, renderChips()), isOpen && /* @__PURE__ */ React104.createElement(PopoverOverlay, {
|
14473
15018
|
ref: popoverRef,
|
14474
15019
|
triggerRef: targetRef,
|
14475
15020
|
state,
|
@@ -14477,13 +15022,13 @@ var MultiSelectBase = (_a) => {
|
|
14477
15022
|
shouldFlip: true,
|
14478
15023
|
isNonModal: true,
|
14479
15024
|
style: { width: (_a2 = targetRef.current) == null ? void 0 : _a2.offsetWidth }
|
14480
|
-
}, /* @__PURE__ */
|
15025
|
+
}, /* @__PURE__ */ React104.createElement(Select.Menu, __spreadValues({
|
14481
15026
|
maxHeight
|
14482
|
-
}, menuProps), hasNoResults && /* @__PURE__ */
|
15027
|
+
}, menuProps), hasNoResults && /* @__PURE__ */ React104.createElement(Select.NoResults, null, emptyState), filteredOptions.map(
|
14483
15028
|
(option, index) => isOptionGroup(option) ? renderGroup(option) : renderItem(option, index)
|
14484
15029
|
))));
|
14485
15030
|
};
|
14486
|
-
var MultiSelectBaseSkeleton = () => /* @__PURE__ */
|
15031
|
+
var MultiSelectBaseSkeleton = () => /* @__PURE__ */ React104.createElement(Skeleton, {
|
14487
15032
|
height: 38
|
14488
15033
|
});
|
14489
15034
|
MultiSelectBase.Skeleton = MultiSelectBaseSkeleton;
|
@@ -14498,19 +15043,19 @@ var MultiSelect = (_a) => {
|
|
14498
15043
|
"emptyState"
|
14499
15044
|
]);
|
14500
15045
|
var _a2;
|
14501
|
-
const defaultId =
|
15046
|
+
const defaultId = useId16();
|
14502
15047
|
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
14503
|
-
const errorMessageId =
|
15048
|
+
const errorMessageId = useId16();
|
14504
15049
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
14505
15050
|
const labelControlProps = getLabelControlProps(props);
|
14506
|
-
const baseProps =
|
14507
|
-
return /* @__PURE__ */
|
15051
|
+
const baseProps = omit16(props, Object.keys(labelControlProps));
|
15052
|
+
return /* @__PURE__ */ React104.createElement(LabelControl, __spreadProps(__spreadValues({
|
14508
15053
|
id: `${id}-label`,
|
14509
15054
|
htmlFor: `${id}-input`,
|
14510
15055
|
messageId: errorMessageId
|
14511
15056
|
}, labelControlProps), {
|
14512
15057
|
className: "Aquarium-MultiSelect"
|
14513
|
-
}), /* @__PURE__ */
|
15058
|
+
}), /* @__PURE__ */ React104.createElement(MultiSelectBase, __spreadProps(__spreadValues(__spreadValues({}, baseProps), errorProps), {
|
14514
15059
|
id,
|
14515
15060
|
options,
|
14516
15061
|
emptyState,
|
@@ -14518,17 +15063,17 @@ var MultiSelect = (_a) => {
|
|
14518
15063
|
valid: props.valid
|
14519
15064
|
})));
|
14520
15065
|
};
|
14521
|
-
var MultiSelectSkeleton = () => /* @__PURE__ */
|
15066
|
+
var MultiSelectSkeleton = () => /* @__PURE__ */ React104.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React104.createElement(MultiSelectBase.Skeleton, null));
|
14522
15067
|
MultiSelect.Skeleton = MultiSelectSkeleton;
|
14523
15068
|
MultiSelect.Skeleton.displayName = "MultiSelect.Skeleton";
|
14524
15069
|
|
14525
15070
|
// src/molecules/NativeSelect/NativeSelect.tsx
|
14526
|
-
import
|
14527
|
-
import { useId as
|
14528
|
-
import
|
15071
|
+
import React105 from "react";
|
15072
|
+
import { useId as useId17 } from "@react-aria/utils";
|
15073
|
+
import omit17 from "lodash/omit";
|
14529
15074
|
import uniqueId from "lodash/uniqueId";
|
14530
15075
|
var import_caretDown2 = __toESM(require_caretDown());
|
14531
|
-
var NativeSelectBase =
|
15076
|
+
var NativeSelectBase = React105.forwardRef(
|
14532
15077
|
(_a, ref) => {
|
14533
15078
|
var _b = _a, { children, disabled = false, required = false, valid = true, readOnly = false } = _b, props = __objRest(_b, ["children", "disabled", "required", "valid", "readOnly"]);
|
14534
15079
|
const placeholderValue = uniqueId("default_value_for_placeholder");
|
@@ -14545,16 +15090,16 @@ var NativeSelectBase = React95.forwardRef(
|
|
14545
15090
|
(_b2 = props.onBlur) == null ? void 0 : _b2.call(props, event);
|
14546
15091
|
}
|
14547
15092
|
};
|
14548
|
-
return /* @__PURE__ */
|
15093
|
+
return /* @__PURE__ */ React105.createElement("span", {
|
14549
15094
|
className: classNames("Aquarium-NativeSelectBase", tw("relative block"))
|
14550
|
-
}, !readOnly && /* @__PURE__ */
|
15095
|
+
}, !readOnly && /* @__PURE__ */ React105.createElement("span", {
|
14551
15096
|
className: tw(
|
14552
15097
|
"absolute right-0 inset-y-0 mr-4 text-inactive flex ml-3 pointer-events-none typography-default-strong mt-4"
|
14553
15098
|
)
|
14554
|
-
}, /* @__PURE__ */
|
15099
|
+
}, /* @__PURE__ */ React105.createElement(Icon, {
|
14555
15100
|
icon: import_caretDown2.default,
|
14556
15101
|
"data-testid": "icon-dropdown"
|
14557
|
-
})), /* @__PURE__ */
|
15102
|
+
})), /* @__PURE__ */ React105.createElement("select", __spreadProps(__spreadValues({
|
14558
15103
|
ref,
|
14559
15104
|
disabled: disabled || readOnly,
|
14560
15105
|
required
|
@@ -14573,32 +15118,32 @@ var NativeSelectBase = React95.forwardRef(
|
|
14573
15118
|
),
|
14574
15119
|
props.className
|
14575
15120
|
)
|
14576
|
-
}), props.placeholder && /* @__PURE__ */
|
15121
|
+
}), props.placeholder && /* @__PURE__ */ React105.createElement("option", {
|
14577
15122
|
value: placeholderValue,
|
14578
15123
|
disabled: true
|
14579
15124
|
}, props.placeholder), children));
|
14580
15125
|
}
|
14581
15126
|
);
|
14582
|
-
NativeSelectBase.Skeleton = () => /* @__PURE__ */
|
15127
|
+
NativeSelectBase.Skeleton = () => /* @__PURE__ */ React105.createElement(Skeleton, {
|
14583
15128
|
height: 38
|
14584
15129
|
});
|
14585
|
-
var NativeSelect =
|
15130
|
+
var NativeSelect = React105.forwardRef(
|
14586
15131
|
(_a, ref) => {
|
14587
15132
|
var _b = _a, { readOnly } = _b, props = __objRest(_b, ["readOnly"]);
|
14588
15133
|
var _a2;
|
14589
|
-
const defaultId =
|
15134
|
+
const defaultId = useId17();
|
14590
15135
|
const id = (_a2 = props.id) != null ? _a2 : defaultId;
|
14591
|
-
const errorMessageId =
|
15136
|
+
const errorMessageId = useId17();
|
14592
15137
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
14593
15138
|
const _b2 = getLabelControlProps(props), { "data-testid": dataTestId } = _b2, labelControlProps = __objRest(_b2, ["data-testid"]);
|
14594
|
-
const baseProps =
|
14595
|
-
return /* @__PURE__ */
|
15139
|
+
const baseProps = omit17(props, Object.keys(labelControlProps));
|
15140
|
+
return /* @__PURE__ */ React105.createElement(LabelControl, __spreadProps(__spreadValues({
|
14596
15141
|
id: `${id}-label`,
|
14597
15142
|
htmlFor: id,
|
14598
15143
|
messageId: errorMessageId
|
14599
15144
|
}, labelControlProps), {
|
14600
15145
|
className: "Aquarium-NativeSelect"
|
14601
|
-
}), /* @__PURE__ */
|
15146
|
+
}), /* @__PURE__ */ React105.createElement(NativeSelectBase, __spreadProps(__spreadValues(__spreadValues({
|
14602
15147
|
ref
|
14603
15148
|
}, baseProps), errorProps), {
|
14604
15149
|
id,
|
@@ -14612,63 +15157,63 @@ var NativeSelect = React95.forwardRef(
|
|
14612
15157
|
}
|
14613
15158
|
);
|
14614
15159
|
NativeSelect.displayName = "NativeSelect";
|
14615
|
-
var Option =
|
15160
|
+
var Option = React105.forwardRef((_a, ref) => {
|
14616
15161
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
14617
|
-
return /* @__PURE__ */
|
15162
|
+
return /* @__PURE__ */ React105.createElement("option", __spreadValues({
|
14618
15163
|
ref
|
14619
15164
|
}, props), children);
|
14620
15165
|
});
|
14621
15166
|
Option.displayName = "Option";
|
14622
|
-
var NativeSelectSkeleton = () => /* @__PURE__ */
|
15167
|
+
var NativeSelectSkeleton = () => /* @__PURE__ */ React105.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React105.createElement(NativeSelectBase.Skeleton, null), /* @__PURE__ */ React105.createElement("div", {
|
14623
15168
|
style: { height: "1px" }
|
14624
15169
|
}));
|
14625
15170
|
NativeSelect.Skeleton = NativeSelectSkeleton;
|
14626
15171
|
NativeSelect.Skeleton.displayName = "NativeSelect.Skeleton";
|
14627
15172
|
|
14628
15173
|
// src/molecules/Navigation/Navigation.tsx
|
14629
|
-
import
|
15174
|
+
import React107 from "react";
|
14630
15175
|
import classNames12 from "classnames";
|
14631
15176
|
|
14632
15177
|
// src/atoms/Navigation/Navigation.tsx
|
14633
|
-
import
|
15178
|
+
import React106 from "react";
|
14634
15179
|
var Navigation = (_a) => {
|
14635
15180
|
var _b = _a, { className, children } = _b, rest = __objRest(_b, ["className", "children"]);
|
14636
|
-
return /* @__PURE__ */
|
15181
|
+
return /* @__PURE__ */ React106.createElement("nav", {
|
14637
15182
|
className: classNames(tw("bg-muted h-full"))
|
14638
|
-
}, /* @__PURE__ */
|
15183
|
+
}, /* @__PURE__ */ React106.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
14639
15184
|
className: classNames(tw("flex flex-col h-full"), className),
|
14640
15185
|
role: "menubar"
|
14641
15186
|
}), children));
|
14642
15187
|
};
|
14643
15188
|
var Header = (_a) => {
|
14644
15189
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14645
|
-
return /* @__PURE__ */
|
15190
|
+
return /* @__PURE__ */ React106.createElement("li", __spreadProps(__spreadValues({}, rest), {
|
14646
15191
|
role: "presentation",
|
14647
15192
|
className: classNames(tw("px-6 py-5"), className)
|
14648
15193
|
}));
|
14649
15194
|
};
|
14650
15195
|
var Footer = (_a) => {
|
14651
15196
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14652
|
-
return /* @__PURE__ */
|
15197
|
+
return /* @__PURE__ */ React106.createElement("li", __spreadProps(__spreadValues({}, rest), {
|
14653
15198
|
role: "presentation",
|
14654
15199
|
className: classNames(tw("px-6 py-5 mt-auto"), className)
|
14655
15200
|
}));
|
14656
15201
|
};
|
14657
15202
|
var Section2 = (_a) => {
|
14658
15203
|
var _b = _a, { title, className } = _b, rest = __objRest(_b, ["title", "className"]);
|
14659
|
-
return /* @__PURE__ */
|
15204
|
+
return /* @__PURE__ */ React106.createElement("li", {
|
14660
15205
|
role: "presentation",
|
14661
15206
|
className: tw("py-5")
|
14662
|
-
}, title && /* @__PURE__ */
|
15207
|
+
}, title && /* @__PURE__ */ React106.createElement("div", {
|
14663
15208
|
className: classNames(className, "py-2 px-6 text-inactive uppercase cursor-default typography-caption")
|
14664
|
-
}, title), /* @__PURE__ */
|
15209
|
+
}, title), /* @__PURE__ */ React106.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
14665
15210
|
role: "group",
|
14666
15211
|
className: classNames(tw("flex flex-col"), className)
|
14667
15212
|
})));
|
14668
15213
|
};
|
14669
15214
|
var Divider3 = (_a) => {
|
14670
15215
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
14671
|
-
return /* @__PURE__ */
|
15216
|
+
return /* @__PURE__ */ React106.createElement("li", __spreadProps(__spreadValues({
|
14672
15217
|
role: "separator"
|
14673
15218
|
}, rest), {
|
14674
15219
|
className: classNames(tw("border-t-2 border-muted"), className)
|
@@ -14676,9 +15221,9 @@ var Divider3 = (_a) => {
|
|
14676
15221
|
};
|
14677
15222
|
var Item5 = (_a) => {
|
14678
15223
|
var _b = _a, { className, active } = _b, rest = __objRest(_b, ["className", "active"]);
|
14679
|
-
return /* @__PURE__ */
|
15224
|
+
return /* @__PURE__ */ React106.createElement("li", {
|
14680
15225
|
role: "presentation"
|
14681
|
-
}, /* @__PURE__ */
|
15226
|
+
}, /* @__PURE__ */ React106.createElement("a", __spreadProps(__spreadValues({}, rest), {
|
14682
15227
|
role: "menuitem",
|
14683
15228
|
className: classNames(
|
14684
15229
|
tw("py-3 px-6 hover:bg-default cursor-pointer flex gap-4 items-center typography-small focusable", {
|
@@ -14698,7 +15243,7 @@ Navigation.Divider = Divider3;
|
|
14698
15243
|
// src/molecules/Navigation/Navigation.tsx
|
14699
15244
|
var Navigation2 = (_a) => {
|
14700
15245
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
14701
|
-
return /* @__PURE__ */
|
15246
|
+
return /* @__PURE__ */ React107.createElement(Navigation, __spreadValues({
|
14702
15247
|
className: classNames12("Aquarium-Navigation", className)
|
14703
15248
|
}, props));
|
14704
15249
|
};
|
@@ -14712,11 +15257,11 @@ var Item6 = (_a) => {
|
|
14712
15257
|
"icon",
|
14713
15258
|
"showNotification"
|
14714
15259
|
]);
|
14715
|
-
return /* @__PURE__ */
|
15260
|
+
return /* @__PURE__ */ React107.createElement(Navigation.Item, __spreadValues({}, rest), icon && showNotification && /* @__PURE__ */ React107.createElement(Badge.Notification, null, /* @__PURE__ */ React107.createElement(InlineIcon, {
|
14716
15261
|
icon,
|
14717
15262
|
width: "20px",
|
14718
15263
|
height: "20px"
|
14719
|
-
})), icon && !showNotification && /* @__PURE__ */
|
15264
|
+
})), icon && !showNotification && /* @__PURE__ */ React107.createElement(InlineIcon, {
|
14720
15265
|
icon,
|
14721
15266
|
width: "20px",
|
14722
15267
|
height: "20px"
|
@@ -14729,32 +15274,32 @@ Navigation2.Header = Navigation.Header;
|
|
14729
15274
|
Navigation2.Section = Navigation.Section;
|
14730
15275
|
|
14731
15276
|
// src/molecules/PageHeader/PageHeader.tsx
|
14732
|
-
import
|
15277
|
+
import React109 from "react";
|
14733
15278
|
import castArray6 from "lodash/castArray";
|
14734
15279
|
|
14735
15280
|
// src/atoms/PageHeader/PageHeader.tsx
|
14736
|
-
import
|
15281
|
+
import React108 from "react";
|
14737
15282
|
var PageHeader = (_a) => {
|
14738
15283
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14739
|
-
return /* @__PURE__ */
|
15284
|
+
return /* @__PURE__ */ React108.createElement("div", __spreadValues({
|
14740
15285
|
className: classNames(tw("flex flex-row gap-4 pb-6"), className)
|
14741
15286
|
}, rest), children);
|
14742
15287
|
};
|
14743
15288
|
PageHeader.Container = (_a) => {
|
14744
15289
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14745
|
-
return /* @__PURE__ */
|
15290
|
+
return /* @__PURE__ */ React108.createElement("div", __spreadValues({
|
14746
15291
|
className: classNames(tw("flex flex-col grow gap-0"), className)
|
14747
15292
|
}, rest), children);
|
14748
15293
|
};
|
14749
15294
|
PageHeader.TitleContainer = (_a) => {
|
14750
15295
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14751
|
-
return /* @__PURE__ */
|
15296
|
+
return /* @__PURE__ */ React108.createElement("div", __spreadValues({
|
14752
15297
|
className: classNames(tw("flex flex-col justify-center gap-2"), className)
|
14753
15298
|
}, rest), children);
|
14754
15299
|
};
|
14755
15300
|
PageHeader.Title = (_a) => {
|
14756
15301
|
var _b = _a, { isSubHeader = false, children } = _b, rest = __objRest(_b, ["isSubHeader", "children"]);
|
14757
|
-
return /* @__PURE__ */
|
15302
|
+
return /* @__PURE__ */ React108.createElement(Typography2, __spreadProps(__spreadValues({}, rest), {
|
14758
15303
|
color: "intense",
|
14759
15304
|
variant: isSubHeader ? "subheading" : "heading",
|
14760
15305
|
htmlTag: isSubHeader ? "h2" : "h1"
|
@@ -14762,19 +15307,19 @@ PageHeader.Title = (_a) => {
|
|
14762
15307
|
};
|
14763
15308
|
PageHeader.Subtitle = (_a) => {
|
14764
15309
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
14765
|
-
return /* @__PURE__ */
|
15310
|
+
return /* @__PURE__ */ React108.createElement(Typography2.Small, __spreadProps(__spreadValues({}, rest), {
|
14766
15311
|
color: "default"
|
14767
15312
|
}), children);
|
14768
15313
|
};
|
14769
15314
|
PageHeader.Chips = (_a) => {
|
14770
15315
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14771
|
-
return /* @__PURE__ */
|
15316
|
+
return /* @__PURE__ */ React108.createElement("div", __spreadValues({
|
14772
15317
|
className: classNames(tw("flex gap-3"), className)
|
14773
15318
|
}, rest), children);
|
14774
15319
|
};
|
14775
15320
|
PageHeader.Actions = (_a) => {
|
14776
15321
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14777
|
-
return /* @__PURE__ */
|
15322
|
+
return /* @__PURE__ */ React108.createElement("div", __spreadValues({
|
14778
15323
|
className: classNames(tw("flex flex-row gap-4 self-start"), className)
|
14779
15324
|
}, rest), children);
|
14780
15325
|
};
|
@@ -14798,64 +15343,64 @@ var CommonPageHeader = ({
|
|
14798
15343
|
onMenuOpenChange,
|
14799
15344
|
isSubHeader = false
|
14800
15345
|
}) => {
|
14801
|
-
return /* @__PURE__ */
|
15346
|
+
return /* @__PURE__ */ React109.createElement(PageHeader, {
|
14802
15347
|
className: "Aquarium-PageHeader"
|
14803
|
-
}, /* @__PURE__ */
|
15348
|
+
}, /* @__PURE__ */ React109.createElement(PageHeader.Container, null, breadcrumbs && /* @__PURE__ */ React109.createElement(Box, {
|
14804
15349
|
marginBottom: "3"
|
14805
|
-
}, /* @__PURE__ */
|
15350
|
+
}, /* @__PURE__ */ React109.createElement(Breadcrumbs, null, breadcrumbs)), /* @__PURE__ */ React109.createElement(Spacing, {
|
14806
15351
|
row: true,
|
14807
15352
|
gap: "5"
|
14808
|
-
}, image && /* @__PURE__ */
|
15353
|
+
}, image && /* @__PURE__ */ React109.createElement("img", {
|
14809
15354
|
src: image,
|
14810
15355
|
alt: imageAlt != null ? imageAlt : "",
|
14811
15356
|
className: tw("w-[56px] h-[56px]")
|
14812
|
-
}), /* @__PURE__ */
|
15357
|
+
}), /* @__PURE__ */ React109.createElement(PageHeader.TitleContainer, null, /* @__PURE__ */ React109.createElement(PageHeader.Title, {
|
14813
15358
|
isSubHeader
|
14814
|
-
}, title), chips.length > 0 && /* @__PURE__ */
|
15359
|
+
}, title), chips.length > 0 && /* @__PURE__ */ React109.createElement(PageHeader.Chips, null, chips.map((chip) => /* @__PURE__ */ React109.createElement(Chip2, {
|
14815
15360
|
key: chip,
|
14816
15361
|
dense: true,
|
14817
15362
|
text: chip
|
14818
|
-
}))), subtitle && /* @__PURE__ */
|
15363
|
+
}))), 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
15364
|
alignItems: "center"
|
14820
|
-
}, /* @__PURE__ */
|
15365
|
+
}, /* @__PURE__ */ React109.createElement(DropdownMenu2, {
|
14821
15366
|
placement: defaultContextualMenuPlacement,
|
14822
15367
|
onAction: (action) => onAction == null ? void 0 : onAction(action),
|
14823
15368
|
onOpenChange: onMenuOpenChange
|
14824
|
-
}, /* @__PURE__ */
|
15369
|
+
}, /* @__PURE__ */ React109.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React109.createElement(Button.Icon, {
|
14825
15370
|
"aria-label": menuAriaLabel,
|
14826
15371
|
icon: import_more5.default
|
14827
15372
|
})), menu)), secondaryActions && castArray6(secondaryActions).filter(Boolean).map((secondaryAction2) => renderAction({ kind: "secondary", action: secondaryAction2 })), primaryAction && renderAction({ kind: "primary", action: primaryAction })));
|
14828
15373
|
};
|
14829
|
-
var PageHeader2 = (props) => /* @__PURE__ */
|
15374
|
+
var PageHeader2 = (props) => /* @__PURE__ */ React109.createElement(CommonPageHeader, __spreadValues({}, props));
|
14830
15375
|
PageHeader2.displayName = "PageHeader";
|
14831
|
-
var SubHeader = (props) => /* @__PURE__ */
|
15376
|
+
var SubHeader = (props) => /* @__PURE__ */ React109.createElement(CommonPageHeader, __spreadProps(__spreadValues({}, props), {
|
14832
15377
|
isSubHeader: true
|
14833
15378
|
}));
|
14834
15379
|
PageHeader2.SubHeader = SubHeader;
|
14835
15380
|
PageHeader2.SubHeader.displayName = "PageHeader.SubHeader";
|
14836
15381
|
|
14837
15382
|
// src/molecules/PopoverDialog/PopoverDialog.tsx
|
14838
|
-
import
|
14839
|
-
import
|
15383
|
+
import React111 from "react";
|
15384
|
+
import omit18 from "lodash/omit";
|
14840
15385
|
|
14841
15386
|
// src/atoms/PopoverDialog/PopoverDialog.tsx
|
14842
|
-
import
|
15387
|
+
import React110 from "react";
|
14843
15388
|
var Header2 = (_a) => {
|
14844
15389
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14845
|
-
return /* @__PURE__ */
|
15390
|
+
return /* @__PURE__ */ React110.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14846
15391
|
className: classNames(tw("p-5 gap-3 flex items-center"), className)
|
14847
15392
|
}), children);
|
14848
15393
|
};
|
14849
15394
|
var Title2 = (_a) => {
|
14850
15395
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14851
|
-
return /* @__PURE__ */
|
15396
|
+
return /* @__PURE__ */ React110.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
14852
15397
|
htmlTag: "h1",
|
14853
15398
|
variant: "small-strong"
|
14854
15399
|
}), children);
|
14855
15400
|
};
|
14856
15401
|
var Body = (_a) => {
|
14857
15402
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14858
|
-
return /* @__PURE__ */
|
15403
|
+
return /* @__PURE__ */ React110.createElement(Typography, __spreadProps(__spreadValues({}, rest), {
|
14859
15404
|
htmlTag: "div",
|
14860
15405
|
variant: "caption",
|
14861
15406
|
className: classNames(tw("px-5 overflow-y-auto"), className)
|
@@ -14863,13 +15408,13 @@ var Body = (_a) => {
|
|
14863
15408
|
};
|
14864
15409
|
var Footer2 = (_a) => {
|
14865
15410
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14866
|
-
return /* @__PURE__ */
|
15411
|
+
return /* @__PURE__ */ React110.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14867
15412
|
className: classNames(tw("p-5"), className)
|
14868
15413
|
}), children);
|
14869
15414
|
};
|
14870
15415
|
var Actions2 = (_a) => {
|
14871
15416
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14872
|
-
return /* @__PURE__ */
|
15417
|
+
return /* @__PURE__ */ React110.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14873
15418
|
className: classNames(tw("flex gap-4"), className)
|
14874
15419
|
}), children);
|
14875
15420
|
};
|
@@ -14885,29 +15430,29 @@ var PopoverDialog = {
|
|
14885
15430
|
var PopoverDialog2 = ({ placement, open, title, secondaryAction, primaryAction, children }) => {
|
14886
15431
|
const wrapPromptWithBody = (child) => {
|
14887
15432
|
if (isComponentType(child, PopoverDialog2.Prompt)) {
|
14888
|
-
return /* @__PURE__ */
|
15433
|
+
return /* @__PURE__ */ React111.createElement(Popover3.Panel, {
|
14889
15434
|
className: classNames("Aquarium-PopoverDialog", tw("max-w-[300px]"))
|
14890
|
-
}, /* @__PURE__ */
|
15435
|
+
}, /* @__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
15436
|
kind: "secondary-ghost",
|
14892
15437
|
key: secondaryAction.text,
|
14893
15438
|
dense: true
|
14894
|
-
},
|
15439
|
+
}, omit18(secondaryAction, "text")), secondaryAction.text), /* @__PURE__ */ React111.createElement(Popover3.Button, __spreadValues({
|
14895
15440
|
kind: "ghost",
|
14896
15441
|
key: primaryAction.text,
|
14897
15442
|
dense: true
|
14898
|
-
},
|
15443
|
+
}, omit18(primaryAction, "text")), primaryAction.text))));
|
14899
15444
|
}
|
14900
15445
|
return child;
|
14901
15446
|
};
|
14902
|
-
return /* @__PURE__ */
|
15447
|
+
return /* @__PURE__ */ React111.createElement(Popover3, {
|
14903
15448
|
type: "dialog",
|
14904
15449
|
isOpen: open,
|
14905
15450
|
placement,
|
14906
15451
|
containFocus: true
|
14907
|
-
},
|
15452
|
+
}, React111.Children.map(children, wrapPromptWithBody));
|
14908
15453
|
};
|
14909
|
-
PopoverDialog2.Trigger =
|
14910
|
-
var Prompt = ({ children }) => /* @__PURE__ */
|
15454
|
+
PopoverDialog2.Trigger = Popover3.Trigger;
|
15455
|
+
var Prompt = ({ children }) => /* @__PURE__ */ React111.createElement(PopoverDialog.Body, null, children);
|
14911
15456
|
Prompt.displayName = "PopoverDialog.Prompt";
|
14912
15457
|
PopoverDialog2.Prompt = Prompt;
|
14913
15458
|
|
@@ -14916,14 +15461,14 @@ import { createPortal } from "react-dom";
|
|
14916
15461
|
var Portal = ({ children, to }) => createPortal(children, to);
|
14917
15462
|
|
14918
15463
|
// src/molecules/ProgressBar/ProgressBar.tsx
|
14919
|
-
import
|
15464
|
+
import React113 from "react";
|
14920
15465
|
|
14921
15466
|
// src/atoms/ProgressBar/ProgressBar.tsx
|
14922
|
-
import
|
15467
|
+
import React112 from "react";
|
14923
15468
|
import clamp3 from "lodash/clamp";
|
14924
15469
|
var ProgressBar = (_a) => {
|
14925
15470
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
14926
|
-
return /* @__PURE__ */
|
15471
|
+
return /* @__PURE__ */ React112.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14927
15472
|
className: classNames(tw("relative flex items-center w-full bg-muted h-2 rounded-full overflow-hidden"), className)
|
14928
15473
|
}), children);
|
14929
15474
|
};
|
@@ -14936,7 +15481,7 @@ var STATUS_COLORS = {
|
|
14936
15481
|
ProgressBar.Indicator = (_a) => {
|
14937
15482
|
var _b = _a, { min, max, value, "aria-label": ariaLabel, status, className } = _b, rest = __objRest(_b, ["min", "max", "value", "aria-label", "status", "className"]);
|
14938
15483
|
const completedPercentage = clamp3((value - min) / (max - min) * 100, 0, 100);
|
14939
|
-
return /* @__PURE__ */
|
15484
|
+
return /* @__PURE__ */ React112.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
14940
15485
|
className: classNames(
|
14941
15486
|
tw("h-2 rounded-full transition-all ease-in-out delay-150"),
|
14942
15487
|
STATUS_COLORS[status],
|
@@ -14952,11 +15497,11 @@ ProgressBar.Indicator = (_a) => {
|
|
14952
15497
|
};
|
14953
15498
|
ProgressBar.Labels = (_a) => {
|
14954
15499
|
var _b = _a, { children, startLabel, endLabel, className } = _b, rest = __objRest(_b, ["children", "startLabel", "endLabel", "className"]);
|
14955
|
-
return /* @__PURE__ */
|
15500
|
+
return /* @__PURE__ */ React112.createElement("div", {
|
14956
15501
|
className: classNames(tw("flex flex-row"), className)
|
14957
|
-
}, /* @__PURE__ */
|
15502
|
+
}, /* @__PURE__ */ React112.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
14958
15503
|
className: tw("grow text-default typography-caption")
|
14959
|
-
}), startLabel), /* @__PURE__ */
|
15504
|
+
}), startLabel), /* @__PURE__ */ React112.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
14960
15505
|
className: tw("grow text-default typography-caption text-right")
|
14961
15506
|
}), endLabel));
|
14962
15507
|
};
|
@@ -14974,7 +15519,7 @@ var ProgressBar2 = (props) => {
|
|
14974
15519
|
if (min > max) {
|
14975
15520
|
throw new Error("`min` value provided to `ProgressBar` is greater than `max` value.");
|
14976
15521
|
}
|
14977
|
-
const progress = /* @__PURE__ */
|
15522
|
+
const progress = /* @__PURE__ */ React113.createElement(ProgressBar, null, /* @__PURE__ */ React113.createElement(ProgressBar.Indicator, {
|
14978
15523
|
status: value === max ? completedStatus : progresStatus,
|
14979
15524
|
min,
|
14980
15525
|
max,
|
@@ -14984,15 +15529,15 @@ var ProgressBar2 = (props) => {
|
|
14984
15529
|
if (props.dense) {
|
14985
15530
|
return progress;
|
14986
15531
|
}
|
14987
|
-
return /* @__PURE__ */
|
15532
|
+
return /* @__PURE__ */ React113.createElement("div", {
|
14988
15533
|
className: "Aquarium-ProgressBar"
|
14989
|
-
}, progress, /* @__PURE__ */
|
15534
|
+
}, progress, /* @__PURE__ */ React113.createElement(ProgressBar.Labels, {
|
14990
15535
|
className: tw("py-2"),
|
14991
15536
|
startLabel: props.startLabel,
|
14992
15537
|
endLabel: props.endLabel
|
14993
15538
|
}));
|
14994
15539
|
};
|
14995
|
-
var ProgressBarSkeleton = () => /* @__PURE__ */
|
15540
|
+
var ProgressBarSkeleton = () => /* @__PURE__ */ React113.createElement(Skeleton, {
|
14996
15541
|
height: 4,
|
14997
15542
|
display: "block"
|
14998
15543
|
});
|
@@ -15000,13 +15545,13 @@ ProgressBar2.Skeleton = ProgressBarSkeleton;
|
|
15000
15545
|
ProgressBar2.Skeleton.displayName = "ProgressBar.Skeleton";
|
15001
15546
|
|
15002
15547
|
// src/molecules/RadioButton/RadioButton.tsx
|
15003
|
-
import
|
15004
|
-
var RadioButton2 =
|
15548
|
+
import React114 from "react";
|
15549
|
+
var RadioButton2 = React114.forwardRef(
|
15005
15550
|
(_a, ref) => {
|
15006
15551
|
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
15552
|
var _a2;
|
15008
15553
|
const isChecked = (_a2 = props.checked) != null ? _a2 : props.defaultChecked;
|
15009
|
-
return !readOnly || isChecked ? /* @__PURE__ */
|
15554
|
+
return !readOnly || isChecked ? /* @__PURE__ */ React114.createElement(ControlLabel, {
|
15010
15555
|
htmlFor: id,
|
15011
15556
|
label: children,
|
15012
15557
|
"aria-label": ariaLabel,
|
@@ -15015,7 +15560,7 @@ var RadioButton2 = React104.forwardRef(
|
|
15015
15560
|
disabled,
|
15016
15561
|
style: { gap: "0 8px" },
|
15017
15562
|
className: "Aquarium-RadioButton"
|
15018
|
-
}, !readOnly && /* @__PURE__ */
|
15563
|
+
}, !readOnly && /* @__PURE__ */ React114.createElement(RadioButton, __spreadProps(__spreadValues({
|
15019
15564
|
id,
|
15020
15565
|
ref,
|
15021
15566
|
name
|
@@ -15026,12 +15571,12 @@ var RadioButton2 = React104.forwardRef(
|
|
15026
15571
|
}
|
15027
15572
|
);
|
15028
15573
|
RadioButton2.displayName = "RadioButton";
|
15029
|
-
var RadioButtonSkeleton = () => /* @__PURE__ */
|
15574
|
+
var RadioButtonSkeleton = () => /* @__PURE__ */ React114.createElement("div", {
|
15030
15575
|
className: tw("flex gap-3")
|
15031
|
-
}, /* @__PURE__ */
|
15576
|
+
}, /* @__PURE__ */ React114.createElement(Skeleton, {
|
15032
15577
|
height: 20,
|
15033
15578
|
width: 20
|
15034
|
-
}), /* @__PURE__ */
|
15579
|
+
}), /* @__PURE__ */ React114.createElement(Skeleton, {
|
15035
15580
|
height: 20,
|
15036
15581
|
width: 150
|
15037
15582
|
}));
|
@@ -15039,10 +15584,10 @@ RadioButton2.Skeleton = RadioButtonSkeleton;
|
|
15039
15584
|
RadioButton2.Skeleton.displayName = "RadioButton.Skeleton";
|
15040
15585
|
|
15041
15586
|
// src/molecules/RadioButtonGroup/RadioButtonGroup.tsx
|
15042
|
-
import
|
15043
|
-
import { useId as
|
15587
|
+
import React115 from "react";
|
15588
|
+
import { useId as useId18 } from "@react-aria/utils";
|
15044
15589
|
var isRadioButton = (c) => {
|
15045
|
-
return
|
15590
|
+
return React115.isValidElement(c) && c.type === RadioButton2;
|
15046
15591
|
};
|
15047
15592
|
var RadioButtonGroup = (_a) => {
|
15048
15593
|
var _b = _a, {
|
@@ -15065,8 +15610,8 @@ var RadioButtonGroup = (_a) => {
|
|
15065
15610
|
"children"
|
15066
15611
|
]);
|
15067
15612
|
var _a2;
|
15068
|
-
const [value, setValue] =
|
15069
|
-
const errorMessageId =
|
15613
|
+
const [value, setValue] = React115.useState((_a2 = _value != null ? _value : defaultValue) != null ? _a2 : "");
|
15614
|
+
const errorMessageId = useId18();
|
15070
15615
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
15071
15616
|
const labelControlProps = getLabelControlProps(props);
|
15072
15617
|
if (_value !== void 0 && _value !== value) {
|
@@ -15076,14 +15621,14 @@ var RadioButtonGroup = (_a) => {
|
|
15076
15621
|
setValue(e.target.value);
|
15077
15622
|
onChange == null ? void 0 : onChange(e.target.value);
|
15078
15623
|
};
|
15079
|
-
const content =
|
15624
|
+
const content = React115.Children.map(children, (c) => {
|
15080
15625
|
var _a3, _b2, _c;
|
15081
15626
|
if (!isRadioButton(c)) {
|
15082
15627
|
return null;
|
15083
15628
|
}
|
15084
15629
|
const defaultChecked = defaultValue === void 0 ? void 0 : c.props.value === defaultValue;
|
15085
15630
|
const checked = value === void 0 ? void 0 : c.props.value === value;
|
15086
|
-
return
|
15631
|
+
return React115.cloneElement(c, {
|
15087
15632
|
name,
|
15088
15633
|
defaultChecked: (_a3 = c.props.defaultChecked) != null ? _a3 : defaultChecked,
|
15089
15634
|
checked: (_b2 = c.props.checked) != null ? _b2 : checked,
|
@@ -15092,13 +15637,13 @@ var RadioButtonGroup = (_a) => {
|
|
15092
15637
|
readOnly
|
15093
15638
|
});
|
15094
15639
|
});
|
15095
|
-
return /* @__PURE__ */
|
15640
|
+
return /* @__PURE__ */ React115.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({
|
15096
15641
|
fieldset: true
|
15097
15642
|
}, labelControlProps), errorProps), {
|
15098
15643
|
className: "Aquarium-RadioButtonGroup"
|
15099
|
-
}), cols && /* @__PURE__ */
|
15644
|
+
}), cols && /* @__PURE__ */ React115.createElement(InputGroup, {
|
15100
15645
|
cols
|
15101
|
-
}, content), !cols && /* @__PURE__ */
|
15646
|
+
}, content), !cols && /* @__PURE__ */ React115.createElement(Flexbox, {
|
15102
15647
|
direction,
|
15103
15648
|
alignItems: "flex-start",
|
15104
15649
|
colGap: "8",
|
@@ -15107,12 +15652,12 @@ var RadioButtonGroup = (_a) => {
|
|
15107
15652
|
}, content));
|
15108
15653
|
};
|
15109
15654
|
var RadioButtonGroupSkeleton = ({ direction = "row", options = 2 }) => {
|
15110
|
-
return /* @__PURE__ */
|
15655
|
+
return /* @__PURE__ */ React115.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React115.createElement("div", {
|
15111
15656
|
className: tw("flex flex-wrap", {
|
15112
15657
|
"flex-row gap-8": direction === "row",
|
15113
15658
|
"flex-col gap-2": direction === "column"
|
15114
15659
|
})
|
15115
|
-
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */
|
15660
|
+
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */ React115.createElement(RadioButton2.Skeleton, {
|
15116
15661
|
key
|
15117
15662
|
}))));
|
15118
15663
|
};
|
@@ -15120,25 +15665,25 @@ RadioButtonGroup.Skeleton = RadioButtonGroupSkeleton;
|
|
15120
15665
|
RadioButtonGroup.Skeleton.displayName = "RadioButtonGroup.Skeleton";
|
15121
15666
|
|
15122
15667
|
// src/molecules/Section/Section.tsx
|
15123
|
-
import
|
15668
|
+
import React120, { useRef as useRef14 } from "react";
|
15124
15669
|
import { useButton as useButton4 } from "@react-aria/button";
|
15125
|
-
import { useId as
|
15670
|
+
import { useId as useId19 } from "@react-aria/utils";
|
15126
15671
|
import { animated as animated6, useSpring as useSpring5 } from "@react-spring/web";
|
15127
15672
|
import castArray7 from "lodash/castArray";
|
15128
15673
|
import isUndefined9 from "lodash/isUndefined";
|
15129
15674
|
|
15130
15675
|
// src/molecules/Switch/Switch.tsx
|
15131
|
-
import
|
15676
|
+
import React117 from "react";
|
15132
15677
|
|
15133
15678
|
// src/atoms/Switch/Switch.tsx
|
15134
|
-
import
|
15679
|
+
import React116 from "react";
|
15135
15680
|
var import_ban2 = __toESM(require_ban());
|
15136
|
-
var Switch =
|
15681
|
+
var Switch = React116.forwardRef(
|
15137
15682
|
(_a, ref) => {
|
15138
15683
|
var _b = _a, { id, children, name, disabled = false, readOnly = false } = _b, props = __objRest(_b, ["id", "children", "name", "disabled", "readOnly"]);
|
15139
|
-
return /* @__PURE__ */
|
15684
|
+
return /* @__PURE__ */ React116.createElement("span", {
|
15140
15685
|
className: tw("relative inline-flex justify-center items-center self-center group")
|
15141
|
-
}, /* @__PURE__ */
|
15686
|
+
}, /* @__PURE__ */ React116.createElement("input", __spreadProps(__spreadValues({
|
15142
15687
|
id,
|
15143
15688
|
ref,
|
15144
15689
|
type: "checkbox",
|
@@ -15157,7 +15702,7 @@ var Switch = React106.forwardRef(
|
|
15157
15702
|
),
|
15158
15703
|
readOnly,
|
15159
15704
|
disabled
|
15160
|
-
})), /* @__PURE__ */
|
15705
|
+
})), /* @__PURE__ */ React116.createElement("span", {
|
15161
15706
|
className: tw(
|
15162
15707
|
"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
15708
|
"bg-white left-2 peer-checked/switch:left-1 text-inactive peer-checked/switch:text-primary-muted",
|
@@ -15165,7 +15710,7 @@ var Switch = React106.forwardRef(
|
|
15165
15710
|
"shadow-4dp": !disabled
|
15166
15711
|
}
|
15167
15712
|
)
|
15168
|
-
}, disabled && /* @__PURE__ */
|
15713
|
+
}, disabled && /* @__PURE__ */ React116.createElement(Icon, {
|
15169
15714
|
icon: import_ban2.default,
|
15170
15715
|
width: "10px",
|
15171
15716
|
height: "10px"
|
@@ -15174,7 +15719,7 @@ var Switch = React106.forwardRef(
|
|
15174
15719
|
);
|
15175
15720
|
|
15176
15721
|
// src/molecules/Switch/Switch.tsx
|
15177
|
-
var Switch2 =
|
15722
|
+
var Switch2 = React117.forwardRef(
|
15178
15723
|
(_a, ref) => {
|
15179
15724
|
var _b = _a, {
|
15180
15725
|
id,
|
@@ -15197,7 +15742,7 @@ var Switch2 = React107.forwardRef(
|
|
15197
15742
|
]);
|
15198
15743
|
var _a2;
|
15199
15744
|
const isChecked = (_a2 = props.checked) != null ? _a2 : props.defaultChecked;
|
15200
|
-
return !readOnly || isChecked ? /* @__PURE__ */
|
15745
|
+
return !readOnly || isChecked ? /* @__PURE__ */ React117.createElement(ControlLabel, {
|
15201
15746
|
htmlFor: id,
|
15202
15747
|
label: children,
|
15203
15748
|
"aria-label": ariaLabel,
|
@@ -15207,7 +15752,7 @@ var Switch2 = React107.forwardRef(
|
|
15207
15752
|
style: { gap: "0 8px" },
|
15208
15753
|
labelPlacement,
|
15209
15754
|
className: "Aquarium-Switch"
|
15210
|
-
}, !readOnly && /* @__PURE__ */
|
15755
|
+
}, !readOnly && /* @__PURE__ */ React117.createElement(Switch, __spreadProps(__spreadValues({
|
15211
15756
|
id,
|
15212
15757
|
ref,
|
15213
15758
|
name
|
@@ -15218,12 +15763,12 @@ var Switch2 = React107.forwardRef(
|
|
15218
15763
|
}
|
15219
15764
|
);
|
15220
15765
|
Switch2.displayName = "Switch";
|
15221
|
-
var SwitchSkeleton = () => /* @__PURE__ */
|
15766
|
+
var SwitchSkeleton = () => /* @__PURE__ */ React117.createElement("div", {
|
15222
15767
|
className: tw("flex gap-3")
|
15223
|
-
}, /* @__PURE__ */
|
15768
|
+
}, /* @__PURE__ */ React117.createElement(Skeleton, {
|
15224
15769
|
height: 20,
|
15225
15770
|
width: 35
|
15226
|
-
}), /* @__PURE__ */
|
15771
|
+
}), /* @__PURE__ */ React117.createElement(Skeleton, {
|
15227
15772
|
height: 20,
|
15228
15773
|
width: 150
|
15229
15774
|
}));
|
@@ -15231,7 +15776,7 @@ Switch2.Skeleton = SwitchSkeleton;
|
|
15231
15776
|
Switch2.Skeleton.displayName = "Switch.Skeleton ";
|
15232
15777
|
|
15233
15778
|
// src/molecules/TagLabel/TagLabel.tsx
|
15234
|
-
import
|
15779
|
+
import React118 from "react";
|
15235
15780
|
var getVariantClassNames = (variant = "primary") => {
|
15236
15781
|
switch (variant) {
|
15237
15782
|
case "neutral":
|
@@ -15247,7 +15792,7 @@ var getVariantClassNames = (variant = "primary") => {
|
|
15247
15792
|
};
|
15248
15793
|
var TagLabel = (_a) => {
|
15249
15794
|
var _b = _a, { title, dense = false, variant } = _b, rest = __objRest(_b, ["title", "dense", "variant"]);
|
15250
|
-
return /* @__PURE__ */
|
15795
|
+
return /* @__PURE__ */ React118.createElement("span", __spreadProps(__spreadValues({}, rest), {
|
15251
15796
|
className: classNames(
|
15252
15797
|
"Aquarium-TagLabel",
|
15253
15798
|
getVariantClassNames(variant),
|
@@ -15261,19 +15806,25 @@ var TagLabel = (_a) => {
|
|
15261
15806
|
};
|
15262
15807
|
|
15263
15808
|
// src/atoms/Section/Section.tsx
|
15264
|
-
import
|
15809
|
+
import React119 from "react";
|
15265
15810
|
var import_caretUp2 = __toESM(require_caretUp());
|
15266
15811
|
var Section3 = (_a) => {
|
15267
|
-
var _b = _a, {
|
15268
|
-
|
15269
|
-
|
15270
|
-
|
15271
|
-
|
15272
|
-
|
15812
|
+
var _b = _a, {
|
15813
|
+
children,
|
15814
|
+
className
|
15815
|
+
} = _b, rest = __objRest(_b, [
|
15816
|
+
"children",
|
15817
|
+
"className"
|
15818
|
+
]);
|
15819
|
+
return /* @__PURE__ */ React119.createElement(Box, __spreadProps(__spreadValues({
|
15820
|
+
component: "section"
|
15821
|
+
}, rest), {
|
15822
|
+
className: classNames(tw("border border-muted"), className)
|
15823
|
+
}), children);
|
15273
15824
|
};
|
15274
15825
|
Section3.Header = (_a) => {
|
15275
15826
|
var _b = _a, { children, className, expanded } = _b, rest = __objRest(_b, ["children", "className", "expanded"]);
|
15276
|
-
return /* @__PURE__ */
|
15827
|
+
return /* @__PURE__ */ React119.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15277
15828
|
className: classNames(
|
15278
15829
|
tw("px-6 flex gap-5 justify-between items-center h-[72px]", {
|
15279
15830
|
"bg-muted": expanded
|
@@ -15282,10 +15833,10 @@ Section3.Header = (_a) => {
|
|
15282
15833
|
)
|
15283
15834
|
}), children);
|
15284
15835
|
};
|
15285
|
-
Section3.TitleContainer =
|
15836
|
+
Section3.TitleContainer = React119.forwardRef(
|
15286
15837
|
(_a, ref) => {
|
15287
15838
|
var _b = _a, { children, className, collapsible } = _b, rest = __objRest(_b, ["children", "className", "collapsible"]);
|
15288
|
-
return /* @__PURE__ */
|
15839
|
+
return /* @__PURE__ */ React119.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15289
15840
|
ref,
|
15290
15841
|
className: classNames(
|
15291
15842
|
tw("grow grid grid-cols-[auto_1fr] gap-x-3 items-center", {
|
@@ -15296,14 +15847,14 @@ Section3.TitleContainer = React109.forwardRef(
|
|
15296
15847
|
}), children);
|
15297
15848
|
}
|
15298
15849
|
);
|
15299
|
-
Section3.Toggle = (props) => /* @__PURE__ */
|
15850
|
+
Section3.Toggle = (props) => /* @__PURE__ */ React119.createElement(Icon, __spreadProps(__spreadValues({}, props), {
|
15300
15851
|
icon: import_caretUp2.default,
|
15301
15852
|
height: 22,
|
15302
15853
|
width: 22
|
15303
15854
|
}));
|
15304
15855
|
Section3.Title = (_a) => {
|
15305
15856
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
15306
|
-
return /* @__PURE__ */
|
15857
|
+
return /* @__PURE__ */ React119.createElement(Typography2.Large, __spreadProps(__spreadValues({}, rest), {
|
15307
15858
|
htmlTag: "h2",
|
15308
15859
|
color: "intense",
|
15309
15860
|
className: "flex gap-3 items-center"
|
@@ -15311,21 +15862,21 @@ Section3.Title = (_a) => {
|
|
15311
15862
|
};
|
15312
15863
|
Section3.Subtitle = (_a) => {
|
15313
15864
|
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
15314
|
-
return /* @__PURE__ */
|
15865
|
+
return /* @__PURE__ */ React119.createElement(Typography2.Small, __spreadProps(__spreadValues({}, rest), {
|
15315
15866
|
color: "default"
|
15316
15867
|
}), children);
|
15317
15868
|
};
|
15318
15869
|
Section3.Actions = (_a) => {
|
15319
15870
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
15320
|
-
return /* @__PURE__ */
|
15871
|
+
return /* @__PURE__ */ React119.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15321
15872
|
className: classNames(tw("flex gap-4 justify-end"), className)
|
15322
15873
|
}), children);
|
15323
15874
|
};
|
15324
15875
|
Section3.Body = (_a) => {
|
15325
15876
|
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
15326
|
-
return /* @__PURE__ */
|
15877
|
+
return /* @__PURE__ */ React119.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15327
15878
|
className: classNames(tw("p-6"), className)
|
15328
|
-
}), /* @__PURE__ */
|
15879
|
+
}), /* @__PURE__ */ React119.createElement(Typography, {
|
15329
15880
|
htmlTag: "div",
|
15330
15881
|
color: "default"
|
15331
15882
|
}, children));
|
@@ -15339,7 +15890,7 @@ var Section4 = (props) => {
|
|
15339
15890
|
const _collapsible = title ? (_a = props.collapsible) != null ? _a : false : false;
|
15340
15891
|
const _collapsed = title ? props.collapsed : void 0;
|
15341
15892
|
const _defaultCollapsed = title ? (_b = props.defaultCollapsed) != null ? _b : false : false;
|
15342
|
-
const [isCollapsed, setCollapsed] =
|
15893
|
+
const [isCollapsed, setCollapsed] = React120.useState(_collapsed != null ? _collapsed : _defaultCollapsed);
|
15343
15894
|
const [ref, { height }] = useMeasure();
|
15344
15895
|
const toggleAreaRef = useRef14(null);
|
15345
15896
|
const menu = title ? (_c = props.menu) != null ? _c : void 0 : void 0;
|
@@ -15365,26 +15916,25 @@ var Section4 = (props) => {
|
|
15365
15916
|
height: height !== null ? targetHeight : void 0,
|
15366
15917
|
opacity: isCollapsed ? 0 : 1,
|
15367
15918
|
transform: `rotate(${isCollapsed ? 90 : 180}deg)`,
|
15368
|
-
backgroundColor: isCollapsed ? tokens_default.backgroundColor.muted : tokens_default.backgroundColor.default,
|
15369
15919
|
config: {
|
15370
15920
|
duration: 150
|
15371
15921
|
},
|
15372
15922
|
immediate: !_collapsible
|
15373
|
-
}), { transform
|
15374
|
-
const toggleId =
|
15375
|
-
const regionId =
|
15376
|
-
const titleId =
|
15923
|
+
}), { transform } = _f, spring = __objRest(_f, ["transform"]);
|
15924
|
+
const toggleId = useId19();
|
15925
|
+
const regionId = useId19();
|
15926
|
+
const titleId = useId19();
|
15377
15927
|
const hasTabs = isComponentType(children, Tabs);
|
15378
15928
|
const { buttonProps } = useButton4(
|
15379
15929
|
{ "elementType": "div", "onPress": handleTitleClick, "aria-expanded": !isCollapsed, "aria-controls": regionId },
|
15380
15930
|
toggleAreaRef
|
15381
15931
|
);
|
15382
|
-
return /* @__PURE__ */
|
15932
|
+
return /* @__PURE__ */ React120.createElement(Section3, {
|
15383
15933
|
"aria-label": title,
|
15384
|
-
className: "Aquarium-Section"
|
15385
|
-
}, title && /* @__PURE__ */
|
15934
|
+
className: _collapsible ? "Aquarium-Collapsible-Section" : "Aquarium-Section"
|
15935
|
+
}, title && /* @__PURE__ */ React120.createElement(React120.Fragment, null, /* @__PURE__ */ React120.createElement(Section3.Header, {
|
15386
15936
|
expanded: _collapsible && !isCollapsed
|
15387
|
-
}, /* @__PURE__ */
|
15937
|
+
}, /* @__PURE__ */ React120.createElement(Section3.TitleContainer, __spreadProps(__spreadValues({}, _collapsible ? __spreadProps(__spreadValues({}, buttonProps), {
|
15388
15938
|
onPointerDown: (e) => {
|
15389
15939
|
e.preventDefault();
|
15390
15940
|
handleTitleClick();
|
@@ -15393,49 +15943,49 @@ var Section4 = (props) => {
|
|
15393
15943
|
ref: _collapsible ? toggleAreaRef : void 0,
|
15394
15944
|
id: toggleId,
|
15395
15945
|
collapsible: _collapsible
|
15396
|
-
}), _collapsible && /* @__PURE__ */
|
15946
|
+
}), _collapsible && /* @__PURE__ */ React120.createElement(animated6.div, {
|
15397
15947
|
style: { transform }
|
15398
|
-
}, /* @__PURE__ */
|
15948
|
+
}, /* @__PURE__ */ React120.createElement(Section3.Toggle, null)), /* @__PURE__ */ React120.createElement(Section3.Title, {
|
15399
15949
|
id: titleId
|
15400
|
-
}, /* @__PURE__ */
|
15950
|
+
}, /* @__PURE__ */ React120.createElement(LineClamp2, {
|
15401
15951
|
lines: 1
|
15402
|
-
}, title), props.tag && /* @__PURE__ */
|
15952
|
+
}, title), props.tag && /* @__PURE__ */ React120.createElement(TagLabel, __spreadValues({}, props.tag)), props.badge && /* @__PURE__ */ React120.createElement(Chip2, {
|
15403
15953
|
text: props.badge
|
15404
|
-
}), props.chip && /* @__PURE__ */
|
15954
|
+
}), props.chip && /* @__PURE__ */ React120.createElement(StatusChip, __spreadValues({}, props.chip))), subtitle && /* @__PURE__ */ React120.createElement(Section3.Subtitle, {
|
15405
15955
|
className: tw("row-start-2", { "col-start-2": _collapsible })
|
15406
|
-
}, /* @__PURE__ */
|
15956
|
+
}, /* @__PURE__ */ React120.createElement(LineClamp2, {
|
15407
15957
|
lines: 1
|
15408
|
-
}, subtitle))), !isCollapsed && /* @__PURE__ */
|
15958
|
+
}, subtitle))), !isCollapsed && /* @__PURE__ */ React120.createElement(Section3.Actions, null, menu && /* @__PURE__ */ React120.createElement(Box.Flex, {
|
15409
15959
|
alignItems: "center"
|
15410
|
-
}, /* @__PURE__ */
|
15960
|
+
}, /* @__PURE__ */ React120.createElement(DropdownMenu2, {
|
15411
15961
|
onAction: (action) => onAction == null ? void 0 : onAction(action),
|
15412
15962
|
onOpenChange: onMenuOpenChange,
|
15413
15963
|
placement: defaultContextualMenuPlacement
|
15414
|
-
}, /* @__PURE__ */
|
15964
|
+
}, /* @__PURE__ */ React120.createElement(DropdownMenu2.Trigger, null, /* @__PURE__ */ React120.createElement(Button.Icon, {
|
15415
15965
|
"aria-label": menuAriaLabel,
|
15416
15966
|
icon: import_more6.default
|
15417
|
-
})), menu)), props.actions && castArray7(props.actions).filter(Boolean).map((action) => renderAction({ kind: "secondary", action })), props.switch && /* @__PURE__ */
|
15967
|
+
})), 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
15968
|
"aria-labelledby": titleId
|
15419
|
-
}, props.select)))), !hasTabs && !isCollapsed && /* @__PURE__ */
|
15969
|
+
}, props.select)))), !hasTabs && !isCollapsed && /* @__PURE__ */ React120.createElement(animated6.div, {
|
15420
15970
|
className: tw(`h-[1px]`),
|
15421
|
-
style: { backgroundColor }
|
15422
|
-
})), /* @__PURE__ */
|
15971
|
+
style: { backgroundColor: "var(--aquarium-border-color-muted)" }
|
15972
|
+
})), /* @__PURE__ */ React120.createElement(animated6.div, {
|
15423
15973
|
id: regionId,
|
15424
15974
|
"aria-hidden": _collapsible ? isCollapsed ? true : void 0 : void 0,
|
15425
15975
|
style: spring,
|
15426
15976
|
className: tw({ "overflow-hidden": _collapsible })
|
15427
|
-
}, /* @__PURE__ */
|
15977
|
+
}, /* @__PURE__ */ React120.createElement("div", {
|
15428
15978
|
ref
|
15429
|
-
}, hasTabs ? /* @__PURE__ */
|
15979
|
+
}, hasTabs ? /* @__PURE__ */ React120.createElement(SectionTabs, __spreadProps(__spreadValues({}, children.props), {
|
15430
15980
|
className: tw("[&>div:first-child]:px-3 grow flex flex-col overflow-y-auto", { "mt-4": _collapsible })
|
15431
|
-
})) : /* @__PURE__ */
|
15981
|
+
})) : /* @__PURE__ */ React120.createElement(Section3.Body, null, children))));
|
15432
15982
|
};
|
15433
|
-
var SectionTabs = createTabsComponent(ModalTab, TabItem, "SectionTabs", (children, selected) => /* @__PURE__ */
|
15983
|
+
var SectionTabs = createTabsComponent(ModalTab, TabItem, "SectionTabs", (children, selected) => /* @__PURE__ */ React120.createElement(Section3.Body, null, children.find(
|
15434
15984
|
(node, index) => (node == null ? void 0 : node.props.value) === selected || index === selected
|
15435
15985
|
)));
|
15436
15986
|
|
15437
15987
|
// src/molecules/SegmentedControl/SegmentedControl.tsx
|
15438
|
-
import
|
15988
|
+
import React121 from "react";
|
15439
15989
|
var SegmentedControl = (_a) => {
|
15440
15990
|
var _b = _a, {
|
15441
15991
|
children,
|
@@ -15452,7 +16002,7 @@ var SegmentedControl = (_a) => {
|
|
15452
16002
|
"selected",
|
15453
16003
|
"className"
|
15454
16004
|
]);
|
15455
|
-
return /* @__PURE__ */
|
16005
|
+
return /* @__PURE__ */ React121.createElement("li", null, /* @__PURE__ */ React121.createElement("button", __spreadProps(__spreadValues({
|
15456
16006
|
type: "button"
|
15457
16007
|
}, rest), {
|
15458
16008
|
className: classNames(getBaseSegmentedControlClassNames(selected), className),
|
@@ -15477,16 +16027,16 @@ var SegmentedControlGroup = (_a) => {
|
|
15477
16027
|
"className",
|
15478
16028
|
"ariaLabel"
|
15479
16029
|
]);
|
15480
|
-
return /* @__PURE__ */
|
16030
|
+
return /* @__PURE__ */ React121.createElement("ul", __spreadProps(__spreadValues({}, rest), {
|
15481
16031
|
"aria-label": ariaLabel,
|
15482
16032
|
className: classNames(
|
15483
16033
|
"Aquarium-SegmentedControl",
|
15484
16034
|
"flex border border-default rounded-sm divide-x divide-grey-20",
|
15485
16035
|
className
|
15486
16036
|
)
|
15487
|
-
}),
|
16037
|
+
}), React121.Children.map(
|
15488
16038
|
children,
|
15489
|
-
(child) =>
|
16039
|
+
(child) => React121.cloneElement(child, {
|
15490
16040
|
onClick: () => onChange(child.props.value),
|
15491
16041
|
selected: child.props.value === value
|
15492
16042
|
})
|
@@ -15503,14 +16053,14 @@ var getBaseSegmentedControlClassNames = (selected) => tw(
|
|
15503
16053
|
);
|
15504
16054
|
|
15505
16055
|
// src/molecules/Stepper/Stepper.tsx
|
15506
|
-
import
|
16056
|
+
import React123 from "react";
|
15507
16057
|
|
15508
16058
|
// src/atoms/Stepper/Stepper.tsx
|
15509
|
-
import
|
16059
|
+
import React122 from "react";
|
15510
16060
|
var import_tick6 = __toESM(require_tick());
|
15511
16061
|
var Stepper = (_a) => {
|
15512
16062
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15513
|
-
return /* @__PURE__ */
|
16063
|
+
return /* @__PURE__ */ React122.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15514
16064
|
className: classNames(className)
|
15515
16065
|
}));
|
15516
16066
|
};
|
@@ -15524,7 +16074,7 @@ var ConnectorContainer = (_a) => {
|
|
15524
16074
|
"completed",
|
15525
16075
|
"dense"
|
15526
16076
|
]);
|
15527
|
-
return /* @__PURE__ */
|
16077
|
+
return /* @__PURE__ */ React122.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15528
16078
|
className: classNames(
|
15529
16079
|
tw("absolute w-full -left-1/2", {
|
15530
16080
|
"top-[3px] px-[14px]": Boolean(dense),
|
@@ -15536,7 +16086,7 @@ var ConnectorContainer = (_a) => {
|
|
15536
16086
|
};
|
15537
16087
|
var Connector = (_a) => {
|
15538
16088
|
var _b = _a, { children, className, completed, dense } = _b, rest = __objRest(_b, ["children", "className", "completed", "dense"]);
|
15539
|
-
return /* @__PURE__ */
|
16089
|
+
return /* @__PURE__ */ React122.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15540
16090
|
className: classNames(
|
15541
16091
|
tw("w-full", {
|
15542
16092
|
"bg-intense": !completed,
|
@@ -15550,7 +16100,7 @@ var Connector = (_a) => {
|
|
15550
16100
|
};
|
15551
16101
|
var Step = (_a) => {
|
15552
16102
|
var _b = _a, { className, state } = _b, rest = __objRest(_b, ["className", "state"]);
|
15553
|
-
return /* @__PURE__ */
|
16103
|
+
return /* @__PURE__ */ React122.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15554
16104
|
className: classNames(
|
15555
16105
|
tw("flex flex-col items-center relative text-center", {
|
15556
16106
|
"text-intense": state !== "inactive",
|
@@ -15572,13 +16122,13 @@ var getDenseClassNames = (state) => tw("h-[8px] w-[8px]", {
|
|
15572
16122
|
});
|
15573
16123
|
var Indicator = (_a) => {
|
15574
16124
|
var _b = _a, { children, className, state, dense } = _b, rest = __objRest(_b, ["children", "className", "state", "dense"]);
|
15575
|
-
return /* @__PURE__ */
|
16125
|
+
return /* @__PURE__ */ React122.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15576
16126
|
className: classNames(
|
15577
16127
|
tw("rounded-full flex justify-center items-center mx-2 mb-3"),
|
15578
16128
|
dense ? getDenseClassNames(state) : getClassNames(state),
|
15579
16129
|
className
|
15580
16130
|
)
|
15581
|
-
}), state === "completed" ? /* @__PURE__ */
|
16131
|
+
}), state === "completed" ? /* @__PURE__ */ React122.createElement(InlineIcon, {
|
15582
16132
|
icon: import_tick6.default
|
15583
16133
|
}) : dense ? null : children);
|
15584
16134
|
};
|
@@ -15589,26 +16139,26 @@ Stepper.ConnectorContainer = ConnectorContainer;
|
|
15589
16139
|
|
15590
16140
|
// src/molecules/Stepper/Stepper.tsx
|
15591
16141
|
var Stepper2 = ({ children, activeIndex, dense }) => {
|
15592
|
-
const steps =
|
15593
|
-
return /* @__PURE__ */
|
16142
|
+
const steps = React123.Children.count(children);
|
16143
|
+
return /* @__PURE__ */ React123.createElement(Stepper, {
|
15594
16144
|
role: "list",
|
15595
16145
|
className: "Aquarium-Stepper"
|
15596
|
-
}, /* @__PURE__ */
|
16146
|
+
}, /* @__PURE__ */ React123.createElement(Template, {
|
15597
16147
|
columns: steps
|
15598
|
-
},
|
16148
|
+
}, React123.Children.map(children, (child, index) => {
|
15599
16149
|
if (!isComponentType(child, Step2)) {
|
15600
16150
|
throw new Error("<Stepper> can only have <Stepper.Step> components as children");
|
15601
16151
|
} else {
|
15602
16152
|
const state = index > activeIndex ? "inactive" : index === activeIndex ? "active" : "completed";
|
15603
|
-
return /* @__PURE__ */
|
16153
|
+
return /* @__PURE__ */ React123.createElement(Stepper.Step, {
|
15604
16154
|
state,
|
15605
16155
|
"aria-current": state === "active" ? "step" : false,
|
15606
16156
|
role: "listitem"
|
15607
|
-
}, index > 0 && index <= steps && /* @__PURE__ */
|
16157
|
+
}, index > 0 && index <= steps && /* @__PURE__ */ React123.createElement(Stepper.ConnectorContainer, {
|
15608
16158
|
dense
|
15609
|
-
}, /* @__PURE__ */
|
16159
|
+
}, /* @__PURE__ */ React123.createElement(Stepper.ConnectorContainer.Connector, {
|
15610
16160
|
completed: state === "completed" || state === "active"
|
15611
|
-
})), /* @__PURE__ */
|
16161
|
+
})), /* @__PURE__ */ React123.createElement(Stepper.Step.Indicator, {
|
15612
16162
|
state,
|
15613
16163
|
dense
|
15614
16164
|
}, index + 1), child.props.children);
|
@@ -15621,8 +16171,8 @@ Step2.displayName = "Stepper.Step";
|
|
15621
16171
|
Stepper2.Step = Step2;
|
15622
16172
|
|
15623
16173
|
// src/molecules/SwitchGroup/SwitchGroup.tsx
|
15624
|
-
import
|
15625
|
-
import { useId as
|
16174
|
+
import React124, { useState as useState14 } from "react";
|
16175
|
+
import { useId as useId20 } from "@react-aria/utils";
|
15626
16176
|
var SwitchGroup = (_a) => {
|
15627
16177
|
var _b = _a, {
|
15628
16178
|
value,
|
@@ -15644,7 +16194,7 @@ var SwitchGroup = (_a) => {
|
|
15644
16194
|
if (value !== void 0 && value !== selectedItems) {
|
15645
16195
|
setSelectedItems(value);
|
15646
16196
|
}
|
15647
|
-
const errorMessageId =
|
16197
|
+
const errorMessageId = useId20();
|
15648
16198
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
15649
16199
|
const labelControlProps = getLabelControlProps(props);
|
15650
16200
|
const handleChange = (e) => {
|
@@ -15653,13 +16203,13 @@ var SwitchGroup = (_a) => {
|
|
15653
16203
|
setSelectedItems(updated);
|
15654
16204
|
onChange == null ? void 0 : onChange(updated);
|
15655
16205
|
};
|
15656
|
-
return /* @__PURE__ */
|
16206
|
+
return /* @__PURE__ */ React124.createElement(LabelControl, __spreadProps(__spreadValues(__spreadValues({
|
15657
16207
|
fieldset: true
|
15658
16208
|
}, labelControlProps), errorProps), {
|
15659
16209
|
className: "Aquarium-SwitchGroup"
|
15660
|
-
}), /* @__PURE__ */
|
16210
|
+
}), /* @__PURE__ */ React124.createElement(InputGroup, {
|
15661
16211
|
cols
|
15662
|
-
},
|
16212
|
+
}, React124.Children.map(children, (c) => {
|
15663
16213
|
var _a3, _b2, _c, _d;
|
15664
16214
|
if (!isComponentType(c, Switch2)) {
|
15665
16215
|
return null;
|
@@ -15667,7 +16217,7 @@ var SwitchGroup = (_a) => {
|
|
15667
16217
|
const str = (_a3 = c.props.value) == null ? void 0 : _a3.toString();
|
15668
16218
|
const defaultChecked = defaultValue === void 0 ? void 0 : str !== void 0 && defaultValue.includes(str);
|
15669
16219
|
const checked = value === void 0 ? void 0 : str !== void 0 && value.includes(str);
|
15670
|
-
return
|
16220
|
+
return React124.cloneElement(c, {
|
15671
16221
|
defaultChecked: (_b2 = c.props.defaultChecked) != null ? _b2 : defaultChecked,
|
15672
16222
|
checked: (_c = c.props.checked) != null ? _c : checked,
|
15673
16223
|
onChange: (_d = c.props.onChange) != null ? _d : handleChange,
|
@@ -15677,9 +16227,9 @@ var SwitchGroup = (_a) => {
|
|
15677
16227
|
})));
|
15678
16228
|
};
|
15679
16229
|
var SwitchGroupSkeleton = ({ options = 2 }) => {
|
15680
|
-
return /* @__PURE__ */
|
16230
|
+
return /* @__PURE__ */ React124.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React124.createElement("div", {
|
15681
16231
|
className: tw("flex flex-wrap flex-col gap-2")
|
15682
|
-
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */
|
16232
|
+
}, Array.from({ length: options }).map((_, key) => /* @__PURE__ */ React124.createElement(Switch2.Skeleton, {
|
15683
16233
|
key
|
15684
16234
|
}))));
|
15685
16235
|
};
|
@@ -15687,14 +16237,14 @@ SwitchGroup.Skeleton = SwitchGroupSkeleton;
|
|
15687
16237
|
SwitchGroup.Skeleton.displayName = "SwitchGroup.Skeleton";
|
15688
16238
|
|
15689
16239
|
// src/molecules/Textarea/Textarea.tsx
|
15690
|
-
import
|
15691
|
-
import { useId as
|
15692
|
-
import
|
16240
|
+
import React125, { useState as useState15 } from "react";
|
16241
|
+
import { useId as useId21 } from "@react-aria/utils";
|
16242
|
+
import omit19 from "lodash/omit";
|
15693
16243
|
import toString2 from "lodash/toString";
|
15694
|
-
var TextareaBase =
|
16244
|
+
var TextareaBase = React125.forwardRef(
|
15695
16245
|
(_a, ref) => {
|
15696
16246
|
var _b = _a, { readOnly = false, valid = true } = _b, props = __objRest(_b, ["readOnly", "valid"]);
|
15697
|
-
return /* @__PURE__ */
|
16247
|
+
return /* @__PURE__ */ React125.createElement("textarea", __spreadProps(__spreadValues({
|
15698
16248
|
ref
|
15699
16249
|
}, props), {
|
15700
16250
|
readOnly,
|
@@ -15702,26 +16252,26 @@ var TextareaBase = React115.forwardRef(
|
|
15702
16252
|
}));
|
15703
16253
|
}
|
15704
16254
|
);
|
15705
|
-
TextareaBase.Skeleton = () => /* @__PURE__ */
|
16255
|
+
TextareaBase.Skeleton = () => /* @__PURE__ */ React125.createElement(Skeleton, {
|
15706
16256
|
height: 58
|
15707
16257
|
});
|
15708
|
-
var Textarea =
|
16258
|
+
var Textarea = React125.forwardRef((props, ref) => {
|
15709
16259
|
var _a, _b, _c;
|
15710
16260
|
const [value, setValue] = useState15((_b = (_a = props.value) != null ? _a : props.defaultValue) != null ? _b : "");
|
15711
|
-
const defaultId =
|
16261
|
+
const defaultId = useId21();
|
15712
16262
|
const id = (_c = props.id) != null ? _c : defaultId;
|
15713
|
-
const errorMessageId =
|
16263
|
+
const errorMessageId = useId21();
|
15714
16264
|
const errorProps = props.valid === false ? { "aria-invalid": true, "aria-describedby": errorMessageId } : {};
|
15715
16265
|
const _d = getLabelControlProps(props), { "data-testid": dataTestId } = _d, labelControlProps = __objRest(_d, ["data-testid"]);
|
15716
|
-
const baseProps =
|
15717
|
-
return /* @__PURE__ */
|
16266
|
+
const baseProps = omit19(props, Object.keys(labelControlProps));
|
16267
|
+
return /* @__PURE__ */ React125.createElement(LabelControl, __spreadProps(__spreadValues({
|
15718
16268
|
id: `${id}-label`,
|
15719
16269
|
htmlFor: id,
|
15720
16270
|
messageId: errorMessageId,
|
15721
16271
|
length: value !== void 0 ? toString2(value).length : void 0
|
15722
16272
|
}, labelControlProps), {
|
15723
16273
|
className: "Aquarium-Textarea"
|
15724
|
-
}), /* @__PURE__ */
|
16274
|
+
}), /* @__PURE__ */ React125.createElement(TextareaBase, __spreadProps(__spreadValues(__spreadValues({
|
15725
16275
|
ref
|
15726
16276
|
}, baseProps), errorProps), {
|
15727
16277
|
id,
|
@@ -15738,48 +16288,48 @@ var Textarea = React115.forwardRef((props, ref) => {
|
|
15738
16288
|
})));
|
15739
16289
|
});
|
15740
16290
|
Textarea.displayName = "Textarea";
|
15741
|
-
var TextAreaSkeleton = () => /* @__PURE__ */
|
16291
|
+
var TextAreaSkeleton = () => /* @__PURE__ */ React125.createElement(LabelControl.Skeleton, null, /* @__PURE__ */ React125.createElement(TextareaBase.Skeleton, null));
|
15742
16292
|
Textarea.Skeleton = TextAreaSkeleton;
|
15743
16293
|
Textarea.Skeleton.displayName = "Textarea.Skeleton";
|
15744
16294
|
|
15745
16295
|
// src/molecules/Timeline/Timeline.tsx
|
15746
|
-
import
|
16296
|
+
import React127 from "react";
|
15747
16297
|
|
15748
16298
|
// src/atoms/Timeline/Timeline.tsx
|
15749
|
-
import
|
16299
|
+
import React126 from "react";
|
15750
16300
|
var Timeline = (_a) => {
|
15751
16301
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15752
|
-
return /* @__PURE__ */
|
16302
|
+
return /* @__PURE__ */ React126.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15753
16303
|
className: classNames(tw("grid grid-cols-[16px_1fr] gap-x-4"), className)
|
15754
16304
|
}));
|
15755
16305
|
};
|
15756
16306
|
var Content2 = (_a) => {
|
15757
16307
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15758
|
-
return /* @__PURE__ */
|
16308
|
+
return /* @__PURE__ */ React126.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15759
16309
|
className: classNames(tw("pb-6"), className)
|
15760
16310
|
}));
|
15761
16311
|
};
|
15762
16312
|
var Separator2 = (_a) => {
|
15763
16313
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15764
|
-
return /* @__PURE__ */
|
16314
|
+
return /* @__PURE__ */ React126.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15765
16315
|
className: classNames(tw("flex items-center justify-center h-5 w-5"), className)
|
15766
16316
|
}));
|
15767
16317
|
};
|
15768
16318
|
var LineContainer = (_a) => {
|
15769
16319
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15770
|
-
return /* @__PURE__ */
|
16320
|
+
return /* @__PURE__ */ React126.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15771
16321
|
className: classNames(tw("flex justify-center py-1"), className)
|
15772
16322
|
}));
|
15773
16323
|
};
|
15774
16324
|
var Line = (_a) => {
|
15775
16325
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15776
|
-
return /* @__PURE__ */
|
16326
|
+
return /* @__PURE__ */ React126.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15777
16327
|
className: classNames(tw("w-1 bg-default h-full justify-self-center"), className)
|
15778
16328
|
}));
|
15779
16329
|
};
|
15780
16330
|
var Dot = (_a) => {
|
15781
16331
|
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
15782
|
-
return /* @__PURE__ */
|
16332
|
+
return /* @__PURE__ */ React126.createElement("div", __spreadProps(__spreadValues({}, rest), {
|
15783
16333
|
className: classNames(tw("bg-intense h-[6px] w-[6px] rounded"), className)
|
15784
16334
|
}));
|
15785
16335
|
};
|
@@ -15794,64 +16344,68 @@ var import_error5 = __toESM(require_error());
|
|
15794
16344
|
var import_time2 = __toESM(require_time());
|
15795
16345
|
var import_warningSign5 = __toESM(require_warningSign());
|
15796
16346
|
var TimelineItem = () => null;
|
15797
|
-
var Timeline2 = ({ children }) => /* @__PURE__ */
|
16347
|
+
var Timeline2 = ({ children }) => /* @__PURE__ */ React127.createElement("div", {
|
15798
16348
|
className: "Aquarium-Timeline"
|
15799
|
-
},
|
16349
|
+
}, React127.Children.map(children, (item) => {
|
15800
16350
|
if (!isComponentType(item, TimelineItem)) {
|
15801
16351
|
throw new Error("<Timeline> can only have <Timeline.Item> components as children");
|
15802
16352
|
} else {
|
15803
16353
|
const { props, key } = item;
|
15804
|
-
return /* @__PURE__ */
|
16354
|
+
return /* @__PURE__ */ React127.createElement(Timeline, {
|
15805
16355
|
key: key != null ? key : props.title
|
15806
|
-
}, /* @__PURE__ */
|
16356
|
+
}, /* @__PURE__ */ React127.createElement(Timeline.Separator, null, props.variant === "error" ? /* @__PURE__ */ React127.createElement(Icon, {
|
15807
16357
|
icon: import_error5.default,
|
15808
16358
|
color: "danger-default"
|
15809
|
-
}) : props.variant === "warning" ? /* @__PURE__ */
|
16359
|
+
}) : props.variant === "warning" ? /* @__PURE__ */ React127.createElement(Icon, {
|
15810
16360
|
icon: import_warningSign5.default,
|
15811
16361
|
color: "warning-default"
|
15812
|
-
}) : props.variant === "info" ? /* @__PURE__ */
|
16362
|
+
}) : props.variant === "info" ? /* @__PURE__ */ React127.createElement(Icon, {
|
15813
16363
|
icon: import_time2.default,
|
15814
16364
|
color: "info-default"
|
15815
|
-
}) : /* @__PURE__ */
|
16365
|
+
}) : /* @__PURE__ */ React127.createElement(Timeline.Separator.Dot, null)), /* @__PURE__ */ React127.createElement(Typography2.Caption, {
|
15816
16366
|
color: "muted"
|
15817
|
-
}, props.title), /* @__PURE__ */
|
16367
|
+
}, 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
16368
|
}
|
15819
16369
|
}));
|
15820
|
-
var TimelineItemSkeleton = () => /* @__PURE__ */
|
16370
|
+
var TimelineItemSkeleton = () => /* @__PURE__ */ React127.createElement(Timeline, null, /* @__PURE__ */ React127.createElement(Timeline.Separator, null, /* @__PURE__ */ React127.createElement(Skeleton, {
|
15821
16371
|
width: 6,
|
15822
16372
|
height: 6,
|
15823
16373
|
rounded: true
|
15824
|
-
})), /* @__PURE__ */
|
16374
|
+
})), /* @__PURE__ */ React127.createElement(Skeleton, {
|
15825
16375
|
height: 12,
|
15826
16376
|
width: 120
|
15827
|
-
}), /* @__PURE__ */
|
16377
|
+
}), /* @__PURE__ */ React127.createElement(Timeline.LineContainer, null, /* @__PURE__ */ React127.createElement(Skeleton, {
|
15828
16378
|
width: 2,
|
15829
16379
|
height: "100%"
|
15830
|
-
})), /* @__PURE__ */
|
16380
|
+
})), /* @__PURE__ */ React127.createElement(Timeline.Content, null, /* @__PURE__ */ React127.createElement(Box, {
|
15831
16381
|
display: "flex",
|
15832
16382
|
flexDirection: "column",
|
15833
16383
|
gap: "3"
|
15834
|
-
}, /* @__PURE__ */
|
16384
|
+
}, /* @__PURE__ */ React127.createElement(Skeleton, {
|
15835
16385
|
height: 32,
|
15836
16386
|
width: "100%"
|
15837
|
-
}), /* @__PURE__ */
|
16387
|
+
}), /* @__PURE__ */ React127.createElement(Skeleton, {
|
15838
16388
|
height: 32,
|
15839
16389
|
width: "73%"
|
15840
|
-
}), /* @__PURE__ */
|
16390
|
+
}), /* @__PURE__ */ React127.createElement(Skeleton, {
|
15841
16391
|
height: 32,
|
15842
16392
|
width: "80%"
|
15843
16393
|
}))));
|
15844
|
-
var TimelineSkeleton = ({ items = 3 }) => /* @__PURE__ */
|
16394
|
+
var TimelineSkeleton = ({ items = 3 }) => /* @__PURE__ */ React127.createElement("div", null, Array.from({ length: items }).map((_, key) => /* @__PURE__ */ React127.createElement(TimelineItemSkeleton, {
|
15845
16395
|
key
|
15846
16396
|
})));
|
15847
16397
|
Timeline2.Item = TimelineItem;
|
15848
16398
|
Timeline2.Skeleton = TimelineSkeleton;
|
15849
16399
|
Timeline2.Skeleton.displayName = "Timeline.Skeleton";
|
15850
16400
|
|
16401
|
+
// src/molecules/TimePicker/TimePicker.tsx
|
16402
|
+
import React128 from "react";
|
16403
|
+
var TimePicker = (props) => /* @__PURE__ */ React128.createElement(TimeField, __spreadValues({}, props));
|
16404
|
+
|
15851
16405
|
// src/utils/table/useTableSelect.ts
|
15852
|
-
import
|
16406
|
+
import React129 from "react";
|
15853
16407
|
var useTableSelect = (data, { key }) => {
|
15854
|
-
const [selected, setSelected] =
|
16408
|
+
const [selected, setSelected] = React129.useState([]);
|
15855
16409
|
const allSelected = selected.length === data.length;
|
15856
16410
|
const isSelected = (dot) => selected.includes(dot[key]);
|
15857
16411
|
const selectAll = () => setSelected(data.map((dot) => dot[key]));
|
@@ -16017,8 +16571,16 @@ export {
|
|
16017
16571
|
ControlLabel,
|
16018
16572
|
DataList2 as DataList,
|
16019
16573
|
DataTable,
|
16574
|
+
DatePicker,
|
16575
|
+
DatePickerBase,
|
16576
|
+
DateRangePicker,
|
16577
|
+
DateRangePickerBase,
|
16578
|
+
DateTimePicker,
|
16579
|
+
DateTimePickerBase,
|
16580
|
+
DateTimeRangePicker,
|
16581
|
+
DateTimeRangePickerBase,
|
16020
16582
|
DesignSystemContext,
|
16021
|
-
Dialog,
|
16583
|
+
Dialog2 as Dialog,
|
16022
16584
|
Divider2 as Divider,
|
16023
16585
|
Drawer,
|
16024
16586
|
Dropdown,
|
@@ -16063,7 +16625,7 @@ export {
|
|
16063
16625
|
Option,
|
16064
16626
|
PageHeader2 as PageHeader,
|
16065
16627
|
Pagination,
|
16066
|
-
|
16628
|
+
Popover3 as Popover,
|
16067
16629
|
PopoverDialog2 as PopoverDialog,
|
16068
16630
|
Portal,
|
16069
16631
|
PositionerPlacement,
|
@@ -16098,6 +16660,7 @@ export {
|
|
16098
16660
|
TextButton,
|
16099
16661
|
Textarea,
|
16100
16662
|
TextareaBase,
|
16663
|
+
TimePicker,
|
16101
16664
|
Timeline2 as Timeline,
|
16102
16665
|
ToastComponent,
|
16103
16666
|
ToastProvider,
|