@konstructio/ui 0.1.2-alpha.74 → 0.1.2-alpha.76

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 (193) hide show
  1. package/dist/{Modal-CXRo8f-h.js → Modal-BTOXCb0Y.js} +1 -1
  2. package/dist/assets/icons/components/Home2.d.ts +3 -0
  3. package/dist/assets/icons/components/Home2.js +28 -0
  4. package/dist/assets/icons/components/Upload.d.ts +3 -0
  5. package/dist/assets/icons/components/Upload.js +28 -0
  6. package/dist/assets/icons/components/index.d.ts +2 -0
  7. package/dist/assets/icons/components/index.js +70 -66
  8. package/dist/assets/icons/index.js +70 -66
  9. package/dist/components/Alert/Alert.d.ts +2 -2
  10. package/dist/components/Alert/Alert.types.d.ts +3 -1
  11. package/dist/components/AlertDialog/AlertDialog.d.ts +2 -2
  12. package/dist/components/AlertDialog/AlertDialog.js +1 -1
  13. package/dist/components/AlertDialog/AlertDialog.types.d.ts +5 -3
  14. package/dist/components/AlertDialog/components/AlertDialogTrigger.d.ts +2 -2
  15. package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
  16. package/dist/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +4 -2
  17. package/dist/components/AlertDialog/components/index.js +1 -1
  18. package/dist/components/Autocomplete/Autocomplete.d.ts +2 -2
  19. package/dist/components/Autocomplete/Autocomplete.types.d.ts +3 -1
  20. package/dist/components/Badge/Badge.d.ts +2 -2
  21. package/dist/components/Badge/Badge.types.d.ts +3 -1
  22. package/dist/components/Breadcrumb/Breadcrumb.d.ts +2 -2
  23. package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +3 -1
  24. package/dist/components/Breadcrumb/components/Item/Item.d.ts +2 -2
  25. package/dist/components/Breadcrumb/components/Item/Item.types.d.ts +3 -1
  26. package/dist/components/Button/Button.d.ts +2 -2
  27. package/dist/components/Button/Button.types.d.ts +3 -1
  28. package/dist/components/Button/Button.variants.js +4 -5
  29. package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
  30. package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +1 -1
  31. package/dist/components/Card/Card.d.ts +2 -2
  32. package/dist/components/Card/Card.types.d.ts +3 -1
  33. package/dist/components/Checkbox/Checkbox.d.ts +2 -2
  34. package/dist/components/Checkbox/Checkbox.types.d.ts +3 -1
  35. package/dist/components/Command/Command.d.ts +2 -2
  36. package/dist/components/Command/Command.js +2 -2
  37. package/dist/components/Command/Command.types.d.ts +3 -1
  38. package/dist/components/Command/components/Command.js +1 -1
  39. package/dist/components/Command/components/CommandEmpty.js +1 -1
  40. package/dist/components/Command/components/CommandGroup.js +1 -1
  41. package/dist/components/Command/components/CommandInput.js +1 -1
  42. package/dist/components/Command/components/CommandItem.js +1 -1
  43. package/dist/components/Command/components/CommandList.js +1 -1
  44. package/dist/components/Command/components/CommandSeparator.js +1 -1
  45. package/dist/components/Command/components/DialogContent.js +1 -1
  46. package/dist/components/Command/components/DialogOverlay.js +1 -1
  47. package/dist/components/Counter/Counter.d.ts +2 -2
  48. package/dist/components/Counter/Counter.types.d.ts +3 -1
  49. package/dist/components/DateRangePicker/DateRangePicker.d.ts +2 -2
  50. package/dist/components/DateRangePicker/DateRangePicker.types.d.ts +3 -1
  51. package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +1 -1
  52. package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
  53. package/dist/components/Datepicker/DatePicker.d.ts +2 -2
  54. package/dist/components/Datepicker/DatePicker.types.d.ts +3 -1
  55. package/dist/components/Filter/Filter.js +24 -22
  56. package/dist/components/Filter/Filter.types.d.ts +13 -3
  57. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.d.ts +3 -1
  58. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +57 -41
  59. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +75 -49
  60. package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.types.d.ts +2 -0
  61. package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +38 -37
  62. package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +31 -30
  63. package/dist/components/Filter/components/ResetButton/ResetButton.types.d.ts +1 -1
  64. package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +64 -47
  65. package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.types.d.ts +2 -0
  66. package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +35 -34
  67. package/dist/components/Filter/contexts/filter.context.d.ts +4 -0
  68. package/dist/components/Filter/contexts/filter.context.js +7 -0
  69. package/dist/components/Filter/contexts/filter.hook.d.ts +2 -0
  70. package/dist/components/Filter/contexts/filter.hook.js +11 -0
  71. package/dist/components/Filter/contexts/filter.provider.d.ts +5 -0
  72. package/dist/components/Filter/contexts/filter.provider.js +6 -0
  73. package/dist/components/Filter/contexts/index.d.ts +3 -0
  74. package/dist/components/Filter/contexts/index.js +8 -0
  75. package/dist/components/ImageUpload/ImageUpload.d.ts +2 -2
  76. package/dist/components/ImageUpload/ImageUpload.types.d.ts +3 -1
  77. package/dist/components/Input/Input.d.ts +2 -2
  78. package/dist/components/Input/Input.types.d.ts +3 -1
  79. package/dist/components/LineChart/LineChart.d.ts +2 -2
  80. package/dist/components/LineChart/LineChart.js +55 -52
  81. package/dist/components/LineChart/LineChart.types.d.ts +6 -2
  82. package/dist/components/Loading/Loading.d.ts +2 -2
  83. package/dist/components/Loading/Loading.types.d.ts +3 -1
  84. package/dist/components/Modal/Modal.js +1 -1
  85. package/dist/components/Modal/components/Wrapper/Wrapper.js +2 -2
  86. package/dist/components/Modal/components/index.js +1 -1
  87. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.d.ts +2 -2
  88. package/dist/components/MultiSelectDropdown/MultiSelectDropdown.types.d.ts +3 -1
  89. package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.types.d.ts +1 -1
  90. package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +394 -353
  91. package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +1 -1
  92. package/dist/components/ProgressBar/ProgressBar.d.ts +2 -2
  93. package/dist/components/ProgressBar/ProgressBar.types.d.ts +3 -1
  94. package/dist/components/Radio/Radio.d.ts +2 -2
  95. package/dist/components/Radio/Radio.types.d.ts +3 -1
  96. package/dist/components/RadioCard/RadioCard.d.ts +2 -2
  97. package/dist/components/RadioCard/RadioCard.types.d.ts +5 -3
  98. package/dist/components/RadioCardGroup/RadioCardGroup.d.ts +2 -2
  99. package/dist/components/RadioCardGroup/RadioCardGroup.types.d.ts +4 -2
  100. package/dist/components/RadioGroup/RadioGroup.d.ts +2 -2
  101. package/dist/components/RadioGroup/RadioGroup.types.d.ts +4 -2
  102. package/dist/components/Range/Range.d.ts +2 -2
  103. package/dist/components/Range/Range.types.d.ts +3 -1
  104. package/dist/components/Select/Select.d.ts +2 -2
  105. package/dist/components/Select/Select.types.d.ts +4 -1
  106. package/dist/components/Select/Select.variants.js +1 -1
  107. package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.types.d.ts +1 -1
  108. package/dist/components/Select/components/List/List.js +64 -61
  109. package/dist/components/Select/components/List/List.types.d.ts +2 -1
  110. package/dist/components/Select/components/Wrapper.js +46 -44
  111. package/dist/components/Select/constants/index.d.ts +1 -0
  112. package/dist/components/Select/constants/index.js +3 -1
  113. package/dist/components/Select/constants/list.d.ts +1 -0
  114. package/dist/components/Select/constants/list.js +4 -0
  115. package/dist/components/Sidebar/Sidebar.d.ts +1 -1
  116. package/dist/components/Sidebar/Sidebar.types.d.ts +3 -1
  117. package/dist/components/Sidebar/components/Footer/Footer.d.ts +2 -2
  118. package/dist/components/Sidebar/components/Footer/Footer.types.d.ts +3 -1
  119. package/dist/components/Sidebar/components/Logo/Logo.d.ts +2 -2
  120. package/dist/components/Sidebar/components/Logo/Logo.types.d.ts +3 -1
  121. package/dist/components/Sidebar/components/Navigation/Navigation.d.ts +2 -2
  122. package/dist/components/Sidebar/components/Navigation/Navigation.types.d.ts +7 -5
  123. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.d.ts +2 -2
  124. package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.d.ts +3 -1
  125. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.d.ts +2 -2
  126. package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.d.ts +3 -1
  127. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.d.ts +2 -2
  128. package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.d.ts +3 -1
  129. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.d.ts +2 -2
  130. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +1 -5
  131. package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.d.ts +3 -1
  132. package/dist/components/Sidebar/components/index.d.ts +7 -7
  133. package/dist/components/Slider/Slider.d.ts +2 -2
  134. package/dist/components/Slider/Slider.types.d.ts +3 -1
  135. package/dist/components/Spinner/Spinner.d.ts +2 -2
  136. package/dist/components/Spinner/Spinner.types.d.ts +4 -2
  137. package/dist/components/Stepper/Stepper.d.ts +2 -2
  138. package/dist/components/Stepper/Stepper.types.d.ts +3 -1
  139. package/dist/components/Switch/Switch.d.ts +2 -2
  140. package/dist/components/Switch/Switch.types.d.ts +3 -1
  141. package/dist/components/Table/Table.types.d.ts +3 -1
  142. package/dist/components/Tabs/Tabs.d.ts +1 -1
  143. package/dist/components/Tabs/Tabs.types.d.ts +3 -1
  144. package/dist/components/Tag/Tag.d.ts +2 -2
  145. package/dist/components/Tag/Tag.types.d.ts +3 -1
  146. package/dist/components/TagSelect/TagSelect.d.ts +2 -2
  147. package/dist/components/TagSelect/TagSelect.js +3 -1
  148. package/dist/components/TagSelect/TagSelect.types.d.ts +4 -2
  149. package/dist/components/TagSelect/components/Item/Item.types.d.ts +1 -1
  150. package/dist/components/TagSelect/components/Wrapper/Wrapper.types.d.ts +1 -1
  151. package/dist/components/TagSelect/contexts/TagSelect.types.d.ts +1 -1
  152. package/dist/components/TextArea/TextArea.d.ts +2 -2
  153. package/dist/components/TextArea/TextArea.types.d.ts +3 -1
  154. package/dist/components/TimePicker/TimePicker.d.ts +2 -2
  155. package/dist/components/TimePicker/TimePicker.types.d.ts +3 -1
  156. package/dist/components/TimePicker/components/HoursList/HoursList.types.d.ts +1 -1
  157. package/dist/components/TimePicker/components/MeridianList/MeridianList.types.d.ts +1 -1
  158. package/dist/components/TimePicker/components/MinutesList/MinutesList.types.d.ts +1 -1
  159. package/dist/components/TimePicker/components/Wrapper/Wrapper.types.d.ts +1 -1
  160. package/dist/components/TimePicker/components/WrapperList/WrapperList.types.d.ts +1 -1
  161. package/dist/components/Toast/Toast.d.ts +2 -2
  162. package/dist/components/Toast/Toast.js +191 -184
  163. package/dist/components/Toast/Toast.types.d.ts +3 -1
  164. package/dist/components/Toast/Toast.variants.js +6 -12
  165. package/dist/components/Tooltip/Tooltip.d.ts +2 -2
  166. package/dist/components/Tooltip/Tooltip.js +20 -20
  167. package/dist/components/Tooltip/Tooltip.types.d.ts +3 -1
  168. package/dist/components/Typography/Typography.d.ts +2 -2
  169. package/dist/components/Typography/Typography.types.d.ts +3 -1
  170. package/dist/components/VirtualizedTable/VirtualizedTable.js +57 -55
  171. package/dist/components/VirtualizedTable/VirtualizedTable.types.d.ts +3 -1
  172. package/dist/components/VirtualizedTable/components/Filter/Filter.js +55 -54
  173. package/dist/components/VirtualizedTable/components/Filter/Filter.types.d.ts +1 -0
  174. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.d.ts +1 -1
  175. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +55 -26
  176. package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.types.d.ts +4 -1
  177. package/dist/components/index.d.ts +2 -0
  178. package/dist/components/index.js +1 -1
  179. package/dist/icons.d.ts +1 -1
  180. package/dist/icons.js +70 -66
  181. package/dist/index-BvEpLnOv.js +144 -0
  182. package/dist/{index-Dd_ZmIqU.js → index-C7zAY3xv.js} +1 -1
  183. package/dist/{index-Dfq4O3b4.js → index-CrCTywU1.js} +1 -1
  184. package/dist/{index-9a-FL_6D.js → index-DWyM654o.js} +41 -42
  185. package/dist/{index-B7-5g1Sm.js → index-mPinF0Ho.js} +407 -401
  186. package/dist/index.js +1 -1
  187. package/dist/package.json +10 -10
  188. package/dist/proxy-BvdTb_6B.js +4974 -0
  189. package/dist/styles.css +1 -1
  190. package/package.json +10 -10
  191. package/dist/index-CESXsoMn.js +0 -14
  192. package/dist/index-URQGEGX7.js +0 -136
  193. package/dist/proxy-0sbyKj-k.js +0 -4946
