altum 0.0.4 → 0.0.5

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 (112) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +47 -1
  3. package/dist/base/DialogBase/DialogBase.js +1 -1
  4. package/dist/base/ToggleControlBase/ToggleControlBase.js +1 -1
  5. package/dist/base/ToggleControlBase/ToggleControlBase.module.css.js +1 -1
  6. package/dist/components/Accordion/Accordion.module.css.js +1 -1
  7. package/dist/components/ActionList/ActionList.js +1 -1
  8. package/dist/components/Alert/Alert.js +1 -1
  9. package/dist/components/Alert/Alert.module.css.js +1 -1
  10. package/dist/components/Avatar/Avatar.module.css.js +1 -1
  11. package/dist/components/Bubble/Bubble.module.css.js +1 -1
  12. package/dist/components/Button/Button.js +1 -1
  13. package/dist/components/Button/Button.module.css.js +1 -0
  14. package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
  15. package/dist/components/ButtonGroup/ButtonGroup.module.css.js +1 -1
  16. package/dist/components/ButtonIcon/ButtonIcon.js +1 -1
  17. package/dist/components/ButtonIcon/ButtonIcon.module.css.js +1 -0
  18. package/dist/components/Calendar/Calendar.module.css.js +1 -1
  19. package/dist/components/Calendar/Calendar.slots.js +1 -1
  20. package/dist/components/Calendar/Calendar.utils.js +1 -1
  21. package/dist/components/Calendar/Calendar.views.js +1 -1
  22. package/dist/components/CalendarBoard/CalendarBoard.MonthView.js +1 -1
  23. package/dist/components/CalendarBoard/CalendarBoard.Schedule.js +1 -1
  24. package/dist/components/CalendarBoard/CalendarBoard.Schedule.module.css.js +1 -1
  25. package/dist/components/CalendarBoard/CalendarBoard.Schedule.utils.js +1 -1
  26. package/dist/components/CalendarBoard/CalendarBoard.YearView.js +1 -1
  27. package/dist/components/CalendarBoard/CalendarBoard.chrome.js +1 -1
  28. package/dist/components/CalendarBoard/CalendarBoard.context.js +1 -1
  29. package/dist/components/CalendarBoard/CalendarBoard.module.css.js +1 -1
  30. package/dist/components/CalendarBoard/CalendarBoard.utils.js +1 -1
  31. package/dist/components/CalendarBoard/calendar.schedule.js +1 -1
  32. package/dist/components/Chip/Chip.js +1 -1
  33. package/dist/components/Chip/Chip.module.css.js +1 -1
  34. package/dist/components/ColorSwatchGroup/ColorSwatchGroup.module.css.js +1 -1
  35. package/dist/components/ConfirmDialog/ConfirmDialog.js +1 -1
  36. package/dist/components/CustomSelect/CustomSelect.Filter.js +1 -1
  37. package/dist/components/CustomSelect/CustomSelect.Shell.js +1 -1
  38. package/dist/components/CustomSelect/CustomSelect.Shell.module.css.js +1 -1
  39. package/dist/components/DateField/DateField.js +1 -1
  40. package/dist/components/DateRangeField/DateRangeField.js +1 -1
  41. package/dist/components/DayStripCalendar/DayStripCalendar.js +1 -1
  42. package/dist/components/Dropdown/Dropdown.js +1 -1
  43. package/dist/components/FileList/FileList.js +1 -1
  44. package/dist/components/Grid/Grid.js +1 -1
  45. package/dist/components/Grid/Grid.utils.js +1 -1
  46. package/dist/components/LocaleProvider/LocaleProvider.js +1 -1
  47. package/dist/components/MaskedField/MaskedField.js +1 -1
  48. package/dist/components/Notification/Notification.js +1 -1
  49. package/dist/components/NumberField/NumberField.js +1 -1
  50. package/dist/components/Overflow/Overflow.js +1 -1
  51. package/dist/components/Overflow/Overflow.module.css.js +1 -1
  52. package/dist/components/Overflow/OverflowActionsMode.js +1 -1
  53. package/dist/components/Overflow/OverflowMeasure.js +1 -1
  54. package/dist/components/Overlay/Overlay.module.css.js +1 -1
  55. package/dist/components/Pagination/Pagination.js +1 -1
  56. package/dist/components/PasswordField/PasswordField.js +1 -1
  57. package/dist/components/PasswordField/PasswordField.module.css.js +1 -1
  58. package/dist/components/PinInput/PinInput.js +1 -1
  59. package/dist/components/PinInput/PinInput.module.css.js +1 -1
  60. package/dist/components/RelativeTime/RelativeTime.js +1 -1
  61. package/dist/components/SearchField/SearchField.js +1 -1
  62. package/dist/components/Select/Select.js +1 -1
  63. package/dist/components/Steps/Steps.module.css.js +1 -1
  64. package/dist/components/SuggestField/SuggestField.js +1 -1
  65. package/dist/components/TextField/TextField.js +1 -1
  66. package/dist/components/TextField/TextField.module.css.js +1 -0
  67. package/dist/components/TextareaField/TextareaField.js +1 -1
  68. package/dist/components/TextareaField/TextareaField.module.css.js +1 -0
  69. package/dist/components/ThemeProvider/ThemeProvider.js +1 -1
  70. package/dist/components/ThemeProvider/ThemeProvider.module.css.js +1 -1
  71. package/dist/components/TimeField/TimeField.js +1 -1
  72. package/dist/entries/hooks.js +1 -1
  73. package/dist/entries/locales.js +1 -0
  74. package/dist/entries/utils.js +1 -1
  75. package/dist/hooks/useForm.js +1 -1
  76. package/dist/hooks/useFormProvider.js +1 -0
  77. package/dist/index.js +1 -1
  78. package/dist/locales/en.js +1 -1
  79. package/dist/locales/localeContext.js +1 -1
  80. package/dist/locales/ru.js +1 -1
  81. package/dist/locales/translate.js +1 -1
  82. package/dist/shared/form/Form.utils.js +1 -0
  83. package/dist/shared/form/formRules.js +1 -0
  84. package/dist/shared/form/formValues.js +1 -0
  85. package/dist/styles/toggleBox.module.css.js +1 -1
  86. package/dist/utils/autoHeight.js +1 -1
  87. package/dist/utils/date.js +1 -0
  88. package/dist/utils/duration.js +1 -0
  89. package/dist/utils/eventTarget.js +1 -0
  90. package/dist/utils/injectCss.js +1 -1
  91. package/dist/utils/locale.js +1 -0
  92. package/dist/utils/plural.js +1 -0
  93. package/dist/utils/timezone.js +1 -0
  94. package/docs/COMPONENTS.md +7 -7
  95. package/docs/LAYOUT.md +3 -3
  96. package/docs/THEMING.md +4 -4
  97. package/package.json +6 -1
  98. package/types/entries/hooks.d.ts +61 -13
  99. package/types/entries/locales.d.ts +280 -0
  100. package/types/entries/utils.d.ts +70 -8
  101. package/types/index.d.ts +67 -52
  102. package/dist/base/ButtonBase/ButtonBase.js +0 -1
  103. package/dist/base/ButtonBase/ButtonBase.module.css.js +0 -1
  104. package/dist/base/FieldBase/FieldBase.js +0 -1
  105. package/dist/base/FieldBase/FieldBase.module.css.js +0 -1
  106. package/dist/base/TextControl/TextControl.js +0 -1
  107. package/dist/hooks/useFieldControl.js +0 -1
  108. package/dist/hooks/useOverflowEdges.js +0 -1
  109. package/dist/hooks/useScrollFocusedChildIntoView.js +0 -1
  110. package/dist/styles/ControlTrack.module.css.js +0 -1
  111. package/dist/utils/controlTrack.js +0 -1
  112. package/dist/utils/fieldPlaceholder.js +0 -1
package/types/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import React__default, { ComponentPropsWithoutRef, ReactNode, ComponentPropsWithRef, ButtonHTMLAttributes, ReactElement, ElementType, AriaRole, RefCallback, SVGProps, ForwardRefExoticComponent, RefAttributes, FC, HTMLAttributes } from 'react';
2
+ import React__default, { ComponentPropsWithoutRef, ReactNode, ComponentPropsWithRef, Ref, ReactElement, ButtonHTMLAttributes, ElementType, AriaRole, RefCallback, SVGProps, ForwardRefExoticComponent, RefAttributes, FC, HTMLAttributes } from 'react';
3
3
 
4
4
  type AccordionVariant = 'bordered' | 'flush';
