@companix/uikit 0.0.34 → 0.0.36

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 (184) hide show
  1. package/package.json +7 -10
  2. package/dist/Avatar/Avatar.scss +0 -64
  3. package/dist/Avatar/helpers.d.ts +0 -10
  4. package/dist/Avatar/index.d.ts +0 -8
  5. package/dist/Avatar/types.d.ts +0 -2
  6. package/dist/Button/Button.scss +0 -128
  7. package/dist/Button/index.d.ts +0 -21
  8. package/dist/ButtonGroup/ButtonGroup.scss +0 -18
  9. package/dist/ButtonGroup/index.d.ts +0 -6
  10. package/dist/Calendar/Calendar.d.ts +0 -14
  11. package/dist/Calendar/Calendar.scss +0 -125
  12. package/dist/Calendar/CalendarHeader.d.ts +0 -10
  13. package/dist/Checkbox/Checkbox.scss +0 -115
  14. package/dist/Checkbox/index.d.ts +0 -10
  15. package/dist/Countdown/index.d.ts +0 -6
  16. package/dist/DateInput/DateInput.scss +0 -11
  17. package/dist/DateInput/index.d.ts +0 -13
  18. package/dist/DatePicker/index.d.ts +0 -9
  19. package/dist/Dialog/Dialog.scss +0 -25
  20. package/dist/Dialog/Popup.scss +0 -55
  21. package/dist/Dialog/index.d.ts +0 -16
  22. package/dist/DialogAlert/Alert.d.ts +0 -19
  23. package/dist/DialogAlert/Alert.scss +0 -52
  24. package/dist/DialogAlert/Viewport.d.ts +0 -8
  25. package/dist/DialogAlert/index.d.ts +0 -11
  26. package/dist/Drawer/Drawer.scss +0 -112
  27. package/dist/Drawer/index.d.ts +0 -13
  28. package/dist/File/index.d.ts +0 -10
  29. package/dist/FormGroup/FormGroup.scss +0 -32
  30. package/dist/FormGroup/index.d.ts +0 -9
  31. package/dist/Icon/icon.scss +0 -18
  32. package/dist/Icon/index.d.ts +0 -6
  33. package/dist/Input/Form.scss +0 -67
  34. package/dist/Input/InlineInput.d.ts +0 -0
  35. package/dist/Input/Input.d.ts +0 -14
  36. package/dist/Input/Input.scss +0 -47
  37. package/dist/Input/InputContainer.d.ts +0 -11
  38. package/dist/Input/InputElement.d.ts +0 -9
  39. package/dist/LoadingButton/index.d.ts +0 -5
  40. package/dist/NumberInput/index.d.ts +0 -23
  41. package/dist/OptionItem/Option.scss +0 -89
  42. package/dist/OptionItem/OptionItem.d.ts +0 -6
  43. package/dist/OptionItem/OptionsList.d.ts +0 -7
  44. package/dist/Popover/Popover.scss +0 -80
  45. package/dist/Popover/index.d.ts +0 -27
  46. package/dist/Progress/Progress.scss +0 -47
  47. package/dist/Progress/index.d.ts +0 -5
  48. package/dist/Radio/Radio.scss +0 -148
  49. package/dist/Radio/index.d.ts +0 -20
  50. package/dist/Scrollable/ImitateScroll.d.ts +0 -10
  51. package/dist/Scrollable/Scrollable.scss +0 -50
  52. package/dist/Scrollable/index.d.ts +0 -33
  53. package/dist/Segments/Segments.scss +0 -57
  54. package/dist/Segments/index.d.ts +0 -11
  55. package/dist/Select/Select.scss +0 -80
  56. package/dist/Select/SelectInput.d.ts +0 -15
  57. package/dist/Select/SelectOptions.d.ts +0 -12
  58. package/dist/Select/SelectRight.d.ts +0 -8
  59. package/dist/Select/index.d.ts +0 -24
  60. package/dist/SelectTags/SelectTags.scss +0 -67
  61. package/dist/SelectTags/index.d.ts +0 -17
  62. package/dist/Spinner/Spinner.scss +0 -14
  63. package/dist/Spinner/index.d.ts +0 -7
  64. package/dist/Switch/Switch.scss +0 -102
  65. package/dist/Switch/index.d.ts +0 -10
  66. package/dist/Tabs/Tabs.scss +0 -58
  67. package/dist/Tabs/index.d.ts +0 -13
  68. package/dist/TextArea/TextArea.scss +0 -34
  69. package/dist/TextArea/index.d.ts +0 -7
  70. package/dist/ThemeProvider/helpers.d.ts +0 -4
  71. package/dist/ThemeProvider/index.d.ts +0 -12
  72. package/dist/ThemeProvider/script.d.ts +0 -8
  73. package/dist/ThemeProvider/types.d.ts +0 -2
  74. package/dist/TimePicker/index.d.ts +0 -10
  75. package/dist/Toaster/Toast.d.ts +0 -15
  76. package/dist/Toaster/Toaster.scss +0 -155
  77. package/dist/Toaster/Viewport.d.ts +0 -13
  78. package/dist/Toaster/index.d.ts +0 -20
  79. package/dist/Tooltip/Tooltip.scss +0 -28
  80. package/dist/Tooltip/index.d.ts +0 -7
  81. package/dist/__helpers/createDialogRegistry.d.ts +0 -26
  82. package/dist/__helpers/createPopoversRegistry.d.ts +0 -19
  83. package/dist/__hooks/use-frooze-closing.d.ts +0 -5
  84. package/dist/__hooks/use-input-padding.d.ts +0 -5
  85. package/dist/__hooks/use-loading.d.ts +0 -8
  86. package/dist/__hooks/use-local-storage.d.ts +0 -1
  87. package/dist/__hooks/use-popover-position.d.ts +0 -8
  88. package/dist/__hooks/use-previos.d.ts +0 -2
  89. package/dist/__hooks/use-resize.d.ts +0 -3
  90. package/dist/__hooks/use-scrollbox.d.ts +0 -7
  91. package/dist/__hooks/use-update.d.ts +0 -1
  92. package/dist/__hooks/useCalendar.d.ts +0 -17
  93. package/dist/__hooks/useCalendarOptions-copy.d.ts +0 -22
  94. package/dist/__hooks/useCalendarOptions.d.ts +0 -31
  95. package/dist/__libs/calendar.d.ts +0 -25
  96. package/dist/__utils/RemoveListener.d.ts +0 -3
  97. package/dist/__utils/utils.d.ts +0 -39
  98. package/dist/bundle.es.js +0 -88
  99. package/dist/bundle.es10.js +0 -82
  100. package/dist/bundle.es11.js +0 -28
  101. package/dist/bundle.es12.js +0 -77
  102. package/dist/bundle.es13.js +0 -43
  103. package/dist/bundle.es14.js +0 -38
  104. package/dist/bundle.es15.js +0 -58
  105. package/dist/bundle.es16.js +0 -23
  106. package/dist/bundle.es17.js +0 -35
  107. package/dist/bundle.es18.js +0 -27
  108. package/dist/bundle.es19.js +0 -47
  109. package/dist/bundle.es2.js +0 -44
  110. package/dist/bundle.es20.js +0 -25
  111. package/dist/bundle.es21.js +0 -31
  112. package/dist/bundle.es22.js +0 -40
  113. package/dist/bundle.es23.js +0 -18
  114. package/dist/bundle.es24.js +0 -36
  115. package/dist/bundle.es25.js +0 -23
  116. package/dist/bundle.es26.js +0 -44
  117. package/dist/bundle.es27.js +0 -118
  118. package/dist/bundle.es28.js +0 -123
  119. package/dist/bundle.es29.js +0 -76
  120. package/dist/bundle.es3.js +0 -4
  121. package/dist/bundle.es30.js +0 -35
  122. package/dist/bundle.es31.js +0 -14
  123. package/dist/bundle.es32.js +0 -88
  124. package/dist/bundle.es33.js +0 -24
  125. package/dist/bundle.es34.js +0 -9
  126. package/dist/bundle.es35.js +0 -37
  127. package/dist/bundle.es36.js +0 -24
  128. package/dist/bundle.es37.js +0 -13
  129. package/dist/bundle.es38.js +0 -27
  130. package/dist/bundle.es39.js +0 -41
  131. package/dist/bundle.es4.js +0 -47
  132. package/dist/bundle.es40.js +0 -53
  133. package/dist/bundle.es41.js +0 -45
  134. package/dist/bundle.es42.js +0 -11
  135. package/dist/bundle.es43.js +0 -27
  136. package/dist/bundle.es44.js +0 -26
  137. package/dist/bundle.es45.js +0 -89
  138. package/dist/bundle.es46.js +0 -20
  139. package/dist/bundle.es47.js +0 -22
  140. package/dist/bundle.es48.js +0 -26
  141. package/dist/bundle.es49.js +0 -41
  142. package/dist/bundle.es5.js +0 -10
  143. package/dist/bundle.es50.js +0 -5
  144. package/dist/bundle.es51.js +0 -7
  145. package/dist/bundle.es52.js +0 -16
  146. package/dist/bundle.es53.js +0 -16
  147. package/dist/bundle.es54.js +0 -5
  148. package/dist/bundle.es55.js +0 -5
  149. package/dist/bundle.es56.js +0 -72
  150. package/dist/bundle.es57.js +0 -70
  151. package/dist/bundle.es58.js +0 -72
  152. package/dist/bundle.es59.js +0 -14
  153. package/dist/bundle.es6.js +0 -13
  154. package/dist/bundle.es60.js +0 -45
  155. package/dist/bundle.es61.js +0 -17
  156. package/dist/bundle.es62.js +0 -34
  157. package/dist/bundle.es63.js +0 -72
  158. package/dist/bundle.es64.js +0 -78
  159. package/dist/bundle.es65.js +0 -51
  160. package/dist/bundle.es66.js +0 -16
  161. package/dist/bundle.es67.js +0 -22
  162. package/dist/bundle.es68.js +0 -4
  163. package/dist/bundle.es69.js +0 -22
  164. package/dist/bundle.es7.js +0 -87
  165. package/dist/bundle.es70.js +0 -4
  166. package/dist/bundle.es71.js +0 -23
  167. package/dist/bundle.es72.js +0 -4
  168. package/dist/bundle.es73.js +0 -22
  169. package/dist/bundle.es74.js +0 -5
  170. package/dist/bundle.es75.js +0 -5
  171. package/dist/bundle.es76.js +0 -16
  172. package/dist/bundle.es77.js +0 -4
  173. package/dist/bundle.es78.js +0 -22
  174. package/dist/bundle.es79.js +0 -4
  175. package/dist/bundle.es8.js +0 -87
  176. package/dist/bundle.es80.js +0 -22
  177. package/dist/bundle.es81.js +0 -4
  178. package/dist/bundle.es9.js +0 -24
  179. package/dist/css-properties.scss +0 -120
  180. package/dist/index.d.ts +0 -77
  181. package/dist/index.scss +0 -28
  182. package/dist/mixins.scss +0 -102
  183. package/dist/theme.scss +0 -101
  184. package/dist/types.d.ts +0 -17