@@ -1,5 +1,5 @@
1
1
  import { jsxs as a, jsx as o } from "react/jsx-runtime";
2
- import { P as f, R as u, T as b, C as m } from "../../../../index-B7-5g1Sm.js";
2
+ import { P as f, R as u, T as b, C as m } from "../../../../index-mPinF0Ho.js";
3
3
  import { d as h } from "../../../../debounce-DJveWHr_.js";
4
4
  import { useRef as p, useState as w, useCallback as g, useEffect as i } from "react";
5
5
  const C = ({ text: r, prefix: n }) => {
@@ -1,3 +1,3 @@
1
1
  import { FC } from 'react';
2
- import { ProgressBarProps } from './ProgressBar.types';
3
- export declare const ProgressBar: FC<ProgressBarProps>;
2
+ import { Props } from './ProgressBar.types';
3
+ export declare const ProgressBar: FC<Props>;
@@ -2,7 +2,7 @@ import { ReactNode } from 'react';
2
2
  import { VariantProps } from 'class-variance-authority';
3
3
  import { Theme } from '../../domain/theme';
4
4
  import { progressBarFillVariants } from './ProgressBar.variants';
5
- export interface ProgressBarProps extends VariantProps<typeof progressBarFillVariants> {
5
+ export interface Props extends VariantProps<typeof progressBarFillVariants> {
6
6
  /** Additional CSS classes for the outer wrapper */
7
7
  className?: string;
8
8
  /** Custom CSS class for the progress bar fill (e.g., "bg-purple-500") */
@@ -18,3 +18,5 @@ export interface ProgressBarProps extends VariantProps<typeof progressBarFillVar
18
18
  /** Custom CSS class for the track background (e.g., "bg-gray-200") */
19
19
  trackClassName?: string;
20
20
  }
21
+ /** @deprecated Use Props instead */
22
+ export type ProgressBarProps = Props;
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { RadioProps } from './Radio.types';
2
+ import { Props } from './Radio.types';
3
3
  /**
4
4
  * A radio button component with label and optional description.
5
5
  * Use RadioGroup to manage a group of radio buttons.
@@ -18,5 +18,5 @@ import { RadioProps } from './Radio.types';
18
18
  *
19
19
  * @see {@link https://konstructio.github.io/konstruct-ui/?path=/docs/components-radio--docs Storybook}
20
20
  */
21
- declare const Radio: FC<RadioProps>;
21
+ declare const Radio: FC<Props>;
22
22
  export { Radio };
@@ -16,7 +16,7 @@ import { radioVariants } from './Radio.variants';
16
16
  * />
17
17
  * ```
18
18
  */
19
- export interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'disabled'>, VariantProps<typeof radioVariants> {
19
+ export interface Props extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'disabled'>, VariantProps<typeof radioVariants> {
20
20
  /** Whether the radio is checked */
21
21
  checked?: boolean;
22
22
  /** Initial checked state (uncontrolled) */
@@ -42,3 +42,5 @@ export interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>,
42
42
  /** Callback when selected */
43
43
  onChange?: (value: string) => void;
44
44
  }
45
+ /** @deprecated Use Props instead */
46
+ export type RadioProps = Props;
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { RadioCardProps } from './RadioCard.types';
2
+ import { Props } from './RadioCard.types';
3
3
  /**
4
4
  * A card-style radio button for visually prominent selection options.
5
5
  * Use RadioCardGroup to manage a group of radio cards.
@@ -18,5 +18,5 @@ import { RadioCardProps } from './RadioCard.types';
18
18
  *
19
19
  * @see {@link https://konstructio.github.io/konstruct-ui/?path=/docs/components-radiocard--docs Storybook}
20
20
  */
21
- declare const RadioCard: FC<RadioCardProps>;
21
+ declare const RadioCard: FC<Props>;
22
22
  export { RadioCard };
@@ -1,6 +1,6 @@
1
1
  import { Theme } from '../../domain/theme';
2
- import { CardProps } from '../Card/Card.types';
3
- import { RadioProps } from '../Radio/Radio.types';
2
+ import { Props as CardProps } from '../Card/Card.types';
3
+ import { Props as RadioProps } from '../Radio/Radio.types';
4
4
  /**
5
5
  * Props for the RadioCard component.
6
6
  * Combines Card styling with Radio functionality.
@@ -17,7 +17,9 @@ import { RadioProps } from '../Radio/Radio.types';
17
17
  * />
18
18
  * ```
19
19
  */
20
- export type RadioCardProps = Omit<CardProps, 'canHover' | 'isActive'> & Pick<RadioProps, 'name' | 'value' | 'checked' | 'onChange' | 'label' | 'disabled' | 'defaultChecked' | 'labelTextClassName' | 'description' | 'descriptionClassName'> & {
20
+ export type Props = Omit<CardProps, 'canHover' | 'isActive'> & Pick<RadioProps, 'name' | 'value' | 'checked' | 'onChange' | 'label' | 'disabled' | 'defaultChecked' | 'labelTextClassName' | 'description' | 'descriptionClassName'> & {
21
21
  labelWrapperClassName?: string;
22
22
  theme?: Theme;
23
23
  };
24
+ /** @deprecated Use Props instead */
25
+ export type RadioCardProps = Props;
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { RadioCardGroupProps } from './RadioCardGroup.types';
2
+ import { Props } from './RadioCardGroup.types';
3
3
  /**
4
4
  * A group of card-style radio buttons with shared state management.
5
5
  *
@@ -20,4 +20,4 @@ import { RadioCardGroupProps } from './RadioCardGroup.types';
20
20
  *
21
21
  * @see {@link https://konstructio.github.io/konstruct-ui/?path=/docs/components-radiocardgroup--docs Storybook}
22
22
  */
23
- export declare const RadioCardGroup: FC<RadioCardGroupProps>;
23
+ export declare const RadioCardGroup: FC<Props>;
@@ -1,5 +1,5 @@
1
1
  import { Theme } from '../../domain/theme';
2
- import { RadioCardProps } from '../RadioCard/RadioCard.types';
2
+ import { Props as RadioCardProps } from '../RadioCard/RadioCard.types';
3
3
  /**
4
4
  * Props for the RadioCardGroup component.
5
5
  *
@@ -17,7 +17,7 @@ import { RadioCardProps } from '../RadioCard/RadioCard.types';
17
17
  * />
18
18
  * ```
19
19
  */
20
- export type RadioCardGroupProps = {
20
+ export type Props = {
21
21
  asChild?: boolean;
22
22
  className?: string;
23
23
  defaultChecked?: string;
@@ -28,3 +28,5 @@ export type RadioCardGroupProps = {
28
28
  wrapperClassName?: string;
29
29
  onValueChange?: (value: string) => void;
30
30
  };
31
+ /** @deprecated Use Props instead */
32
+ export type RadioCardGroupProps = Props;
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { RadioGroupProps } from './RadioGroup.types';
2
+ import { Props } from './RadioGroup.types';
3
3
  /**
4
4
  * A group of radio buttons with shared state management.
5
5
  *
@@ -31,4 +31,4 @@ import { RadioGroupProps } from './RadioGroup.types';
31
31
  *
32
32
  * @see {@link https://konstructio.github.io/konstruct-ui/?path=/docs/components-radiogroup--docs Storybook}
33
33
  */
34
- export declare const RadioGroup: FC<RadioGroupProps>;
34
+ export declare const RadioGroup: FC<Props>;
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { Theme } from '../../domain/theme';
3
- import { RadioProps } from '../Radio/Radio.types';
3
+ import { Props as RadioProps } from '../Radio/Radio.types';
4
4
  /**
5
5
  * Props for the RadioGroup component.
6
6
  *
@@ -18,7 +18,7 @@ import { RadioProps } from '../Radio/Radio.types';
18
18
  * />
19
19
  * ```
20
20
  */
21
- export interface RadioGroupProps {
21
+ export interface Props {
22
22
  /** Merge props onto child element */
23
23
  asChild?: boolean;
24
24
  /** CSS classes for each radio option */
@@ -42,3 +42,5 @@ export interface RadioGroupProps {
42
42
  /** Callback when selection changes */
43
43
  onValueChange?: (value: string) => void;
44
44
  }
45
+ /** @deprecated Use Props instead */
46
+ export type RadioGroupProps = Props;
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { RangeProps } from './Range.types';
2
+ import { Props } from './Range.types';
3
3
  /**
4
4
  * A dual-thumb slider component for selecting a value range.
5
5
  * Built on Radix UI Slider for accessibility.
@@ -18,4 +18,4 @@ import { RangeProps } from './Range.types';
18
18
  *
19
19
  * @see {@link https://konstructio.github.io/konstruct-ui/?path=/docs/components-range--docs Storybook}
20
20
  */
21
- export declare const Range: FC<RangeProps>;
21
+ export declare const Range: FC<Props>;
@@ -18,7 +18,7 @@ import { rangeVariants } from './Range.variants';
18
18
  * />
19
19
  * ```
20
20
  */
21
- export interface RangeProps extends VariantProps<typeof rangeVariants> {
21
+ export interface Props extends VariantProps<typeof rangeVariants> {
22
22
  /** Additional CSS classes */
23
23
  className?: string;
24
24
  /** Initial range values [min, max] */
@@ -40,3 +40,5 @@ export interface RangeProps extends VariantProps<typeof rangeVariants> {
40
40
  /** Theme override for this component */
41
41
  theme?: Theme;
42
42
  }
43
+ /** @deprecated Use Props instead */
44
+ export type RangeProps = Props;
@@ -1,5 +1,5 @@
1
1
  import { FC } from 'react';
2
- import { SelectProps } from './Select.types';
2
+ import { Props } from './Select.types';
3
3
  export type { OptionGroup, AdditionalOptionGroup } from './Select.types';
4
4
  /**
5
5
  * A dropdown select component with search, icons, and infinite scroll support.
@@ -34,4 +34,4 @@ export type { OptionGroup, AdditionalOptionGroup } from './Select.types';
34
34
  *
35
35
  * @see {@link https://konstructio.github.io/konstruct-ui/?path=/docs/components-select--docs Storybook}
36
36
  */
37
- export declare const Select: FC<SelectProps>;
37
+ export declare const Select: FC<Props>;
@@ -89,7 +89,7 @@ type OnChangeFn = (params: {
89
89
  *
90
90
  * @see {@link https://konstructio.github.io/konstruct-ui/?path=/docs/components-select--docs Storybook}
91
91
  */
92
- export type SelectProps = VariantProps<typeof selectVariants> & Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'> & {
92
+ export type Props = VariantProps<typeof selectVariants> & Omit<InputHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'> & {
93
93
  additionalOptions?: ReactNode[] | string[] | AdditionalOptionGroup[];
94
94
  className?: string;
95
95
  disabled?: boolean;
@@ -111,6 +111,7 @@ export type SelectProps = VariantProps<typeof selectVariants> & Omit<InputHTMLAt
111
111
  listItemSecondRowClassName?: string;
112
112
  mainWrapperClassName?: string;
113
113
  noOptionsText?: string;
114
+ visibleItems?: number;
114
115
  options: Option[] | OptionGroup[];
115
116
  searchable?: boolean;
116
117
  showSearchIcon?: boolean;
@@ -134,4 +135,6 @@ export type SelectProps = VariantProps<typeof selectVariants> & Omit<InputHTMLAt
134
135
  isInfiniteScrollEnabled?: false | undefined;
135
136
  onFetchMoreOptions?: never;
136
137
  });
138
+ /** @deprecated Use Props instead */
139
+ export type SelectProps = Props;
137
140
  export {};
@@ -15,7 +15,7 @@ const a = e(
15
15
  "transition-all",
16
16
  "w-full",
17
17
  "outline-none",
18
- "h-9",
18
+ "h-10",
19
19
  "border-gray-200",
20
20
  "focus-visible:bg-zinc-50",
21
21
  "aria-expanded:border-aurora-500",
@@ -1,4 +1,4 @@
1
- import { SelectProps } from '../../Select.types';
1
+ import { Props as SelectProps } from '../../Select.types';
2
2
  export type Props = {
3
3
  additionalOptions?: SelectProps['additionalOptions'];
4
4
  };
@@ -1,48 +1,50 @@
1
- import { jsxs as N, jsx as o } from "react/jsx-runtime";
2
- import { d as K } from "../../../../debounce-DJveWHr_.js";
3
- import { forwardRef as Q, useRef as O, useState as W, useImperativeHandle as X, useMemo as j, useEffect as Y, Fragment as $ } from "react";
4
- import { Loading as R } from "../../../Loading/Loading.js";
1
+ import { jsxs as H, jsx as o } from "react/jsx-runtime";
2
+ import { d as Q } from "../../../../debounce-DJveWHr_.js";
3
+ import { forwardRef as W, useRef as I, useState as Y, useImperativeHandle as $, useMemo as N, useEffect as R, Fragment as ee } from "react";
4
+ import { Loading as te } from "../../../Loading/Loading.js";
5
5
  import { cn as s } from "../../../../utils/index.js";
6
- import { useNavigationUlList as ee } from "../../hooks/useNavigationList.js";
7
- import { A as te, i as re } from "../../../../AdditionalOptions-C2FDVZhu.js";
6
+ import { useNavigationUlList as re } from "../../hooks/useNavigationList.js";
7
+ import { A as oe, i as ne } from "../../../../AdditionalOptions-C2FDVZhu.js";
8
8
  import { ListItem as g } from "../ListItem/ListItem.js";
9
- import { listGroupLabelVariants as oe, listVariants as ne } from "./List.variants.js";
10
- import { DEFAULT_LIST_SIZE as se } from "../../constants/pagination.js";
11
- import { useSelectContext as ae } from "../../contexts/select.hook.js";
12
- const Le = Q(
9
+ import { listGroupLabelVariants as se, listVariants as ie } from "./List.variants.js";
10
+ import { DEFAULT_LIST_SIZE as ae } from "../../constants/pagination.js";
11
+ import { ITEM_HEIGHT_PX as le } from "../../constants/list.js";
12
+ import { useSelectContext as ce } from "../../contexts/select.hook.js";
13
+ const xe = W(
13
14
  ({
14
- additionalOptions: A,
15
- className: I,
15
+ additionalOptions: O,
16
+ className: P,
16
17
  groupedOptions: l,
17
18
  inputRef: c,
18
- isLoading: P,
19
+ isLoading: _,
19
20
  itemClassName: u,
20
- name: T,
21
+ name: j,
21
22
  searchable: f = !1,
22
23
  listItemSecondRowClassName: p,
23
- wrapperInputRef: U,
24
+ wrapperInputRef: A,
24
25
  isInfiniteScrollEnabled: h,
25
26
  noOptionsText: F,
26
- onFetchMoreOptions: b
27
- }, V) => {
28
- const m = O(null), L = O(null), [v, k] = W(!1), {
27
+ onFetchMoreOptions: L,
28
+ visibleItems: E
29
+ }, M) => {
30
+ const m = I(null), b = I(null), [v, k] = Y(!1), {
29
31
  canContinueFetching: d,
30
32
  canFilter: y,
31
- isOpen: _,
32
- isTyping: E,
33
- options: G,
33
+ isOpen: S,
34
+ isTyping: G,
35
+ options: T,
34
36
  page: w,
35
37
  searchTerm: n,
36
- setCanContinueFetching: q,
37
- setOptions: z,
38
- setPage: D
39
- } = ae();
40
- X(V, () => m.current, [m]);
41
- const a = l.length > 0 && re(l[0]), x = f && y ? G.filter((e) => {
38
+ setCanContinueFetching: U,
39
+ setOptions: V,
40
+ setPage: q
41
+ } = ce(), z = E !== void 0 ? { maxHeight: E * le } : void 0;
42
+ $(M, () => m.current, [m]);
43
+ const i = l.length > 0 && ne(l[0]), x = f && y ? T.filter((e) => {
42
44
  const t = n.toLowerCase();
43
45
  return (typeof e.label == "string" ? e.label.toLowerCase() : "").includes(t);
44
- }) : G, C = j(() => {
45
- if (!a)
46
+ }) : T, C = N(() => {
47
+ if (!i)
46
48
  return [];
47
49
  const e = l;
48
50
  if (!f || !y || !n)
@@ -51,61 +53,62 @@ const Le = Q(
51
53
  return e.map((r) => ({
52
54
  ...r,
53
55
  options: r.options.filter(
54
- (i) => i.label.toLowerCase().includes(t)
56
+ (a) => a.label.toLowerCase().includes(t)
55
57
  )
56
58
  })).filter((r) => r.options.length > 0);
57
- }, [a, l, f, y, n]), H = a ? C.flatMap((e) => e.options) : x;
58
- ee({
59
+ }, [i, l, f, y, n]), D = i ? C.flatMap((e) => e.options) : x;
60
+ re({
59
61
  ulRef: m,
60
- wrapperInputRef: U,
62
+ wrapperInputRef: A,
61
63
  searchable: f,
62
- filteredOptions: H
64
+ filteredOptions: D
63
65
  });
64
- const M = x.filter(
65
- (e, t, r) => t === r.findIndex((i) => i.value === e.value)
66
- ), S = a ? C.length === 0 : x.length === 0, Z = j(
67
- () => K(async (e) => {
66
+ const X = x.filter(
67
+ (e, t, r) => t === r.findIndex((a) => a.value === e.value)
68
+ ), Z = i ? C.length === 0 : x.length === 0, B = N(
69
+ () => Q(async (e) => {
68
70
  const [t] = e;
69
- if (t.isIntersecting && !v && b && d)
71
+ if (t.isIntersecting && !v && L && d)
70
72
  try {
71
73
  k(!0);
72
- const r = w + 1, { data: i, hasMore: B } = await b({
74
+ const r = w + 1, { data: a, hasMore: J } = await L({
73
75
  page: r,
74
- pageSize: se,
76
+ pageSize: ae,
75
77
  termOfSearch: n
76
78
  });
77
- D(r), q(B), z((J) => [...J, ...i]);
79
+ q(r), U(J), V((K) => [...K, ...a]);
78
80
  } catch {
79
81
  console.error("Error fetching more options");
80
82
  } finally {
81
83
  k(!1);
82
84
  }
83
85
  }, 100),
84
- [v, b, n, w]
86
+ [v, L, n, w]
85
87
  );
86
- return Y(() => {
87
- if (h && d && L.current && !E) {
88
- const e = new IntersectionObserver(Z, {
88
+ return R(() => {
89
+ if (h && d && b.current && !G) {
90
+ const e = new IntersectionObserver(B, {
89
91
  threshold: 0.1
90
92
  });
91
- return e.observe(L.current), () => e.disconnect();
93
+ return e.observe(b.current), () => e.disconnect();
92
94
  }
93
95
  }, [
94
96
  h,
95
97
  d,
96
98
  v,
97
- E,
99
+ G,
98
100
  w
99
- ]), /* @__PURE__ */ N(
101
+ ]), /* @__PURE__ */ H(
100
102
  "ul",
101
103
  {
102
104
  ref: m,
103
- title: T,
105
+ title: j,
104
106
  role: "listbox",
105
- className: s(ne({ className: I })),
106
- "data-state": _ ? "open" : "closed",
107
+ className: s(ie({ className: P })),
108
+ style: z,
109
+ "data-state": S ? "open" : "closed",
107
110
  children: [
108
- P ? /* @__PURE__ */ o(
111
+ _ ? /* @__PURE__ */ o(
109
112
  g,
110
113
  {
111
114
  className: s("select-none", u),
@@ -115,7 +118,7 @@ const Le = Q(
115
118
  label: "Loading...",
116
119
  listItemSecondRowClassName: p
117
120
  }
118
- ) : S ? /* @__PURE__ */ o(
121
+ ) : Z ? /* @__PURE__ */ o(
119
122
  g,
120
123
  {
121
124
  isEmpty: !0,
@@ -126,14 +129,14 @@ const Le = Q(
126
129
  label: F ?? "No options",
127
130
  listItemSecondRowClassName: p
128
131
  }
129
- ) : a ? C.map((e) => /* @__PURE__ */ N($, { children: [
132
+ ) : i ? C.map((e) => /* @__PURE__ */ H(ee, { children: [
130
133
  /* @__PURE__ */ o(
131
134
  "li",
132
135
  {
133
136
  role: "presentation",
134
137
  "aria-hidden": "true",
135
138
  "data-action": "true",
136
- className: s(oe()),
139
+ className: s(se()),
137
140
  children: e.groupLabel
138
141
  }
139
142
  ),
@@ -148,7 +151,7 @@ const Le = Q(
148
151
  },
149
152
  t.value
150
153
  ))
151
- ] }, e.groupLabel)) : M.map((e) => /* @__PURE__ */ o(
154
+ ] }, e.groupLabel)) : X.map((e) => /* @__PURE__ */ o(
152
155
  g,
153
156
  {
154
157
  className: s("select-none", u),
@@ -162,20 +165,20 @@ const Le = Q(
162
165
  h && d && /* @__PURE__ */ o(
163
166
  "li",
164
167
  {
165
- ref: L,
168
+ ref: b,
166
169
  role: "option",
167
170
  "data-action": "true",
168
171
  className: "flex items-center justify-center py-3",
169
172
  onClick: (e) => e.stopPropagation(),
170
- children: /* @__PURE__ */ o(R, { className: "w-4 h-4 text-aurora-500 select-none" })
173
+ children: /* @__PURE__ */ o(te, { className: "w-4 h-4 text-aurora-500 select-none" })
171
174
  }
172
175
  ),
173
- /* @__PURE__ */ o(te, { additionalOptions: A })
176
+ /* @__PURE__ */ o(oe, { additionalOptions: O })
174
177
  ]
175
178
  }
176
179
  );
177
180
  }
178
181
  );
179
182
  export {
180
- Le as List
183
+ xe as List
181
184
  };
@@ -1,5 +1,5 @@
1
1
  import { ComponentRef, RefObject } from 'react';
2
- import { SelectProps } from '../../Select.types';
2
+ import { Props as SelectProps } from '../../Select.types';
3
3
  export type ListProps = Pick<SelectProps, 'name' | 'options' | 'theme' | 'additionalOptions'> & {
4
4
  className?: string;
5
5
  groupedOptions: SelectProps['options'];
@@ -12,4 +12,5 @@ export type ListProps = Pick<SelectProps, 'name' | 'options' | 'theme' | 'additi
12
12
  isInfiniteScrollEnabled: SelectProps['isInfiniteScrollEnabled'];
13
13
  onFetchMoreOptions?: SelectProps['onFetchMoreOptions'];
14
14
  noOptionsText?: SelectProps['noOptionsText'];
15
+ visibleItems?: number;
15
16
  };