5
5
  interface AccordionProps extends ComponentPropsWithoutRef<'div'> {
@@ -66,33 +66,33 @@ type Density = 'default' | 'compact';
66
66
 
67
67
  type SurfaceVariant = 'primary' | 'tinted' | 'secondary' | 'ghost' | 'plain';
68
68
 
69
- type ButtonVariant = 'primary' | 'tinted' | 'secondary' | 'ghost' | 'link';
70
- type ButtonStatus = 'default' | 'danger';
71
- type ButtonBaseAs = 'button' | 'a';
72
- type ButtonBaseOwnProps = {
69
+ type ButtonVariant = 'primary' | 'tinted' | 'secondary' | 'danger' | 'danger_tinted' | 'ghost' | 'link';
70
+ type ButtonAs = 'button' | 'a';
71
+ type ButtonRef<T extends ButtonAs> = T extends 'a' ? HTMLAnchorElement : HTMLButtonElement;
72
+ type ButtonOwnProps = {
73
73
  variant?: ButtonVariant;
74
- status?: ButtonStatus;
75
74
  size?: ControlSize;
76
75
  active?: boolean;
77
76
  disabled?: boolean;
78
77
  type?: 'button' | 'submit' | 'reset';
79
78
  children?: React__default.ReactNode;
79
+ prefix?: ReactNode;
80
+ postfix?: ReactNode;
81
+ loading?: boolean;
82
+ fullWidth?: boolean;
80
83
  };
81
- type ButtonBaseProps<T extends ButtonBaseAs = 'button'> = ButtonBaseOwnProps & Omit<ComponentPropsWithRef<T>, keyof ButtonBaseOwnProps | 'as'> & {
84
+ type ButtonProps<T extends ButtonAs = 'button'> = ButtonOwnProps & Omit<ComponentPropsWithRef<T>, keyof ButtonOwnProps | 'as'> & {
82
85
  as?: T;
83
86
  };
84
87
 
85
- interface ButtonProps extends ButtonBaseProps {
86
- iconStart?: ReactNode;
87
- iconEnd?: ReactNode;
88
- loading?: boolean;
89
- fullWidth?: boolean;
90
- shortcut?: string;
91
- }
92
-
93
- declare const Button: React.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
88
+ type ButtonComponent = (<T extends ButtonAs = 'button'>(props: ButtonProps<T> & {
89
+ ref?: Ref<ButtonRef<T>>;
90
+ }) => ReactElement | null) & {
91
+ displayName?: string;
92
+ };
93
+ declare const Button: ButtonComponent;
94
94
 
95
- interface ButtonIconProps extends Omit<ButtonBaseProps, 'children'> {
95
+ interface ButtonIconProps extends Omit<ButtonProps, 'children' | 'prefix' | 'postfix' | 'loading' | 'fullWidth'> {
96
96
  shape?: 'circle' | 'square';
97
97
  appearance?: 'default' | 'diskClose';
98
98
  icon?: React__default.ReactNode;
@@ -103,12 +103,12 @@ declare const ButtonIcon: React.ForwardRefExoticComponent<Omit<ButtonIconProps,
103
103
 
104
104
  type ButtonGroupMode = 'button' | 'toggle' | 'multi_toggle';
105
105
  type ButtonGroupItemFit = 'equal' | 'content';
106
- type ButtonGroupVariant = ButtonVariant | 'plain';
106
+ type ButtonGroupVariant = Exclude<ButtonVariant, 'danger' | 'danger_tinted'> | 'plain';
107
107
  interface ButtonGroupRootProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'onChange' | 'defaultValue'> {
108
108
  children: React__default.ReactNode;
109
109
  mode?: ButtonGroupMode;
110
110
  variant?: ButtonGroupVariant;
111
- status?: ButtonStatus;
111
+ status?: 'default' | 'danger';
112
112
  size?: ControlSize;
113
113
  disabled?: boolean;
114
114
  readOnly?: boolean;
@@ -155,14 +155,10 @@ interface ChipProps extends Omit<ComponentPropsWithoutRef<'span'>, 'onClick' | '
155
155
  removeLabel?: string;
156
156
  }
157
157
  type ChipGroupGap = GroupGap;
158
- type ChipGroupLayout = 'wrap' | 'scrollX';
159
- type ChipGroupOverflowAffordance = 'fade' | 'none';
160
158
  interface ChipGroupProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'> {
161
159
  children: React__default.ReactNode;
162
160
  'aria-label'?: string;
163
161
  gap?: ChipGroupGap;
164
- layout?: ChipGroupLayout;
165
- overflowAffordance?: ChipGroupOverflowAffordance;
166
162
  mode?: Exclude<ChipMode, 'toggle'>;
167
163
  as?: Exclude<ChipMode, 'toggle'>;
168
164
  className?: string;
@@ -227,21 +223,18 @@ interface FieldLabelProps extends Omit<ComponentPropsWithoutRef<'div'>, 'childre
227
223
 
228
224
  declare const FieldLabel: React.ForwardRefExoticComponent<FieldLabelProps & React.RefAttributes<HTMLDivElement>>;
229
225
 
230
- type FieldLabelPlacement = 'inline' | 'outside' | 'none';
231
226
  interface FieldBaseProps {
232
- label: string;
233
- labelPlacement?: FieldLabelPlacement;
227
+ label?: string;
234
228
  size?: ControlSize;
235
229
  width?: FieldWidth;
236
230
  error?: boolean | string;
237
- helperText?: string;
231
+ description?: ReactNode;
238
232
  disabled?: boolean;
239
233
  readOnly?: boolean;
240
234
  prefix?: ReactNode;
241
235
  postfix?: ReactNode;
242
236
  onClear?: () => void;
243
237
  clearLabel?: string;
244
- footer?: ReactNode;
245
238
  }
246
239
  interface FieldBaseButtonProps extends ComponentPropsWithoutRef<'button'> {
247
240
  icon?: ReactNode;
@@ -249,22 +242,33 @@ interface FieldBaseButtonProps extends ComponentPropsWithoutRef<'button'> {
249
242
  interface FieldBaseIconProps extends ComponentPropsWithoutRef<'span'> {
250
243
  children: ReactNode;
251
244
  }
252
-
253
- declare const FieldBaseButton: React__default.ForwardRefExoticComponent<FieldBaseButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
254
- declare const FieldBaseIcon: React__default.ForwardRefExoticComponent<FieldBaseIconProps & React__default.RefAttributes<HTMLSpanElement>>;
255
-
256
- interface TextFieldProps extends FieldBaseProps, Omit<ComponentPropsWithoutRef<'input'>, 'prefix' | 'size' | 'width' | keyof FieldBaseProps> {
245
+ type TextFieldAs = 'input' | 'textarea' | 'button' | 'div';
246
+ type TextFieldRef<T extends TextFieldAs> = T extends 'textarea' ? HTMLTextAreaElement : T extends 'button' ? HTMLButtonElement : T extends 'div' ? HTMLDivElement : HTMLInputElement;
247
+ type TextFieldOwnProps = FieldBaseProps & {
257
248
  wrapperClassName?: string;
249
+ wrapperRef?: Ref<HTMLDivElement>;
250
+ wrapperProps?: Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'prefix'>;
258
251
  active?: boolean;
259
252
  keepPlaceholder?: boolean;
260
253
  controlOverlay?: ReactNode;
261
- }
254
+ hasValue?: boolean;
255
+ };
256
+ type TextFieldProps<T extends TextFieldAs = 'input'> = TextFieldOwnProps & Omit<ComponentPropsWithRef<T>, keyof TextFieldOwnProps | 'as' | 'prefix' | 'size' | 'width'> & {
257
+ as?: T;
258
+ };
262
259
 
263
- declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement>>;
260
+ declare const FieldBaseButton: React__default.ForwardRefExoticComponent<FieldBaseButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
261
+ declare const FieldBaseIcon: React__default.ForwardRefExoticComponent<FieldBaseIconProps & React__default.RefAttributes<HTMLSpanElement>>;
262
+ type TextFieldComponent = (<T extends TextFieldAs = 'input'>(props: TextFieldProps<T> & {
263
+ ref?: Ref<TextFieldRef<T>>;
264
+ }) => ReactElement | null) & {
265
+ displayName?: string;
266
+ };
267
+ declare const TextField: TextFieldComponent;
264
268
 
265
269
  type SearchFieldProps = Omit<TextFieldProps, 'prefix' | 'type'>;
266
270
 
267
- declare const SearchField: React.ForwardRefExoticComponent<SearchFieldProps & React.RefAttributes<HTMLInputElement>>;
271
+ declare const SearchField: React.ForwardRefExoticComponent<Omit<SearchFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
268
272
 
269
273
  type SkeletonVariant = 'block' | 'text' | 'avatar' | 'card' | 'table';
270
274
  interface SkeletonProps extends ComponentPropsWithoutRef<'div'> {
@@ -389,9 +393,8 @@ interface PinInputProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children'
389
393
  autoFocus?: boolean;
390
394
  error?: boolean | string;
391
395
  label?: string;
392
- helperText?: string;
396
+ description?: ReactNode;
393
397
  name?: string;
394
- labelPlacement?: FieldLabelPlacement;
395
398
  width?: FieldWidth;
396
399
  }
397
400
 
@@ -779,11 +782,11 @@ interface ImageLightboxProps extends Omit<ComponentPropsWithoutRef<'div'>, 'chil
779
782
  declare const ImageLightbox: React.ForwardRefExoticComponent<ImageLightboxProps & React.RefAttributes<HTMLElement>>;
780
783
 
781
784
  type LinkVariant = 'primary' | 'secondary' | 'muted';
782
-
785
+ type LinkStatus = 'default' | 'danger';
783
786
  type LinkSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
784
787
  interface LinkProps extends ComponentPropsWithoutRef<'a'> {
785
788
  variant?: LinkVariant;
786
- status?: ButtonStatus;
789
+ status?: LinkStatus;
787
790
  size?: LinkSize;
788
791
  weight?: 'normal' | 'medium' | 'bold';
789
792
  children: React__default.ReactNode;
@@ -817,7 +820,7 @@ interface MaskedFieldProps extends Omit<TextFieldProps, 'value' | 'onChange'> {
817
820
  maskAsPlaceholder?: boolean;
818
821
  }
819
822
 
820
- declare const MaskedField: React.ForwardRefExoticComponent<MaskedFieldProps & React.RefAttributes<HTMLInputElement>>;
823
+ declare const MaskedField: React.ForwardRefExoticComponent<Omit<MaskedFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
821
824
 
822
825
  interface NumberFieldProps extends Omit<TextFieldProps, 'type' | 'onChange'> {
823
826
  value?: number;
@@ -827,7 +830,7 @@ interface NumberFieldProps extends Omit<TextFieldProps, 'type' | 'onChange'> {
827
830
  onChange?: (val: number | undefined) => void;
828
831
  }
829
832
 
830
- declare const NumberField: React.ForwardRefExoticComponent<NumberFieldProps & React.RefAttributes<HTMLInputElement>>;
833
+ declare const NumberField: React.ForwardRefExoticComponent<Omit<NumberFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
831
834
 
832
835
  interface PaginationRootProps extends Omit<React__default.ComponentPropsWithoutRef<'nav'>, 'children'> {
833
836
  currentPage: number;
@@ -1189,7 +1192,7 @@ interface PasswordFieldProps extends Omit<TextFieldProps, 'type' | 'postfix'> {
1189
1192
  }
1190
1193
 
1191
1194
  declare function getPasswordStrength(password: string): PasswordStrength;
1192
- declare const PasswordField: React.ForwardRefExoticComponent<PasswordFieldProps & React.RefAttributes<HTMLInputElement>>;
1195
+ declare const PasswordField: React.ForwardRefExoticComponent<Omit<PasswordFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
1193
1196
 
1194
1197
  type FormMessageVariant = 'error' | 'hint' | 'success';
1195
1198
  interface FormMessageProps extends Omit<ComponentPropsWithoutRef<'p'>, 'color'> {
@@ -1261,9 +1264,17 @@ declare const ru: {
1261
1264
  readonly scheduleAria: "Расписание";
1262
1265
  readonly allDay: "События на весь день";
1263
1266
  readonly allDayShort: "весь день";
1264
- readonly dayWithTasks: "{day} {month}, задач: {count}";
1267
+ readonly dayWithTasks: {
1268
+ readonly one: "{day} {month}, {count} задача";
1269
+ readonly few: "{day} {month}, {count} задачи";
1270
+ readonly many: "{day} {month}, {count} задач";
1271
+ };
1265
1272
  readonly dayWithoutTasks: "{day} {month}";
1266
- readonly moreTasks: "ещё {count}";
1273
+ readonly moreTasks: {
1274
+ readonly one: "ещё {count} задача";
1275
+ readonly few: "ещё {count} задачи";
1276
+ readonly many: "ещё {count} задач";
1277
+ };
1267
1278
  };
1268
1279
  readonly dayStrip: {
1269
1280
  readonly ariaLabel: "Навигация по дням";
@@ -1329,7 +1340,11 @@ declare const ru: {
1329
1340
  readonly upload: {
1330
1341
  readonly dropHint: "Перетащите файлы сюда или";
1331
1342
  readonly choose: "выберите";
1332
- readonly selectedCount: "Выбрано файлов: {count}";
1343
+ readonly selectedCount: {
1344
+ readonly one: "Выбран {count} файл";
1345
+ readonly few: "Выбрано {count} файла";
1346
+ readonly many: "Выбрано {count} файлов";
1347
+ };
1333
1348
  readonly release: "Отпустите файл для загрузки";
1334
1349
  };
1335
1350
  readonly imageCrop: {
@@ -1468,6 +1483,8 @@ type DeepPartialMessagesValue<T> = T extends (infer U)[] ? U[] : T extends objec
1468
1483
  type LocaleCode = 'ru' | 'en';
1469
1484
  type TranslationParams = Record<string, string | number>;
1470
1485
 
1486
+ declare const en: Messages;
1487
+
1471
1488
  type TranslateFn = (key: string, params?: TranslationParams) => string;
1472
1489
 
1473
1490
  interface LocaleContextValue {
@@ -1779,7 +1796,7 @@ interface CustomSelectRootProps extends Omit<ComponentPropsWithoutRef<'div'>, 'c
1779
1796
 
1780
1797
  declare const CustomSelect: React__default.ForwardRefExoticComponent<CustomSelectRootProps & React__default.RefAttributes<HTMLDivElement>> & {
1781
1798
  Root: React__default.ForwardRefExoticComponent<CustomSelectRootProps & React__default.RefAttributes<HTMLDivElement>>;
1782
- Filter: React__default.ForwardRefExoticComponent<CustomSelectFilterProps & React__default.RefAttributes<HTMLInputElement>>;
1799
+ Filter: React__default.ForwardRefExoticComponent<Omit<CustomSelectFilterProps, "ref"> & React__default.RefAttributes<HTMLInputElement>>;
1783
1800
  List: React__default.ForwardRefExoticComponent<CustomSelectListProps & React__default.RefAttributes<ListboxHandle>>;
1784
1801
  Shell: React__default.ForwardRefExoticComponent<CustomSelectShellProps & React__default.RefAttributes<HTMLDivElement>>;
1785
1802
  Chevron: React__default.ForwardRefExoticComponent<Omit<CustomSelectChevronProps, "ref"> & React__default.RefAttributes<SVGSVGElement>>;
@@ -2219,7 +2236,7 @@ interface DateFieldProps extends Omit<MaskedFieldProps, 'mask' | 'value' | 'onCh
2219
2236
  onChange: (date: Date | undefined) => void;
2220
2237
  }
2221
2238
 
2222
- declare const DateField: React.ForwardRefExoticComponent<DateFieldProps & React.RefAttributes<HTMLInputElement>>;
2239
+ declare const DateField: React.ForwardRefExoticComponent<Omit<DateFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
2223
2240
 
2224
2241
  interface DateRangeFieldProps extends Omit<FieldBaseProps, 'label'>, Omit<ComponentPropsWithoutRef<'div'>, 'onChange' | 'defaultValue' | 'children' | keyof FieldBaseProps> {
2225
2242
  value: DateRangeValue;
@@ -2257,7 +2274,7 @@ interface TimeFieldProps extends Omit<MaskedFieldProps, 'mask'> {
2257
2274
  value: string;
2258
2275
  }
2259
2276
 
2260
- declare const TimeField: React.ForwardRefExoticComponent<TimeFieldProps & React.RefAttributes<HTMLInputElement>>;
2277
+ declare const TimeField: React.ForwardRefExoticComponent<Omit<TimeFieldProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
2261
2278
 
2262
2279
  type TimeValue = {
2263
2280
  hours: number;
@@ -2675,7 +2692,5 @@ declare const CalendarBoard: React.FC<CalendarBoardProviderProps> & {
2675
2692
  TaskChip: React.ForwardRefExoticComponent<CalendarBoardTaskChipProps & React.RefAttributes<HTMLButtonElement | HTMLSpanElement>>;
2676
2693
  };
2677
2694
 
2678
- declare const en: Messages;
2679
-
2680
2695
  export { Accordion, ActionList, ActionSheetTrigger, Alert, AspectRatio, Attachment, Avatar, AvatarGroup, Backdrop, Badge, BarChart, Box, Bubble, Button, ButtonGroup, ButtonIcon, Calendar, CalendarBoard, Card, Checkbox, CheckboxGroup, Chip, ChipGroup, Collapse, ColorSwatchGroup, CommandPalette, ConfirmDialog, Container, ControlRow, CustomSelect, DateField, DateRangeField, DayStripCalendar, DescriptionList, DonutChart, Dropdown, EmptyState, FieldBaseButton, FieldBaseIcon, FieldLabel, Fieldset, FileList$1 as FileList, FormMessage, GRID_BREAKPOINTS, Grid, GridItem, ImageCrop, ImageGallery, ImageLightbox, Inline, Item, Kbd, KbdGroup, Layout, LayoutContent, LayoutFooter, LayoutHeader, LayoutItem, LayoutRoot, LineChart, Link, Listbox, LocaleProvider, Marker, MaskedField, Media, Menu, Modal, Notification, NotificationProvider, NumberField, Overflow, Overlay, Page, Pagination, PasswordField, PinInput, Popover, Progress, ProgressCircle, PullToRefresh, Radio, RadioGroup, Rating, RelativeTime, SafeArea, ScrollArea, SearchField, SegmentedControl, Select, SelectionGroup, Separator, Sheet, Sidebar, Skeleton, SkipLink, Slider, SortableList, Spinner, Split, Stack, StatBadge, Steps, SuggestField, SwipeToAction, Switch, Table, Tabs, Text, TextField, TextareaField, ThemeProvider, TimeField, Timeline, Title, Tooltip, UploadZone, VirtualList, VisuallyHidden, WheelTimePicker, dismiss, dismissAll, en, formatRelativeTime, getPasswordStrength, notify, ru, useCalendarBoardContext, useCalendarBoardTaskHover, useLocale, useNotify, useT, useTheme };
2681
- export type { AccordionItemProps, AccordionProps, AccordionVariant, ActionListGroup, ActionListHandle, ActionListItem, ActionListProps, ActionSheetTriggerProps, AdaptiveValue, AlertLayout, AlertProps, AlertVariant, AspectRatioProps, AttachmentProps, AttachmentSize, AttachmentStatus, AvatarGroupProps, AvatarProps, AvatarSize, AvatarStatus, BackdropBlur, BackdropPosition, BackdropProps, BackdropVariant, BadgePosition, BadgeProps, BadgeSize, BadgeVariant, BarChartDataset, BarChartProps, BoxAs, BoxBorderStyle, BoxPadding, BoxProps, BoxRadius, BoxShadow, BoxVariant, BubbleAlign, BubbleProps, BubbleReaction, BubbleVariant, ButtonGroupItemFit, ButtonGroupItemProps, ButtonGroupMode, ButtonGroupRootProps, ButtonGroupVariant, ButtonIconProps, ButtonProps, ButtonStatus, ButtonVariant, CalendarBoardBodyProps, CalendarBoardDayCellRenderProps, CalendarBoardDayProps, CalendarBoardHeaderProps, CalendarBoardMonthProps, CalendarBoardNavProps, CalendarBoardProviderProps, CalendarBoardRootProps, CalendarBoardTask, CalendarBoardTaskChipProps, CalendarBoardTaskLayout, CalendarBoardTaskRenderProps, CalendarBoardTitleProps, CalendarBoardView, CalendarBoardWeekProps, CalendarBoardYearMonthRenderProps, CalendarBoardYearProps, CalendarBodyProps, CalendarContextValue, CalendarDayCell, CalendarDayCellRenderProps, CalendarHeaderProps, CalendarNavProps, CalendarProviderProps, CalendarRootProps, CalendarScheduleEvent, CalendarSelectionMode, CalendarTitleProps, CalendarViewMode, CardProps, CardVariant, CheckboxGroupProps, CheckboxMode, CheckboxProps, ChipAs, ChipGroupGap, ChipGroupLayout, ChipGroupOverflowAffordance, ChipGroupProps, ChipMode, ChipProps, ChipVariant, CollapseProps, ColorSwatchGroupProps, Column, ActionListGroup as CommandPaletteGroup, ActionListItem as CommandPaletteItem, CommandPaletteProps, ConfirmDialogProps, ConfirmDialogSecondaryAction, ContainerProps, ContainerSize, ControlRowProps, ControlSize, CustomSelectChevronProps, CustomSelectFilterProps, CustomSelectListProps, CustomSelectOption, CustomSelectPlaceholderProps, CustomSelectRenderTargetContext, CustomSelectRootProps, CustomSelectSelectionMode, CustomSelectShellProps, DateFieldProps, DateRangeFieldProps, DateRangeValue, DayStripCalendarProps, DayStripDayRenderProps, DeepPartialMessages, DescriptionListItem, DescriptionListProps, DonutChartProps, DropdownAlign, DropdownPanelScroll, DropdownPopupRole, DropdownProps, DropdownTriggerAttrs, DropdownTriggerMode, DropdownTriggerSlotProps, DropdownWidthMode, EmptyStateProps, EmptyStateSize, FieldBaseButtonProps, FieldBaseIconProps, FieldBaseProps, FieldLabelAlign, FieldLabelJustify, FieldLabelLayout, FieldLabelPlacement, FieldLabelProps, FieldWidth, FieldsetProps, FieldsetVariant, FileListItemProps, FileListItemStatus, FileListRootProps, FormMessageProps, FormMessageVariant, GridGapToken, GridItemProps, GridMode, GridProps, ImageCropProps, ImageCropResult, ImageCropShape, ImageGalleryItem, ImageGalleryProps, ImageLightboxProps, InlineProps, ItemMediaVariant, ItemProps, ItemSize, ItemVariant, KbdGroupProps, KbdProps, LabelSide, LayoutAlign, LayoutContentProps, LayoutFooterAlign, LayoutFooterProps, LayoutGap, LayoutHeaderProps, LayoutItemProps, LayoutJustify, LayoutRootProps, LineChartProps, LinkProps, LinkSize, ButtonStatus as LinkStatus, LinkVariant, ListboxFilterFn, ListboxGroup, ListboxHandle, ListboxNavigation, ListboxOption, ListboxProps, LocaleCode, LocaleProviderProps, MarkerProps, MarkerVariant, MaskedFieldProps, MediaProps, MenuProps, MenuTrigger, Messages, ModalBodyProps, ModalCloseProps, ModalFooterAlign, ModalFooterProps, ModalFormFooterProps, ModalHeaderProps, ModalProps, ModalRootProps, ModalTitleProps, NotificationAction, NotificationItem, NotificationPosition, NotificationProps, NotificationProviderProps, NotificationRootProps, NotificationViewportProps, NotifyInput, NumberFieldProps, OverflowDisplay, OverflowFit, OverflowGap, OverflowItemProps, OverflowProps, OverlayBaseProps, OverlayChildren, OverlayContentProps, OverlayDismiss, OverlayDropdownProps, OverlayFloatingProps, OverlayModalProps, OverlayPopoverProps, OverlayProps, OverlayPurpose, OverlaySheetProps, OverlaySheetSide, OverlayTriggerMode, OverlayVariant, OverlayWidthMode, PageProps, PaginationControlsProps, PaginationPageSizeProps, PaginationProps, PaginationRootProps, PaginationSummaryProps, PasswordFieldProps, PasswordStrength, PinInputProps, PopoverContentVariant, PopoverProps, PopoverTriggerMode, PopoverTriggerSlotProps, ProgressCircleProps, ProgressProps, ProgressVariant, PullToRefreshProps, RadioGroupProps, RadioProps, RangeValue, RatingProps, RelativeTimeProps, ResolvedListboxGroup, SafeAreaEdges, SafeAreaProps, ScrollAreaProps, SearchFieldProps, SegmentOption, SegmentedControlProps, SegmentedItemFit, SelectOption, SelectProps, SelectionGroupItemProps, SelectionGroupListProps, SelectionGroupOrientation, SelectionGroupPanelProps, SelectionGroupRootProps, SeparatorOrientation, SeparatorProps, SeparatorSpace, SheetBodyProps, SheetCloseProps, SheetDirection, SheetFooterAlign, SheetFooterProps, SheetHeaderProps, SheetMode, SheetProps, SheetTitleProps, SidebarCollapseProps, SidebarContentProps, SidebarFooterProps, SidebarGroupLabelProps, SidebarGroupProps, SidebarHeaderProps, SidebarItemProps, SidebarMobileTriggerProps, SidebarProps, SidebarTitleProps, SkeletonProps, SkeletonVariant, SkipLinkProps, SliderProps, SliderRangeProps, SliderSingleProps, SortableItem, SortableListProps, SortableListVariant, SpinnerProps, SpinnerSize, SpinnerVariant, SplitProps, StackProps, StatBadgeProps, StepItem, StepStatus, StepsProps, SuggestFieldOption, SuggestFieldProps, SwipeAction, SwipeToActionProps, SwitchLabelSide, SwitchProps, TableContentProps, TableDensity, TableEmptyConfig, TablePagination, TableProps, TableRowActionsProps, TableSortDirection, TabsListProps, TabsOrientation, TabsPanelProps, TabsProps, TabsTriggerProps, TabsVariant, TextFieldProps, TextProps, TextareaFieldProps, Theme, ThemeApplyTarget, ThemeProviderProps, TimeFieldProps, TimePopupProps, TimeValue, TimelineItem, TimelineItemStatus, TimelineProps, TitleProps, TooltipPosition, TooltipProps, TooltipSide, TooltipTriggerProps, TranslationParams, UploadZoneProps, VirtualListAlign, VirtualListHandle, VirtualListOnRangeChangeOptions, VirtualListProps, VirtualListRange, VirtualListRenderItemInfo, VirtualScrollMetrics, VirtualScrollMetricsStore, VisuallyHiddenProps, WheelTimePickerProps };
2696
+ export type { AccordionItemProps, AccordionProps, AccordionVariant, ActionListGroup, ActionListHandle, ActionListItem, ActionListProps, ActionSheetTriggerProps, AdaptiveValue, AlertLayout, AlertProps, AlertVariant, AspectRatioProps, AttachmentProps, AttachmentSize, AttachmentStatus, AvatarGroupProps, AvatarProps, AvatarSize, AvatarStatus, BackdropBlur, BackdropPosition, BackdropProps, BackdropVariant, BadgePosition, BadgeProps, BadgeSize, BadgeVariant, BarChartDataset, BarChartProps, BoxAs, BoxBorderStyle, BoxPadding, BoxProps, BoxRadius, BoxShadow, BoxVariant, BubbleAlign, BubbleProps, BubbleReaction, BubbleVariant, ButtonGroupItemFit, ButtonGroupItemProps, ButtonGroupMode, ButtonGroupRootProps, ButtonGroupVariant, ButtonIconProps, ButtonProps, ButtonVariant, CalendarBoardBodyProps, CalendarBoardDayCellRenderProps, CalendarBoardDayProps, CalendarBoardHeaderProps, CalendarBoardMonthProps, CalendarBoardNavProps, CalendarBoardProviderProps, CalendarBoardRootProps, CalendarBoardTask, CalendarBoardTaskChipProps, CalendarBoardTaskLayout, CalendarBoardTaskRenderProps, CalendarBoardTitleProps, CalendarBoardView, CalendarBoardWeekProps, CalendarBoardYearMonthRenderProps, CalendarBoardYearProps, CalendarBodyProps, CalendarContextValue, CalendarDayCell, CalendarDayCellRenderProps, CalendarHeaderProps, CalendarNavProps, CalendarProviderProps, CalendarRootProps, CalendarScheduleEvent, CalendarSelectionMode, CalendarTitleProps, CalendarViewMode, CardProps, CardVariant, CheckboxGroupProps, CheckboxMode, CheckboxProps, ChipAs, ChipGroupGap, ChipGroupProps, ChipMode, ChipProps, ChipVariant, CollapseProps, ColorSwatchGroupProps, Column, ActionListGroup as CommandPaletteGroup, ActionListItem as CommandPaletteItem, CommandPaletteProps, ConfirmDialogProps, ConfirmDialogSecondaryAction, ContainerProps, ContainerSize, ControlRowProps, ControlSize, CustomSelectChevronProps, CustomSelectFilterProps, CustomSelectListProps, CustomSelectOption, CustomSelectPlaceholderProps, CustomSelectRenderTargetContext, CustomSelectRootProps, CustomSelectSelectionMode, CustomSelectShellProps, DateFieldProps, DateRangeFieldProps, DateRangeValue, DayStripCalendarProps, DayStripDayRenderProps, DeepPartialMessages, DescriptionListItem, DescriptionListProps, DonutChartProps, DropdownAlign, DropdownPanelScroll, DropdownPopupRole, DropdownProps, DropdownTriggerAttrs, DropdownTriggerMode, DropdownTriggerSlotProps, DropdownWidthMode, EmptyStateProps, EmptyStateSize, FieldBaseButtonProps, FieldBaseIconProps, FieldBaseProps, FieldLabelAlign, FieldLabelJustify, FieldLabelLayout, FieldLabelProps, FieldWidth, FieldsetProps, FieldsetVariant, FileListItemProps, FileListItemStatus, FileListRootProps, FormMessageProps, FormMessageVariant, GridGapToken, GridItemProps, GridMode, GridProps, ImageCropProps, ImageCropResult, ImageCropShape, ImageGalleryItem, ImageGalleryProps, ImageLightboxProps, InlineProps, ItemMediaVariant, ItemProps, ItemSize, ItemVariant, KbdGroupProps, KbdProps, LabelSide, LayoutAlign, LayoutContentProps, LayoutFooterAlign, LayoutFooterProps, LayoutGap, LayoutHeaderProps, LayoutItemProps, LayoutJustify, LayoutRootProps, LineChartProps, LinkProps, LinkSize, LinkStatus, LinkVariant, ListboxFilterFn, ListboxGroup, ListboxHandle, ListboxNavigation, ListboxOption, ListboxProps, LocaleCode, LocaleProviderProps, MarkerProps, MarkerVariant, MaskedFieldProps, MediaProps, MenuProps, MenuTrigger, Messages, ModalBodyProps, ModalCloseProps, ModalFooterAlign, ModalFooterProps, ModalFormFooterProps, ModalHeaderProps, ModalProps, ModalRootProps, ModalTitleProps, NotificationAction, NotificationItem, NotificationPosition, NotificationProps, NotificationProviderProps, NotificationRootProps, NotificationViewportProps, NotifyInput, NumberFieldProps, OverflowDisplay, OverflowFit, OverflowGap, OverflowItemProps, OverflowProps, OverlayBaseProps, OverlayChildren, OverlayContentProps, OverlayDismiss, OverlayDropdownProps, OverlayFloatingProps, OverlayModalProps, OverlayPopoverProps, OverlayProps, OverlayPurpose, OverlaySheetProps, OverlaySheetSide, OverlayTriggerMode, OverlayVariant, OverlayWidthMode, PageProps, PaginationControlsProps, PaginationPageSizeProps, PaginationProps, PaginationRootProps, PaginationSummaryProps, PasswordFieldProps, PasswordStrength, PinInputProps, PopoverContentVariant, PopoverProps, PopoverTriggerMode, PopoverTriggerSlotProps, ProgressCircleProps, ProgressProps, ProgressVariant, PullToRefreshProps, RadioGroupProps, RadioProps, RangeValue, RatingProps, RelativeTimeProps, ResolvedListboxGroup, SafeAreaEdges, SafeAreaProps, ScrollAreaProps, SearchFieldProps, SegmentOption, SegmentedControlProps, SegmentedItemFit, SelectOption, SelectProps, SelectionGroupItemProps, SelectionGroupListProps, SelectionGroupOrientation, SelectionGroupPanelProps, SelectionGroupRootProps, SeparatorOrientation, SeparatorProps, SeparatorSpace, SheetBodyProps, SheetCloseProps, SheetDirection, SheetFooterAlign, SheetFooterProps, SheetHeaderProps, SheetMode, SheetProps, SheetTitleProps, SidebarCollapseProps, SidebarContentProps, SidebarFooterProps, SidebarGroupLabelProps, SidebarGroupProps, SidebarHeaderProps, SidebarItemProps, SidebarMobileTriggerProps, SidebarProps, SidebarTitleProps, SkeletonProps, SkeletonVariant, SkipLinkProps, SliderProps, SliderRangeProps, SliderSingleProps, SortableItem, SortableListProps, SortableListVariant, SpinnerProps, SpinnerSize, SpinnerVariant, SplitProps, StackProps, StatBadgeProps, StepItem, StepStatus, StepsProps, SuggestFieldOption, SuggestFieldProps, SwipeAction, SwipeToActionProps, SwitchLabelSide, SwitchProps, TableContentProps, TableDensity, TableEmptyConfig, TablePagination, TableProps, TableRowActionsProps, TableSortDirection, TabsListProps, TabsOrientation, TabsPanelProps, TabsProps, TabsTriggerProps, TabsVariant, TextFieldAs, TextFieldProps, TextFieldRef, TextProps, TextareaFieldProps, Theme, ThemeApplyTarget, ThemeProviderProps, TimeFieldProps, TimePopupProps, TimeValue, TimelineItem, TimelineItemStatus, TimelineProps, TitleProps, TooltipPosition, TooltipProps, TooltipSide, TooltipTriggerProps, TranslationParams, UploadZoneProps, VirtualListAlign, VirtualListHandle, VirtualListOnRangeChangeOptions, VirtualListProps, VirtualListRange, VirtualListRenderItemInfo, VirtualScrollMetrics, VirtualScrollMetricsStore, VisuallyHiddenProps, WheelTimePickerProps };
@@ -1 +0,0 @@
1
- "use client";import{forwardRef as g,createElement as m}from"react";import a from"./ButtonBase.module.css.js";import y from"../../styles/textLink.module.css.js";import{cn as N}from"../../utils/cn.js";const l=g(function({variant:s="primary",status:c="default",size:u="md",active:e,className:p,children:r,type:f="button",disabled:i,as:b,...n},o){const v=b==="a",t=e!==void 0,d=N(a.btn,a[s],a[u],s==="link"?y.link:"",c==="danger"?a.statusDanger:"",t?a.isToggle:"",t&&e?a.isActive:"",p);return v?m("a",{ref:o,className:d,...i?{"aria-disabled":!0,tabIndex:-1}:{},...n,"aria-pressed":t?e:void 0},r):m("button",{ref:o,className:d,type:f,disabled:i,...n,"aria-pressed":t?e:void 0},r)});l.displayName="ButtonBase";export{l as ButtonBase};
@@ -1 +0,0 @@
1
- "use client";import{injectCss as t}from"../../utils/injectCss.js";var a=".jMtRj{--altum-btn-border:#0000;--altum-btn-text:inherit;--altum-btn-text-hover:var(--altum-btn-text);--altum-btn-bg:#0000;--altum-btn-bg-hover:var(--altum-btn-bg);--altum-btn-bg-active:var(--altum-btn-bg-hover);--altum-btn-shadow:0 0 0 0 #0000;--altum-btn-focus-ring:var(--altum-focus-ring-color);align-items:center;appearance:none;background:var(--altum-btn-bg);border:1px solid var(--altum-btn-border);border-radius:var(--altum-g-radius);box-shadow:var(--altum-btn-shadow);box-sizing:border-box;color:var(--altum-btn-text);cursor:pointer;display:inline-flex;font-family:var(--altum-g-font-family-ui);font-size:var(--altum-g-font-size-base);font-weight:var(--altum-g-font-weight-medium);gap:var(--altum-g-space-2);justify-content:center;outline:none;padding:0;position:relative;transition:var(--altum-transition-smooth),box-shadow .2s ease;-webkit-user-select:none;user-select:none}.jMtRj svg{height:var(--altum-control-icon-size-md);width:var(--altum-control-icon-size-md)}.jMtRj:is(:disabled,[aria-disabled=true]):not([aria-busy=true]){color:color-mix(in srgb,var(--altum-btn-text) 48%,var(--altum-color-bg));cursor:not-allowed;transform:none}.jMtRj[aria-disabled=true]{pointer-events:none}.jMtRj:is(.Q7Ovy,.m-yYo,.lOIB2):is(:disabled,[aria-disabled=true]):not([aria-busy=true]){background:color-mix(in srgb,var(--altum-btn-bg) 36%,var(--altum-color-surface));border-color:#0000;box-shadow:none}.jMtRj[aria-busy=true]{cursor:progress}.jMtRj:hover:not(:disabled):not([aria-disabled=true]){background-color:var(--altum-btn-bg-hover);color:var(--altum-btn-text-hover)}.jMtRj:active:not(:disabled):not([aria-disabled=true]){background-color:var(--altum-btn-bg-active)}.jMtRj:focus-visible{box-shadow:var(--altum-btn-shadow),0 0 0 var(--altum-button-focus-inner) var(--altum-color-bg),0 0 0 var(--altum-button-focus-outer) var(--altum-btn-focus-ring)}.jMtRj.atBv9{font-size:var(--altum-g-font-size-2xs);height:var(--altum-control-height-sm);padding:0 var(--altum-g-space-3)}.jMtRj.atBv9 svg{height:var(--altum-control-icon-size-sm);width:var(--altum-control-icon-size-sm)}.jMtRj.NxiSk{height:var(--altum-control-height-md);padding:0 var(--altum-g-space-5)}.jMtRj.SeJvT{font-size:var(--altum-g-font-size-lg);height:var(--altum-control-height-lg);padding:0 var(--altum-g-space-7)}.jMtRj.SeJvT svg{height:var(--altum-control-icon-size-lg);width:var(--altum-control-icon-size-lg)}.jMtRj.Q7Ovy{--altum-btn-border:var(--altum-color-button-border-primary);--altum-btn-text:var(--altum-color-brand-text);--altum-btn-bg:var(--altum-color-brand);--altum-btn-bg-hover:var(--altum-color-brand-hover);--altum-btn-bg-active:var(--altum-color-brand-active);--altum-btn-shadow:var(--altum-shadow-brand)}.jMtRj.Q7Ovy._0Gcuj{--altum-btn-border:var(--altum-color-button-border-danger);--altum-btn-text:var(--altum-color-danger-text);--altum-btn-bg:var(--altum-color-danger-bg-solid);--altum-btn-bg-hover:var(--altum-color-danger-bg-hover);--altum-btn-bg-active:var(--altum-color-danger-bg-active);--altum-btn-shadow:var(--altum-color-danger-shadow);--altum-btn-focus-ring:var(--altum-color-danger-bg-solid)}.jMtRj.m-yYo{--altum-btn-border:var(--altum-color-button-tinted-border);--altum-btn-text:var(--altum-color-button-tinted-text);--altum-btn-bg:var(--altum-color-button-tinted-bg);--altum-btn-bg-hover:var(--altum-color-button-tinted-bg-hover);--altum-btn-bg-active:var(--altum-color-button-tinted-bg-active)}.jMtRj.m-yYo._0Gcuj{--altum-btn-border:var(--altum-color-button-border-danger-tinted);--altum-btn-text:var(--altum-color-danger-tint-text);--altum-btn-text-hover:var(--altum-color-danger-text-secondary-hover);--altum-btn-bg:var(--altum-color-danger-tint-bg);--altum-btn-bg-hover:var(--altum-color-danger-tint-bg-hover);--altum-btn-bg-active:var(--altum-color-danger-tint-bg-active);--altum-btn-focus-ring:var(--altum-color-danger-bg-solid)}.jMtRj.lOIB2{--altum-btn-border:var(--altum-color-button-secondary-border);--altum-btn-text:var(--altum-color-button-secondary-text);--altum-btn-bg:var(--altum-color-button-secondary-bg);--altum-btn-bg-hover:var(--altum-color-button-secondary-bg-hover);--altum-btn-bg-active:var(--altum-color-button-secondary-bg-active);--altum-btn-shadow:var(--altum-color-button-secondary-shadow)}.jMtRj.lOIB2._0Gcuj{--altum-btn-border:var(--altum-color-button-border-danger-secondary);--altum-btn-text:var(--altum-color-danger-text-secondary);--altum-btn-text-hover:var(--altum-color-danger-text-secondary-hover);--altum-btn-bg:var(--altum-color-danger-bg-secondary);--altum-btn-bg-hover:var(--altum-color-danger-bg-secondary-hover);--altum-btn-bg-active:var(--altum-color-danger-bg-secondary-active);--altum-btn-shadow:var(--altum-color-danger-shadow-secondary);--altum-btn-focus-ring:var(--altum-color-danger-bg-solid)}.jMtRj.yv9bR{--altum-btn-border:#0000;--altum-btn-text:var(--altum-color-button-ghost-text);--altum-btn-text-hover:var(--altum-color-button-ghost-text-hover);--altum-btn-bg:#0000;--altum-btn-bg-hover:var(--altum-color-button-ghost-hover-bg);--altum-btn-bg-active:var(--altum-color-button-ghost-active-bg)}.jMtRj.yv9bR._0Gcuj{--altum-btn-text:var(--altum-color-danger-text-secondary);--altum-btn-text-hover:var(--altum-color-danger-text-secondary-hover);--altum-btn-bg-hover:var(--altum-color-danger-bg-secondary);--altum-btn-bg-active:var(--altum-color-danger-bg-secondary-active);--altum-btn-focus-ring:var(--altum-color-danger-bg-solid)}.jMtRj.B1GxO{--altum-btn-text:var(--altum-color-link-color);--altum-btn-text-hover:var(--altum-color-link-color-hover,var(--altum-color-link-color));--altum-btn-bg:#0000;--altum-btn-bg-hover:#0000;--altum-btn-bg-active:#0000;align-self:center;border:none;border-radius:var(--altum-g-radius-sm);font-weight:var(--altum-g-font-weight-normal);height:auto;padding:0}.jMtRj.B1GxO:active:not(:disabled):not([aria-disabled=true]){color:var(--altum-color-link-color-hover,var(--altum-color-link-color))}.jMtRj.B1GxO._0Gcuj{--altum-btn-text:var(--altum-color-danger-bg-solid);--altum-btn-text-hover:var(--altum-color-danger-bg-hover);--altum-btn-focus-ring:var(--altum-color-danger-bg-solid)}.jMtRj.B1GxO._0Gcuj:active:not(:disabled):not([aria-disabled=true]){color:var(--altum-color-danger-bg-active)}.jMtRj._28S8Y:not(.fcgkb){background-color:initial;border-color:#0000;box-shadow:none;opacity:.75}.jMtRj._28S8Y.fcgkb,.jMtRj._28S8Y:not(.fcgkb):hover:not(:disabled):not([aria-disabled=true]){opacity:1}.jMtRj.mWcLF{display:flex;width:100%}.jMtRj.NnlTr{aspect-ratio:1;padding:0;width:auto}.jMtRj.NnlTr svg{transform:translateY(.5px)}.jMtRj._1QTJP{border-radius:50%}.ORGiC{animation:ORGiC .75s linear infinite;border:2px solid;border-radius:50%;border-right:2px solid #0000;box-sizing:border-box;display:inline-block;height:var(--altum-control-icon-size-sm);width:var(--altum-control-icon-size-sm)}@keyframes ORGiC{to{transform:rotate(1turn)}}@media (prefers-reduced-motion:reduce){.ORGiC{animation:none;border-right-color:initial;opacity:.55}}";const r={btn:"jMtRj",primary:"Q7Ovy",tinted:"m-yYo",secondary:"lOIB2",sm:"atBv9",md:"NxiSk",lg:"SeJvT",statusDanger:"_0Gcuj",ghost:"yv9bR",link:"B1GxO",isToggle:"_28S8Y",isActive:"fcgkb",fullWidth:"mWcLF",icon:"NnlTr",circle:"_1QTJP",spin:"ORGiC"};t(a);export{r as default};
@@ -1 +0,0 @@
1
- "use client";import{jsx as r,jsxs as m}from"react/jsx-runtime";import{forwardRef as p,useMemo as q,createContext as K}from"react";import e from"./FieldBase.module.css.js";import T from"../../styles/unstyledControl.module.css.js";import{cn as t}from"../../utils/cn.js";import{composeEventHandlers as O}from"../../utils/composeEvents.js";import{IconCross as Y}from"../../icons/icons/IconCross.js";import{useLocale as _}from"../../locales/localeContext.js";import{useRequiredContext as G}from"../../hooks/useRequiredContext.js";import{FormMessage as S}from"../../components/FormMessage/FormMessage.js";const w=K(null);function J(l){const a=G(w,"useFieldControlAttrs \u0434\u043E\u043B\u0436\u0435\u043D \u0432\u044B\u0437\u044B\u0432\u0430\u0442\u044C\u0441\u044F \u0432\u043D\u0443\u0442\u0440\u0438 FieldBase");return{id:a.id,"aria-invalid":a.invalid||void 0,"aria-describedby":[a.describedBy,l?.["aria-describedby"]].filter(Boolean).join(" ")||void 0,"aria-label":l?.["aria-label"]??a.ariaLabel}}function Q(l){return t(e.controlSurface,l?.readOnly?e.controlSurfaceReadOnly:"",l?.keepPlaceholder?e.controlSurfaceKeepPlaceholder:"",l?.autoResize?e.controlSurfaceAutoResize:"")}function U(){return e.chrome}function W(){return e.controlOverlay}const X={md:"",full:e.widthFull},N=p(function({className:l,icon:a,children:i,type:n="button",...o},d){return r("button",{ref:d,type:n,className:t(T.control,e.affixButton,l),...o,children:a??i})});N.displayName="FieldBaseButton";const D=p(function({className:l,children:a,...i},n){return r("span",{ref:n,className:t(e.affixIcon,l),...i,children:a})});D.displayName="FieldBaseIcon";const L=p(function({visible:l,className:a,onClick:i,onMouseDown:n,...o},d){const{t:h}=_(),f=l===!1,b=l===!0;return r(N,{ref:d,...o,className:t(e.clearBtn,f?e.clearBtnHidden:"",a),"aria-label":o["aria-label"]??h("common.clear"),icon:r(Y,{size:12,"aria-hidden":!0}),onClick:O(i,s=>{s.preventDefault(),s.stopPropagation()}),onMouseDown:O(n,s=>{s.preventDefault()}),"data-field-clear-btn":"","data-visible":b?"true":void 0})});L.displayName="FieldBaseClear";const g=p(function({label:l,labelPlacement:a="inline",size:i="md",width:n="md",error:o,helperText:d,footer:h,disabled:f=!1,readOnly:b=!1,prefix:s,postfix:B,onClear:v,clearLabel:z,id:c,hasValue:I=!1,focused:M=!1,open:P=!1,chrome:R=!0,className:j,style:k,children:A,controlOverlay:E,labelId:y,...H},V){const u=!!o,F=typeof o=="string"?`${c}-error`:void 0,x=d&&!u?`${c}-helper`:void 0,C=[F,x].filter(Boolean).join(" ")||void 0,$=q(()=>({id:c,invalid:u,describedBy:C,ariaLabel:a==="none"&&l?l:void 0}),[C,u,c,l,a]);return m("div",{ref:V,className:t(e.root,i!=="md"?e[i]:"",X[n],a==="outside"?e.placementOutside:"",a==="none"?e.placementNone:"",R?"":e.chromeOff,u?e.error:"",f?e.disabled:"",b?e.readOnly:"",I?e.hasValue:"",P?e.isOpen:"",M?e.focused:"",j),style:k,...H,"data-field-size":i,"data-field-width":n,"data-label-placement":a,"data-field-disabled":f||void 0,"data-field-error":u||void 0,children:[a==="outside"?r("label",{className:e.labelOutside,htmlFor:c,id:y,children:l}):null,m("div",{className:t(e.chrome,e.fieldBody),"data-field-chrome":"",children:[s?r("span",{className:t(e.affix,e.affixStart),children:s}):null,r(w.Provider,{value:$,children:m("div",{className:e.controlSlot,children:[A,E,a==="inline"?r("label",{className:e.inputLabel,htmlFor:c,id:y,children:l}):null]})}),v||B?m("span",{className:t(e.affix,e.affixEnd),children:[v?r(L,{"aria-label":z,onClick:v}):null,B]}):null]}),d&&!u?r(S,{id:x,children:d}):null,typeof o=="string"?r(S,{variant:"error",id:F,children:o}):null,h]})});g.displayName="FieldBase";export{g as FieldBase,N as FieldBaseButton,D as FieldBaseIcon,U as fieldChromeClassName,W as fieldOverlayClassName,Q as fieldSurfaceClassName,J as useFieldControlAttrs};
@@ -1 +0,0 @@
1
- "use client";import{injectCss as l}from"../../utils/injectCss.js";var a="._9vbUf{--altum-field-padding-inline-sm:var(--altum-g-space-3);--altum-field-padding-inline-md:var(--altum-g-space-4);--altum-field-padding-inline-lg:var(--altum-g-space-5);--altum-field-padding-inline:var(--altum-field-padding-inline-md);--altum-field-pad-top:var(--altum-field-pad-top-md);--altum-field-pad-bottom:var(--altum-field-pad-bottom-md);--altum-field-label-raised-top:calc(var(--altum-g-space-2) - 2px);--altum-field-icon-size:var(--altum-control-icon-size-md);--altum-field-font-size:var(--altum-g-font-size-base);--altum-field-size-height:var(--altum-control-height-md);--altum-field-chrome-height:var(--altum-field-size-height);--altum-field-control-height:var(--altum-field-chrome-height);--altum-field-line-height:calc(var(--altum-field-chrome-height) - 2px);--altum-field-control-border:var(--altum-color-field-border);--altum-field-control-shadow:none;--altum-field-control-bg:var(--altum-color-field-bg);--altum-field-control-color:var(--altum-color-field-text);--altum-field-control-opacity:1;--altum-field-label-color:var(--altum-field-label);--altum-field-affix-inset:var(--altum-g-space-2);--altum-field-affix-size:calc(var(--altum-field-size-height) - 2px - var(--altum-field-affix-inset)*2);--altum-field-affix-gap:var(--altum-g-space-2);box-sizing:border-box;display:inline-block;flex-shrink:1;font-family:var(--altum-g-font-family-ui);max-width:var(--altum-field-width-default);min-width:0;position:relative;width:100%}._9vbUf:hover:not(._6QHGn):not(.MXknR){--altum-field-control-border:var(--altum-color-border-hover)}._9vbUf.NeR6I{--altum-field-label-raised-top:calc(var(--altum-g-space-1) - 1px);--altum-field-pad-top:var(--altum-field-pad-top-sm);--altum-field-pad-bottom:var(--altum-field-pad-bottom-sm);--altum-field-padding-inline:var(--altum-field-padding-inline-sm);--altum-field-font-size:var(--altum-g-font-size-2xs);--altum-field-icon-size:var(--altum-control-icon-size-sm);--altum-field-size-height:var(--altum-control-height-sm)}._9vbUf.TXcS6{--altum-field-label-raised-top:calc(var(--altum-g-space-2) + var(--altum-g-space-1) - 2px);--altum-field-pad-top:var(--altum-field-pad-top-lg);--altum-field-pad-bottom:var(--altum-field-pad-bottom-lg);--altum-field-padding-inline:var(--altum-field-padding-inline-lg);--altum-field-font-size:var(--altum-g-font-size-lg);--altum-field-icon-size:var(--altum-control-icon-size-lg);--altum-field-affix-gap:var(--altum-g-space-3);--altum-field-size-height:var(--altum-control-height-lg)}._9vbUf.p22jJ{display:block;max-width:100%}._9vbUf.xHOT9{--altum-field-control-border:var(--altum-color-status-error);--altum-field-label-color:var(--altum-color-status-error)}._9vbUf.xHOT9 .ryKmz:focus-within,._9vbUf.xHOT9.Q2CCE,._9vbUf.xHOT9._5v8pL{--altum-field-control-border:var(--altum-color-status-error);--altum-field-control-shadow:0 0 0 1px var(--altum-color-status-error)}._9vbUf.xHOT9 .GeNn-:focus-within ._6OSv6,._9vbUf.xHOT9 ._6OSv6,._9vbUf.xHOT9.Q2CCE ._6OSv6,._9vbUf.xHOT9._5v8pL ._6OSv6{color:var(--altum-color-status-error)}._9vbUf._6QHGn{--altum-field-control-bg:var(--altum-color-option-hover);--altum-field-control-color:var(--altum-field-label);--altum-field-control-opacity:var(--altum-field-disabled-opacity);--altum-field-label-color:var(--altum-field-label)}._9vbUf._6QHGn .SdPtz,._9vbUf._6QHGn ._6OSv6,._9vbUf._6QHGn .kLUWI{opacity:var(--altum-opacity-disabled)}._9vbUf.MXknR{--altum-field-label-color:var(--altum-field-label-readonly)}._9vbUf.MXknR .ryKmz{background-color:var(--altum-field-bg-readonly);border-color:var(--altum-field-border-readonly);border-style:dashed;box-shadow:none}._9vbUf.MXknR .ryKmz:focus-within ._6OSv6,._9vbUf.MXknR.Q2CCE ._6OSv6,._9vbUf.MXknR._0bdVb ._6OSv6,._9vbUf.MXknR._5v8pL ._6OSv6{color:var(--altum-field-label-readonly)}._9vbUf.u-od2 .ryKmz{display:block;height:auto;min-height:0;padding:0}._9vbUf.u-od2 .XywuJ{background:#0000;border:none;box-shadow:none}._9vbUf.u-od2 .Ee2sB,._9vbUf.u-od2 .GeNn-,._9vbUf.u-od2 ._8o-xB{padding:0}.XywuJ{background-color:var(--altum-field-control-bg,var(--altum-color-field-bg));border:1px solid var(--altum-field-control-border,var(--altum-color-field-border));border-radius:var(--altum-g-radius);box-shadow:var(--altum-field-control-shadow,none);box-sizing:border-box}.ryKmz{align-items:stretch;display:flex;height:var(--altum-field-chrome-height);position:relative;transition:var(--altum-transition-smooth);width:100%}.ryKmz:has([contenteditable=true]),.ryKmz:has(textarea){align-items:flex-start;height:auto;min-height:var(--altum-field-chrome-height)}.Q2CCE .ryKmz,._5v8pL .ryKmz,.ryKmz:focus-within{--altum-field-control-border:var(--altum-color-border-hover);--altum-field-control-shadow:0 0 0 1px var(--altum-color-border-hover);border-color:var(--altum-field-control-border);box-shadow:var(--altum-field-control-shadow)}.GeNn-{align-items:stretch;display:flex;flex:1 1 auto;min-width:0;position:relative}.Ee2sB{box-sizing:border-box;font-family:inherit;font-size:var(--altum-field-font-size,var(--altum-g-font-size-base));inset:0;line-height:1.25;overflow:hidden;padding:var(--altum-field-pad-top) var(--altum-field-padding-inline) var(--altum-field-pad-bottom);pointer-events:none;position:absolute;-webkit-user-select:none;user-select:none;white-space:pre;z-index:var(--altum-g-z-local)}.nyJQ9 .Ee2sB,.o0TlA .Ee2sB{align-items:center;display:flex;line-height:var(--altum-field-line-height);padding-bottom:0;padding-top:0}.GeNn-:not(:focus-within) .Ee2sB{display:none}.kLUWI{align-items:center;box-sizing:border-box;color:var(--altum-color-muted);display:flex;flex-shrink:0;gap:var(--altum-field-affix-gap);padding:var(--altum-field-affix-inset);pointer-events:none}.kLUWI svg{flex-shrink:0;height:var(--altum-field-icon-size);width:var(--altum-field-icon-size)}.s-pKA{padding-inline-end:var(--altum-field-affix-gap)}.q-KDM{padding-inline-start:var(--altum-field-affix-gap)}.ryKmz:has(.s-pKA) .Ee2sB,.ryKmz:has(.s-pKA) ._8o-xB{padding-inline-start:0}.ryKmz:has(.q-KDM) .Ee2sB,.ryKmz:has(.q-KDM) ._8o-xB{padding-inline-end:0}.ryKmz:has(.s-pKA) ._6OSv6{left:0}.ryKmz:has(.q-KDM) ._6OSv6{right:0}.q-KDM:not(:has(:not(.rKEHx))){display:none}.Z33ws{align-items:center;border-radius:var(--altum-g-radius-sm);display:inline-flex;flex-shrink:0;height:var(--altum-field-affix-size);justify-content:center;pointer-events:auto;width:var(--altum-field-affix-size)}.Z33ws:hover:not(:disabled){background-color:var(--altum-color-option-hover)}.J-Ebr{align-items:center;box-sizing:border-box;display:inline-flex;flex-shrink:0;height:var(--altum-field-icon-size);justify-content:center;width:var(--altum-field-icon-size)}.SdPtz{color:var(--altum-field-label-color,var(--altum-color-muted));display:block;font-size:var(--altum-form-label-size);font-weight:var(--altum-form-label-weight);line-height:var(--altum-form-label-line-height);margin:0 0 var(--altum-field-label-gap,var(--altum-g-space-1));padding:0}._6OSv6{backface-visibility:hidden;color:var(--altum-field-label-color);font-size:var(--altum-field-font-size);left:var(--altum-field-padding-inline);line-height:1.2;overflow:hidden;pointer-events:none;position:absolute;right:var(--altum-field-padding-inline);text-overflow:ellipsis;top:50%;transform:translate3d(0,-50%,0);transform-origin:left top;transition:var(--altum-transition-smooth);white-space:nowrap;z-index:var(--altum-g-z-raised)}.GeNn-:focus-within ._6OSv6,.GeNn-:has(input:not(:placeholder-shown)) ._6OSv6,.GeNn-:has(textarea:not(:placeholder-shown)) ._6OSv6,.Q2CCE ._6OSv6,._0bdVb ._6OSv6,._5v8pL ._6OSv6{color:var(--altum-field-label-color,var(--altum-color-border-hover));max-width:calc(128.20513% - var(--altum-field-padding-inline)*2/.78);right:auto;top:var(--altum-field-label-raised-top);transform:translateZ(0) scale(.78)}.GeNn-:focus-within ._6OSv6,.Q2CCE ._6OSv6,._5v8pL ._6OSv6{color:var(--altum-color-border-hover)}._8o-xB{align-self:stretch;background:#0000;border:none;box-sizing:border-box;color:var(--altum-field-control-color,var(--altum-color-field-text));flex:1 1 auto;font-family:inherit;font-size:var(--altum-field-font-size,var(--altum-g-font-size-base));height:100%;line-height:1.25;min-width:0;opacity:var(--altum-field-control-opacity,1);outline:none;padding:var(--altum-field-pad-top) var(--altum-field-padding-inline) var(--altum-field-pad-bottom);text-align:start;transition:var(--altum-transition-smooth);width:100%}._8o-xB:disabled{cursor:not-allowed}._8o-xB:is(input,textarea){cursor:text}._8o-xB:is(input,textarea):-webkit-autofill,._8o-xB:is(input,textarea):-webkit-autofill:focus,._8o-xB:is(input,textarea):-webkit-autofill:hover{-webkit-text-fill-color:var(--altum-color-field-text)!important;-webkit-box-shadow:0 0 0 1000px var(--altum-color-field-bg) inset!important}._8o-xB[type=search]::-webkit-search-cancel-button,._8o-xB[type=search]::-webkit-search-decoration,._8o-xB[type=search]::-webkit-search-results-button,._8o-xB[type=search]::-webkit-search-results-decoration{appearance:none;display:none}._8o-xB:is(textarea){height:auto;min-height:var(--altum-field-control-height);resize:vertical}._8o-xB::placeholder,._8o-xB:focus::placeholder{color:#0000}._4mrI-{overflow-y:hidden;resize:none}.nyJQ9 ._8o-xB,.o0TlA ._8o-xB{line-height:var(--altum-field-line-height);padding-bottom:0;padding-top:0}.nyJQ9:has(textarea) ._8o-xB,.o0TlA:has(textarea) ._8o-xB{line-height:1.25;padding-bottom:max(var(--altum-g-space-2),calc(var(--altum-field-control-height)/2 - 1px - .625em));padding-top:max(var(--altum-g-space-2),calc(var(--altum-field-control-height)/2 - 1px - .625em))}.nyJQ9 ._8o-xB::placeholder,.o0TlA ._8o-xB::placeholder{color:var(--altum-field-placeholder,var(--altum-field-label));opacity:1}.nyJQ9 ._8o-xB:focus-visible::placeholder,.nyJQ9 ._8o-xB:focus::placeholder,.o0TlA ._8o-xB:focus-visible::placeholder,.o0TlA ._8o-xB:focus::placeholder{color:#0000}.HkguN::placeholder,.HkguN:focus::placeholder{color:var(--altum-field-placeholder)}._3YW9E{cursor:default}._9vbUf.MXknR .tQ-yf:not([data-visible=true]),._9vbUf._6QHGn .tQ-yf:not([data-visible=true]),._9vbUf:not(._0bdVb) .tQ-yf:not([data-visible=true]),.rKEHx{display:none}";const e={root:"_9vbUf",disabled:"_6QHGn",readOnly:"MXknR",sm:"NeR6I",lg:"TXcS6",widthFull:"p22jJ",error:"xHOT9",fieldBody:"ryKmz",focused:"Q2CCE",isOpen:"_5v8pL",inputLabel:"_6OSv6",controlSlot:"GeNn-",labelOutside:"SdPtz",affix:"kLUWI",hasValue:"_0bdVb",chromeOff:"u-od2",chrome:"XywuJ",controlSurface:"_8o-xB",controlOverlay:"Ee2sB",placementOutside:"o0TlA",placementNone:"nyJQ9",affixStart:"s-pKA",affixEnd:"q-KDM",clearBtnHidden:"rKEHx",affixButton:"Z33ws",affixIcon:"J-Ebr",controlSurfaceAutoResize:"_4mrI-",controlSurfaceKeepPlaceholder:"HkguN",controlSurfaceReadOnly:"_3YW9E",clearBtn:"tQ-yf"};l(a);export{e as default};
@@ -1 +0,0 @@
1
- "use client";import{jsx as R}from"react/jsx-runtime";import{forwardRef as z,useRef as I}from"react";import{useFieldControl as J}from"../../hooks/useFieldControl.js";import{useAutoResize as K}from"../../hooks/useAutoResize.js";import{composeEventHandlers as Q}from"../../utils/composeEvents.js";import{composeRefs as U}from"../../utils/composeRefs.js";import{cn as W}from"../../utils/cn.js";import{FieldBase as X,useFieldControlAttrs as Y,fieldSurfaceClassName as Z}from"../FieldBase/FieldBase.js";const k=z(function({as:a,rest:n,className:i,type:d,disabled:r,readOnly:o,value:c,placeholder:u,rows:m,style:p,onChange:f,onFocus:y,onBlur:s,keepPlaceholder:h,autoResize:b,ariaDescribedBy:C},x){const v=Y({"aria-describedby":C});return R(a,{ref:x,...n,...v,type:a==="textarea"?void 0:d,disabled:r,readOnly:o,"aria-readonly":o||void 0,value:c,placeholder:u,rows:m,style:p,className:W(Z({readOnly:o,keepPlaceholder:h,autoResize:b}),i),onChange:f,onFocus:y,onBlur:s})});k.displayName="TextControl.Surface";const T=z(function({as:a="input",label:n,size:i="md",width:d="full",labelPlacement:r="inline",prefix:o,postfix:c,wrapperClassName:u="",className:m="",id:p,placeholder:f=" ",type:y="text",disabled:s,readOnly:h,error:b,helperText:C,footer:x,active:v,value:O,defaultValue:V,onChange:A,onFocus:E,onBlur:H,onClear:w,clearLabel:S,keepPlaceholder:B=!1,controlOverlay:q,minRows:F=1,maxHeight:D,autoResize:t=!0,rows:j,style:L,"aria-describedby":M,...G},N){const P=I(null),l=a==="textarea",e=J({id:p,value:O,defaultValue:V,disabled:s,readOnly:h,label:n,labelPlacement:r,placeholder:f,keepPlaceholder:B,onChange:A,onFocus:E,onBlur:H,onClear:w}),g=K(P,{enabled:l&&t,minRows:F,maxHeight:D,value:e.currentValue});return R(X,{label:n,size:i,width:d,labelPlacement:r,error:b,helperText:C,footer:x,disabled:!!s,readOnly:e.isReadOnly,hasValue:!e.isEmpty,open:r==="inline"&&!!v,focused:e.focused,className:u,prefix:o,postfix:c,onClear:w?()=>{e.handleClear(),l&&requestAnimationFrame(g)}:void 0,clearLabel:S,id:e.id,controlOverlay:q,children:R(k,{rest:G,as:a,ref:l?U(N,P):N,type:y,className:m,disabled:s,readOnly:e.isReadOnly,keepPlaceholder:B,autoResize:l&&t,ariaDescribedBy:M,placeholder:e.placeholder,value:e.isControlled?O:e.currentValue,rows:l?t?1:j??F:void 0,style:L,onChange:Q(e.onChange,()=>{l&&t&&requestAnimationFrame(g)}),onFocus:e.onFocus,onBlur:e.onBlur})})});T.displayName="TextControl";export{T as TextControl};
@@ -1 +0,0 @@
1
- "use client";import{useId as p,useState as f}from"react";import{useControlledState as h}from"./useControlledState.js";import{composeEventHandlers as o}from"../utils/composeEvents.js";import{fieldPlaceholder as C}from"../utils/fieldPlaceholder.js";import{getFormControlState as g}from"../utils/formControl.js";function v(e){const u=p(),i=e.id||u,[r,t]=f(!1),[a,n,l]=h(e.value===void 0?void 0:String(e.value),e.defaultValue!==void 0?String(e.defaultValue):""),{isReadOnly:c}=g(e),d=a.length===0,{onClear:s}=e;return{id:i,focused:r,isReadOnly:c,isEmpty:d,isControlled:l,currentValue:a,placeholder:C({placement:e.labelPlacement,focused:r,empty:d,placeholder:e.placeholder,label:e.label,keepPlaceholder:e.keepPlaceholder}),handleClear:()=>{l||n(""),s?.()},onFocus:o(e.onFocus,()=>t(!0)),onBlur:o(e.onBlur,()=>t(!1)),onChange:o(e.onChange,m=>{l||n(m.target.value)})}}export{v as useFieldControl};
@@ -1 +0,0 @@
1
- "use client";import{useRef as d,useState as i,useCallback as b,useEffect as p}from"react";function O(s){const l=d(null),[f,o]=i(!1),[a,u]=i(!1),t=b(()=>{const e=l.current;if(!e||!s){o(!1),u(!1);return}const{scrollLeft:r,scrollWidth:n,clientWidth:v}=e,c=n-v;o(r>2),u(c>2&&r<c-2)},[s]);return p(()=>{t();const e=l.current;if(!e||!s)return;e.addEventListener("scroll",t,{passive:!0});const r=typeof ResizeObserver<"u"?new ResizeObserver(t):null;r?.observe(e);const n=typeof MutationObserver<"u"?new MutationObserver(t):null;return n?.observe(e,{childList:!0,subtree:!0}),()=>{e.removeEventListener("scroll",t),r?.disconnect(),n?.disconnect()}},[s,t]),{ref:l,start:f,end:a}}export{O as useOverflowEdges};
@@ -1 +0,0 @@
1
- "use client";import{useEffect as s}from"react";function c(t,r){s(()=>{if(!r)return;const e=t.current;if(!e)return;const o=i=>{const n=i.target;!(n instanceof HTMLElement)||!e.contains(n)||n.scrollIntoView({inline:"nearest",block:"nearest"})};return e.addEventListener("focusin",o),()=>e.removeEventListener("focusin",o)},[r,t])}export{c as useScrollFocusedChildIntoView};
@@ -1 +0,0 @@
1
- "use client";import{injectCss as o}from"../utils/injectCss.js";var r=".Rbz9q._3C2P4{background-color:var(--altum-color-brand);border:1px solid #0000;box-shadow:var(--altum-shadow-brand)}.Rbz9q._-50a1{background-color:var(--altum-color-button-tinted-bg);border:1px solid var(--altum-color-button-tinted-border);box-shadow:none}.Rbz9q.hJnTm{background-color:var(--altum-color-button-secondary-bg)}.Rbz9q._8Ipww,.Rbz9q.hJnTm{border:1px solid var(--altum-color-button-secondary-border);box-shadow:none}.Rbz9q._8Ipww{background-color:initial}.Rbz9q.WUoOB,.Rbz9q.X2cj9{background-color:initial;border:1px solid #0000;box-shadow:none}.Rbz9q.TPkiu{background-color:var(--altum-field-bg-readonly);border:1px dashed var(--altum-field-border-readonly);box-shadow:none;cursor:default}";const a={track:"Rbz9q",primary:"_3C2P4",tinted:"_-50a1",secondary:"hJnTm",ghost:"_8Ipww",plain:"WUoOB",link:"X2cj9",readOnly:"TPkiu"};o(r);export{a as default};
@@ -1 +0,0 @@
1
- import{cn as t}from"./cn.js";import r from"../styles/ControlTrack.module.css.js";function a(o,n){return t(r.track,r[o]??"",n?.readOnly?r.readOnly:"")}export{a as controlTrackClassName};
@@ -1 +0,0 @@
1
- function c(l){const{placement:n="inline",focused:r=!1,empty:t=!0,placeholder:e,label:i,keepPlaceholder:o=!1}=l;if(n==="inline")return" ";const a=e&&e.trim()!==""?e:i??"";return r&&!o||!t?"":a}export{c as fieldPlaceholder};