@helpwave/hightide 0.1.23 → 0.1.25
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/components/date/DatePicker.js +48 -53
- package/dist/components/date/DatePicker.js.map +1 -1
- package/dist/components/date/DatePicker.mjs +58 -63
- package/dist/components/date/DatePicker.mjs.map +1 -1
- package/dist/components/date/DayPicker.js.map +1 -1
- package/dist/components/date/DayPicker.mjs +4 -4
- package/dist/components/date/DayPicker.mjs.map +1 -1
- package/dist/components/date/TimeDisplay.js.map +1 -1
- package/dist/components/date/TimeDisplay.mjs +2 -2
- package/dist/components/date/TimeDisplay.mjs.map +1 -1
- package/dist/components/date/YearMonthPicker.js +26 -29
- package/dist/components/date/YearMonthPicker.js.map +1 -1
- package/dist/components/date/YearMonthPicker.mjs +31 -34
- package/dist/components/date/YearMonthPicker.mjs.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.js +40 -43
- package/dist/components/dialogs/ConfirmDialog.js.map +1 -1
- package/dist/components/dialogs/ConfirmDialog.mjs +48 -51
- package/dist/components/dialogs/ConfirmDialog.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Carousel.js +40 -43
- package/dist/components/layout-and-navigation/Carousel.js.map +1 -1
- package/dist/components/layout-and-navigation/Carousel.mjs +40 -43
- package/dist/components/layout-and-navigation/Carousel.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.js +40 -43
- package/dist/components/layout-and-navigation/Overlay.js.map +1 -1
- package/dist/components/layout-and-navigation/Overlay.mjs +46 -49
- package/dist/components/layout-and-navigation/Overlay.mjs.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.js +40 -43
- package/dist/components/layout-and-navigation/Pagination.js.map +1 -1
- package/dist/components/layout-and-navigation/Pagination.mjs +50 -53
- package/dist/components/layout-and-navigation/Pagination.mjs.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.js +40 -43
- package/dist/components/layout-and-navigation/SearchableList.js.map +1 -1
- package/dist/components/layout-and-navigation/SearchableList.mjs +50 -53
- package/dist/components/layout-and-navigation/SearchableList.mjs.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.js +26 -29
- package/dist/components/layout-and-navigation/StepperBar.js.map +1 -1
- package/dist/components/layout-and-navigation/StepperBar.mjs +30 -33
- 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 +2 -2
- package/dist/components/layout-and-navigation/TextImage.mjs.map +1 -1
- package/dist/components/loading-states/ErrorComponent.js.map +1 -1
- package/dist/components/loading-states/ErrorComponent.mjs +2 -2
- package/dist/components/loading-states/ErrorComponent.mjs.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.js.map +1 -1
- package/dist/components/loading-states/LoadingAnimation.mjs +2 -2
- package/dist/components/loading-states/LoadingAnimation.mjs.map +1 -1
- package/dist/components/loading-states/LoadingButton.js +26 -29
- package/dist/components/loading-states/LoadingButton.js.map +1 -1
- package/dist/components/loading-states/LoadingButton.mjs +26 -29
- package/dist/components/loading-states/LoadingButton.mjs.map +1 -1
- package/dist/components/modals/ConfirmModal.js +40 -43
- package/dist/components/modals/ConfirmModal.js.map +1 -1
- package/dist/components/modals/ConfirmModal.mjs +48 -51
- package/dist/components/modals/ConfirmModal.mjs.map +1 -1
- package/dist/components/modals/DiscardChangesModal.js +40 -43
- package/dist/components/modals/DiscardChangesModal.js.map +1 -1
- package/dist/components/modals/DiscardChangesModal.mjs +48 -51
- package/dist/components/modals/DiscardChangesModal.mjs.map +1 -1
- package/dist/components/modals/InputModal.js +40 -43
- package/dist/components/modals/InputModal.js.map +1 -1
- package/dist/components/modals/InputModal.mjs +48 -51
- package/dist/components/modals/InputModal.mjs.map +1 -1
- package/dist/components/modals/LanguageModal.js +43 -49
- package/dist/components/modals/LanguageModal.js.map +1 -1
- package/dist/components/modals/LanguageModal.mjs +67 -73
- package/dist/components/modals/LanguageModal.mjs.map +1 -1
- package/dist/components/modals/ThemeModal.js +43 -49
- package/dist/components/modals/ThemeModal.js.map +1 -1
- package/dist/components/modals/ThemeModal.mjs +68 -74
- package/dist/components/modals/ThemeModal.mjs.map +1 -1
- package/dist/components/properties/CheckboxProperty.js +96 -75
- package/dist/components/properties/CheckboxProperty.js.map +1 -1
- package/dist/components/properties/CheckboxProperty.mjs +98 -77
- package/dist/components/properties/CheckboxProperty.mjs.map +1 -1
- package/dist/components/properties/DateProperty.js +48 -53
- package/dist/components/properties/DateProperty.js.map +1 -1
- package/dist/components/properties/DateProperty.mjs +50 -55
- package/dist/components/properties/DateProperty.mjs.map +1 -1
- package/dist/components/properties/MultiSelectProperty.js +114 -93
- package/dist/components/properties/MultiSelectProperty.js.map +1 -1
- package/dist/components/properties/MultiSelectProperty.mjs +135 -114
- package/dist/components/properties/MultiSelectProperty.mjs.map +1 -1
- package/dist/components/properties/NumberProperty.js +48 -53
- package/dist/components/properties/NumberProperty.js.map +1 -1
- package/dist/components/properties/NumberProperty.mjs +50 -55
- package/dist/components/properties/NumberProperty.mjs.map +1 -1
- package/dist/components/properties/PropertyBase.js +48 -53
- package/dist/components/properties/PropertyBase.js.map +1 -1
- package/dist/components/properties/PropertyBase.mjs +50 -55
- package/dist/components/properties/PropertyBase.mjs.map +1 -1
- package/dist/components/properties/SelectProperty.js +65 -73
- package/dist/components/properties/SelectProperty.js.map +1 -1
- package/dist/components/properties/SelectProperty.mjs +86 -94
- package/dist/components/properties/SelectProperty.mjs.map +1 -1
- package/dist/components/properties/TextProperty.js +51 -56
- package/dist/components/properties/TextProperty.js.map +1 -1
- package/dist/components/properties/TextProperty.mjs +57 -62
- package/dist/components/properties/TextProperty.mjs.map +1 -1
- package/dist/components/table/Table.js +88 -65
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/Table.mjs +114 -91
- package/dist/components/table/Table.mjs.map +1 -1
- package/dist/components/table/TableFilterButton.js +40 -43
- package/dist/components/table/TableFilterButton.js.map +1 -1
- package/dist/components/table/TableFilterButton.mjs +44 -47
- package/dist/components/table/TableFilterButton.mjs.map +1 -1
- package/dist/components/table/TableSortButton.js +40 -43
- package/dist/components/table/TableSortButton.js.map +1 -1
- package/dist/components/table/TableSortButton.mjs +40 -43
- package/dist/components/table/TableSortButton.mjs.map +1 -1
- package/dist/components/user-action/Button.d.mts +3 -3
- package/dist/components/user-action/Button.d.ts +3 -3
- package/dist/components/user-action/Button.js +76 -84
- package/dist/components/user-action/Button.js.map +1 -1
- package/dist/components/user-action/Button.mjs +76 -84
- package/dist/components/user-action/Button.mjs.map +1 -1
- package/dist/components/user-action/Checkbox.js +48 -22
- package/dist/components/user-action/Checkbox.js.map +1 -1
- package/dist/components/user-action/Checkbox.mjs +48 -22
- 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 +2 -2
- package/dist/components/user-action/CopyToClipboardWrapper.mjs.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.js +48 -53
- package/dist/components/user-action/DateAndTimePicker.js.map +1 -1
- package/dist/components/user-action/DateAndTimePicker.mjs +60 -65
- package/dist/components/user-action/DateAndTimePicker.mjs.map +1 -1
- package/dist/components/user-action/MultiSelect.js +92 -69
- package/dist/components/user-action/MultiSelect.js.map +1 -1
- package/dist/components/user-action/MultiSelect.mjs +114 -91
- package/dist/components/user-action/MultiSelect.mjs.map +1 -1
- package/dist/components/user-action/SearchBar.js +40 -43
- package/dist/components/user-action/SearchBar.js.map +1 -1
- package/dist/components/user-action/SearchBar.mjs +42 -45
- package/dist/components/user-action/SearchBar.mjs.map +1 -1
- package/dist/components/user-action/Select.js +43 -49
- package/dist/components/user-action/Select.js.map +1 -1
- package/dist/components/user-action/Select.mjs +49 -55
- 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 +269 -136
- package/dist/css/uncompiled/theme/index.css +1 -2
- package/dist/hooks/useLocalStorage.js +1 -3
- package/dist/hooks/useLocalStorage.js.map +1 -1
- package/dist/hooks/useLocalStorage.mjs +3 -4
- package/dist/hooks/useLocalStorage.mjs.map +1 -1
- package/dist/index.js +141 -129
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +216 -204
- package/dist/index.mjs.map +1 -1
- package/dist/localization/LanguageProvider.js +0 -3
- package/dist/localization/LanguageProvider.js.map +1 -1
- package/dist/localization/LanguageProvider.mjs +5 -8
- package/dist/localization/LanguageProvider.mjs.map +1 -1
- package/dist/localization/useTranslation.js.map +1 -1
- package/dist/localization/useTranslation.mjs +2 -2
- package/dist/localization/useTranslation.mjs.map +1 -1
- package/dist/theming/useTheme.js +3 -6
- package/dist/theming/useTheme.js.map +1 -1
- package/dist/theming/useTheme.mjs +8 -11
- package/dist/theming/useTheme.mjs.map +1 -1
- package/package.json +1 -1
- package/dist/css/uncompiled/theme/theme.css +0 -0
|
@@ -3,10 +3,10 @@ import { List, Plus as Plus2 } from "lucide-react";
|
|
|
3
3
|
import clsx12 from "clsx";
|
|
4
4
|
|
|
5
5
|
// src/localization/LanguageProvider.tsx
|
|
6
|
-
import { createContext, useContext, useEffect
|
|
6
|
+
import { createContext, useContext, useEffect, useState as useState2 } from "react";
|
|
7
7
|
|
|
8
8
|
// src/hooks/useLocalStorage.ts
|
|
9
|
-
import { useCallback,
|
|
9
|
+
import { useCallback, useState } from "react";
|
|
10
10
|
|
|
11
11
|
// src/localization/util.ts
|
|
12
12
|
var languages = ["en", "de"];
|
|
@@ -91,7 +91,7 @@ var useTranslation = (translations, overwriteTranslation = {}) => {
|
|
|
91
91
|
|
|
92
92
|
// src/components/user-action/MultiSelect.tsx
|
|
93
93
|
import { useCallback as useCallback5 } from "react";
|
|
94
|
-
import { useEffect as
|
|
94
|
+
import { useEffect as useEffect10, useState as useState10 } from "react";
|
|
95
95
|
import clsx10 from "clsx";
|
|
96
96
|
|
|
97
97
|
// src/components/user-action/Label.tsx
|
|
@@ -141,7 +141,6 @@ var ButtonUtil = {
|
|
|
141
141
|
};
|
|
142
142
|
var SolidButton = forwardRef(function SolidButton2({
|
|
143
143
|
children,
|
|
144
|
-
disabled = false,
|
|
145
144
|
color = "primary",
|
|
146
145
|
size = "medium",
|
|
147
146
|
startIcon,
|
|
@@ -151,35 +150,33 @@ var SolidButton = forwardRef(function SolidButton2({
|
|
|
151
150
|
...restProps
|
|
152
151
|
}, ref) {
|
|
153
152
|
const colorClasses = {
|
|
154
|
-
primary: "bg-button-solid-primary-background text-button-solid-primary-text",
|
|
155
|
-
secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
|
|
156
|
-
tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
|
|
157
|
-
positive: "bg-button-solid-positive-background text-button-solid-positive-text",
|
|
158
|
-
warning: "bg-button-solid-warning-background text-button-solid-warning-text",
|
|
159
|
-
negative: "bg-button-solid-negative-background text-button-solid-negative-text",
|
|
160
|
-
neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text"
|
|
153
|
+
primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
|
|
154
|
+
secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
|
|
155
|
+
tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
|
|
156
|
+
positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
|
|
157
|
+
warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
|
|
158
|
+
negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
|
|
159
|
+
neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text"
|
|
161
160
|
}[color];
|
|
162
161
|
const iconColorClasses = {
|
|
163
|
-
primary: "text-button-solid-primary-icon",
|
|
164
|
-
secondary: "text-button-solid-secondary-icon",
|
|
165
|
-
tertiary: "text-button-solid-tertiary-icon",
|
|
166
|
-
positive: "text-button-solid-positive-icon",
|
|
167
|
-
warning: "text-button-solid-warning-icon",
|
|
168
|
-
negative: "text-button-solid-negative-icon",
|
|
169
|
-
neutral: "text-button-solid-neutral-icon"
|
|
162
|
+
primary: "not-group-disabled:text-button-solid-primary-icon",
|
|
163
|
+
secondary: "not-group-disabled:text-button-solid-secondary-icon",
|
|
164
|
+
tertiary: "not-group-disabled:text-button-solid-tertiary-icon",
|
|
165
|
+
positive: "not-group-disabled:text-button-solid-positive-icon",
|
|
166
|
+
warning: "not-group-disabled:text-button-solid-warning-icon",
|
|
167
|
+
negative: "not-group-disabled:text-button-solid-negative-icon",
|
|
168
|
+
neutral: "not-group-disabled:text-button-solid-neutral-icon"
|
|
170
169
|
}[color];
|
|
171
170
|
return /* @__PURE__ */ jsxs(
|
|
172
171
|
"button",
|
|
173
172
|
{
|
|
174
173
|
ref,
|
|
175
174
|
onClick,
|
|
176
|
-
disabled,
|
|
177
175
|
className: clsx2(
|
|
178
|
-
"font-semibold",
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
},
|
|
176
|
+
"group font-semibold",
|
|
177
|
+
colorClasses,
|
|
178
|
+
"not-disabled:hover:brightness-90",
|
|
179
|
+
"disabled:text-disabled-text disabled:bg-disabled-background",
|
|
183
180
|
ButtonUtil.paddingMapping[size],
|
|
184
181
|
className
|
|
185
182
|
),
|
|
@@ -188,10 +185,10 @@ var SolidButton = forwardRef(function SolidButton2({
|
|
|
188
185
|
startIcon && /* @__PURE__ */ jsx3(
|
|
189
186
|
"span",
|
|
190
187
|
{
|
|
191
|
-
className: clsx2(
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
188
|
+
className: clsx2(
|
|
189
|
+
iconColorClasses,
|
|
190
|
+
"group-disabled:text-disabled-icon"
|
|
191
|
+
),
|
|
195
192
|
children: startIcon
|
|
196
193
|
}
|
|
197
194
|
),
|
|
@@ -199,10 +196,10 @@ var SolidButton = forwardRef(function SolidButton2({
|
|
|
199
196
|
endIcon && /* @__PURE__ */ jsx3(
|
|
200
197
|
"span",
|
|
201
198
|
{
|
|
202
|
-
className: clsx2(
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
199
|
+
className: clsx2(
|
|
200
|
+
iconColorClasses,
|
|
201
|
+
"group-disabled:text-disabled-icon"
|
|
202
|
+
),
|
|
206
203
|
children: endIcon
|
|
207
204
|
}
|
|
208
205
|
)
|
|
@@ -212,7 +209,6 @@ var SolidButton = forwardRef(function SolidButton2({
|
|
|
212
209
|
});
|
|
213
210
|
var TextButton = ({
|
|
214
211
|
children,
|
|
215
|
-
disabled = false,
|
|
216
212
|
color = "neutral",
|
|
217
213
|
size = "medium",
|
|
218
214
|
startIcon,
|
|
@@ -223,32 +219,31 @@ var TextButton = ({
|
|
|
223
219
|
...restProps
|
|
224
220
|
}) => {
|
|
225
221
|
const colorClasses = {
|
|
226
|
-
primary: "bg-transparent text-button-text-primary-text",
|
|
227
|
-
negative: "bg-transparent text-button-text-negative-text",
|
|
228
|
-
neutral: "bg-transparent text-button-text-neutral-text"
|
|
222
|
+
primary: "not-disabled:bg-transparent not-disabled:text-button-text-primary-text",
|
|
223
|
+
negative: "not-disabled:bg-transparent not-disabled:text-button-text-negative-text",
|
|
224
|
+
neutral: "not-disabled:bg-transparent not-disabled:text-button-text-neutral-text"
|
|
229
225
|
}[color];
|
|
230
226
|
const backgroundColor = {
|
|
231
|
-
primary: "hover:bg-button-text-primary-text/20",
|
|
232
|
-
negative: "hover:bg-button-text-negative-text/20",
|
|
233
|
-
neutral: "hover:bg-button-text-neutral-text/20"
|
|
227
|
+
primary: "not-disabled:hover:bg-button-text-primary-text/20",
|
|
228
|
+
negative: "not-disabled:hover:bg-button-text-negative-text/20",
|
|
229
|
+
neutral: "not-disabled:hover:bg-button-text-neutral-text/20"
|
|
234
230
|
}[color];
|
|
235
231
|
const iconColorClasses = {
|
|
236
|
-
primary: "text-button-text-primary-icon",
|
|
237
|
-
negative: "text-button-text-negative-icon",
|
|
238
|
-
neutral: "text-button-text-neutral-icon"
|
|
232
|
+
primary: "not-group-disabled:text-button-text-primary-icon",
|
|
233
|
+
negative: "not-group-disabled:text-button-text-negative-icon",
|
|
234
|
+
neutral: "not-group-disabled:text-button-text-neutral-icon"
|
|
239
235
|
}[color];
|
|
240
236
|
return /* @__PURE__ */ jsxs(
|
|
241
237
|
"button",
|
|
242
238
|
{
|
|
243
239
|
onClick,
|
|
244
|
-
disabled,
|
|
245
240
|
className: clsx2(
|
|
246
|
-
"font-semibold",
|
|
241
|
+
"group font-semibold",
|
|
242
|
+
"disabled:text-disabled-text",
|
|
243
|
+
colorClasses,
|
|
247
244
|
{
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
[backgroundColor]: !disabled && coloredHoverBackground,
|
|
251
|
-
"hover:bg-button-text-hover-background": !disabled && !coloredHoverBackground
|
|
245
|
+
[backgroundColor]: coloredHoverBackground,
|
|
246
|
+
"not-disabled:hover:bg-button-text-hover-background": !coloredHoverBackground
|
|
252
247
|
},
|
|
253
248
|
ButtonUtil.paddingMapping[size],
|
|
254
249
|
className
|
|
@@ -258,10 +253,10 @@ var TextButton = ({
|
|
|
258
253
|
startIcon && /* @__PURE__ */ jsx3(
|
|
259
254
|
"span",
|
|
260
255
|
{
|
|
261
|
-
className: clsx2(
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
256
|
+
className: clsx2(
|
|
257
|
+
iconColorClasses,
|
|
258
|
+
"group-disabled:text-disabled-icon"
|
|
259
|
+
),
|
|
265
260
|
children: startIcon
|
|
266
261
|
}
|
|
267
262
|
),
|
|
@@ -269,10 +264,10 @@ var TextButton = ({
|
|
|
269
264
|
endIcon && /* @__PURE__ */ jsx3(
|
|
270
265
|
"span",
|
|
271
266
|
{
|
|
272
|
-
className: clsx2(
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
267
|
+
className: clsx2(
|
|
268
|
+
iconColorClasses,
|
|
269
|
+
"group-disabled:text-disabled-icon"
|
|
270
|
+
),
|
|
276
271
|
children: endIcon
|
|
277
272
|
}
|
|
278
273
|
)
|
|
@@ -282,32 +277,32 @@ var TextButton = ({
|
|
|
282
277
|
};
|
|
283
278
|
var IconButton = ({
|
|
284
279
|
children,
|
|
285
|
-
disabled = false,
|
|
286
280
|
color = "primary",
|
|
287
281
|
size = "medium",
|
|
288
282
|
className,
|
|
289
283
|
...restProps
|
|
290
284
|
}) => {
|
|
291
285
|
const colorClasses = {
|
|
292
|
-
primary: "bg-button-solid-primary-background text-button-solid-primary-text",
|
|
293
|
-
secondary: "bg-button-solid-secondary-background text-button-solid-secondary-text",
|
|
294
|
-
tertiary: "bg-button-solid-tertiary-background text-button-solid-tertiary-text",
|
|
295
|
-
positive: "bg-button-solid-positive-background text-button-solid-positive-text",
|
|
296
|
-
warning: "bg-button-solid-warning-background text-button-solid-warning-text",
|
|
297
|
-
negative: "bg-button-solid-negative-background text-button-solid-negative-text",
|
|
298
|
-
neutral: "bg-button-solid-neutral-background text-button-solid-neutral-text",
|
|
299
|
-
transparent: "bg-transparent"
|
|
286
|
+
primary: "not-disabled:bg-button-solid-primary-background not-disabled:text-button-solid-primary-text",
|
|
287
|
+
secondary: "not-disabled:bg-button-solid-secondary-background not-disabled:text-button-solid-secondary-text",
|
|
288
|
+
tertiary: "not-disabled:bg-button-solid-tertiary-background not-disabled:text-button-solid-tertiary-text",
|
|
289
|
+
positive: "not-disabled:bg-button-solid-positive-background not-disabled:text-button-solid-positive-text",
|
|
290
|
+
warning: "not-disabled:bg-button-solid-warning-background not-disabled:text-button-solid-warning-text",
|
|
291
|
+
negative: "not-disabled:bg-button-solid-negative-background not-disabled:text-button-solid-negative-text",
|
|
292
|
+
neutral: "not-disabled:bg-button-solid-neutral-background not-disabled:text-button-solid-neutral-text",
|
|
293
|
+
transparent: "not-disabled:bg-transparent"
|
|
300
294
|
}[color];
|
|
301
295
|
return /* @__PURE__ */ jsx3(
|
|
302
296
|
"button",
|
|
303
297
|
{
|
|
304
|
-
disabled,
|
|
305
298
|
className: clsx2(
|
|
299
|
+
colorClasses,
|
|
300
|
+
"not-disabled:hover:brightness-90",
|
|
301
|
+
"disabled:text-disabled-text",
|
|
306
302
|
{
|
|
307
|
-
"
|
|
308
|
-
"
|
|
309
|
-
"hover:bg-button-text-hover-background":
|
|
310
|
-
[clsx2(colorClasses, "hover:brightness-90")]: !disabled
|
|
303
|
+
"disabled:bg-disabled-background": color !== "transparent",
|
|
304
|
+
"disabled:opacity-70": color === "transparent",
|
|
305
|
+
"not-disabled:hover:bg-button-text-hover-background": color === "transparent"
|
|
311
306
|
},
|
|
312
307
|
ButtonUtil.iconPaddingMapping[size],
|
|
313
308
|
className
|
|
@@ -500,13 +495,13 @@ var formTranslation = {
|
|
|
500
495
|
};
|
|
501
496
|
|
|
502
497
|
// src/components/user-action/Menu.tsx
|
|
503
|
-
import { useEffect as
|
|
498
|
+
import { useEffect as useEffect4, useRef, useState as useState4 } from "react";
|
|
504
499
|
import clsx4 from "clsx";
|
|
505
500
|
|
|
506
501
|
// src/hooks/useOutsideClick.ts
|
|
507
|
-
import { useEffect as
|
|
502
|
+
import { useEffect as useEffect2 } from "react";
|
|
508
503
|
var useOutsideClick = (refs, handler) => {
|
|
509
|
-
|
|
504
|
+
useEffect2(() => {
|
|
510
505
|
const listener = (event) => {
|
|
511
506
|
if (event.target === null) return;
|
|
512
507
|
if (refs.some((ref) => !ref.current || ref.current.contains(event.target))) {
|
|
@@ -524,7 +519,7 @@ var useOutsideClick = (refs, handler) => {
|
|
|
524
519
|
};
|
|
525
520
|
|
|
526
521
|
// src/hooks/useHoverState.ts
|
|
527
|
-
import { useEffect as
|
|
522
|
+
import { useEffect as useEffect3, useState as useState3 } from "react";
|
|
528
523
|
var defaultUseHoverStateProps = {
|
|
529
524
|
closingDelay: 200,
|
|
530
525
|
isDisabled: false
|
|
@@ -548,14 +543,14 @@ var useHoverState = (props = void 0) => {
|
|
|
548
543
|
setIsHovered(false);
|
|
549
544
|
}, closingDelay));
|
|
550
545
|
};
|
|
551
|
-
|
|
546
|
+
useEffect3(() => {
|
|
552
547
|
if (timer) {
|
|
553
548
|
return () => {
|
|
554
549
|
clearTimeout(timer);
|
|
555
550
|
};
|
|
556
551
|
}
|
|
557
552
|
});
|
|
558
|
-
|
|
553
|
+
useEffect3(() => {
|
|
559
554
|
if (timer) {
|
|
560
555
|
clearTimeout(timer);
|
|
561
556
|
}
|
|
@@ -668,7 +663,7 @@ var Menu = ({
|
|
|
668
663
|
triggerRef.current?.getBoundingClientRect(),
|
|
669
664
|
{ verticalAlignment: alignmentVertical, horizontalAlignment: alignmentHorizontal, disabled }
|
|
670
665
|
);
|
|
671
|
-
|
|
666
|
+
useEffect4(() => {
|
|
672
667
|
if (!isOpen) return;
|
|
673
668
|
const triggerEl = triggerRef.current;
|
|
674
669
|
if (!triggerEl) return;
|
|
@@ -685,7 +680,7 @@ var Menu = ({
|
|
|
685
680
|
window.removeEventListener("resize", close);
|
|
686
681
|
};
|
|
687
682
|
}, [isOpen, setIsOpen]);
|
|
688
|
-
|
|
683
|
+
useEffect4(() => {
|
|
689
684
|
if (isOpen) {
|
|
690
685
|
setIsHidden(false);
|
|
691
686
|
}
|
|
@@ -721,7 +716,7 @@ var Menu = ({
|
|
|
721
716
|
};
|
|
722
717
|
|
|
723
718
|
// src/components/layout-and-navigation/Expandable.tsx
|
|
724
|
-
import { forwardRef as forwardRef2, useCallback as useCallback2, useEffect as
|
|
719
|
+
import { forwardRef as forwardRef2, useCallback as useCallback2, useEffect as useEffect5, useState as useState5 } from "react";
|
|
725
720
|
import { ChevronDown } from "lucide-react";
|
|
726
721
|
import clsx5 from "clsx";
|
|
727
722
|
|
|
@@ -807,7 +802,7 @@ var ExpandableUncontrolled = forwardRef2(function ExpandableUncontrolled2({
|
|
|
807
802
|
...props
|
|
808
803
|
}, ref) {
|
|
809
804
|
const [usedIsExpanded, setUsedIsExpanded] = useState5(isExpanded);
|
|
810
|
-
|
|
805
|
+
useEffect5(() => {
|
|
811
806
|
setUsedIsExpanded(isExpanded);
|
|
812
807
|
}, [isExpanded]);
|
|
813
808
|
return /* @__PURE__ */ jsx6(
|
|
@@ -825,11 +820,11 @@ var ExpandableUncontrolled = forwardRef2(function ExpandableUncontrolled2({
|
|
|
825
820
|
});
|
|
826
821
|
|
|
827
822
|
// src/components/user-action/Input.tsx
|
|
828
|
-
import { forwardRef as forwardRef3, useEffect as
|
|
823
|
+
import { forwardRef as forwardRef3, useEffect as useEffect8, useImperativeHandle, useRef as useRef2, useState as useState7 } from "react";
|
|
829
824
|
import clsx6 from "clsx";
|
|
830
825
|
|
|
831
826
|
// src/hooks/useDelay.ts
|
|
832
|
-
import { useEffect as
|
|
827
|
+
import { useEffect as useEffect6, useState as useState6 } from "react";
|
|
833
828
|
var defaultOptions = {
|
|
834
829
|
delay: 3e3,
|
|
835
830
|
disabled: false
|
|
@@ -854,12 +849,12 @@ function useDelay(options) {
|
|
|
854
849
|
setTimer(void 0);
|
|
855
850
|
}, delay));
|
|
856
851
|
};
|
|
857
|
-
|
|
852
|
+
useEffect6(() => {
|
|
858
853
|
return () => {
|
|
859
854
|
clearTimeout(timer);
|
|
860
855
|
};
|
|
861
856
|
}, [timer]);
|
|
862
|
-
|
|
857
|
+
useEffect6(() => {
|
|
863
858
|
if (disabled) {
|
|
864
859
|
clearTimeout(timer);
|
|
865
860
|
setTimer(void 0);
|
|
@@ -926,10 +921,10 @@ function useFocusManagement() {
|
|
|
926
921
|
}
|
|
927
922
|
|
|
928
923
|
// src/hooks/useFocusOnceVisible.ts
|
|
929
|
-
import React, { useEffect as
|
|
924
|
+
import React, { useEffect as useEffect7 } from "react";
|
|
930
925
|
var useFocusOnceVisible = (ref, disable = false) => {
|
|
931
926
|
const [hasUsedFocus, setHasUsedFocus] = React.useState(false);
|
|
932
|
-
|
|
927
|
+
useEffect7(() => {
|
|
933
928
|
if (disable || hasUsedFocus) {
|
|
934
929
|
return;
|
|
935
930
|
}
|
|
@@ -1100,7 +1095,7 @@ var SearchBar = ({
|
|
|
1100
1095
|
};
|
|
1101
1096
|
|
|
1102
1097
|
// src/hooks/useSearch.ts
|
|
1103
|
-
import { useCallback as useCallback4, useEffect as
|
|
1098
|
+
import { useCallback as useCallback4, useEffect as useEffect9, useMemo, useState as useState8 } from "react";
|
|
1104
1099
|
|
|
1105
1100
|
// src/util/simpleSearch.ts
|
|
1106
1101
|
var MultiSubjectSearchWithMapping = (search, objects, mapping) => {
|
|
@@ -1134,7 +1129,7 @@ var useSearch = ({
|
|
|
1134
1129
|
}
|
|
1135
1130
|
setResult(MultiSubjectSearchWithMapping([usedSearch, ...searchTags], list, searchMapping));
|
|
1136
1131
|
}, [searchTags, list, search, searchMapping]);
|
|
1137
|
-
|
|
1132
|
+
useEffect9(() => {
|
|
1138
1133
|
if (isSearchInstant) {
|
|
1139
1134
|
setResult(MultiSubjectSearchWithMapping([search, ...searchTags], list, searchMapping));
|
|
1140
1135
|
}
|
|
@@ -1205,31 +1200,57 @@ var Checkbox = ({
|
|
|
1205
1200
|
}
|
|
1206
1201
|
};
|
|
1207
1202
|
const changeValue = () => {
|
|
1203
|
+
if (disabled) {
|
|
1204
|
+
return;
|
|
1205
|
+
}
|
|
1208
1206
|
const newValue = checked === "indeterminate" ? false : !checked;
|
|
1209
1207
|
propagateChange(newValue);
|
|
1210
1208
|
};
|
|
1211
|
-
return /* @__PURE__ */ jsxs7(
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
{
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1209
|
+
return /* @__PURE__ */ jsxs7(
|
|
1210
|
+
"div",
|
|
1211
|
+
{
|
|
1212
|
+
className: clsx8("group flex-row-2 items-center", {
|
|
1213
|
+
"cursor-pointer": !disabled,
|
|
1214
|
+
"cursor-not-allowed": disabled
|
|
1215
|
+
}, containerClassName),
|
|
1216
|
+
onClick: changeValue,
|
|
1217
|
+
children: [
|
|
1218
|
+
/* @__PURE__ */ jsx9(
|
|
1219
|
+
CheckboxPrimitive.Root,
|
|
1220
|
+
{
|
|
1221
|
+
onCheckedChange: propagateChange,
|
|
1222
|
+
checked,
|
|
1223
|
+
disabled,
|
|
1224
|
+
id,
|
|
1225
|
+
className: clsx8(usedSizeClass, `items-center border-2 rounded outline-none `, {
|
|
1226
|
+
"text-disabled-text border-disabled-outline bg-disabled-background cursor-not-allowed": disabled,
|
|
1227
|
+
"focus:border-primary group-hover:border-primary ": !disabled,
|
|
1228
|
+
"bg-input-background": !disabled && !checked,
|
|
1229
|
+
"bg-primary/30 border-primary text-primary": !disabled && checked === true || checked === "indeterminate"
|
|
1230
|
+
}, className),
|
|
1231
|
+
children: /* @__PURE__ */ jsxs7(CheckboxPrimitive.Indicator, { children: [
|
|
1232
|
+
checked === true && /* @__PURE__ */ jsx9(Check, { className: innerIconSize }),
|
|
1233
|
+
checked === "indeterminate" && /* @__PURE__ */ jsx9(Minus, { className: innerIconSize })
|
|
1234
|
+
] })
|
|
1235
|
+
}
|
|
1236
|
+
),
|
|
1237
|
+
label && /* @__PURE__ */ jsx9(
|
|
1238
|
+
Label,
|
|
1239
|
+
{
|
|
1240
|
+
...label,
|
|
1241
|
+
className: clsx8(
|
|
1242
|
+
label.className,
|
|
1243
|
+
{
|
|
1244
|
+
"cursor-pointer": !disabled,
|
|
1245
|
+
"cursor-not-allowed": disabled
|
|
1246
|
+
}
|
|
1247
|
+
),
|
|
1248
|
+
htmlFor: id
|
|
1249
|
+
}
|
|
1250
|
+
)
|
|
1251
|
+
]
|
|
1252
|
+
}
|
|
1253
|
+
);
|
|
1233
1254
|
};
|
|
1234
1255
|
|
|
1235
1256
|
// src/components/user-action/MultiSelect.tsx
|
|
@@ -1332,7 +1353,7 @@ var MultiSelect = ({
|
|
|
1332
1353
|
...label,
|
|
1333
1354
|
htmlFor: label.name,
|
|
1334
1355
|
className: clsx10(" mb-1", label.className),
|
|
1335
|
-
labelType: label.labelType ?? "
|
|
1356
|
+
labelType: label.labelType ?? "labelSmall"
|
|
1336
1357
|
}
|
|
1337
1358
|
),
|
|
1338
1359
|
/* @__PURE__ */ jsx11(
|
|
@@ -1345,10 +1366,10 @@ var MultiSelect = ({
|
|
|
1345
1366
|
ref,
|
|
1346
1367
|
className: clsx10(
|
|
1347
1368
|
"group btn-md justify-between w-full border-2 h-auto",
|
|
1369
|
+
"not-disabled:bg-input-background not-disabled:text-input-text not-disabled:hover:border-primary",
|
|
1370
|
+
"disabled:bg-disabled-background disabled:text-disabled-text disabled:border-disabled-border",
|
|
1348
1371
|
{
|
|
1349
|
-
"min-h-14": useChipDisplay
|
|
1350
|
-
"bg-input-background text-input-text hover:border-primary": !disabled,
|
|
1351
|
-
"bg-disabled-background text-disabled-text border-disabled-background cursor-not-allowed": disabled
|
|
1372
|
+
"min-h-14": useChipDisplay
|
|
1352
1373
|
},
|
|
1353
1374
|
triggerClassName
|
|
1354
1375
|
),
|