@helpwave/hightide 0.1.21 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/components/branding/HelpwaveBadge.js +8 -5
- package/dist/components/branding/HelpwaveBadge.js.map +1 -1
- package/dist/components/branding/HelpwaveBadge.mjs +8 -5
- package/dist/components/branding/HelpwaveBadge.mjs.map +1 -1
- package/dist/components/date/DatePicker.js +11 -1
- package/dist/components/date/DatePicker.js.map +1 -1
- package/dist/components/date/DatePicker.mjs +11 -1
- package/dist/components/date/DatePicker.mjs.map +1 -1
- package/dist/components/date/DayPicker.js.map +1 -1
- package/dist/components/date/DayPicker.mjs.map +1 -1
- package/dist/components/date/TimeDisplay.js.map +1 -1
- package/dist/components/date/TimeDisplay.mjs.map +1 -1
- package/dist/components/date/YearMonthPicker.js +1 -0
- package/dist/components/date/YearMonthPicker.js.map +1 -1
- package/dist/components/date/YearMonthPicker.mjs +1 -0
- package/dist/components/date/YearMonthPicker.mjs.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.js +2 -1
- package/dist/components/dialogs/ConfirmDialog.js.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.mjs +2 -1
- package/dist/components/dialogs/ConfirmDialog.mjs.map +1 -1
- package/dist/components/icons-and-geometry/Avatar.d.mts +17 -7
- package/dist/components/icons-and-geometry/Avatar.d.ts +17 -7
- package/dist/components/icons-and-geometry/Avatar.js +2982 -42
- package/dist/components/icons-and-geometry/Avatar.js.map +1 -1
- package/dist/components/icons-and-geometry/Avatar.mjs +3010 -40
- package/dist/components/icons-and-geometry/Avatar.mjs.map +1 -1
- package/dist/components/icons-and-geometry/Tag.js +2912 -1
- package/dist/components/icons-and-geometry/Tag.js.map +1 -1
- package/dist/components/icons-and-geometry/Tag.mjs +2931 -1
- package/dist/components/icons-and-geometry/Tag.mjs.map +1 -1
- package/dist/components/layout-and-navigation/BreadCrumb.d.mts +2 -1
- package/dist/components/layout-and-navigation/BreadCrumb.d.ts +2 -1
- package/dist/components/layout-and-navigation/BreadCrumb.js +15 -11
- package/dist/components/layout-and-navigation/BreadCrumb.js.map +1 -1
- package/dist/components/layout-and-navigation/BreadCrumb.mjs +15 -11
- package/dist/components/layout-and-navigation/BreadCrumb.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Carousel.js +1 -0
- package/dist/components/layout-and-navigation/Carousel.js.map +1 -1
- package/dist/components/layout-and-navigation/Carousel.mjs +1 -0
- package/dist/components/layout-and-navigation/Carousel.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Chip.d.mts +6 -2
- package/dist/components/layout-and-navigation/Chip.d.ts +6 -2
- package/dist/components/layout-and-navigation/Chip.js +10 -4
- package/dist/components/layout-and-navigation/Chip.js.map +1 -1
- package/dist/components/layout-and-navigation/Chip.mjs +8 -3
- package/dist/components/layout-and-navigation/Chip.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.js +3 -2
- package/dist/components/layout-and-navigation/Overlay.js.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.mjs +3 -2
- package/dist/components/layout-and-navigation/Overlay.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.js +3 -2
- package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.mjs +3 -2
- package/dist/components/layout-and-navigation/Pagination.mjs.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.js +2 -1
- package/dist/components/layout-and-navigation/SearchableList.js.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.mjs +2 -1
- package/dist/components/layout-and-navigation/SearchableList.mjs.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.js +1 -0
- package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.mjs +1 -0
- package/dist/components/layout-and-navigation/StepperBar.mjs.map +1 -1
- package/dist/components/layout-and-navigation/TextImage.js.map +1 -1
- package/dist/components/layout-and-navigation/TextImage.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Tile.d.mts +9 -10
- package/dist/components/layout-and-navigation/Tile.d.ts +9 -10
- package/dist/components/layout-and-navigation/Tile.js +21 -4
- package/dist/components/layout-and-navigation/Tile.js.map +1 -1
- package/dist/components/layout-and-navigation/Tile.mjs +20 -4
- package/dist/components/layout-and-navigation/Tile.mjs.map +1 -1
- package/dist/components/loading-states/ErrorComponent.js.map +1 -1
- package/dist/components/loading-states/ErrorComponent.mjs.map +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.js +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.js.map +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.mjs +1 -1
- package/dist/components/loading-states/LoadingAndErrorComponent.mjs.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.mjs.map +1 -1
- package/dist/components/loading-states/LoadingButton.js +1 -0
- package/dist/components/loading-states/LoadingButton.js.map +1 -1
- package/dist/components/loading-states/LoadingButton.mjs +1 -0
- package/dist/components/loading-states/LoadingButton.mjs.map +1 -1
- package/dist/components/modals/ConfirmModal.js +2 -1
- package/dist/components/modals/ConfirmModal.js.map +1 -1
- package/dist/components/modals/ConfirmModal.mjs +2 -1
- package/dist/components/modals/ConfirmModal.mjs.map +1 -1
- package/dist/components/modals/DiscardChangesModal.js +2 -1
- package/dist/components/modals/DiscardChangesModal.js.map +1 -1
- package/dist/components/modals/DiscardChangesModal.mjs +2 -1
- package/dist/components/modals/DiscardChangesModal.mjs.map +1 -1
- package/dist/components/modals/InputModal.js +3 -2
- package/dist/components/modals/InputModal.js.map +1 -1
- package/dist/components/modals/InputModal.mjs +3 -2
- package/dist/components/modals/InputModal.mjs.map +1 -1
- package/dist/components/modals/LanguageModal.js +26 -26
- package/dist/components/modals/LanguageModal.js.map +1 -1
- package/dist/components/modals/LanguageModal.mjs +27 -31
- package/dist/components/modals/LanguageModal.mjs.map +1 -1
- package/dist/components/modals/ThemeModal.js +32 -29
- package/dist/components/modals/ThemeModal.js.map +1 -1
- package/dist/components/modals/ThemeModal.mjs +31 -32
- package/dist/components/modals/ThemeModal.mjs.map +1 -1
- package/dist/components/properties/CheckboxProperty.js +14 -4
- package/dist/components/properties/CheckboxProperty.js.map +1 -1
- package/dist/components/properties/CheckboxProperty.mjs +14 -4
- package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
- package/dist/components/properties/DateProperty.js +14 -4
- package/dist/components/properties/DateProperty.js.map +1 -1
- package/dist/components/properties/DateProperty.mjs +14 -4
- package/dist/components/properties/DateProperty.mjs.map +1 -1
- package/dist/components/properties/MultiSelectProperty.d.mts +0 -1
- package/dist/components/properties/MultiSelectProperty.d.ts +0 -1
- package/dist/components/properties/MultiSelectProperty.js +663 -648
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.mjs +779 -768
- package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
- package/dist/components/properties/NumberProperty.js +14 -4
- package/dist/components/properties/NumberProperty.js.map +1 -1
- package/dist/components/properties/NumberProperty.mjs +14 -4
- package/dist/components/properties/NumberProperty.mjs.map +1 -1
- package/dist/components/properties/PropertyBase.js +13 -3
- package/dist/components/properties/PropertyBase.js.map +1 -1
- package/dist/components/properties/PropertyBase.mjs +13 -3
- package/dist/components/properties/PropertyBase.mjs.map +1 -1
- package/dist/components/properties/SelectProperty.d.mts +0 -1
- package/dist/components/properties/SelectProperty.d.ts +0 -1
- package/dist/components/properties/SelectProperty.js +39 -30
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/SelectProperty.mjs +40 -35
- package/dist/components/properties/SelectProperty.mjs.map +1 -1
- package/dist/components/properties/TextProperty.js +16 -6
- package/dist/components/properties/TextProperty.js.map +1 -1
- package/dist/components/properties/TextProperty.mjs +16 -6
- package/dist/components/properties/TextProperty.mjs.map +1 -1
- package/dist/components/table/Table.js +6 -5
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/Table.mjs +7 -10
- package/dist/components/table/Table.mjs.map +1 -1
- package/dist/components/table/TableFilterButton.js +3 -2
- package/dist/components/table/TableFilterButton.js.map +1 -1
- package/dist/components/table/TableFilterButton.mjs +4 -7
- package/dist/components/table/TableFilterButton.mjs.map +1 -1
- package/dist/components/table/TableSortButton.js +1 -0
- package/dist/components/table/TableSortButton.js.map +1 -1
- package/dist/components/table/TableSortButton.mjs +1 -0
- package/dist/components/table/TableSortButton.mjs.map +1 -1
- package/dist/components/user-action/Button.d.mts +2 -1
- package/dist/components/user-action/Button.d.ts +2 -1
- package/dist/components/user-action/Button.js +12 -1
- package/dist/components/user-action/Button.js.map +1 -1
- package/dist/components/user-action/Button.mjs +12 -1
- package/dist/components/user-action/Button.mjs.map +1 -1
- package/dist/components/user-action/Checkbox.js +1 -1
- package/dist/components/user-action/Checkbox.js.map +1 -1
- package/dist/components/user-action/Checkbox.mjs +1 -1
- package/dist/components/user-action/Checkbox.mjs.map +1 -1
- package/dist/components/user-action/CopyToClipboardWrapper.js.map +1 -1
- package/dist/components/user-action/CopyToClipboardWrapper.mjs.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.js +11 -1
- package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.mjs +11 -1
- package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
- package/dist/components/user-action/Input.js +1 -1
- package/dist/components/user-action/Input.js.map +1 -1
- package/dist/components/user-action/Input.mjs +1 -1
- package/dist/components/user-action/Input.mjs.map +1 -1
- package/dist/components/user-action/Menu.js +2 -2
- package/dist/components/user-action/Menu.js.map +1 -1
- package/dist/components/user-action/Menu.mjs +3 -7
- package/dist/components/user-action/Menu.mjs.map +1 -1
- package/dist/components/user-action/MultiSelect.d.mts +0 -1
- package/dist/components/user-action/MultiSelect.d.ts +0 -1
- package/dist/components/user-action/MultiSelect.js +622 -616
- package/dist/components/user-action/MultiSelect.js.map +1 -1
- package/dist/components/user-action/MultiSelect.mjs +641 -639
- package/dist/components/user-action/MultiSelect.mjs.map +1 -1
- package/dist/components/user-action/ScrollPicker.js +1 -1
- package/dist/components/user-action/ScrollPicker.js.map +1 -1
- package/dist/components/user-action/ScrollPicker.mjs +1 -1
- package/dist/components/user-action/ScrollPicker.mjs.map +1 -1
- package/dist/components/user-action/SearchBar.js +2 -1
- package/dist/components/user-action/SearchBar.js.map +1 -1
- package/dist/components/user-action/SearchBar.mjs +2 -1
- package/dist/components/user-action/SearchBar.mjs.map +1 -1
- package/dist/components/user-action/Select.d.mts +1 -4
- package/dist/components/user-action/Select.d.ts +1 -4
- package/dist/components/user-action/Select.js +25 -27
- package/dist/components/user-action/Select.js.map +1 -1
- package/dist/components/user-action/Select.mjs +26 -31
- package/dist/components/user-action/Select.mjs.map +1 -1
- package/dist/components/user-action/Textarea.js +3 -3
- package/dist/components/user-action/Textarea.js.map +1 -1
- package/dist/components/user-action/Textarea.mjs +3 -3
- package/dist/components/user-action/Textarea.mjs.map +1 -1
- package/dist/css/globals.css +431 -212
- package/dist/css/uncompiled/globals.css +5 -5
- package/dist/css/uncompiled/textstyles.css +5 -5
- package/dist/css/uncompiled/theme/colors-basic.css +13 -5
- package/dist/css/uncompiled/theme/colors-component.css +60 -49
- package/dist/css/uncompiled/theme/colors-semantic.css +76 -78
- package/dist/css/uncompiled/utitlity/shadow.css +45 -16
- package/dist/hooks/useLocalStorage.js +8 -3
- package/dist/hooks/useLocalStorage.js.map +1 -1
- package/dist/hooks/useLocalStorage.mjs +8 -3
- package/dist/hooks/useLocalStorage.mjs.map +1 -1
- package/dist/hooks/useLogOnce.d.mts +8 -0
- package/dist/hooks/useLogOnce.d.ts +8 -0
- package/dist/hooks/useLogOnce.js +53 -0
- package/dist/hooks/useLogOnce.js.map +1 -0
- package/dist/hooks/useLogOnce.mjs +29 -0
- package/dist/hooks/useLogOnce.mjs.map +1 -0
- package/dist/index.d.mts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +3301 -435
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3185 -324
- package/dist/index.mjs.map +1 -1
- package/dist/localization/LanguageProvider.js +8 -3
- package/dist/localization/LanguageProvider.js.map +1 -1
- package/dist/localization/LanguageProvider.mjs +8 -3
- package/dist/localization/LanguageProvider.mjs.map +1 -1
- package/dist/localization/useTranslation.js.map +1 -1
- package/dist/localization/useTranslation.mjs.map +1 -1
- package/dist/theming/useTheme.d.mts +2 -2
- package/dist/theming/useTheme.d.ts +2 -2
- package/dist/theming/useTheme.js +26 -22
- package/dist/theming/useTheme.js.map +1 -1
- package/dist/theming/useTheme.mjs +21 -17
- package/dist/theming/useTheme.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -33,8 +33,8 @@ __export(MultiSelect_exports, {
|
|
|
33
33
|
MultiSelectUncontrolled: () => MultiSelectUncontrolled
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(MultiSelect_exports);
|
|
36
|
-
var
|
|
37
|
-
var
|
|
36
|
+
var import_react14 = require("react");
|
|
37
|
+
var import_react15 = require("react");
|
|
38
38
|
|
|
39
39
|
// src/localization/LanguageProvider.tsx
|
|
40
40
|
var import_react2 = require("react");
|
|
@@ -124,7 +124,7 @@ var useTranslation = (translations, overwriteTranslation = {}) => {
|
|
|
124
124
|
};
|
|
125
125
|
|
|
126
126
|
// src/components/user-action/MultiSelect.tsx
|
|
127
|
-
var
|
|
127
|
+
var import_clsx10 = __toESM(require("clsx"));
|
|
128
128
|
|
|
129
129
|
// src/components/user-action/Label.tsx
|
|
130
130
|
var import_clsx = __toESM(require("clsx"));
|
|
@@ -144,156 +144,322 @@ var Label = ({
|
|
|
144
144
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("label", { ...props, className: (0, import_clsx.default)(styleMapping[labelType], className), children: children ? children : name });
|
|
145
145
|
};
|
|
146
146
|
|
|
147
|
-
// src/components/user-action/
|
|
148
|
-
var
|
|
149
|
-
var import_react14 = require("react");
|
|
150
|
-
var import_clsx8 = __toESM(require("clsx"));
|
|
151
|
-
|
|
152
|
-
// src/components/layout-and-navigation/Tile.tsx
|
|
147
|
+
// src/components/user-action/Button.tsx
|
|
148
|
+
var import_react3 = require("react");
|
|
153
149
|
var import_clsx2 = __toESM(require("clsx"));
|
|
154
|
-
var import_lucide_react = require("lucide-react");
|
|
155
150
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
156
|
-
var
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
151
|
+
var ButtonColorUtil = {
|
|
152
|
+
solid: ["primary", "secondary", "tertiary", "positive", "warning", "negative", "neutral"],
|
|
153
|
+
text: ["primary", "negative", "neutral"],
|
|
154
|
+
outline: ["primary"]
|
|
155
|
+
};
|
|
156
|
+
var IconButtonUtil = {
|
|
157
|
+
icon: [...ButtonColorUtil.solid, "transparent"]
|
|
158
|
+
};
|
|
159
|
+
var paddingMapping = {
|
|
160
|
+
small: "btn-sm",
|
|
161
|
+
medium: "btn-md",
|
|
162
|
+
large: "btn-lg"
|
|
163
|
+
};
|
|
164
|
+
var iconPaddingMapping = {
|
|
165
|
+
tiny: "icon-btn-xs",
|
|
166
|
+
small: "icon-btn-sm",
|
|
167
|
+
medium: "icon-btn-md",
|
|
168
|
+
large: "icon-btn-lg"
|
|
169
|
+
};
|
|
170
|
+
var ButtonUtil = {
|
|
171
|
+
paddingMapping,
|
|
172
|
+
iconPaddingMapping
|
|
173
|
+
};
|
|
174
|
+
var SolidButton = (0, import_react3.forwardRef)(function SolidButton2({
|
|
175
|
+
children,
|
|
161
176
|
disabled = false,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
className
|
|
168
|
-
|
|
177
|
+
color = "primary",
|
|
178
|
+
size = "medium",
|
|
179
|
+
startIcon,
|
|
180
|
+
endIcon,
|
|
181
|
+
onClick,
|
|
182
|
+
className,
|
|
183
|
+
...restProps
|
|
184
|
+
}, ref) {
|
|
185
|
+
const colorClasses = {
|
|
186
|
+
primary: "bg-button-solid-primary-background text-button-solid-primary-text",
|
|
187
|
+
secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
|
|
188
|
+
tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
|
|
189
|
+
positive: "bg-button-solid-positive-background text-button-solid-positive-text",
|
|
190
|
+
warning: "bg-button-solid-warning-background text-button-solid-warning-text",
|
|
191
|
+
negative: "bg-button-solid-negative-background text-button-solid-negative-text",
|
|
192
|
+
neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text"
|
|
193
|
+
}[color];
|
|
194
|
+
const iconColorClasses = {
|
|
195
|
+
primary: "text-button-solid-primary-icon",
|
|
196
|
+
secondary: "text-button-solid-secondary-icon",
|
|
197
|
+
tertiary: "text-button-solid-tertiary-icon",
|
|
198
|
+
positive: "text-button-solid-positive-icon",
|
|
199
|
+
warning: "text-button-solid-warning-icon",
|
|
200
|
+
negative: "text-button-solid-negative-icon",
|
|
201
|
+
neutral: "text-button-solid-neutral-icon"
|
|
202
|
+
}[color];
|
|
169
203
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
170
|
-
"
|
|
204
|
+
"button",
|
|
171
205
|
{
|
|
206
|
+
ref,
|
|
207
|
+
onClick,
|
|
208
|
+
disabled,
|
|
172
209
|
className: (0, import_clsx2.default)(
|
|
173
|
-
"
|
|
210
|
+
"font-semibold",
|
|
174
211
|
{
|
|
175
|
-
|
|
176
|
-
[
|
|
177
|
-
[disabledClassName]: disabled
|
|
212
|
+
"text-disabled-text bg-disabled-background cursor-not-allowed": disabled,
|
|
213
|
+
[(0, import_clsx2.default)(colorClasses, "hover:brightness-90")]: !disabled
|
|
178
214
|
},
|
|
215
|
+
ButtonUtil.paddingMapping[size],
|
|
179
216
|
className
|
|
180
217
|
),
|
|
181
|
-
|
|
218
|
+
...restProps,
|
|
182
219
|
children: [
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
220
|
+
startIcon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
221
|
+
"span",
|
|
222
|
+
{
|
|
223
|
+
className: (0, import_clsx2.default)({
|
|
224
|
+
[iconColorClasses]: !disabled,
|
|
225
|
+
[`text-disabled-icon`]: disabled
|
|
226
|
+
}),
|
|
227
|
+
children: startIcon
|
|
228
|
+
}
|
|
229
|
+
),
|
|
230
|
+
children,
|
|
231
|
+
endIcon && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
232
|
+
"span",
|
|
233
|
+
{
|
|
234
|
+
className: (0, import_clsx2.default)({
|
|
235
|
+
[iconColorClasses]: !disabled,
|
|
236
|
+
[`text-disabled-icon`]: disabled
|
|
237
|
+
}),
|
|
238
|
+
children: endIcon
|
|
239
|
+
}
|
|
240
|
+
)
|
|
189
241
|
]
|
|
190
242
|
}
|
|
191
243
|
);
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
244
|
+
});
|
|
245
|
+
var IconButton = ({
|
|
246
|
+
children,
|
|
247
|
+
disabled = false,
|
|
248
|
+
color = "primary",
|
|
249
|
+
size = "medium",
|
|
250
|
+
className,
|
|
251
|
+
...restProps
|
|
252
|
+
}) => {
|
|
253
|
+
const colorClasses = {
|
|
254
|
+
primary: "bg-button-solid-primary-background text-button-solid-primary-text",
|
|
255
|
+
secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
|
|
256
|
+
tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
|
|
257
|
+
positive: "bg-button-solid-positive-background text-button-solid-positive-text",
|
|
258
|
+
warning: "bg-button-solid-warning-background text-button-solid-warning-text",
|
|
259
|
+
negative: "bg-button-solid-negative-background text-button-solid-negative-text",
|
|
260
|
+
neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text",
|
|
261
|
+
transparent: "bg-transparent"
|
|
262
|
+
}[color];
|
|
263
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
264
|
+
"button",
|
|
207
265
|
{
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
{
|
|
266
|
+
disabled,
|
|
267
|
+
className: (0, import_clsx2.default)(
|
|
268
|
+
{
|
|
269
|
+
"text-disabled-text bg-disabled-background cursor-not-allowed": disabled && color !== "transparent",
|
|
270
|
+
"text-disabled-text cursor-not-allowed opacity-70": disabled && color === "transparent",
|
|
271
|
+
"hover:bg-button-text-hover-background": !disabled && color === "transparent",
|
|
272
|
+
[(0, import_clsx2.default)(colorClasses, "hover:brightness-90")]: !disabled
|
|
273
|
+
},
|
|
274
|
+
ButtonUtil.iconPaddingMapping[size],
|
|
211
275
|
className
|
|
212
|
-
)
|
|
276
|
+
),
|
|
277
|
+
...restProps,
|
|
278
|
+
children
|
|
213
279
|
}
|
|
214
280
|
);
|
|
215
281
|
};
|
|
216
|
-
|
|
282
|
+
|
|
283
|
+
// src/components/layout-and-navigation/Chip.tsx
|
|
284
|
+
var import_clsx3 = __toESM(require("clsx"));
|
|
285
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
286
|
+
var Chip = ({
|
|
217
287
|
children,
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
288
|
+
trailingIcon,
|
|
289
|
+
color = "default",
|
|
290
|
+
variant = "normal",
|
|
291
|
+
className = "",
|
|
292
|
+
...restProps
|
|
293
|
+
}) => {
|
|
294
|
+
const colorMapping = {
|
|
295
|
+
default: "text-tag-default-text bg-tag-default-background",
|
|
296
|
+
dark: "text-tag-dark-text bg-tag-dark-background",
|
|
297
|
+
red: "text-tag-red-text bg-tag-red-background",
|
|
298
|
+
yellow: "text-tag-yellow-text bg-tag-yellow-background",
|
|
299
|
+
green: "text-tag-green-text bg-tag-green-background",
|
|
300
|
+
blue: "text-tag-blue-text bg-tag-blue-background",
|
|
301
|
+
pink: "text-tag-pink-text bg-tag-pink-background"
|
|
302
|
+
}[color];
|
|
303
|
+
const colorMappingIcon = {
|
|
304
|
+
default: "text-tag-default-icon",
|
|
305
|
+
dark: "text-tag-dark-icon",
|
|
306
|
+
red: "text-tag-red-icon",
|
|
307
|
+
yellow: "text-tag-yellow-icon",
|
|
308
|
+
green: "text-tag-green-icon",
|
|
309
|
+
blue: "text-tag-blue-icon",
|
|
310
|
+
pink: "text-tag-pink-icon"
|
|
311
|
+
}[color];
|
|
231
312
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
232
313
|
"div",
|
|
233
314
|
{
|
|
234
|
-
|
|
235
|
-
className: (0, import_clsx3.default)(
|
|
236
|
-
|
|
315
|
+
...restProps,
|
|
316
|
+
className: (0, import_clsx3.default)(
|
|
317
|
+
`row w-fit px-2 py-1 font-semibold`,
|
|
318
|
+
colorMapping,
|
|
319
|
+
{
|
|
320
|
+
"rounded-md": variant === "normal",
|
|
321
|
+
"rounded-full": variant === "fullyRounded"
|
|
322
|
+
},
|
|
323
|
+
className
|
|
324
|
+
),
|
|
237
325
|
children: [
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
{
|
|
241
|
-
className: (0, import_clsx3.default)(
|
|
242
|
-
"flex-row-2 py-2 px-4 rounded-lg justify-between items-center bg-surface text-on-surface select-none",
|
|
243
|
-
{
|
|
244
|
-
"group-hover:brightness-97": !isExpanded,
|
|
245
|
-
"hover:brightness-97": isExpanded && !disabled,
|
|
246
|
-
"cursor-pointer": clickOnlyOnHeader && !disabled
|
|
247
|
-
},
|
|
248
|
-
headerClassName
|
|
249
|
-
),
|
|
250
|
-
onClick: () => clickOnlyOnHeader && !disabled && onChange(!isExpanded),
|
|
251
|
-
children: [
|
|
252
|
-
label,
|
|
253
|
-
icon(isExpanded)
|
|
254
|
-
]
|
|
255
|
-
}
|
|
256
|
-
),
|
|
257
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
258
|
-
"div",
|
|
259
|
-
{
|
|
260
|
-
className: (0, import_clsx3.default)(
|
|
261
|
-
"flex-col-2 px-4 transition-all duration-300 ease-in-out",
|
|
262
|
-
{
|
|
263
|
-
[(0, import_clsx3.default)("max-h-96 opacity-100 pb-2 overflow-y-auto", contentExpandedClassName)]: isExpanded,
|
|
264
|
-
"max-h-0 opacity-0 overflow-hidden": !isExpanded
|
|
265
|
-
},
|
|
266
|
-
contentClassName
|
|
267
|
-
),
|
|
268
|
-
children
|
|
269
|
-
}
|
|
270
|
-
)
|
|
326
|
+
children,
|
|
327
|
+
trailingIcon && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: colorMappingIcon, children: trailingIcon })
|
|
271
328
|
]
|
|
272
329
|
}
|
|
273
330
|
);
|
|
274
|
-
}
|
|
275
|
-
var
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
(0, import_react3.useEffect)(() => {
|
|
282
|
-
setUsedIsExpanded(isExpanded);
|
|
283
|
-
}, [isExpanded]);
|
|
284
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
285
|
-
Expandable,
|
|
331
|
+
};
|
|
332
|
+
var ChipList = ({
|
|
333
|
+
list,
|
|
334
|
+
className = ""
|
|
335
|
+
}) => {
|
|
336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: (0, import_clsx3.default)("flex flex-wrap gap-x-2 gap-y-2", className), children: list.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
337
|
+
Chip,
|
|
286
338
|
{
|
|
287
|
-
...
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
339
|
+
...value,
|
|
340
|
+
color: value.color ?? "default",
|
|
341
|
+
variant: value.variant ?? "normal",
|
|
342
|
+
children: value.children
|
|
343
|
+
},
|
|
344
|
+
index
|
|
345
|
+
)) });
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
// src/localization/defaults/form.ts
|
|
349
|
+
var formTranslation = {
|
|
350
|
+
en: {
|
|
351
|
+
add: "Add",
|
|
352
|
+
all: "All",
|
|
353
|
+
apply: "Apply",
|
|
354
|
+
back: "Back",
|
|
355
|
+
cancel: "Cancel",
|
|
356
|
+
change: "Change",
|
|
357
|
+
clear: "Clear",
|
|
358
|
+
click: "Click",
|
|
359
|
+
clickToCopy: "Click to Copy",
|
|
360
|
+
close: "Close",
|
|
361
|
+
confirm: "Confirm",
|
|
362
|
+
copy: "Copy",
|
|
363
|
+
copied: "Copied",
|
|
364
|
+
create: "Create",
|
|
365
|
+
decline: "Decline",
|
|
366
|
+
delete: "Delete",
|
|
367
|
+
discard: "Discard",
|
|
368
|
+
discardChanges: "Discard Changes",
|
|
369
|
+
done: "Done",
|
|
370
|
+
edit: "Edit",
|
|
371
|
+
enterText: "Enter text here",
|
|
372
|
+
error: "Error",
|
|
373
|
+
exit: "Exit",
|
|
374
|
+
fieldRequiredError: "This field is required.",
|
|
375
|
+
invalidEmailError: "Please enter a valid email address.",
|
|
376
|
+
less: "Less",
|
|
377
|
+
loading: "Loading",
|
|
378
|
+
maxLengthError: "Maximum length exceeded.",
|
|
379
|
+
minLengthError: "Minimum length not met.",
|
|
380
|
+
more: "More",
|
|
381
|
+
next: "Next",
|
|
382
|
+
no: "No",
|
|
383
|
+
none: "None",
|
|
384
|
+
of: "of",
|
|
385
|
+
optional: "Optional",
|
|
386
|
+
pleaseWait: "Please wait...",
|
|
387
|
+
previous: "Previous",
|
|
388
|
+
remove: "Remove",
|
|
389
|
+
required: "Required",
|
|
390
|
+
reset: "Reset",
|
|
391
|
+
save: "Save",
|
|
392
|
+
saved: "Saved",
|
|
393
|
+
search: "Search",
|
|
394
|
+
select: "Select",
|
|
395
|
+
selectOption: "Select an option",
|
|
396
|
+
show: "Show",
|
|
397
|
+
showMore: "Show more",
|
|
398
|
+
showLess: "Show less",
|
|
399
|
+
submit: "Submit",
|
|
400
|
+
success: "Success",
|
|
401
|
+
update: "Update",
|
|
402
|
+
unsavedChanges: "Unsaved Changes",
|
|
403
|
+
unsavedChangesSaveQuestion: "Do you want to save your changes?",
|
|
404
|
+
yes: "Yes"
|
|
405
|
+
},
|
|
406
|
+
de: {
|
|
407
|
+
add: "Hinzuf\xFCgen",
|
|
408
|
+
all: "Alle",
|
|
409
|
+
apply: "Anwenden",
|
|
410
|
+
back: "Zur\xFCck",
|
|
411
|
+
cancel: "Abbrechen",
|
|
412
|
+
change: "\xC4ndern",
|
|
413
|
+
clear: "L\xF6schen",
|
|
414
|
+
click: "Klicken",
|
|
415
|
+
clickToCopy: "Zum kopieren klicken",
|
|
416
|
+
close: "Schlie\xDFen",
|
|
417
|
+
confirm: "Best\xE4tigen",
|
|
418
|
+
copy: "Kopieren",
|
|
419
|
+
copied: "Kopiert",
|
|
420
|
+
create: "Erstellen",
|
|
421
|
+
decline: "Ablehnen",
|
|
422
|
+
delete: "L\xF6schen",
|
|
423
|
+
discard: "Verwerfen",
|
|
424
|
+
discardChanges: "\xC4nderungen Verwerfen",
|
|
425
|
+
done: "Fertig",
|
|
426
|
+
edit: "Bearbeiten",
|
|
427
|
+
enterText: "Text hier eingeben",
|
|
428
|
+
error: "Fehler",
|
|
429
|
+
exit: "Beenden",
|
|
430
|
+
fieldRequiredError: "Dieses Feld ist erforderlich.",
|
|
431
|
+
invalidEmailError: "Bitte geben Sie eine g\xFCltige E-Mail-Adresse ein.",
|
|
432
|
+
less: "Weniger",
|
|
433
|
+
loading: "L\xE4dt",
|
|
434
|
+
maxLengthError: "Maximale L\xE4nge \xFCberschritten.",
|
|
435
|
+
minLengthError: "Mindestl\xE4nge nicht erreicht.",
|
|
436
|
+
more: "Mehr",
|
|
437
|
+
next: "Weiter",
|
|
438
|
+
no: "Nein",
|
|
439
|
+
none: "Nichts",
|
|
440
|
+
of: "von",
|
|
441
|
+
optional: "Optional",
|
|
442
|
+
pleaseWait: "Bitte warten...",
|
|
443
|
+
previous: "Vorherige",
|
|
444
|
+
remove: "Entfernen",
|
|
445
|
+
required: "Erforderlich",
|
|
446
|
+
reset: "Zur\xFCcksetzen",
|
|
447
|
+
save: "Speichern",
|
|
448
|
+
saved: "Gespeichert",
|
|
449
|
+
search: "Suche",
|
|
450
|
+
select: "Select",
|
|
451
|
+
selectOption: "Option ausw\xE4hlen",
|
|
452
|
+
show: "Anzeigen",
|
|
453
|
+
showMore: "Mehr anzeigen",
|
|
454
|
+
showLess: "Weniger anzeigen",
|
|
455
|
+
submit: "Abschicken",
|
|
456
|
+
success: "Erfolg",
|
|
457
|
+
update: "Update",
|
|
458
|
+
unsavedChanges: "Ungespeicherte \xC4nderungen",
|
|
459
|
+
unsavedChangesSaveQuestion: "M\xF6chtest du die \xC4nderungen speichern?",
|
|
460
|
+
yes: "Ja"
|
|
461
|
+
}
|
|
462
|
+
};
|
|
297
463
|
|
|
298
464
|
// src/components/user-action/Menu.tsx
|
|
299
465
|
var import_react6 = require("react");
|
|
@@ -494,7 +660,7 @@ var Menu = ({
|
|
|
494
660
|
ref: menuRef,
|
|
495
661
|
onClick: (e) => e.stopPropagation(),
|
|
496
662
|
className: (0, import_clsx4.default)(
|
|
497
|
-
"absolute rounded-md bg-menu-background text-menu-text shadow-around-lg z-[300]",
|
|
663
|
+
"absolute rounded-md bg-menu-background text-menu-text shadow-around-lg shadow-strong z-[300]",
|
|
498
664
|
{
|
|
499
665
|
"animate-pop-in": isOpen,
|
|
500
666
|
"animate-pop-out": !isOpen,
|
|
@@ -516,18 +682,122 @@ var Menu = ({
|
|
|
516
682
|
] });
|
|
517
683
|
};
|
|
518
684
|
|
|
519
|
-
// src/components/
|
|
520
|
-
var
|
|
685
|
+
// src/components/layout-and-navigation/Expandable.tsx
|
|
686
|
+
var import_react7 = require("react");
|
|
687
|
+
var import_lucide_react = require("lucide-react");
|
|
521
688
|
var import_clsx5 = __toESM(require("clsx"));
|
|
522
689
|
|
|
690
|
+
// src/util/noop.ts
|
|
691
|
+
var noop = () => void 0;
|
|
692
|
+
|
|
693
|
+
// src/components/layout-and-navigation/Expandable.tsx
|
|
694
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
695
|
+
var ExpansionIcon = ({ isExpanded, className }) => {
|
|
696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
697
|
+
import_lucide_react.ChevronDown,
|
|
698
|
+
{
|
|
699
|
+
className: (0, import_clsx5.default)(
|
|
700
|
+
"min-w-6 w-6 min-h-6 h-6 transition-transform duration-200 ease-in-out",
|
|
701
|
+
{ "rotate-180": isExpanded },
|
|
702
|
+
className
|
|
703
|
+
)
|
|
704
|
+
}
|
|
705
|
+
);
|
|
706
|
+
};
|
|
707
|
+
var Expandable = (0, import_react7.forwardRef)(function Expandable2({
|
|
708
|
+
children,
|
|
709
|
+
label,
|
|
710
|
+
icon,
|
|
711
|
+
isExpanded = false,
|
|
712
|
+
onChange = noop,
|
|
713
|
+
clickOnlyOnHeader = true,
|
|
714
|
+
disabled = false,
|
|
715
|
+
className,
|
|
716
|
+
headerClassName,
|
|
717
|
+
contentClassName,
|
|
718
|
+
contentExpandedClassName
|
|
719
|
+
}, ref) {
|
|
720
|
+
const defaultIcon = (0, import_react7.useCallback)((expanded) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ExpansionIcon, { isExpanded: expanded }), []);
|
|
721
|
+
icon ??= defaultIcon;
|
|
722
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
723
|
+
"div",
|
|
724
|
+
{
|
|
725
|
+
ref,
|
|
726
|
+
className: (0, import_clsx5.default)("flex-col-0 bg-surface text-on-surface group rounded-lg shadow-sm", { "cursor-pointer": !clickOnlyOnHeader && !disabled }, className),
|
|
727
|
+
onClick: () => !clickOnlyOnHeader && !disabled && onChange(!isExpanded),
|
|
728
|
+
children: [
|
|
729
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
730
|
+
"div",
|
|
731
|
+
{
|
|
732
|
+
className: (0, import_clsx5.default)(
|
|
733
|
+
"flex-row-2 py-2 px-4 rounded-lg justify-between items-center bg-surface text-on-surface select-none",
|
|
734
|
+
{
|
|
735
|
+
"group-hover:brightness-97": !isExpanded,
|
|
736
|
+
"hover:brightness-97": isExpanded && !disabled,
|
|
737
|
+
"cursor-pointer": clickOnlyOnHeader && !disabled
|
|
738
|
+
},
|
|
739
|
+
headerClassName
|
|
740
|
+
),
|
|
741
|
+
onClick: () => clickOnlyOnHeader && !disabled && onChange(!isExpanded),
|
|
742
|
+
children: [
|
|
743
|
+
label,
|
|
744
|
+
icon(isExpanded)
|
|
745
|
+
]
|
|
746
|
+
}
|
|
747
|
+
),
|
|
748
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
749
|
+
"div",
|
|
750
|
+
{
|
|
751
|
+
className: (0, import_clsx5.default)(
|
|
752
|
+
"flex-col-2 px-4 transition-all duration-300 ease-in-out",
|
|
753
|
+
{
|
|
754
|
+
[(0, import_clsx5.default)("max-h-96 opacity-100 pb-2 overflow-y-auto", contentExpandedClassName)]: isExpanded,
|
|
755
|
+
"max-h-0 opacity-0 overflow-hidden": !isExpanded
|
|
756
|
+
},
|
|
757
|
+
contentClassName
|
|
758
|
+
),
|
|
759
|
+
children
|
|
760
|
+
}
|
|
761
|
+
)
|
|
762
|
+
]
|
|
763
|
+
}
|
|
764
|
+
);
|
|
765
|
+
});
|
|
766
|
+
var ExpandableUncontrolled = (0, import_react7.forwardRef)(function ExpandableUncontrolled2({
|
|
767
|
+
isExpanded,
|
|
768
|
+
onChange = noop,
|
|
769
|
+
...props
|
|
770
|
+
}, ref) {
|
|
771
|
+
const [usedIsExpanded, setUsedIsExpanded] = (0, import_react7.useState)(isExpanded);
|
|
772
|
+
(0, import_react7.useEffect)(() => {
|
|
773
|
+
setUsedIsExpanded(isExpanded);
|
|
774
|
+
}, [isExpanded]);
|
|
775
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
776
|
+
Expandable,
|
|
777
|
+
{
|
|
778
|
+
...props,
|
|
779
|
+
ref,
|
|
780
|
+
isExpanded: usedIsExpanded,
|
|
781
|
+
onChange: (value) => {
|
|
782
|
+
onChange(value);
|
|
783
|
+
setUsedIsExpanded(value);
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
);
|
|
787
|
+
});
|
|
788
|
+
|
|
789
|
+
// src/components/user-action/Input.tsx
|
|
790
|
+
var import_react11 = require("react");
|
|
791
|
+
var import_clsx6 = __toESM(require("clsx"));
|
|
792
|
+
|
|
523
793
|
// src/hooks/useDelay.ts
|
|
524
|
-
var
|
|
794
|
+
var import_react8 = require("react");
|
|
525
795
|
var defaultOptions = {
|
|
526
796
|
delay: 3e3,
|
|
527
797
|
disabled: false
|
|
528
798
|
};
|
|
529
799
|
function useDelay(options) {
|
|
530
|
-
const [timer, setTimer] = (0,
|
|
800
|
+
const [timer, setTimer] = (0, import_react8.useState)(void 0);
|
|
531
801
|
const { delay, disabled } = {
|
|
532
802
|
...defaultOptions,
|
|
533
803
|
...options
|
|
@@ -546,12 +816,12 @@ function useDelay(options) {
|
|
|
546
816
|
setTimer(void 0);
|
|
547
817
|
}, delay));
|
|
548
818
|
};
|
|
549
|
-
(0,
|
|
819
|
+
(0, import_react8.useEffect)(() => {
|
|
550
820
|
return () => {
|
|
551
821
|
clearTimeout(timer);
|
|
552
822
|
};
|
|
553
823
|
}, [timer]);
|
|
554
|
-
(0,
|
|
824
|
+
(0, import_react8.useEffect)(() => {
|
|
555
825
|
if (disabled) {
|
|
556
826
|
clearTimeout(timer);
|
|
557
827
|
setTimer(void 0);
|
|
@@ -561,9 +831,9 @@ function useDelay(options) {
|
|
|
561
831
|
}
|
|
562
832
|
|
|
563
833
|
// src/hooks/useFocusManagement.ts
|
|
564
|
-
var
|
|
834
|
+
var import_react9 = require("react");
|
|
565
835
|
function useFocusManagement() {
|
|
566
|
-
const getFocusableElements = (0,
|
|
836
|
+
const getFocusableElements = (0, import_react9.useCallback)(() => {
|
|
567
837
|
return Array.from(
|
|
568
838
|
document.querySelectorAll(
|
|
569
839
|
'input, button, select, textarea, a[href], [tabindex]:not([tabindex="-1"])'
|
|
@@ -572,7 +842,7 @@ function useFocusManagement() {
|
|
|
572
842
|
(el) => el instanceof HTMLElement && !el.hasAttribute("disabled") && !el.hasAttribute("hidden") && el.tabIndex !== -1
|
|
573
843
|
);
|
|
574
844
|
}, []);
|
|
575
|
-
const getNextFocusElement = (0,
|
|
845
|
+
const getNextFocusElement = (0, import_react9.useCallback)(() => {
|
|
576
846
|
const elements = getFocusableElements();
|
|
577
847
|
if (elements.length === 0) {
|
|
578
848
|
return void 0;
|
|
@@ -584,11 +854,11 @@ function useFocusManagement() {
|
|
|
584
854
|
}
|
|
585
855
|
return nextElement;
|
|
586
856
|
}, [getFocusableElements]);
|
|
587
|
-
const focusNext = (0,
|
|
857
|
+
const focusNext = (0, import_react9.useCallback)(() => {
|
|
588
858
|
const nextElement = getNextFocusElement();
|
|
589
859
|
nextElement?.focus();
|
|
590
860
|
}, [getNextFocusElement]);
|
|
591
|
-
const getPreviousFocusElement = (0,
|
|
861
|
+
const getPreviousFocusElement = (0, import_react9.useCallback)(() => {
|
|
592
862
|
const elements = getFocusableElements();
|
|
593
863
|
if (elements.length === 0) {
|
|
594
864
|
return void 0;
|
|
@@ -604,7 +874,7 @@ function useFocusManagement() {
|
|
|
604
874
|
}
|
|
605
875
|
return previousElement;
|
|
606
876
|
}, [getFocusableElements]);
|
|
607
|
-
const focusPrevious = (0,
|
|
877
|
+
const focusPrevious = (0, import_react9.useCallback)(() => {
|
|
608
878
|
const previousElement = getPreviousFocusElement();
|
|
609
879
|
if (previousElement) previousElement.focus();
|
|
610
880
|
}, [getPreviousFocusElement]);
|
|
@@ -618,10 +888,10 @@ function useFocusManagement() {
|
|
|
618
888
|
}
|
|
619
889
|
|
|
620
890
|
// src/hooks/useFocusOnceVisible.ts
|
|
621
|
-
var
|
|
891
|
+
var import_react10 = __toESM(require("react"));
|
|
622
892
|
var useFocusOnceVisible = (ref, disable = false) => {
|
|
623
|
-
const [hasUsedFocus, setHasUsedFocus] =
|
|
624
|
-
(0,
|
|
893
|
+
const [hasUsedFocus, setHasUsedFocus] = import_react10.default.useState(false);
|
|
894
|
+
(0, import_react10.useEffect)(() => {
|
|
625
895
|
if (disable || hasUsedFocus) {
|
|
626
896
|
return;
|
|
627
897
|
}
|
|
@@ -641,12 +911,12 @@ var useFocusOnceVisible = (ref, disable = false) => {
|
|
|
641
911
|
};
|
|
642
912
|
|
|
643
913
|
// src/components/user-action/Input.tsx
|
|
644
|
-
var
|
|
914
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
645
915
|
var getInputClassName = ({ disabled = false, hasError = false }) => {
|
|
646
|
-
return (0,
|
|
916
|
+
return (0, import_clsx6.default)(
|
|
647
917
|
"px-2 py-1.5 rounded-md border-2",
|
|
648
918
|
{
|
|
649
|
-
"bg-
|
|
919
|
+
"bg-input-background text-input-text hover:border-primary focus:border-primary": !disabled && !hasError,
|
|
650
920
|
"bg-on-negative text-negative border-negative-border hover:border-negative-border-hover": !disabled && hasError,
|
|
651
921
|
"bg-disabled-background text-disabled-text border-disabled-border": disabled
|
|
652
922
|
}
|
|
@@ -657,369 +927,118 @@ var defaultEditCompleteOptions = {
|
|
|
657
927
|
afterDelay: true,
|
|
658
928
|
delay: 2500
|
|
659
929
|
};
|
|
660
|
-
var Input = (0,
|
|
930
|
+
var Input = (0, import_react11.forwardRef)(function Input2({
|
|
661
931
|
id,
|
|
662
932
|
type = "text",
|
|
663
933
|
value,
|
|
664
934
|
label,
|
|
665
935
|
onChange = noop,
|
|
666
|
-
onChangeText = noop,
|
|
667
|
-
onEditCompleted,
|
|
668
|
-
className = "",
|
|
669
|
-
allowEnterComplete = true,
|
|
670
|
-
expanded = true,
|
|
671
|
-
autoFocus = false,
|
|
672
|
-
onBlur,
|
|
673
|
-
editCompleteOptions,
|
|
674
|
-
containerClassName,
|
|
675
|
-
disabled,
|
|
676
|
-
...restProps
|
|
677
|
-
}, forwardedRef) {
|
|
678
|
-
const { onBlur: allowEditCompleteOnBlur, afterDelay, delay } = { ...defaultEditCompleteOptions, ...editCompleteOptions };
|
|
679
|
-
const {
|
|
680
|
-
restartTimer,
|
|
681
|
-
clearTimer
|
|
682
|
-
} = useDelay({ delay, disabled: !afterDelay });
|
|
683
|
-
const innerRef = (0,
|
|
684
|
-
const { focusNext } = useFocusManagement();
|
|
685
|
-
useFocusOnceVisible(innerRef, !autoFocus);
|
|
686
|
-
(0,
|
|
687
|
-
const handleKeyDown = (e) => {
|
|
688
|
-
if (e.key === "Enter" && !e.shiftKey) {
|
|
689
|
-
e.preventDefault();
|
|
690
|
-
innerRef.current?.blur();
|
|
691
|
-
focusNext();
|
|
692
|
-
}
|
|
693
|
-
};
|
|
694
|
-
return /* @__PURE__ */ (0,
|
|
695
|
-
label && /* @__PURE__ */ (0,
|
|
696
|
-
/* @__PURE__ */ (0,
|
|
697
|
-
"input",
|
|
698
|
-
{
|
|
699
|
-
...restProps,
|
|
700
|
-
ref: innerRef,
|
|
701
|
-
value,
|
|
702
|
-
id,
|
|
703
|
-
type,
|
|
704
|
-
disabled,
|
|
705
|
-
className: (0,
|
|
706
|
-
onKeyDown: allowEnterComplete ? handleKeyDown : void 0,
|
|
707
|
-
onBlur: (event) => {
|
|
708
|
-
onBlur?.(event);
|
|
709
|
-
if (onEditCompleted && allowEditCompleteOnBlur) {
|
|
710
|
-
onEditCompleted(event.target.value);
|
|
711
|
-
clearTimer();
|
|
712
|
-
}
|
|
713
|
-
},
|
|
714
|
-
onChange: (e) => {
|
|
715
|
-
const value2 = e.target.value;
|
|
716
|
-
if (onEditCompleted) {
|
|
717
|
-
restartTimer(() => {
|
|
718
|
-
if (innerRef.current) {
|
|
719
|
-
innerRef.current.blur();
|
|
720
|
-
if (!allowEditCompleteOnBlur) {
|
|
721
|
-
onEditCompleted(value2);
|
|
722
|
-
}
|
|
723
|
-
} else {
|
|
724
|
-
onEditCompleted(value2);
|
|
725
|
-
}
|
|
726
|
-
});
|
|
727
|
-
}
|
|
728
|
-
onChange(e);
|
|
729
|
-
onChangeText(value2);
|
|
730
|
-
}
|
|
731
|
-
}
|
|
732
|
-
)
|
|
733
|
-
] });
|
|
734
|
-
});
|
|
735
|
-
var FormInput = (0, import_react10.forwardRef)(function FormInput2({
|
|
736
|
-
id,
|
|
737
|
-
labelText,
|
|
738
|
-
errorText,
|
|
739
|
-
className,
|
|
740
|
-
labelClassName,
|
|
741
|
-
errorClassName,
|
|
742
|
-
containerClassName,
|
|
743
|
-
required,
|
|
744
|
-
disabled,
|
|
745
|
-
...restProps
|
|
746
|
-
}, ref) {
|
|
747
|
-
const input = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
748
|
-
"input",
|
|
749
|
-
{
|
|
750
|
-
...restProps,
|
|
751
|
-
ref,
|
|
752
|
-
id,
|
|
753
|
-
disabled,
|
|
754
|
-
className: (0, import_clsx5.default)(
|
|
755
|
-
getInputClassName({ disabled, hasError: !!errorText }),
|
|
756
|
-
className
|
|
757
|
-
)
|
|
758
|
-
}
|
|
759
|
-
);
|
|
760
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: (0, import_clsx5.default)("flex flex-col gap-y-1", containerClassName), children: [
|
|
761
|
-
labelText && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("label", { htmlFor: id, className: (0, import_clsx5.default)("textstyle-label-md", labelClassName), children: [
|
|
762
|
-
labelText,
|
|
763
|
-
required && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-primary font-bold", children: "*" })
|
|
764
|
-
] }),
|
|
765
|
-
input,
|
|
766
|
-
errorText && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("label", { htmlFor: id, className: (0, import_clsx5.default)("text-negative", errorClassName), children: errorText })
|
|
767
|
-
] });
|
|
768
|
-
});
|
|
769
|
-
|
|
770
|
-
// src/localization/defaults/form.ts
|
|
771
|
-
var formTranslation = {
|
|
772
|
-
en: {
|
|
773
|
-
add: "Add",
|
|
774
|
-
all: "All",
|
|
775
|
-
apply: "Apply",
|
|
776
|
-
back: "Back",
|
|
777
|
-
cancel: "Cancel",
|
|
778
|
-
change: "Change",
|
|
779
|
-
clear: "Clear",
|
|
780
|
-
click: "Click",
|
|
781
|
-
clickToCopy: "Click to Copy",
|
|
782
|
-
close: "Close",
|
|
783
|
-
confirm: "Confirm",
|
|
784
|
-
copy: "Copy",
|
|
785
|
-
copied: "Copied",
|
|
786
|
-
create: "Create",
|
|
787
|
-
decline: "Decline",
|
|
788
|
-
delete: "Delete",
|
|
789
|
-
discard: "Discard",
|
|
790
|
-
discardChanges: "Discard Changes",
|
|
791
|
-
done: "Done",
|
|
792
|
-
edit: "Edit",
|
|
793
|
-
enterText: "Enter text here",
|
|
794
|
-
error: "Error",
|
|
795
|
-
exit: "Exit",
|
|
796
|
-
fieldRequiredError: "This field is required.",
|
|
797
|
-
invalidEmailError: "Please enter a valid email address.",
|
|
798
|
-
less: "Less",
|
|
799
|
-
loading: "Loading",
|
|
800
|
-
maxLengthError: "Maximum length exceeded.",
|
|
801
|
-
minLengthError: "Minimum length not met.",
|
|
802
|
-
more: "More",
|
|
803
|
-
next: "Next",
|
|
804
|
-
no: "No",
|
|
805
|
-
none: "None",
|
|
806
|
-
of: "of",
|
|
807
|
-
optional: "Optional",
|
|
808
|
-
pleaseWait: "Please wait...",
|
|
809
|
-
previous: "Previous",
|
|
810
|
-
remove: "Remove",
|
|
811
|
-
required: "Required",
|
|
812
|
-
reset: "Reset",
|
|
813
|
-
save: "Save",
|
|
814
|
-
saved: "Saved",
|
|
815
|
-
search: "Search",
|
|
816
|
-
select: "Select",
|
|
817
|
-
selectOption: "Select an option",
|
|
818
|
-
show: "Show",
|
|
819
|
-
showMore: "Show more",
|
|
820
|
-
showLess: "Show less",
|
|
821
|
-
submit: "Submit",
|
|
822
|
-
success: "Success",
|
|
823
|
-
update: "Update",
|
|
824
|
-
unsavedChanges: "Unsaved Changes",
|
|
825
|
-
unsavedChangesSaveQuestion: "Do you want to save your changes?",
|
|
826
|
-
yes: "Yes"
|
|
827
|
-
},
|
|
828
|
-
de: {
|
|
829
|
-
add: "Hinzuf\xFCgen",
|
|
830
|
-
all: "Alle",
|
|
831
|
-
apply: "Anwenden",
|
|
832
|
-
back: "Zur\xFCck",
|
|
833
|
-
cancel: "Abbrechen",
|
|
834
|
-
change: "\xC4ndern",
|
|
835
|
-
clear: "L\xF6schen",
|
|
836
|
-
click: "Klicken",
|
|
837
|
-
clickToCopy: "Zum kopieren klicken",
|
|
838
|
-
close: "Schlie\xDFen",
|
|
839
|
-
confirm: "Best\xE4tigen",
|
|
840
|
-
copy: "Kopieren",
|
|
841
|
-
copied: "Kopiert",
|
|
842
|
-
create: "Erstellen",
|
|
843
|
-
decline: "Ablehnen",
|
|
844
|
-
delete: "L\xF6schen",
|
|
845
|
-
discard: "Verwerfen",
|
|
846
|
-
discardChanges: "\xC4nderungen Verwerfen",
|
|
847
|
-
done: "Fertig",
|
|
848
|
-
edit: "Bearbeiten",
|
|
849
|
-
enterText: "Text hier eingeben",
|
|
850
|
-
error: "Fehler",
|
|
851
|
-
exit: "Beenden",
|
|
852
|
-
fieldRequiredError: "Dieses Feld ist erforderlich.",
|
|
853
|
-
invalidEmailError: "Bitte geben Sie eine g\xFCltige E-Mail-Adresse ein.",
|
|
854
|
-
less: "Weniger",
|
|
855
|
-
loading: "L\xE4dt",
|
|
856
|
-
maxLengthError: "Maximale L\xE4nge \xFCberschritten.",
|
|
857
|
-
minLengthError: "Mindestl\xE4nge nicht erreicht.",
|
|
858
|
-
more: "Mehr",
|
|
859
|
-
next: "Weiter",
|
|
860
|
-
no: "Nein",
|
|
861
|
-
none: "Nichts",
|
|
862
|
-
of: "von",
|
|
863
|
-
optional: "Optional",
|
|
864
|
-
pleaseWait: "Bitte warten...",
|
|
865
|
-
previous: "Vorherige",
|
|
866
|
-
remove: "Entfernen",
|
|
867
|
-
required: "Erforderlich",
|
|
868
|
-
reset: "Zur\xFCcksetzen",
|
|
869
|
-
save: "Speichern",
|
|
870
|
-
saved: "Gespeichert",
|
|
871
|
-
search: "Suche",
|
|
872
|
-
select: "Select",
|
|
873
|
-
selectOption: "Option ausw\xE4hlen",
|
|
874
|
-
show: "Anzeigen",
|
|
875
|
-
showMore: "Mehr anzeigen",
|
|
876
|
-
showLess: "Weniger anzeigen",
|
|
877
|
-
submit: "Abschicken",
|
|
878
|
-
success: "Erfolg",
|
|
879
|
-
update: "Update",
|
|
880
|
-
unsavedChanges: "Ungespeicherte \xC4nderungen",
|
|
881
|
-
unsavedChangesSaveQuestion: "M\xF6chtest du die \xC4nderungen speichern?",
|
|
882
|
-
yes: "Ja"
|
|
883
|
-
}
|
|
884
|
-
};
|
|
885
|
-
|
|
886
|
-
// src/components/user-action/Button.tsx
|
|
887
|
-
var import_react11 = require("react");
|
|
888
|
-
var import_clsx6 = __toESM(require("clsx"));
|
|
889
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
890
|
-
var ButtonColorUtil = {
|
|
891
|
-
solid: ["primary", "secondary", "tertiary", "positive", "warning", "negative", "neutral"],
|
|
892
|
-
text: ["primary", "negative", "neutral"],
|
|
893
|
-
outline: ["primary"]
|
|
894
|
-
};
|
|
895
|
-
var IconButtonUtil = {
|
|
896
|
-
icon: [...ButtonColorUtil.solid, "transparent"]
|
|
897
|
-
};
|
|
898
|
-
var paddingMapping = {
|
|
899
|
-
small: "btn-sm",
|
|
900
|
-
medium: "btn-md",
|
|
901
|
-
large: "btn-lg"
|
|
902
|
-
};
|
|
903
|
-
var iconPaddingMapping = {
|
|
904
|
-
tiny: "icon-btn-xs",
|
|
905
|
-
small: "icon-btn-sm",
|
|
906
|
-
medium: "icon-btn-md",
|
|
907
|
-
large: "icon-btn-lg"
|
|
908
|
-
};
|
|
909
|
-
var ButtonUtil = {
|
|
910
|
-
paddingMapping,
|
|
911
|
-
iconPaddingMapping
|
|
912
|
-
};
|
|
913
|
-
var SolidButton = (0, import_react11.forwardRef)(function SolidButton2({
|
|
914
|
-
children,
|
|
915
|
-
disabled = false,
|
|
916
|
-
color = "primary",
|
|
917
|
-
size = "medium",
|
|
918
|
-
startIcon,
|
|
919
|
-
endIcon,
|
|
920
|
-
onClick,
|
|
921
|
-
className,
|
|
922
|
-
...restProps
|
|
923
|
-
}, ref) {
|
|
924
|
-
const colorClasses = {
|
|
925
|
-
primary: "bg-button-solid-primary-background text-button-solid-primary-text",
|
|
926
|
-
secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
|
|
927
|
-
tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
|
|
928
|
-
positive: "bg-button-solid-positive-background text-button-solid-positive-text",
|
|
929
|
-
warning: "bg-button-solid-warning-background text-button-solid-warning-text",
|
|
930
|
-
negative: "bg-button-solid-negative-background text-button-solid-negative-text",
|
|
931
|
-
neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text"
|
|
932
|
-
}[color];
|
|
933
|
-
const iconColorClasses = {
|
|
934
|
-
primary: "text-button-solid-primary-icon",
|
|
935
|
-
secondary: "text-button-solid-secondary-icon",
|
|
936
|
-
tertiary: "text-button-solid-tertiary-icon",
|
|
937
|
-
positive: "text-button-solid-positive-icon",
|
|
938
|
-
warning: "text-button-solid-warning-icon",
|
|
939
|
-
negative: "text-button-solid-negative-icon",
|
|
940
|
-
neutral: "text-button-solid-neutral-icon"
|
|
941
|
-
}[color];
|
|
942
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
943
|
-
"button",
|
|
944
|
-
{
|
|
945
|
-
ref,
|
|
946
|
-
onClick,
|
|
947
|
-
disabled,
|
|
948
|
-
className: (0, import_clsx6.default)(
|
|
949
|
-
{
|
|
950
|
-
"text-disabled-text bg-disabled-background cursor-not-allowed": disabled,
|
|
951
|
-
[(0, import_clsx6.default)(colorClasses, "hover:brightness-90")]: !disabled
|
|
952
|
-
},
|
|
953
|
-
ButtonUtil.paddingMapping[size],
|
|
954
|
-
className
|
|
955
|
-
),
|
|
956
|
-
...restProps,
|
|
957
|
-
children: [
|
|
958
|
-
startIcon && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
959
|
-
"span",
|
|
960
|
-
{
|
|
961
|
-
className: (0, import_clsx6.default)({
|
|
962
|
-
[iconColorClasses]: !disabled,
|
|
963
|
-
[`text-disabled-icon`]: disabled
|
|
964
|
-
}),
|
|
965
|
-
children: startIcon
|
|
936
|
+
onChangeText = noop,
|
|
937
|
+
onEditCompleted,
|
|
938
|
+
className = "",
|
|
939
|
+
allowEnterComplete = true,
|
|
940
|
+
expanded = true,
|
|
941
|
+
autoFocus = false,
|
|
942
|
+
onBlur,
|
|
943
|
+
editCompleteOptions,
|
|
944
|
+
containerClassName,
|
|
945
|
+
disabled,
|
|
946
|
+
...restProps
|
|
947
|
+
}, forwardedRef) {
|
|
948
|
+
const { onBlur: allowEditCompleteOnBlur, afterDelay, delay } = { ...defaultEditCompleteOptions, ...editCompleteOptions };
|
|
949
|
+
const {
|
|
950
|
+
restartTimer,
|
|
951
|
+
clearTimer
|
|
952
|
+
} = useDelay({ delay, disabled: !afterDelay });
|
|
953
|
+
const innerRef = (0, import_react11.useRef)(null);
|
|
954
|
+
const { focusNext } = useFocusManagement();
|
|
955
|
+
useFocusOnceVisible(innerRef, !autoFocus);
|
|
956
|
+
(0, import_react11.useImperativeHandle)(forwardedRef, () => innerRef.current);
|
|
957
|
+
const handleKeyDown = (e) => {
|
|
958
|
+
if (e.key === "Enter" && !e.shiftKey) {
|
|
959
|
+
e.preventDefault();
|
|
960
|
+
innerRef.current?.blur();
|
|
961
|
+
focusNext();
|
|
962
|
+
}
|
|
963
|
+
};
|
|
964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: (0, import_clsx6.default)({ "w-full": expanded }, containerClassName), children: [
|
|
965
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Label, { ...label, htmlFor: id, className: (0, import_clsx6.default)("mb-1", label.className) }),
|
|
966
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
967
|
+
"input",
|
|
968
|
+
{
|
|
969
|
+
...restProps,
|
|
970
|
+
ref: innerRef,
|
|
971
|
+
value,
|
|
972
|
+
id,
|
|
973
|
+
type,
|
|
974
|
+
disabled,
|
|
975
|
+
className: (0, import_clsx6.default)(getInputClassName({ disabled }), className),
|
|
976
|
+
onKeyDown: allowEnterComplete ? handleKeyDown : void 0,
|
|
977
|
+
onBlur: (event) => {
|
|
978
|
+
onBlur?.(event);
|
|
979
|
+
if (onEditCompleted && allowEditCompleteOnBlur) {
|
|
980
|
+
onEditCompleted(event.target.value);
|
|
981
|
+
clearTimer();
|
|
966
982
|
}
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
983
|
+
},
|
|
984
|
+
onChange: (e) => {
|
|
985
|
+
const value2 = e.target.value;
|
|
986
|
+
if (onEditCompleted) {
|
|
987
|
+
restartTimer(() => {
|
|
988
|
+
if (innerRef.current) {
|
|
989
|
+
innerRef.current.blur();
|
|
990
|
+
if (!allowEditCompleteOnBlur) {
|
|
991
|
+
onEditCompleted(value2);
|
|
992
|
+
}
|
|
993
|
+
} else {
|
|
994
|
+
onEditCompleted(value2);
|
|
995
|
+
}
|
|
996
|
+
});
|
|
977
997
|
}
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
998
|
+
onChange(e);
|
|
999
|
+
onChangeText(value2);
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
)
|
|
1003
|
+
] });
|
|
982
1004
|
});
|
|
983
|
-
var
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
size = "medium",
|
|
1005
|
+
var FormInput = (0, import_react11.forwardRef)(function FormInput2({
|
|
1006
|
+
id,
|
|
1007
|
+
labelText,
|
|
1008
|
+
errorText,
|
|
988
1009
|
className,
|
|
1010
|
+
labelClassName,
|
|
1011
|
+
errorClassName,
|
|
1012
|
+
containerClassName,
|
|
1013
|
+
required,
|
|
1014
|
+
disabled,
|
|
989
1015
|
...restProps
|
|
990
|
-
})
|
|
991
|
-
const
|
|
992
|
-
|
|
993
|
-
secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
|
|
994
|
-
tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
|
|
995
|
-
positive: "bg-button-solid-positive-background text-button-solid-positive-text",
|
|
996
|
-
warning: "bg-button-solid-warning-background text-button-solid-warning-text",
|
|
997
|
-
negative: "bg-button-solid-negative-background text-button-solid-negative-text",
|
|
998
|
-
neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text",
|
|
999
|
-
transparent: "bg-transparent"
|
|
1000
|
-
}[color];
|
|
1001
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1002
|
-
"button",
|
|
1016
|
+
}, ref) {
|
|
1017
|
+
const input = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1018
|
+
"input",
|
|
1003
1019
|
{
|
|
1020
|
+
...restProps,
|
|
1021
|
+
ref,
|
|
1022
|
+
id,
|
|
1004
1023
|
disabled,
|
|
1005
1024
|
className: (0, import_clsx6.default)(
|
|
1006
|
-
{
|
|
1007
|
-
"text-disabled-text bg-disabled-background cursor-not-allowed": disabled && color !== "transparent",
|
|
1008
|
-
"text-disabled-text cursor-not-allowed opacity-70": disabled && color === "transparent",
|
|
1009
|
-
"hover:bg-button-text-hover-background": !disabled && color === "transparent",
|
|
1010
|
-
[(0, import_clsx6.default)(colorClasses, "hover:brightness-90")]: !disabled
|
|
1011
|
-
},
|
|
1012
|
-
ButtonUtil.iconPaddingMapping[size],
|
|
1025
|
+
getInputClassName({ disabled, hasError: !!errorText }),
|
|
1013
1026
|
className
|
|
1014
|
-
)
|
|
1015
|
-
...restProps,
|
|
1016
|
-
children
|
|
1027
|
+
)
|
|
1017
1028
|
}
|
|
1018
1029
|
);
|
|
1019
|
-
|
|
1030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: (0, import_clsx6.default)("flex flex-col gap-y-1", containerClassName), children: [
|
|
1031
|
+
labelText && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("label", { htmlFor: id, className: (0, import_clsx6.default)("textstyle-label-md", labelClassName), children: [
|
|
1032
|
+
labelText,
|
|
1033
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { className: "text-primary font-bold", children: "*" })
|
|
1034
|
+
] }),
|
|
1035
|
+
input,
|
|
1036
|
+
errorText && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("label", { htmlFor: id, className: (0, import_clsx6.default)("text-negative", errorClassName), children: errorText })
|
|
1037
|
+
] });
|
|
1038
|
+
});
|
|
1020
1039
|
|
|
1021
1040
|
// src/components/user-action/SearchBar.tsx
|
|
1022
|
-
var
|
|
1041
|
+
var import_lucide_react2 = require("lucide-react");
|
|
1023
1042
|
var import_clsx7 = require("clsx");
|
|
1024
1043
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1025
1044
|
var SearchBar = ({
|
|
@@ -1038,7 +1057,7 @@ var SearchBar = ({
|
|
|
1038
1057
|
placeholder: placeholder ?? translation("search")
|
|
1039
1058
|
}
|
|
1040
1059
|
),
|
|
1041
|
-
onSearch && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(IconButton, { color: "neutral", disabled: disableOnSearch, onClick: onSearch, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1060
|
+
onSearch && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(IconButton, { color: "neutral", disabled: disableOnSearch, onClick: onSearch, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_lucide_react2.Search, { className: "w-full h-full" }) })
|
|
1042
1061
|
] });
|
|
1043
1062
|
};
|
|
1044
1063
|
|
|
@@ -1110,96 +1129,12 @@ var useSearch = ({
|
|
|
1110
1129
|
};
|
|
1111
1130
|
};
|
|
1112
1131
|
|
|
1113
|
-
// src/components/user-action/Select.tsx
|
|
1114
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1115
|
-
var SelectTile = ({
|
|
1116
|
-
className,
|
|
1117
|
-
disabledClassName,
|
|
1118
|
-
title,
|
|
1119
|
-
...restProps
|
|
1120
|
-
}) => {
|
|
1121
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1122
|
-
Tile,
|
|
1123
|
-
{
|
|
1124
|
-
...restProps,
|
|
1125
|
-
className: (0, import_clsx8.default)("px-2 py-1 rounded-md", className),
|
|
1126
|
-
disabledClassName: disabledClassName ?? "text-disabled-text cursor-not-allowed",
|
|
1127
|
-
title: { ...title, className: title.className ?? "font-semibold" }
|
|
1128
|
-
}
|
|
1129
|
-
);
|
|
1130
|
-
};
|
|
1131
|
-
|
|
1132
|
-
// src/components/layout-and-navigation/Chip.tsx
|
|
1133
|
-
var import_clsx9 = __toESM(require("clsx"));
|
|
1134
|
-
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1135
|
-
var Chip = ({
|
|
1136
|
-
children,
|
|
1137
|
-
trailingIcon,
|
|
1138
|
-
color = "default",
|
|
1139
|
-
variant = "normal",
|
|
1140
|
-
className = "",
|
|
1141
|
-
...restProps
|
|
1142
|
-
}) => {
|
|
1143
|
-
const colorMapping = {
|
|
1144
|
-
default: "text-tag-default-text bg-tag-default-background",
|
|
1145
|
-
dark: "text-tag-dark-text bg-tag-dark-background",
|
|
1146
|
-
red: "text-tag-red-text bg-tag-red-background",
|
|
1147
|
-
yellow: "text-tag-yellow-text bg-tag-yellow-background",
|
|
1148
|
-
green: "text-tag-green-text bg-tag-green-background",
|
|
1149
|
-
blue: "text-tag-blue-text bg-tag-blue-background",
|
|
1150
|
-
pink: "text-tag-pink-text bg-tag-pink-background"
|
|
1151
|
-
}[color];
|
|
1152
|
-
const colorMappingIcon = {
|
|
1153
|
-
default: "text-tag-default-icon",
|
|
1154
|
-
dark: "text-tag-dark-icon",
|
|
1155
|
-
red: "text-tag-red-icon",
|
|
1156
|
-
yellow: "text-tag-yellow-icon",
|
|
1157
|
-
green: "text-tag-green-icon",
|
|
1158
|
-
blue: "text-tag-blue-icon",
|
|
1159
|
-
pink: "text-tag-pink-icon"
|
|
1160
|
-
}[color];
|
|
1161
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1162
|
-
"div",
|
|
1163
|
-
{
|
|
1164
|
-
...restProps,
|
|
1165
|
-
className: (0, import_clsx9.default)(
|
|
1166
|
-
`row w-fit px-2 py-1`,
|
|
1167
|
-
colorMapping,
|
|
1168
|
-
{
|
|
1169
|
-
"rounded-md": variant === "normal",
|
|
1170
|
-
"rounded-full": variant === "fullyRounded"
|
|
1171
|
-
},
|
|
1172
|
-
className
|
|
1173
|
-
),
|
|
1174
|
-
children: [
|
|
1175
|
-
children,
|
|
1176
|
-
trailingIcon && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: colorMappingIcon, children: trailingIcon })
|
|
1177
|
-
]
|
|
1178
|
-
}
|
|
1179
|
-
);
|
|
1180
|
-
};
|
|
1181
|
-
var ChipList = ({
|
|
1182
|
-
list,
|
|
1183
|
-
className = ""
|
|
1184
|
-
}) => {
|
|
1185
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: (0, import_clsx9.default)("flex flex-wrap gap-x-2 gap-y-2", className), children: list.map((value, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1186
|
-
Chip,
|
|
1187
|
-
{
|
|
1188
|
-
...value,
|
|
1189
|
-
color: value.color ?? "dark",
|
|
1190
|
-
variant: value.variant ?? "normal",
|
|
1191
|
-
children: value.children
|
|
1192
|
-
},
|
|
1193
|
-
index
|
|
1194
|
-
)) });
|
|
1195
|
-
};
|
|
1196
|
-
|
|
1197
1132
|
// src/components/user-action/Checkbox.tsx
|
|
1198
|
-
var
|
|
1133
|
+
var import_react13 = require("react");
|
|
1199
1134
|
var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
|
|
1200
|
-
var
|
|
1201
|
-
var
|
|
1202
|
-
var
|
|
1135
|
+
var import_lucide_react3 = require("lucide-react");
|
|
1136
|
+
var import_clsx8 = __toESM(require("clsx"));
|
|
1137
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1203
1138
|
var checkboxSizeMapping = {
|
|
1204
1139
|
small: "size-5",
|
|
1205
1140
|
medium: "size-6",
|
|
@@ -1235,33 +1170,92 @@ var Checkbox = ({
|
|
|
1235
1170
|
const newValue = checked === "indeterminate" ? false : !checked;
|
|
1236
1171
|
propagateChange(newValue);
|
|
1237
1172
|
};
|
|
1238
|
-
return /* @__PURE__ */ (0,
|
|
1239
|
-
/* @__PURE__ */ (0,
|
|
1173
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("div", { className: (0, import_clsx8.default)("group flex-row-2 items-center cursor-pointer", containerClassName), onClick: changeValue, children: [
|
|
1174
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1240
1175
|
CheckboxPrimitive.Root,
|
|
1241
1176
|
{
|
|
1242
1177
|
onCheckedChange: propagateChange,
|
|
1243
1178
|
checked,
|
|
1244
1179
|
disabled,
|
|
1245
1180
|
id,
|
|
1246
|
-
className: (0,
|
|
1181
|
+
className: (0, import_clsx8.default)(usedSizeClass, `items-center border-2 rounded outline-none `, {
|
|
1247
1182
|
"text-disabled-text border-disabled-outline bg-disabled-background cursor-not-allowed": disabled,
|
|
1248
1183
|
"focus:border-primary group-hover:border-primary ": !disabled,
|
|
1249
|
-
"bg-
|
|
1184
|
+
"bg-input-background": !disabled && !checked,
|
|
1250
1185
|
"bg-primary/30 border-primary text-primary": !disabled && checked === true || checked === "indeterminate"
|
|
1251
1186
|
}, className),
|
|
1252
|
-
children: /* @__PURE__ */ (0,
|
|
1253
|
-
checked === true && /* @__PURE__ */ (0,
|
|
1254
|
-
checked === "indeterminate" && /* @__PURE__ */ (0,
|
|
1187
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(CheckboxPrimitive.Indicator, { children: [
|
|
1188
|
+
checked === true && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Check, { className: innerIconSize }),
|
|
1189
|
+
checked === "indeterminate" && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_lucide_react3.Minus, { className: innerIconSize })
|
|
1255
1190
|
] })
|
|
1256
1191
|
}
|
|
1257
1192
|
),
|
|
1258
|
-
label && /* @__PURE__ */ (0,
|
|
1193
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Label, { ...label, className: (0, import_clsx8.default)(label.className), htmlFor: id })
|
|
1259
1194
|
] });
|
|
1260
1195
|
};
|
|
1261
1196
|
|
|
1262
1197
|
// src/components/user-action/MultiSelect.tsx
|
|
1263
1198
|
var import_lucide_react5 = require("lucide-react");
|
|
1264
|
-
|
|
1199
|
+
|
|
1200
|
+
// src/components/layout-and-navigation/Tile.tsx
|
|
1201
|
+
var import_clsx9 = __toESM(require("clsx"));
|
|
1202
|
+
var import_lucide_react4 = require("lucide-react");
|
|
1203
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1204
|
+
var Tile = ({
|
|
1205
|
+
title,
|
|
1206
|
+
titleClassName,
|
|
1207
|
+
description,
|
|
1208
|
+
descriptionClassName,
|
|
1209
|
+
onClick,
|
|
1210
|
+
isSelected = false,
|
|
1211
|
+
disabled = false,
|
|
1212
|
+
prefix,
|
|
1213
|
+
suffix,
|
|
1214
|
+
normalClassName = "hover:bg-primary/40 cursor-pointer",
|
|
1215
|
+
selectedClassName = "bg-primary/20",
|
|
1216
|
+
disabledClassName = "text-disabled-text bg-disabled-background cursor-not-allowed",
|
|
1217
|
+
className
|
|
1218
|
+
}) => {
|
|
1219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
1220
|
+
"div",
|
|
1221
|
+
{
|
|
1222
|
+
className: (0, import_clsx9.default)(
|
|
1223
|
+
"flex-row-2 w-full items-center",
|
|
1224
|
+
{
|
|
1225
|
+
[normalClassName]: onClick && !disabled,
|
|
1226
|
+
[selectedClassName]: isSelected && !disabled,
|
|
1227
|
+
[disabledClassName]: disabled
|
|
1228
|
+
},
|
|
1229
|
+
className
|
|
1230
|
+
),
|
|
1231
|
+
onClick: disabled ? void 0 : onClick,
|
|
1232
|
+
children: [
|
|
1233
|
+
prefix,
|
|
1234
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex-col-0 w-full", children: [
|
|
1235
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: (0, import_clsx9.default)(titleClassName ?? "textstyle-title-normal"), children: title }),
|
|
1236
|
+
!!description && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: (0, import_clsx9.default)(descriptionClassName ?? "textstyle-description"), children: description })
|
|
1237
|
+
] }),
|
|
1238
|
+
suffix ?? (isSelected ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_lucide_react4.Check, { size: 24 }) : void 0)
|
|
1239
|
+
]
|
|
1240
|
+
}
|
|
1241
|
+
);
|
|
1242
|
+
};
|
|
1243
|
+
var ListTile = ({
|
|
1244
|
+
...props
|
|
1245
|
+
}) => {
|
|
1246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
1247
|
+
Tile,
|
|
1248
|
+
{
|
|
1249
|
+
...props,
|
|
1250
|
+
titleClassName: props.titleClassName ?? "font-semibold",
|
|
1251
|
+
className: (0, import_clsx9.default)("px-2 py-1 rounded-md", props.className),
|
|
1252
|
+
disabledClassName: props.disabledClassName ?? "text-disabled-text cursor-not-allowed"
|
|
1253
|
+
}
|
|
1254
|
+
);
|
|
1255
|
+
};
|
|
1256
|
+
|
|
1257
|
+
// src/components/user-action/MultiSelect.tsx
|
|
1258
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1265
1259
|
var defaultMultiSelectTranslation = {
|
|
1266
1260
|
en: {
|
|
1267
1261
|
selected: `{{amount}} selected`
|
|
@@ -1288,52 +1282,64 @@ var MultiSelect = ({
|
|
|
1288
1282
|
const translation = useTranslation([formTranslation, defaultMultiSelectTranslation], overwriteTranslation);
|
|
1289
1283
|
const { result, search, setSearch } = useSearch({
|
|
1290
1284
|
list: options,
|
|
1291
|
-
searchMapping: (0,
|
|
1285
|
+
searchMapping: (0, import_react14.useCallback)((item) => item.searchTags, []),
|
|
1292
1286
|
...searchOptions
|
|
1293
1287
|
});
|
|
1294
1288
|
const selectedItems = options.filter((value) => value.selected);
|
|
1295
1289
|
const isShowingHint = !selectedDisplayOverwrite && selectedItems.length === 0;
|
|
1296
|
-
return /* @__PURE__ */ (0,
|
|
1297
|
-
label && /* @__PURE__ */ (0,
|
|
1290
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: (0, import_clsx10.default)(className), children: [
|
|
1291
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1298
1292
|
Label,
|
|
1299
1293
|
{
|
|
1300
1294
|
...label,
|
|
1301
1295
|
htmlFor: label.name,
|
|
1302
|
-
className: (0,
|
|
1296
|
+
className: (0, import_clsx10.default)(" mb-1", label.className),
|
|
1303
1297
|
labelType: label.labelType ?? "labelBig"
|
|
1304
1298
|
}
|
|
1305
1299
|
),
|
|
1306
|
-
/* @__PURE__ */ (0,
|
|
1300
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1307
1301
|
Menu,
|
|
1308
1302
|
{
|
|
1309
1303
|
...menuProps,
|
|
1310
|
-
trigger: ({ toggleOpen, isOpen, disabled }, ref) => /* @__PURE__ */ (0,
|
|
1304
|
+
trigger: ({ toggleOpen, isOpen, disabled }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1311
1305
|
"button",
|
|
1312
1306
|
{
|
|
1313
1307
|
ref,
|
|
1314
|
-
className: (0,
|
|
1315
|
-
"btn-md justify-between w-full border-2 h-auto",
|
|
1308
|
+
className: (0, import_clsx10.default)(
|
|
1309
|
+
"group btn-md justify-between w-full border-2 h-auto",
|
|
1316
1310
|
{
|
|
1317
1311
|
"min-h-14": useChipDisplay,
|
|
1318
|
-
"bg-
|
|
1312
|
+
"bg-input-background text-input-text hover:border-primary": !disabled,
|
|
1319
1313
|
"bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": disabled
|
|
1320
1314
|
},
|
|
1321
1315
|
triggerClassName
|
|
1322
1316
|
),
|
|
1323
1317
|
onClick: toggleOpen,
|
|
1324
1318
|
disabled,
|
|
1325
|
-
children: useChipDisplay ? /* @__PURE__ */ (0,
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1319
|
+
children: useChipDisplay ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_jsx_runtime11.Fragment, { children: isShowingHint ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1320
|
+
"div",
|
|
1321
|
+
{
|
|
1322
|
+
className: (0, import_clsx10.default)(
|
|
1323
|
+
"icon-btn-sm ",
|
|
1324
|
+
{
|
|
1325
|
+
"bg-button-solid-neutral-background text-button-solid-neutral-text hover:brightness-90 group-hover:brightness-90": !disabled,
|
|
1326
|
+
"bg-disabled-background text-disabled-text": disabled
|
|
1327
|
+
}
|
|
1328
|
+
),
|
|
1329
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_lucide_react5.Plus, {})
|
|
1330
|
+
}
|
|
1331
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ChipList, { list: selectedItems.map((value) => ({ children: value.label })) }) }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
1332
|
+
!isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "font-semibold", children: selectedDisplayOverwrite ?? translation("selected", { replacements: { amount: selectedItems.length.toString() } }) }),
|
|
1333
|
+
isShowingHint && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: (0, import_clsx10.default)("textstyle-description", hintTextClassName), children: hintText ?? translation("select") }),
|
|
1334
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ExpansionIcon, { isExpanded: isOpen })
|
|
1329
1335
|
] })
|
|
1330
1336
|
}
|
|
1331
1337
|
),
|
|
1332
|
-
menuClassName: (0,
|
|
1338
|
+
menuClassName: (0, import_clsx10.default)("flex-col-2 p-2 max-h-96 overflow-hidden", menuProps.menuClassName),
|
|
1333
1339
|
children: (bag) => {
|
|
1334
1340
|
const { close } = bag;
|
|
1335
|
-
return /* @__PURE__ */ (0,
|
|
1336
|
-
!searchOptions?.disabled && /* @__PURE__ */ (0,
|
|
1341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
|
|
1342
|
+
!searchOptions?.disabled && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1337
1343
|
SearchBar,
|
|
1338
1344
|
{
|
|
1339
1345
|
value: search,
|
|
@@ -1341,7 +1347,7 @@ var MultiSelect = ({
|
|
|
1341
1347
|
autoFocus: true
|
|
1342
1348
|
}
|
|
1343
1349
|
),
|
|
1344
|
-
/* @__PURE__ */ (0,
|
|
1350
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex-col-2 overflow-y-auto", children: [
|
|
1345
1351
|
result.map((option, index) => {
|
|
1346
1352
|
const update = () => {
|
|
1347
1353
|
onChange(options.map((value) => value.value === option.value ? {
|
|
@@ -1349,10 +1355,10 @@ var MultiSelect = ({
|
|
|
1349
1355
|
selected: !value.selected
|
|
1350
1356
|
} : value));
|
|
1351
1357
|
};
|
|
1352
|
-
return /* @__PURE__ */ (0,
|
|
1353
|
-
|
|
1358
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1359
|
+
ListTile,
|
|
1354
1360
|
{
|
|
1355
|
-
prefix: /* @__PURE__ */ (0,
|
|
1361
|
+
prefix: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1356
1362
|
Checkbox,
|
|
1357
1363
|
{
|
|
1358
1364
|
checked: option.selected,
|
|
@@ -1361,7 +1367,7 @@ var MultiSelect = ({
|
|
|
1361
1367
|
disabled: option.disabled
|
|
1362
1368
|
}
|
|
1363
1369
|
),
|
|
1364
|
-
title:
|
|
1370
|
+
title: option.label,
|
|
1365
1371
|
onClick: update,
|
|
1366
1372
|
disabled: option.disabled
|
|
1367
1373
|
},
|
|
@@ -1370,9 +1376,9 @@ var MultiSelect = ({
|
|
|
1370
1376
|
}),
|
|
1371
1377
|
additionalItems && additionalItems({ ...bag, search })
|
|
1372
1378
|
] }),
|
|
1373
|
-
/* @__PURE__ */ (0,
|
|
1374
|
-
/* @__PURE__ */ (0,
|
|
1375
|
-
/* @__PURE__ */ (0,
|
|
1379
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex-row-2 justify-between", children: [
|
|
1380
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex-row-2", children: [
|
|
1381
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1376
1382
|
SolidButton,
|
|
1377
1383
|
{
|
|
1378
1384
|
color: "neutral",
|
|
@@ -1387,7 +1393,7 @@ var MultiSelect = ({
|
|
|
1387
1393
|
children: translation("all")
|
|
1388
1394
|
}
|
|
1389
1395
|
),
|
|
1390
|
-
/* @__PURE__ */ (0,
|
|
1396
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1391
1397
|
SolidButton,
|
|
1392
1398
|
{
|
|
1393
1399
|
color: "neutral",
|
|
@@ -1402,7 +1408,7 @@ var MultiSelect = ({
|
|
|
1402
1408
|
}
|
|
1403
1409
|
)
|
|
1404
1410
|
] }),
|
|
1405
|
-
/* @__PURE__ */ (0,
|
|
1411
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(SolidButton, { size: "small", onClick: close, children: "Done" })
|
|
1406
1412
|
] })
|
|
1407
1413
|
] });
|
|
1408
1414
|
}
|
|
@@ -1415,11 +1421,11 @@ var MultiSelectUncontrolled = ({
|
|
|
1415
1421
|
onChange,
|
|
1416
1422
|
...props
|
|
1417
1423
|
}) => {
|
|
1418
|
-
const [usedOptions, setUsedOptions] = (0,
|
|
1419
|
-
(0,
|
|
1424
|
+
const [usedOptions, setUsedOptions] = (0, import_react15.useState)(options);
|
|
1425
|
+
(0, import_react15.useEffect)(() => {
|
|
1420
1426
|
setUsedOptions(options);
|
|
1421
1427
|
}, [options]);
|
|
1422
|
-
return /* @__PURE__ */ (0,
|
|
1428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1423
1429
|
MultiSelect,
|
|
1424
1430
|
{
|
|
1425
1431
|
...props,
|