@eifi1/ui-kit 0.23.0 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/chart.d.ts +2 -4
- package/dist/components/amount-input.d.ts +16 -9
- package/dist/components/amount-input.js +13 -11
- package/dist/components/amount-input.js.map +1 -1
- package/dist/components/autocomplete.d.ts +5 -0
- package/dist/components/autocomplete.js +39 -37
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/button-group.d.ts +2 -4
- package/dist/components/calculator.d.ts +2 -4
- package/dist/components/column-mapper.d.ts +62 -9
- package/dist/components/column-mapper.js +85 -49
- package/dist/components/column-mapper.js.map +1 -1
- package/dist/components/combobox.d.ts +33 -1
- package/dist/components/combobox.js +8 -2
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/confirm-dialog.d.ts +2 -4
- package/dist/components/copy-button.d.ts +2 -4
- package/dist/components/danger-confirm.d.ts +2 -4
- package/dist/components/danger-confirm.js +52 -5
- package/dist/components/danger-confirm.js.map +1 -1
- package/dist/components/entity-combobox.d.ts +13 -1
- package/dist/components/entity-combobox.js +13 -4
- package/dist/components/entity-combobox.js.map +1 -1
- package/dist/components/facing-pair.d.ts +2 -4
- package/dist/components/file-button.d.ts +2 -4
- package/dist/components/file-dropzone.d.ts +2 -4
- package/dist/components/form-actions.d.ts +1 -3
- package/dist/components/form-actions.js +15 -1
- package/dist/components/form-actions.js.map +1 -1
- package/dist/components/iban-input.d.ts +2 -4
- package/dist/components/language-select.d.ts +2 -4
- package/dist/components/money-field.d.ts +2 -4
- package/dist/components/multi-entity-combobox.d.ts +5 -1
- package/dist/components/multi-entity-combobox.js +11 -3
- package/dist/components/multi-entity-combobox.js.map +1 -1
- package/dist/components/number-field.d.ts +2 -4
- package/dist/components/number-input.d.ts +2 -4
- package/dist/components/numpad-sheet.d.ts +2 -4
- package/dist/components/phone-input.d.ts +2 -4
- package/dist/components/series-chart.d.ts +2 -4
- package/dist/components/settings-fields.d.ts +2 -4
- package/dist/components/share-card.d.ts +1 -3
- package/dist/components/text-link.d.ts +1 -3
- package/dist/components/time-input.d.ts +2 -4
- package/dist/components/ui.d.ts +2 -4
- package/dist/components/ui.js +55 -17
- package/dist/components/ui.js.map +1 -1
- package/dist/feedback/feedback-attachment.d.ts +66 -1
- package/dist/feedback/feedback-attachment.js +32 -12
- package/dist/feedback/feedback-attachment.js.map +1 -1
- package/dist/feedback/feedback-dialog.d.ts +66 -1
- package/dist/feedback/feedback-inbox.d.ts +67 -253
- package/dist/feedback/feedback-thread.d.ts +1 -3
- package/dist/feedback/feedback-thread.js +8 -2
- package/dist/feedback/feedback-thread.js.map +1 -1
- package/dist/{feedback-BxeQVzwq.d.ts → feedback-DOwPu-Il.d.ts} +878 -18
- package/dist/feedback.d.ts +2 -4
- package/dist/hooks/use-file-drop.d.ts +2 -4
- package/dist/i18n/defaults.d.ts +2 -4
- package/dist/i18n/german.d.ts +2 -4
- package/dist/i18n/kit-labels.d.ts +1 -3
- package/dist/i18n/languages.d.ts +2 -4
- package/dist/i18n/locales/de-CH.d.ts +2 -4
- package/dist/i18n/locales/en.d.ts +2 -4
- package/dist/i18n/locales/es.d.ts +2 -4
- package/dist/i18n/locales/fr.d.ts +2 -4
- package/dist/i18n/locales/hu.d.ts +2 -4
- package/dist/i18n/locales/it.d.ts +2 -4
- package/dist/i18n/locales/zh.d.ts +2 -4
- package/dist/i18n/review.d.ts +2 -4
- package/dist/index.d.ts +2 -4
- package/dist/lib/strip-fade.d.ts +2 -2
- package/dist/lib/strip-fade.js.map +1 -1
- package/dist/rhf/fields.d.ts +59 -8
- package/dist/rhf/fields.js +61 -3
- package/dist/rhf/fields.js.map +1 -1
- package/dist/rhf/form.d.ts +2 -4
- package/dist/rhf.d.ts +3 -5
- package/dist/rhf.js.map +1 -1
- package/dist/shell/app-shell.d.ts +1 -3
- package/dist/shell/top-bar-brand.d.ts +2 -4
- package/dist/shell.d.ts +1 -3
- package/dist/wizard/stepper-nav.d.ts +2 -4
- package/dist/wizard.d.ts +2 -4
- package/package.json +1 -1
- package/src/components/amount-input.tsx +37 -20
- package/src/components/autocomplete.tsx +16 -5
- package/src/components/column-mapper.tsx +181 -79
- package/src/components/combobox.tsx +41 -3
- package/src/components/danger-confirm.tsx +193 -22
- package/src/components/entity-combobox.tsx +28 -5
- package/src/components/form-actions.tsx +20 -1
- package/src/components/multi-entity-combobox.tsx +16 -3
- package/src/components/ui.tsx +107 -0
- package/src/feedback/feedback-attachment.tsx +65 -12
- package/src/feedback/feedback-thread.tsx +66 -6
- package/src/lib/strip-fade.ts +2 -2
- package/src/rhf/fields.tsx +167 -6
- package/src/rhf.ts +1 -1
- package/dist/feedback-attachment-fGAzZPf0.d.ts +0 -469
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactElement, ComponentPropsWithoutRef, ReactNode, Ref, MouseEvent, KeyboardEvent } from 'react';
|
|
3
3
|
import { LucideIcon } from 'lucide-react';
|
|
4
|
-
import {
|
|
5
|
-
import '../feedback-attachment-fGAzZPf0.js';
|
|
6
|
-
import '../feedback/feedback-inbox.js';
|
|
4
|
+
import { bX as KitLinkComponent } from '../feedback-DOwPu-Il.js';
|
|
7
5
|
import './tooltip.js';
|
|
8
6
|
import '../hooks/use-anchored-rect.js';
|
|
9
7
|
import '../lib/clipping.js';
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import '../feedback-attachment-fGAzZPf0.js';
|
|
4
|
-
import '../feedback/feedback-inbox.js';
|
|
5
|
-
import 'lucide-react';
|
|
2
|
+
import { bU as InputProps } from '../feedback-DOwPu-Il.js';
|
|
6
3
|
import './tooltip.js';
|
|
7
4
|
import '../hooks/use-anchored-rect.js';
|
|
8
5
|
import '../lib/clipping.js';
|
|
@@ -13,6 +10,7 @@ import './mini-calendar.js';
|
|
|
13
10
|
import './calendar-heatmap.js';
|
|
14
11
|
import './popover.js';
|
|
15
12
|
import './chip.js';
|
|
13
|
+
import 'lucide-react';
|
|
16
14
|
import './field-sync.js';
|
|
17
15
|
import '../wizard/types.js';
|
|
18
16
|
import '../tour/tour.js';
|
package/dist/components/ui.d.ts
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import './tooltip.js';
|
|
3
|
-
export { B as Button, a as ButtonClassesOptions, b as ButtonLinkProps, c as ButtonProps, d as ButtonSize, e as ButtonTone, f as ButtonVariant, g as Card, h as CardAction, i as CardActionProps, j as CardContent, k as CardContentProps, l as CardDensity, m as CardDescription, n as CardDescriptionProps, o as CardFooter, p as CardFooterProps, q as CardHeader, r as CardHeaderProps, s as CardProps, t as CardTitle, u as CardTitleLevel, v as CardTitleProps, w as CardTone, x as CharacterCountLabels,
|
|
3
|
+
export { B as Button, a as ButtonClassesOptions, b as ButtonLinkProps, c as ButtonProps, d as ButtonSize, e as ButtonTone, f as ButtonVariant, g as Card, h as CardAction, i as CardActionProps, j as CardContent, k as CardContentProps, l as CardDensity, m as CardDescription, n as CardDescriptionProps, o as CardFooter, p as CardFooterProps, q as CardHeader, r as CardHeaderProps, s as CardProps, t as CardTitle, u as CardTitleLevel, v as CardTitleProps, w as CardTone, x as CharacterCountLabels, Z as DEFAULT_CHARACTER_COUNT_LABELS, ag as DEFAULT_PASSWORD_REVEAL_LABELS, al as DEFAULT_TABS_LABELS, at as EmptyState, au as EmptyStateProps, az as FIELD_BASE, aA as FIELD_DISPLAY, aB as FIELD_FLOATING_PAD, aC as FIELD_INVALID, aD as FIELD_TRIGGER, aE as FIELD_WRITABLE_LOOK, aF as FLOATING_INPUT_CLASS, aG as FLOATING_LABEL_CLASS, bm as FieldChevron, bn as FieldChevronProps, bo as FieldHint, bp as FieldHintProps, bx as FloatingField, by as FloatingFieldProps, bL as IconButton, bM as IconButtonGlyphSize, bN as IconButtonLinkProps, bO as IconButtonProps, bP as IconButtonSize, bQ as IconButtonTone, bR as IconButtonToneColor, bS as IconButtonVariant, bT as Input, bU as InputProps, bZ as Label, b$ as LabelProps, c1 as PHONE_QUERY, c2 as PasswordRevealLabels, c8 as Select, c9 as SelectProps, cm as Spinner, cn as SpinnerProps, cp as TabItem, cq as Tabs, cr as TabsLabels, cs as TabsProps, ct as Textarea, cu as TextareaProps, cG as buttonClasses, cN as resolvePasswordRevealLabels } from '../feedback-DOwPu-Il.js';
|
|
4
4
|
export { FLOATING_LABEL_STATIC, FieldLabel, FieldLabelProps } from './field-parts.js';
|
|
5
5
|
import '../hooks/use-anchored-rect.js';
|
|
6
6
|
import '../lib/clipping.js';
|
|
7
|
-
import '../feedback-attachment-fGAzZPf0.js';
|
|
8
|
-
import '../feedback/feedback-inbox.js';
|
|
9
|
-
import 'lucide-react';
|
|
10
7
|
import '../data-table-labels-B7OdnM0S.js';
|
|
11
8
|
import './data-table-sort.js';
|
|
12
9
|
import './swipeable-row.js';
|
|
@@ -14,6 +11,7 @@ import './mini-calendar.js';
|
|
|
14
11
|
import './calendar-heatmap.js';
|
|
15
12
|
import './popover.js';
|
|
16
13
|
import './chip.js';
|
|
14
|
+
import 'lucide-react';
|
|
17
15
|
import './field-sync.js';
|
|
18
16
|
import '../wizard/types.js';
|
|
19
17
|
import '../tour/tour.js';
|
package/dist/components/ui.js
CHANGED
|
@@ -1126,6 +1126,41 @@ const Select = forwardRef(function Select2(props, ref) {
|
|
|
1126
1126
|
) });
|
|
1127
1127
|
});
|
|
1128
1128
|
Select.displayName = "Select";
|
|
1129
|
+
const TEXTAREA_LABEL_STRIP = cn(
|
|
1130
|
+
"pointer-events-none absolute inset-x-px top-px hidden h-4 rounded-t-[5px] bg-[var(--bg-surface)]",
|
|
1131
|
+
"peer-focus:block peer-[:not(:placeholder-shown)]:block",
|
|
1132
|
+
"peer-disabled:bg-[var(--bg-surface-2)] peer-[[readonly]]:bg-[var(--bg-surface-2)]"
|
|
1133
|
+
);
|
|
1134
|
+
function TextareaLabelStrip() {
|
|
1135
|
+
const ref = useRef(null);
|
|
1136
|
+
useLayoutEffect(() => {
|
|
1137
|
+
const strip = ref.current;
|
|
1138
|
+
const field = strip?.previousElementSibling;
|
|
1139
|
+
if (!strip || !(field instanceof HTMLTextAreaElement)) return;
|
|
1140
|
+
const fit = () => {
|
|
1141
|
+
if (field.offsetWidth === 0) return;
|
|
1142
|
+
const style = getComputedStyle(field);
|
|
1143
|
+
const borderLeft = parseFloat(style.borderLeftWidth) || 0;
|
|
1144
|
+
const borderRight = parseFloat(style.borderRightWidth) || 0;
|
|
1145
|
+
const gutter = field.offsetWidth - field.clientWidth - borderLeft - borderRight;
|
|
1146
|
+
const bar = gutter > 1.5;
|
|
1147
|
+
const onLeft = field.clientLeft - borderLeft > 1.5;
|
|
1148
|
+
const rtl = style.direction === "rtl";
|
|
1149
|
+
const atEnd = onLeft === rtl;
|
|
1150
|
+
const border = (end) => end === rtl ? borderLeft : borderRight;
|
|
1151
|
+
strip.style.insetInlineEnd = bar && atEnd ? `${border(true) + gutter}px` : "";
|
|
1152
|
+
strip.style.insetInlineStart = bar && !atEnd ? `${border(false) + gutter}px` : "";
|
|
1153
|
+
strip.style.borderStartEndRadius = bar && atEnd ? "0" : "";
|
|
1154
|
+
strip.style.borderStartStartRadius = bar && !atEnd ? "0" : "";
|
|
1155
|
+
};
|
|
1156
|
+
fit();
|
|
1157
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
1158
|
+
const observer = new ResizeObserver(fit);
|
|
1159
|
+
observer.observe(field);
|
|
1160
|
+
return () => observer.disconnect();
|
|
1161
|
+
}, []);
|
|
1162
|
+
return /* @__PURE__ */ jsx("span", { ref, "aria-hidden": true, "data-slot": "label-strip", className: TEXTAREA_LABEL_STRIP });
|
|
1163
|
+
}
|
|
1129
1164
|
const Textarea = forwardRef(function Textarea2(props, ref) {
|
|
1130
1165
|
const { className, label, id, placeholder, invalid, error, hint, showCount, countLabels, ...rest } = props;
|
|
1131
1166
|
const reserve = "error" in props || "hint" in props || "showCount" in props;
|
|
@@ -1175,23 +1210,26 @@ const Textarea = forwardRef(function Textarea2(props, ref) {
|
|
|
1175
1210
|
) }) });
|
|
1176
1211
|
}
|
|
1177
1212
|
const ownPlaceholder = hasPlaceholderText(placeholder);
|
|
1178
|
-
return /* @__PURE__ */ jsx(FieldGroup, { errorEl: below, reserve, children: /* @__PURE__ */
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1213
|
+
return /* @__PURE__ */ jsx(FieldGroup, { errorEl: below, reserve, children: /* @__PURE__ */ jsxs(FloatingField, { className, htmlFor: fieldId, label, hint: hintParts.labelHint, children: [
|
|
1214
|
+
/* @__PURE__ */ jsx(
|
|
1215
|
+
"textarea",
|
|
1216
|
+
{
|
|
1217
|
+
ref,
|
|
1218
|
+
id: fieldId,
|
|
1219
|
+
placeholder: ownPlaceholder ? placeholder : " ",
|
|
1220
|
+
...rest,
|
|
1221
|
+
"aria-invalid": isInvalid || rest["aria-invalid"] || void 0,
|
|
1222
|
+
"aria-describedby": describedBy,
|
|
1223
|
+
onChange,
|
|
1224
|
+
className: cn(
|
|
1225
|
+
FLOATING_INPUT_CLASS,
|
|
1226
|
+
ownPlaceholder && FLOATING_PLACEHOLDER_ON_FOCUS,
|
|
1227
|
+
isInvalid && FIELD_INVALID
|
|
1228
|
+
)
|
|
1229
|
+
}
|
|
1230
|
+
),
|
|
1231
|
+
/* @__PURE__ */ jsx(TextareaLabelStrip, {})
|
|
1232
|
+
] }) });
|
|
1195
1233
|
});
|
|
1196
1234
|
Textarea.displayName = "Textarea";
|
|
1197
1235
|
const CARD_TONES = {
|