@eifi1/ui-kit 0.23.0 → 0.24.1

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.
Files changed (101) hide show
  1. package/README.md +6 -6
  2. package/dist/chart.d.ts +2 -4
  3. package/dist/components/amount-input.d.ts +16 -9
  4. package/dist/components/amount-input.js +13 -11
  5. package/dist/components/amount-input.js.map +1 -1
  6. package/dist/components/autocomplete.d.ts +5 -0
  7. package/dist/components/autocomplete.js +39 -37
  8. package/dist/components/autocomplete.js.map +1 -1
  9. package/dist/components/button-group.d.ts +2 -4
  10. package/dist/components/calculator.d.ts +2 -4
  11. package/dist/components/column-mapper.d.ts +62 -9
  12. package/dist/components/column-mapper.js +85 -49
  13. package/dist/components/column-mapper.js.map +1 -1
  14. package/dist/components/combobox.d.ts +33 -1
  15. package/dist/components/combobox.js +8 -2
  16. package/dist/components/combobox.js.map +1 -1
  17. package/dist/components/confirm-dialog.d.ts +2 -4
  18. package/dist/components/copy-button.d.ts +2 -4
  19. package/dist/components/danger-confirm.d.ts +2 -4
  20. package/dist/components/danger-confirm.js +52 -5
  21. package/dist/components/danger-confirm.js.map +1 -1
  22. package/dist/components/entity-combobox.d.ts +13 -1
  23. package/dist/components/entity-combobox.js +13 -4
  24. package/dist/components/entity-combobox.js.map +1 -1
  25. package/dist/components/facing-pair.d.ts +2 -4
  26. package/dist/components/file-button.d.ts +2 -4
  27. package/dist/components/file-dropzone.d.ts +2 -4
  28. package/dist/components/form-actions.d.ts +1 -3
  29. package/dist/components/form-actions.js +15 -1
  30. package/dist/components/form-actions.js.map +1 -1
  31. package/dist/components/iban-input.d.ts +2 -4
  32. package/dist/components/language-select.d.ts +2 -4
  33. package/dist/components/money-field.d.ts +2 -4
  34. package/dist/components/multi-entity-combobox.d.ts +5 -1
  35. package/dist/components/multi-entity-combobox.js +11 -3
  36. package/dist/components/multi-entity-combobox.js.map +1 -1
  37. package/dist/components/number-field.d.ts +2 -4
  38. package/dist/components/number-input.d.ts +2 -4
  39. package/dist/components/numpad-sheet.d.ts +2 -4
  40. package/dist/components/phone-input.d.ts +2 -4
  41. package/dist/components/series-chart.d.ts +2 -4
  42. package/dist/components/settings-fields.d.ts +2 -4
  43. package/dist/components/share-card.d.ts +1 -3
  44. package/dist/components/text-link.d.ts +1 -3
  45. package/dist/components/time-input.d.ts +2 -4
  46. package/dist/components/ui.d.ts +2 -4
  47. package/dist/components/ui.js +55 -17
  48. package/dist/components/ui.js.map +1 -1
  49. package/dist/feedback/feedback-attachment.d.ts +66 -1
  50. package/dist/feedback/feedback-attachment.js +32 -12
  51. package/dist/feedback/feedback-attachment.js.map +1 -1
  52. package/dist/feedback/feedback-dialog.d.ts +66 -1
  53. package/dist/feedback/feedback-inbox.d.ts +67 -253
  54. package/dist/feedback/feedback-thread.d.ts +1 -3
  55. package/dist/feedback/feedback-thread.js +8 -2
  56. package/dist/feedback/feedback-thread.js.map +1 -1
  57. package/dist/{feedback-BxeQVzwq.d.ts → feedback-DOwPu-Il.d.ts} +878 -18
  58. package/dist/feedback.d.ts +2 -4
  59. package/dist/hooks/use-file-drop.d.ts +2 -4
  60. package/dist/i18n/defaults.d.ts +2 -4
  61. package/dist/i18n/german.d.ts +2 -4
  62. package/dist/i18n/kit-labels.d.ts +1 -3
  63. package/dist/i18n/languages.d.ts +2 -4
  64. package/dist/i18n/locales/de-CH.d.ts +2 -4
  65. package/dist/i18n/locales/en.d.ts +2 -4
  66. package/dist/i18n/locales/es.d.ts +2 -4
  67. package/dist/i18n/locales/fr.d.ts +2 -4
  68. package/dist/i18n/locales/hu.d.ts +2 -4
  69. package/dist/i18n/locales/it.d.ts +2 -4
  70. package/dist/i18n/locales/zh.d.ts +2 -4
  71. package/dist/i18n/review.d.ts +2 -4
  72. package/dist/index.d.ts +2 -4
  73. package/dist/lib/strip-fade.d.ts +2 -2
  74. package/dist/lib/strip-fade.js.map +1 -1
  75. package/dist/rhf/fields.d.ts +59 -8
  76. package/dist/rhf/fields.js +61 -3
  77. package/dist/rhf/fields.js.map +1 -1
  78. package/dist/rhf/form.d.ts +2 -4
  79. package/dist/rhf.d.ts +3 -5
  80. package/dist/rhf.js.map +1 -1
  81. package/dist/shell/app-shell.d.ts +1 -3
  82. package/dist/shell/top-bar-brand.d.ts +2 -4
  83. package/dist/shell.d.ts +1 -3
  84. package/dist/wizard/stepper-nav.d.ts +2 -4
  85. package/dist/wizard.d.ts +2 -4
  86. package/package.json +2 -2
  87. package/src/components/amount-input.tsx +37 -20
  88. package/src/components/autocomplete.tsx +16 -5
  89. package/src/components/column-mapper.tsx +181 -79
  90. package/src/components/combobox.tsx +41 -3
  91. package/src/components/danger-confirm.tsx +193 -22
  92. package/src/components/entity-combobox.tsx +28 -5
  93. package/src/components/form-actions.tsx +20 -1
  94. package/src/components/multi-entity-combobox.tsx +16 -3
  95. package/src/components/ui.tsx +107 -0
  96. package/src/feedback/feedback-attachment.tsx +65 -12
  97. package/src/feedback/feedback-thread.tsx +66 -6
  98. package/src/lib/strip-fade.ts +2 -2
  99. package/src/rhf/fields.tsx +167 -6
  100. package/src/rhf.ts +1 -1
  101. 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 { bi as KitLinkComponent } from '../feedback-BxeQVzwq.js';
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 { bf as InputProps } from '../feedback-BxeQVzwq.js';
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';
@@ -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, X as DEFAULT_CHARACTER_COUNT_LABELS, aa as DEFAULT_PASSWORD_REVEAL_LABELS, af as DEFAULT_TABS_LABELS, an as EmptyState, ao as EmptyStateProps, ap as FIELD_BASE, aq as FIELD_DISPLAY, ar as FIELD_FLOATING_PAD, as as FIELD_INVALID, at as FIELD_TRIGGER, au as FIELD_WRITABLE_LOOK, av as FLOATING_INPUT_CLASS, aw as FLOATING_LABEL_CLASS, aJ as FieldChevron, aK as FieldChevronProps, aL as FieldHint, aM as FieldHintProps, aU as FloatingField, aV as FloatingFieldProps, b6 as IconButton, b7 as IconButtonGlyphSize, b8 as IconButtonLinkProps, b9 as IconButtonProps, ba as IconButtonSize, bb as IconButtonTone, bc as IconButtonToneColor, bd as IconButtonVariant, be as Input, bf as InputProps, bk as Label, bm as LabelProps, bo as PHONE_QUERY, bp as PasswordRevealLabels, bv as Select, bw as SelectProps, bJ as Spinner, bK as SpinnerProps, bM as TabItem, bN as Tabs, bO as TabsLabels, bP as TabsProps, bQ as Textarea, bR as TextareaProps, c1 as buttonClasses, c5 as resolvePasswordRevealLabels } from '../feedback-BxeQVzwq.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, 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';
@@ -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__ */ jsx(FloatingField, { className, htmlFor: fieldId, label, hint: hintParts.labelHint, children: /* @__PURE__ */ jsx(
1179
- "textarea",
1180
- {
1181
- ref,
1182
- id: fieldId,
1183
- placeholder: ownPlaceholder ? placeholder : " ",
1184
- ...rest,
1185
- "aria-invalid": isInvalid || rest["aria-invalid"] || void 0,
1186
- "aria-describedby": describedBy,
1187
- onChange,
1188
- className: cn(
1189
- FLOATING_INPUT_CLASS,
1190
- ownPlaceholder && FLOATING_PLACEHOLDER_ON_FOCUS,
1191
- isInvalid && FIELD_INVALID
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 = {