@@ -1,8 +0,0 @@
1
- export interface UseLoadingProps<T = unknown> {
2
- onClick: (startLoad: () => void, value: T) => Promise<any>;
3
- }
4
- export declare const useLoading: <T = unknown>({ onClick }: UseLoadingProps<T>) => {
5
- handleClick: (value: T) => void;
6
- isLoading: boolean;
7
- isError: boolean;
8
- };
@@ -1 +0,0 @@
1
- export declare const useLocalStorage: <T>(token: string, defaultValue: T) => [T, React.Dispatch<React.SetStateAction<T>>];
@@ -1,8 +0,0 @@
1
- export declare const usePopoverLeftValue: () => {
2
- popoverRef: import('react').RefObject<HTMLDivElement>;
3
- getLeftValue: () => string;
4
- };
5
- export declare const useButtonWidth: () => {
6
- buttonRef: import('react').RefObject<HTMLButtonElement>;
7
- getWidthValue: () => string;
8
- };
@@ -1,2 +0,0 @@
1
- export declare const usePrevious: <T>(value: T) => T | undefined;
2
- export declare const usePreviousChanged: <T>(value: T) => T | undefined;
@@ -1,3 +0,0 @@
1
- type ResizeText = [React.RefObject<HTMLTextAreaElement>, () => void];
2
- declare const useResizeTextarea: (onResize: ((el: HTMLTextAreaElement) => void) | undefined, grow: boolean) => ResizeText;
3
- export { useResizeTextarea };
@@ -1,7 +0,0 @@
1
- interface UseScrollListControllerReturn {
2
- scrollBoxRef: React.RefObject<HTMLDivElement>;
3
- optionsWrapperRef: React.RefObject<HTMLDivElement>;
4
- scrollToElement: (index: number, position?: 'center' | 'top') => void;
5
- }
6
- export declare const useScrollListController: () => UseScrollListControllerReturn;
7
- export {};
@@ -1 +0,0 @@
1
- export declare const useEffectWithLayout: (callback: () => void, deps?: React.DependencyList | undefined) => void;
@@ -1,17 +0,0 @@
1
- import { CalendarProps } from '../Calendar/Calendar';
2
- export interface UseCalendarDependencies extends Pick<CalendarProps, 'minDateTime' | 'maxDateTime' | 'shouldDisableDate' | 'disableFuture' | 'disablePast'> {
3
- disablePast?: boolean;
4
- disableFuture?: boolean;
5
- minDateTime?: Date;
6
- maxDateTime?: Date;
7
- value?: Date | null;
8
- }
9
- export declare const useCalendar: ({ value, disablePast, disableFuture, shouldDisableDate, minDateTime, maxDateTime }: UseCalendarDependencies) => {
10
- viewDate: Date;
11
- setViewDate: import('react').Dispatch<import('react').SetStateAction<Date>>;
12
- setPrevMonth: () => void;
13
- setNextMonth: () => void;
14
- isDayDisabled: (day: Date, withTime?: boolean) => boolean;
15
- isMonthDisabled: (month: number, year?: number) => boolean;
16
- isYearDisabled: (year: number) => boolean;
17
- };
@@ -1,22 +0,0 @@
1
- export declare const defaultMax: Date;
2
- export declare const defaultMin: Date;
3
- interface Options {
4
- min?: Date;
5
- max?: Date;
6
- now: Date;
7
- }
8
- export declare const useCalendarOptions2: ({ min, max, now }: Options) => {
9
- years: {
10
- title: string;
11
- value: number;
12
- }[];
13
- months: {
14
- title: string;
15
- value: number;
16
- }[];
17
- days: {
18
- title: string;
19
- value: number;
20
- }[];
21
- };
22
- export {};
@@ -1,31 +0,0 @@
1
- import { DateFormat } from '..';
2
- export declare const defaultMax: {
3
- day: number;
4
- month: number;
5
- year: number;
6
- };
7
- export declare const defaultMin: {
8
- day: number;
9
- month: number;
10
- year: number;
11
- };
12
- interface Options {
13
- min?: DateFormat;
14
- max?: DateFormat;
15
- now: DateFormat;
16
- }
17
- export declare const useCalendarOptions: ({ min, max, now }: Options) => {
18
- years: {
19
- title: string;
20
- value: number;
21
- }[];
22
- months: {
23
- title: string;
24
- value: number;
25
- }[];
26
- days: {
27
- title: string;
28
- value: number;
29
- }[];
30
- };
31
- export {};
@@ -1,25 +0,0 @@
1
- import { CalendarProps } from '../Calendar/Calendar';
2
- export declare function isSameDate(d1: Date, d2: Date): boolean;
3
- export declare const MONDAY = 1;
4
- export declare function startOfWeek(date: Date, { weekStartsOn }: {
5
- weekStartsOn?: number | undefined;
6
- }): Date;
7
- export declare function endOfWeek(date: Date, { weekStartsOn }: {
8
- weekStartsOn?: number | undefined;
9
- }): Date;
10
- export declare function startOfDay(date: Date): Date;
11
- export declare function endOfDay(date: Date): Date;
12
- export declare function isDayMinMaxRestricted(day: Date, options?: {
13
- min?: Date;
14
- max?: Date;
15
- withTime?: boolean;
16
- }): boolean;
17
- export declare function addMonths(date: Date, amount: number): Date;
18
- export declare function subMonths(date: Date, amount: number): Date;
19
- export declare function setYear(date: Date, year: number): Date;
20
- export declare function setMonth(date: Date, month: number): Date;
21
- interface DisableOptions extends Pick<CalendarProps, 'disableFuture' | 'disablePast' | 'maxDateTime' | 'minDateTime' | 'shouldDisableDate'> {
22
- }
23
- export declare const createDayDisableChecker: (options: DisableOptions) => (day: Date, withTime?: boolean) => boolean;
24
- export declare const useDayDisableCheker: (options: DisableOptions) => (day: Date, withTime?: boolean) => boolean;
25
- export {};
@@ -1,3 +0,0 @@
1
- export declare const RemoveListener: ({ callback }: {
2
- callback?: () => void;
3
- }) => null;
@@ -1,39 +0,0 @@
1
- import { DateFormat, Option, TimeFormat } from '..';
2
- export declare const getMonthMaxDay: (month: number, year: number) => number;
3
- export declare const getFirstDay: (month: number, year: number) => number;
4
- export declare const getDayIndex: (day: number) => number;
5
- export declare const createVoids: (length: number) => any[];
6
- export declare const dateToFormat: (date: Date) => DateFormat;
7
- export declare const createDateValidation: ({ min, max }: {
8
- min: DateFormat;
9
- max: DateFormat;
10
- }) => (value: DateFormat) => DateFormat | undefined;
11
- export declare const createRangeValidation: ({ min, max }: {
12
- min?: DateFormat;
13
- max?: DateFormat;
14
- }) => {
15
- isDateMinValid: (value: DateFormat) => boolean;
16
- isDateMaxValid: (value: DateFormat) => boolean;
17
- isDateInRange: (value: DateFormat) => boolean;
18
- };
19
- export declare const formatToDate: (format: DateFormat) => Date;
20
- export declare const weeks: string[];
21
- export declare const DefaultMonths: string[];
22
- export declare const DEFAULT_MAX_YEAR = 9999;
23
- export declare const DEFAULT_MIN_YEAR = 100;
24
- export declare const getYears: (currentYear: number, range: number) => Option<number>[];
25
- export declare const getMonths: (locale?: string) => Option<number>[];
26
- export declare const removeDigits: (value: string, signs: string[]) => string;
27
- export declare const convertTimeToOption: ({ hours, minutes }: TimeFormat, char?: string) => string;
28
- interface TimeOption extends Option<string> {
29
- hours: string;
30
- minutes: string;
31
- }
32
- export declare const getTimeValue: (time: TimeFormat, char?: string) => {
33
- title: string;
34
- value: string;
35
- hours: string;
36
- minutes: string;
37
- };
38
- export declare const getTimesOptions: (step: number, char?: string) => TimeOption[];
39
- export {};
package/dist/bundle.es.js DELETED
@@ -1,88 +0,0 @@
1
- import { Avatar as e } from "./bundle.es2.js";
2
- import { avatarSizes as p } from "./bundle.es3.js";
3
- import { Button as x } from "./bundle.es4.js";
4
- import { ButtonGroup as a } from "./bundle.es5.js";
5
- import { Spinner as l } from "./bundle.es6.js";
6
- import { Scrollable as n } from "./bundle.es7.js";
7
- import { ImitateScroll as S } from "./bundle.es8.js";
8
- import { Segments as g } from "./bundle.es9.js";
9
- import { Popover as h } from "./bundle.es10.js";
10
- import { Tooltip as v } from "./bundle.es11.js";
11
- import { Select as P } from "./bundle.es12.js";
12
- import { Input as A } from "./bundle.es13.js";
13
- import { OptionItem as B } from "./bundle.es14.js";
14
- import { NumberInput as k } from "./bundle.es15.js";
15
- import { OptionsList as y } from "./bundle.es16.js";
16
- import { Checkbox as G } from "./bundle.es17.js";
17
- import { Switch as O } from "./bundle.es18.js";
18
- import { Radio as z, RadioGroup as N } from "./bundle.es19.js";
19
- import { Drawer as q } from "./bundle.es20.js";
20
- import { Dialog as H } from "./bundle.es21.js";
21
- import { AlertDialog as K } from "./bundle.es22.js";
22
- import { LoadingButton as Q } from "./bundle.es23.js";
23
- import { Tabs as V } from "./bundle.es24.js";
24
- import { Countdown as X } from "./bundle.es25.js";
25
- import { TextArea as Z } from "./bundle.es26.js";
26
- import { SelectTags as $ } from "./bundle.es27.js";
27
- import { DatePicker as ro } from "./bundle.es28.js";
28
- import { DateInput as to } from "./bundle.es29.js";
29
- import { FileOverlay as mo } from "./bundle.es30.js";
30
- import { FormGroup as fo } from "./bundle.es31.js";
31
- import { TimePicker as io } from "./bundle.es32.js";
32
- import { Icon as co } from "./bundle.es33.js";
33
- import { ProgressBar as so } from "./bundle.es34.js";
34
- import { ThemeProvider as uo, useTheme as go } from "./bundle.es35.js";
35
- import { ColorSchemeScript as ho, colorSchemeScript as Do } from "./bundle.es36.js";
36
- import { useLocalStorage as Io } from "./bundle.es37.js";
37
- import { createAlertAgent as Ao } from "./bundle.es38.js";
38
- import { createToaster as Bo } from "./bundle.es39.js";
39
- import { Toast as ko } from "./bundle.es40.js";
40
- import { DialogShell as yo, createDialogsRegistry as Co } from "./bundle.es41.js";
41
- import { createPopoversRegistry as Lo } from "./bundle.es42.js";
42
- export {
43
- K as AlertDialog,
44
- e as Avatar,
45
- x as Button,
46
- a as ButtonGroup,
47
- G as Checkbox,
48
- ho as ColorSchemeScript,
49
- X as Countdown,
50
- to as DateInput,
51
- ro as DatePicker,
52
- H as Dialog,
53
- yo as DialogShell,
54
- q as Drawer,
55
- mo as FileOverlay,
56
- fo as FormGroup,
57
- co as Icon,
58
- S as ImitateScroll,
59
- A as Input,
60
- Q as LoadingButton,
61
- k as NumberInput,
62
- B as OptionItem,
63
- y as OptionsList,
64
- h as Popover,
65
- so as ProgressBar,
66
- z as Radio,
67
- N as RadioGroup,
68
- n as Scrollable,
69
- g as Segments,
70
- P as Select,
71
- $ as SelectTags,
72
- l as Spinner,
73
- O as Switch,
74
- V as Tabs,
75
- Z as TextArea,
76
- uo as ThemeProvider,
77
- io as TimePicker,
78
- ko as Toast,
79
- v as Tooltip,
80
- p as avatarSizes,
81
- Do as colorSchemeScript,
82
- Ao as createAlertAgent,
83
- Co as createDialogsRegistry,
84
- Lo as createPopoversRegistry,
85
- Bo as createToaster,
86
- Io as useLocalStorage,
87
- go as useTheme
88
- };
@@ -1,82 +0,0 @@
1
- import { jsxs as t, jsx as r } from "react/jsx-runtime";
2
- import * as o from "@radix-ui/react-popover";
3
- import { attr as B } from "@companix/utils-browser";
4
- import M from "classnames";
5
- import { forwardRef as j, useRef as k } from "react";
6
- const D = j((a, i) => {
7
- const {
8
- children: n,
9
- sideOffset: s,
10
- matchTarget: l,
11
- onAnimationEnd: c,
12
- onAnimationStart: m,
13
- onOpenAutoFocus: d,
14
- onCloseAutoFocus: f,
15
- triggerRef: p,
16
- triggerProps: h,
17
- open: g,
18
- content: u,
19
- onOpenChange: v,
20
- align: C,
21
- disabled: x,
22
- minimal: w,
23
- className: L,
24
- fitMaxHeight: N = !0,
25
- zIndex: O = 100,
26
- side: A,
27
- showArrows: P
28
- } = a, e = k(null), b = () => {
29
- e.current && e.current.click();
30
- }, y = (R) => {
31
- x && R.preventDefault();
32
- };
33
- return /* @__PURE__ */ t(o.Root, { open: g, onOpenChange: v, children: [
34
- /* @__PURE__ */ r(o.Trigger, { ref: p, ...h, onClick: y, asChild: !0, children: n }),
35
- /* @__PURE__ */ r(o.Portal, { children: /* @__PURE__ */ t(
36
- o.Content,
37
- {
38
- ref: i,
39
- className: M("popover", L),
40
- side: A,
41
- align: C,
42
- "data-appearance": w ? "minimal" : "default",
43
- "data-match-target": l,
44
- sideOffset: s ?? 6,
45
- avoidCollisions: !0,
46
- arrowPadding: 10,
47
- style: { zIndex: O },
48
- onAnimationStart: m,
49
- onAnimationEnd: c,
50
- onOpenAutoFocus: d,
51
- onCloseAutoFocus: f,
52
- children: [
53
- /* @__PURE__ */ r(o.Close, { ref: e, style: { display: "none" } }),
54
- P && /* @__PURE__ */ r(o.Arrow, { width: 30, height: 11, asChild: !0, children: /* @__PURE__ */ r("div", { className: "popover-arrow", children: /* @__PURE__ */ t("svg", { className: "popover-arrow-icon", viewBox: "0 0 30 11", width: 30, height: 11, children: [
55
- /* @__PURE__ */ r(
56
- "path",
57
- {
58
- className: "popover-arrow-border",
59
- d: "M 18.112 -2.704 C 19.127 -3.64 19.999 -5.626 19.999 -7.001 L 19.999 18.999 C 19.999 17.621 19.131 15.642 18.111 14.702 L 10.927 8.084 C 9.69 6.944 9.694 5.05 10.927 3.914 L 18.112 -2.704 Z",
60
- style: { transformBox: "fill-box", transformOrigin: "50% 50%" },
61
- transform: "matrix(0, -1, 1, 0, 0.000001, 0)"
62
- }
63
- ),
64
- /* @__PURE__ */ r(
65
- "path",
66
- {
67
- className: "popover-arrow-fill",
68
- d: "M 17.789 -2.965 C 19.009 -4.09 19.999 -6.341 19.999 -7.995 L 19.999 -10.001 L 19.999 19.999 L 19.999 17.994 C 19.999 16.34 19.016 14.094 17.789 12.964 L 10.606 6.348 C 9.796 5.602 9.804 4.388 10.606 3.648 L 17.789 -2.966 L 17.789 -2.965 Z",
69
- style: { transformBox: "fill-box", transformOrigin: "50% 50%" },
70
- transform: "matrix(0, -1, 1, 0, 0, 0)"
71
- }
72
- )
73
- ] }) }) }),
74
- /* @__PURE__ */ r("div", { className: "popover-content", "data-fit-max-height": B(N), children: u({ close: b }) })
75
- ]
76
- }
77
- ) })
78
- ] });
79
- });
80
- export {
81
- D as Popover
82
- };
@@ -1,28 +0,0 @@
1
- import { jsx as n } from "react/jsx-runtime";
2
- import { useState as p } from "react";
3
- import { Popover as m } from "./bundle.es10.js";
4
- const f = ({ children: e, content: t, side: r }) => {
5
- const [s, o] = p(!1);
6
- return /* @__PURE__ */ n(
7
- m,
8
- {
9
- showArrows: !0,
10
- className: "tooltip",
11
- open: s,
12
- side: r,
13
- content: () => t,
14
- triggerProps: {
15
- onMouseEnter: () => {
16
- o(!0);
17
- },
18
- onMouseLeave: () => {
19
- o(!1);
20
- }
21
- },
22
- children: e
23
- }
24
- );
25
- };
26
- export {
27
- f as Tooltip
28
- };
@@ -1,77 +0,0 @@
1
- import { jsx as l } from "react/jsx-runtime";
2
- import { useMemo as F, useImperativeHandle as I } from "react";
3
- import { Popover as T } from "./bundle.es10.js";
4
- import { useFroozeClosing as b } from "./bundle.es44.js";
5
- import { SelectInput as z } from "./bundle.es45.js";
6
- import { useScrollListController as B } from "./bundle.es46.js";
7
- import { SelectOptions as D } from "./bundle.es47.js";
8
- import { mergeRefs as j } from "react-merge-refs";
9
- const G = (a) => {
10
- const {
11
- options: n,
12
- onChange: i,
13
- value: r,
14
- minimalOptions: m,
15
- matchTarget: f = "width",
16
- children: u,
17
- disabled: p,
18
- scrollRef: d,
19
- popoverRef: v,
20
- clearButton: s,
21
- ...h
22
- } = a, t = F(() => {
23
- const o = r === null ? -1 : n.findIndex((e) => e.value === r);
24
- return {
25
- index: o,
26
- option: n[o]
27
- };
28
- }, [n, r]), x = t.option?.value ?? null, { popoverRef: R, froozePopoverPosition: C, handleAnimationEnd: g } = b(), { scrollToElement: c, optionsWrapperRef: O, scrollBoxRef: P } = B();
29
- I(d, () => ({
30
- scrollTo: (o) => c(o, "top")
31
- }));
32
- const S = (o, e) => {
33
- C(), i(o), e();
34
- }, A = (o) => {
35
- o.stopPropagation(), s && i(null);
36
- }, E = () => {
37
- t.index !== -1 && c(t.index, "center");
38
- };
39
- return /* @__PURE__ */ l(
40
- T,
41
- {
42
- minimal: !0,
43
- ref: j([R, v]),
44
- sideOffset: 0,
45
- matchTarget: f,
46
- onAnimationEnd: g,
47
- onOpenAutoFocus: (o) => o.preventDefault(),
48
- onCloseAutoFocus: (o) => o.preventDefault(),
49
- disabled: p,
50
- content: ({ close: o }) => /* @__PURE__ */ l(
51
- D,
52
- {
53
- options: n,
54
- active: x,
55
- scrollboxRef: P,
56
- optionsWrapperRef: O,
57
- minimalOptions: m,
58
- onOpened: E,
59
- onSelect: (e) => S(e, o)
60
- }
61
- ),
62
- children: u ?? /* @__PURE__ */ l(
63
- z,
64
- {
65
- ...h,
66
- disabled: p,
67
- clearButton: s,
68
- value: t.option?.title ?? "",
69
- onClear: A
70
- }
71
- )
72
- }
73
- );
74
- };
75
- export {
76
- G as Select
77
- };
@@ -1,43 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { forwardRef as b, useRef as R } from "react";
3
- import { mergeRefs as c } from "react-merge-refs";
4
- import { InputElement as x } from "./bundle.es48.js";
5
- import { InputContainer as I } from "./bundle.es49.js";
6
- import g from "classnames";
7
- const N = b(
8
- ({
9
- onChange: m,
10
- onValueChange: f,
11
- readOnly: i,
12
- inputClassName: o,
13
- value: p,
14
- placeholder: n,
15
- mask: d,
16
- inputType: s = "text",
17
- maskChar: u,
18
- inputRef: a,
19
- ...e
20
- }, l) => {
21
- const r = R(null);
22
- return /* @__PURE__ */ t(I, { ref: l, inputRef: r, ...e, children: /* @__PURE__ */ t(
23
- x,
24
- {
25
- type: s,
26
- ref: c([r, a]),
27
- className: g("form-input form-input-base", o),
28
- "aria-disabled": e.disabled,
29
- onChange: m,
30
- onValueChange: f,
31
- value: p,
32
- placeholder: n,
33
- disabled: e.disabled,
34
- readOnly: i,
35
- maskChar: u,
36
- mask: d
37
- }
38
- ) });
39
- }
40
- );
41
- export {
42
- N as Input
43
- };
@@ -1,38 +0,0 @@
1
- import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
- import N from "classnames";
3
- import { Icon as v } from "./bundle.es33.js";
4
- import { attr as t } from "@companix/utils-browser";
5
- import { forwardRef as k } from "react";
6
- import { f as x } from "./bundle.es50.js";
7
- const E = k(
8
- ({ title: s, icon: c, active: e, label: n, disabled: a, minimal: r, onClick: d, className: l, ...m }, p) => {
9
- const f = (h) => {
10
- a || d?.(h);
11
- };
12
- return /* @__PURE__ */ i(
13
- "div",
14
- {
15
- ref: p,
16
- ...m,
17
- className: N("option", l),
18
- "data-selected": t(e),
19
- "data-disabled": t(a),
20
- "data-minimal": t(r),
21
- onClick: f,
22
- children: [
23
- /* @__PURE__ */ i("div", { className: "option-content", children: [
24
- c && /* @__PURE__ */ o("div", { className: "option-icon", children: c }),
25
- /* @__PURE__ */ i("div", { className: "option-content-layout", children: [
26
- /* @__PURE__ */ o("div", { className: "option-title", children: s }),
27
- n && /* @__PURE__ */ o("div", { className: "option-label", children: n })
28
- ] })
29
- ] }),
30
- e && !r && /* @__PURE__ */ o("div", { className: "option-check", children: /* @__PURE__ */ o(v, { icon: x.faCheck }) })
31
- ]
32
- }
33
- );
34
- }
35
- );
36
- export {
37
- E as OptionItem
38
- };
@@ -1,58 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import C from "classnames";
3
- import { forwardRef as j, useRef as w } from "react";
4
- import { mergeRefs as y } from "react-merge-refs";
5
- import { InputContainer as F } from "./bundle.es49.js";
6
- import { NumericFormat as V } from "react-number-format";
7
- const D = j(
8
- ({
9
- onChange: m,
10
- onValueChange: o,
11
- readOnly: f,
12
- inputClassName: i,
13
- value: n,
14
- placeholder: u,
15
- thousandSeparator: a,
16
- decimalSeparator: p,
17
- allowedDecimalSeparators: l,
18
- thousandsGroupStyle: s,
19
- decimalScale: d,
20
- fixedDecimalScale: b,
21
- allowNegative: R = !1,
22
- allowLeadingZeros: c,
23
- suffix: g,
24
- prefix: x,
25
- inputRef: I,
26
- ...e
27
- }, N) => {
28
- const r = w(null);
29
- return /* @__PURE__ */ t(F, { ref: N, inputRef: r, ...e, children: /* @__PURE__ */ t(
30
- V,
31
- {
32
- type: "text",
33
- getInputRef: y([r, I]),
34
- className: C("form-input form-input-base", i),
35
- "aria-disabled": e.disabled,
36
- onChange: m,
37
- onValueChange: ({ floatValue: h }) => o?.(h ?? null),
38
- value: n,
39
- placeholder: u,
40
- disabled: e.disabled,
41
- readOnly: f,
42
- thousandSeparator: a,
43
- decimalSeparator: p,
44
- allowedDecimalSeparators: l,
45
- thousandsGroupStyle: s,
46
- decimalScale: d,
47
- fixedDecimalScale: b,
48
- allowNegative: R,
49
- allowLeadingZeros: c,
50
- suffix: g,
51
- prefix: x
52
- }
53
- ) });
54
- }
55
- );
56
- export {
57
- D as NumberInput
58
- };
@@ -1,23 +0,0 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- import { Scrollable as n } from "./bundle.es7.js";
3
- const s = ({
4
- children: o,
5
- maxHeight: t,
6
- scrollboxRef: i,
7
- optionsWrapperRef: e
8
- }) => /* @__PURE__ */ r(
9
- n,
10
- {
11
- ref: i,
12
- implementation: "inner",
13
- padding: 10,
14
- thumbPadding: 3,
15
- thumbColor: "#0000002b",
16
- maxHeight: t,
17
- scrollY: !0,
18
- children: /* @__PURE__ */ r("div", { className: "option-list", ref: e, children: o })
19
- }
20
- );
21
- export {
22
- s as OptionsList
23
- };
@@ -1,35 +0,0 @@
1
- import { jsxs as d, jsx as o } from "react/jsx-runtime";
2
- import * as t from "@radix-ui/react-checkbox";
3
- import { Icon as h } from "./bundle.es33.js";
4
- import { f as l } from "./bundle.es50.js";
5
- import { useId as n } from "react";
6
- import { attr as c } from "@companix/utils-browser";
7
- const N = ({ checked: a, required: s, disabled: r, onCheckedChange: m, size: x, label: e }) => {
8
- const i = n();
9
- return /* @__PURE__ */ d(
10
- "div",
11
- {
12
- className: "checkbox",
13
- "data-size": x ?? "md",
14
- "data-required": c(s && !a),
15
- "data-disabled": c(r),
16
- children: [
17
- /* @__PURE__ */ o(
18
- t.Root,
19
- {
20
- className: "checkbox-box",
21
- checked: a,
22
- onCheckedChange: m,
23
- disabled: r,
24
- id: i,
25
- children: /* @__PURE__ */ o(t.Indicator, { className: "checkbox-icon", children: /* @__PURE__ */ o(h, { icon: l.faCheck, size: "xxxs" }) })
26
- }
27
- ),
28
- e && /* @__PURE__ */ o("label", { className: "checkbox-label", htmlFor: i, "data-disabled": c(r), children: e })
29
- ]
30
- }
31
- );
32
- };
33
- export {
34
- N as Checkbox
35
- };