@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.
- package/dist/{Modal-CXRo8f-h.js → Modal-BTOXCb0Y.js} +1 -1
- package/dist/assets/icons/components/Home2.d.ts +3 -0
- package/dist/assets/icons/components/Home2.js +28 -0
- package/dist/assets/icons/components/Upload.d.ts +3 -0
- package/dist/assets/icons/components/Upload.js +28 -0
- package/dist/assets/icons/components/index.d.ts +2 -0
- package/dist/assets/icons/components/index.js +70 -66
- package/dist/assets/icons/index.js +70 -66
- package/dist/components/Alert/Alert.d.ts +2 -2
- package/dist/components/Alert/Alert.types.d.ts +3 -1
- package/dist/components/AlertDialog/AlertDialog.d.ts +2 -2
- package/dist/components/AlertDialog/AlertDialog.js +1 -1
- package/dist/components/AlertDialog/AlertDialog.types.d.ts +5 -3
- package/dist/components/AlertDialog/components/AlertDialogTrigger.d.ts +2 -2
- package/dist/components/AlertDialog/components/AlertDialogTrigger.js +1 -1
- package/dist/components/AlertDialog/components/AlertDialogTrigger.types.d.ts +4 -2
- package/dist/components/AlertDialog/components/index.js +1 -1
- package/dist/components/Autocomplete/Autocomplete.d.ts +2 -2
- package/dist/components/Autocomplete/Autocomplete.types.d.ts +3 -1
- package/dist/components/Badge/Badge.d.ts +2 -2
- package/dist/components/Badge/Badge.types.d.ts +3 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +2 -2
- package/dist/components/Breadcrumb/Breadcrumb.types.d.ts +3 -1
- package/dist/components/Breadcrumb/components/Item/Item.d.ts +2 -2
- package/dist/components/Breadcrumb/components/Item/Item.types.d.ts +3 -1
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Button/Button.types.d.ts +3 -1
- package/dist/components/Button/Button.variants.js +4 -5
- package/dist/components/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/components/ButtonGroup/components/ButtonGroupItem/ButtonGroupItem.js +1 -1
- package/dist/components/Card/Card.d.ts +2 -2
- package/dist/components/Card/Card.types.d.ts +3 -1
- package/dist/components/Checkbox/Checkbox.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.types.d.ts +3 -1
- package/dist/components/Command/Command.d.ts +2 -2
- package/dist/components/Command/Command.js +2 -2
- package/dist/components/Command/Command.types.d.ts +3 -1
- package/dist/components/Command/components/Command.js +1 -1
- package/dist/components/Command/components/CommandEmpty.js +1 -1
- package/dist/components/Command/components/CommandGroup.js +1 -1
- package/dist/components/Command/components/CommandInput.js +1 -1
- package/dist/components/Command/components/CommandItem.js +1 -1
- package/dist/components/Command/components/CommandList.js +1 -1
- package/dist/components/Command/components/CommandSeparator.js +1 -1
- package/dist/components/Command/components/DialogContent.js +1 -1
- package/dist/components/Command/components/DialogOverlay.js +1 -1
- package/dist/components/Counter/Counter.d.ts +2 -2
- package/dist/components/Counter/Counter.types.d.ts +3 -1
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +2 -2
- package/dist/components/DateRangePicker/DateRangePicker.types.d.ts +3 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/IndependentModeCalendar/IndependentModeCalendar.js +1 -1
- package/dist/components/DateRangePicker/components/CalendarPanel/components/TogetherModeCalendar/TogetherModeCalendar.js +1 -1
- package/dist/components/Datepicker/DatePicker.d.ts +2 -2
- package/dist/components/Datepicker/DatePicker.types.d.ts +3 -1
- package/dist/components/Filter/Filter.js +24 -22
- package/dist/components/Filter/Filter.types.d.ts +13 -3
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.d.ts +3 -1
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.hook.js +57 -41
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.js +75 -49
- package/dist/components/Filter/components/BadgeDropdown/BadgeMultiSelect.types.d.ts +2 -0
- package/dist/components/Filter/components/DateFilterDropdown/DateFilterDropdown.hook.js +38 -37
- package/dist/components/Filter/components/DateRangeFilterDropdown/DateRangeFilterDropdown.hook.js +31 -30
- package/dist/components/Filter/components/ResetButton/ResetButton.types.d.ts +1 -1
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.js +64 -47
- package/dist/components/Filter/components/TextMultiSelect/TextMultiSelect.types.d.ts +2 -0
- package/dist/components/Filter/components/TimeFilterDropdown/TimeFilterDropdown.hook.js +35 -34
- package/dist/components/Filter/contexts/filter.context.d.ts +4 -0
- package/dist/components/Filter/contexts/filter.context.js +7 -0
- package/dist/components/Filter/contexts/filter.hook.d.ts +2 -0
- package/dist/components/Filter/contexts/filter.hook.js +11 -0
- package/dist/components/Filter/contexts/filter.provider.d.ts +5 -0
- package/dist/components/Filter/contexts/filter.provider.js +6 -0
- package/dist/components/Filter/contexts/index.d.ts +3 -0
- package/dist/components/Filter/contexts/index.js +8 -0
- package/dist/components/ImageUpload/ImageUpload.d.ts +2 -2
- package/dist/components/ImageUpload/ImageUpload.types.d.ts +3 -1
- package/dist/components/Input/Input.d.ts +2 -2
- package/dist/components/Input/Input.types.d.ts +3 -1
- package/dist/components/LineChart/LineChart.d.ts +2 -2
- package/dist/components/LineChart/LineChart.js +55 -52
- package/dist/components/LineChart/LineChart.types.d.ts +6 -2
- package/dist/components/Loading/Loading.d.ts +2 -2
- package/dist/components/Loading/Loading.types.d.ts +3 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/components/Wrapper/Wrapper.js +2 -2
- package/dist/components/Modal/components/index.js +1 -1
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.d.ts +2 -2
- package/dist/components/MultiSelectDropdown/MultiSelectDropdown.types.d.ts +3 -1
- package/dist/components/MultiSelectDropdown/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/components/PhoneNumberInput/components/FlagSelectorList/FlagSelectorList.js +394 -353
- package/dist/components/PhoneNumberInput/components/TruncateText/TruncateText.js +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +2 -2
- package/dist/components/ProgressBar/ProgressBar.types.d.ts +3 -1
- package/dist/components/Radio/Radio.d.ts +2 -2
- package/dist/components/Radio/Radio.types.d.ts +3 -1
- package/dist/components/RadioCard/RadioCard.d.ts +2 -2
- package/dist/components/RadioCard/RadioCard.types.d.ts +5 -3
- package/dist/components/RadioCardGroup/RadioCardGroup.d.ts +2 -2
- package/dist/components/RadioCardGroup/RadioCardGroup.types.d.ts +4 -2
- package/dist/components/RadioGroup/RadioGroup.d.ts +2 -2
- package/dist/components/RadioGroup/RadioGroup.types.d.ts +4 -2
- package/dist/components/Range/Range.d.ts +2 -2
- package/dist/components/Range/Range.types.d.ts +3 -1
- package/dist/components/Select/Select.d.ts +2 -2
- package/dist/components/Select/Select.types.d.ts +4 -1
- package/dist/components/Select/Select.variants.js +1 -1
- package/dist/components/Select/components/AdditionalOptions/AdditionalOptions.types.d.ts +1 -1
- package/dist/components/Select/components/List/List.js +64 -61
- package/dist/components/Select/components/List/List.types.d.ts +2 -1
- package/dist/components/Select/components/Wrapper.js +46 -44
- package/dist/components/Select/constants/index.d.ts +1 -0
- package/dist/components/Select/constants/index.js +3 -1
- package/dist/components/Select/constants/list.d.ts +1 -0
- package/dist/components/Select/constants/list.js +4 -0
- package/dist/components/Sidebar/Sidebar.d.ts +1 -1
- package/dist/components/Sidebar/Sidebar.types.d.ts +3 -1
- package/dist/components/Sidebar/components/Footer/Footer.d.ts +2 -2
- package/dist/components/Sidebar/components/Footer/Footer.types.d.ts +3 -1
- package/dist/components/Sidebar/components/Logo/Logo.d.ts +2 -2
- package/dist/components/Sidebar/components/Logo/Logo.types.d.ts +3 -1
- package/dist/components/Sidebar/components/Navigation/Navigation.d.ts +2 -2
- package/dist/components/Sidebar/components/Navigation/Navigation.types.d.ts +7 -5
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.d.ts +2 -2
- package/dist/components/Sidebar/components/NavigationGroup/NavigationGroup.types.d.ts +3 -1
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.d.ts +2 -2
- package/dist/components/Sidebar/components/NavigationOption/NavigationOption.types.d.ts +3 -1
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.d.ts +2 -2
- package/dist/components/Sidebar/components/NavigationSeparator/NavigationSeparator.types.d.ts +3 -1
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.d.ts +2 -2
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.js +1 -5
- package/dist/components/Sidebar/components/NavigationTitle/NavigationTitle.types.d.ts +3 -1
- package/dist/components/Sidebar/components/index.d.ts +7 -7
- package/dist/components/Slider/Slider.d.ts +2 -2
- package/dist/components/Slider/Slider.types.d.ts +3 -1
- package/dist/components/Spinner/Spinner.d.ts +2 -2
- package/dist/components/Spinner/Spinner.types.d.ts +4 -2
- package/dist/components/Stepper/Stepper.d.ts +2 -2
- package/dist/components/Stepper/Stepper.types.d.ts +3 -1
- package/dist/components/Switch/Switch.d.ts +2 -2
- package/dist/components/Switch/Switch.types.d.ts +3 -1
- package/dist/components/Table/Table.types.d.ts +3 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/Tabs/Tabs.types.d.ts +3 -1
- package/dist/components/Tag/Tag.d.ts +2 -2
- package/dist/components/Tag/Tag.types.d.ts +3 -1
- package/dist/components/TagSelect/TagSelect.d.ts +2 -2
- package/dist/components/TagSelect/TagSelect.js +3 -1
- package/dist/components/TagSelect/TagSelect.types.d.ts +4 -2
- package/dist/components/TagSelect/components/Item/Item.types.d.ts +1 -1
- package/dist/components/TagSelect/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/components/TagSelect/contexts/TagSelect.types.d.ts +1 -1
- package/dist/components/TextArea/TextArea.d.ts +2 -2
- package/dist/components/TextArea/TextArea.types.d.ts +3 -1
- package/dist/components/TimePicker/TimePicker.d.ts +2 -2
- package/dist/components/TimePicker/TimePicker.types.d.ts +3 -1
- package/dist/components/TimePicker/components/HoursList/HoursList.types.d.ts +1 -1
- package/dist/components/TimePicker/components/MeridianList/MeridianList.types.d.ts +1 -1
- package/dist/components/TimePicker/components/MinutesList/MinutesList.types.d.ts +1 -1
- package/dist/components/TimePicker/components/Wrapper/Wrapper.types.d.ts +1 -1
- package/dist/components/TimePicker/components/WrapperList/WrapperList.types.d.ts +1 -1
- package/dist/components/Toast/Toast.d.ts +2 -2
- package/dist/components/Toast/Toast.js +191 -184
- package/dist/components/Toast/Toast.types.d.ts +3 -1
- package/dist/components/Toast/Toast.variants.js +6 -12
- package/dist/components/Tooltip/Tooltip.d.ts +2 -2
- package/dist/components/Tooltip/Tooltip.js +20 -20
- package/dist/components/Tooltip/Tooltip.types.d.ts +3 -1
- package/dist/components/Typography/Typography.d.ts +2 -2
- package/dist/components/Typography/Typography.types.d.ts +3 -1
- package/dist/components/VirtualizedTable/VirtualizedTable.js +57 -55
- package/dist/components/VirtualizedTable/VirtualizedTable.types.d.ts +3 -1
- package/dist/components/VirtualizedTable/components/Filter/Filter.js +55 -54
- package/dist/components/VirtualizedTable/components/Filter/Filter.types.d.ts +1 -0
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.d.ts +1 -1
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.js +55 -26
- package/dist/components/VirtualizedTable/components/TruncateText/TruncateText.types.d.ts +4 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +1 -1
- package/dist/icons.d.ts +1 -1
- package/dist/icons.js +70 -66
- package/dist/index-BvEpLnOv.js +144 -0
- package/dist/{index-Dd_ZmIqU.js → index-C7zAY3xv.js} +1 -1
- package/dist/{index-Dfq4O3b4.js → index-CrCTywU1.js} +1 -1
- package/dist/{index-9a-FL_6D.js → index-DWyM654o.js} +41 -42
- package/dist/{index-B7-5g1Sm.js → index-mPinF0Ho.js} +407 -401
- package/dist/index.js +1 -1
- package/dist/package.json +10 -10
- package/dist/proxy-BvdTb_6B.js +4974 -0
- package/dist/styles.css +1 -1
- package/package.json +10 -10
- package/dist/index-CESXsoMn.js +0 -14
- package/dist/index-URQGEGX7.js +0 -136
- 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-
|
|
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 {
|
|
3
|
-
export declare const ProgressBar: FC<
|
|
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
|
|
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 {
|
|
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<
|
|
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
|
|
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 {
|
|
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<
|
|
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
|
|
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 {
|
|
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<
|
|
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
|
|
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 {
|
|
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<
|
|
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
|
|
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 {
|
|
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<
|
|
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
|
|
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 {
|
|
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<
|
|
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
|
|
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 {};
|
|
@@ -1,48 +1,50 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { d as
|
|
3
|
-
import { forwardRef as
|
|
4
|
-
import { Loading as
|
|
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
|
|
7
|
-
import { A as
|
|
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
|
|
10
|
-
import { DEFAULT_LIST_SIZE as
|
|
11
|
-
import {
|
|
12
|
-
|
|
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:
|
|
15
|
-
className:
|
|
15
|
+
additionalOptions: O,
|
|
16
|
+
className: P,
|
|
16
17
|
groupedOptions: l,
|
|
17
18
|
inputRef: c,
|
|
18
|
-
isLoading:
|
|
19
|
+
isLoading: _,
|
|
19
20
|
itemClassName: u,
|
|
20
|
-
name:
|
|
21
|
+
name: j,
|
|
21
22
|
searchable: f = !1,
|
|
22
23
|
listItemSecondRowClassName: p,
|
|
23
|
-
wrapperInputRef:
|
|
24
|
+
wrapperInputRef: A,
|
|
24
25
|
isInfiniteScrollEnabled: h,
|
|
25
26
|
noOptionsText: F,
|
|
26
|
-
onFetchMoreOptions:
|
|
27
|
-
|
|
28
|
-
|
|
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:
|
|
33
|
-
options:
|
|
33
|
+
isOpen: S,
|
|
34
|
+
isTyping: G,
|
|
35
|
+
options: T,
|
|
34
36
|
page: w,
|
|
35
37
|
searchTerm: n,
|
|
36
|
-
setCanContinueFetching:
|
|
37
|
-
setOptions:
|
|
38
|
-
setPage:
|
|
39
|
-
} =
|
|
40
|
-
|
|
41
|
-
const
|
|
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
|
-
}) :
|
|
45
|
-
if (!
|
|
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
|
-
(
|
|
56
|
+
(a) => a.label.toLowerCase().includes(t)
|
|
55
57
|
)
|
|
56
58
|
})).filter((r) => r.options.length > 0);
|
|
57
|
-
}, [
|
|
58
|
-
|
|
59
|
+
}, [i, l, f, y, n]), D = i ? C.flatMap((e) => e.options) : x;
|
|
60
|
+
re({
|
|
59
61
|
ulRef: m,
|
|
60
|
-
wrapperInputRef:
|
|
62
|
+
wrapperInputRef: A,
|
|
61
63
|
searchable: f,
|
|
62
|
-
filteredOptions:
|
|
64
|
+
filteredOptions: D
|
|
63
65
|
});
|
|
64
|
-
const
|
|
65
|
-
(e, t, r) => t === r.findIndex((
|
|
66
|
-
),
|
|
67
|
-
() =>
|
|
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 &&
|
|
71
|
+
if (t.isIntersecting && !v && L && d)
|
|
70
72
|
try {
|
|
71
73
|
k(!0);
|
|
72
|
-
const r = w + 1, { data:
|
|
74
|
+
const r = w + 1, { data: a, hasMore: J } = await L({
|
|
73
75
|
page: r,
|
|
74
|
-
pageSize:
|
|
76
|
+
pageSize: ae,
|
|
75
77
|
termOfSearch: n
|
|
76
78
|
});
|
|
77
|
-
|
|
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,
|
|
86
|
+
[v, L, n, w]
|
|
85
87
|
);
|
|
86
|
-
return
|
|
87
|
-
if (h && d &&
|
|
88
|
-
const e = new IntersectionObserver(
|
|
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(
|
|
93
|
+
return e.observe(b.current), () => e.disconnect();
|
|
92
94
|
}
|
|
93
95
|
}, [
|
|
94
96
|
h,
|
|
95
97
|
d,
|
|
96
98
|
v,
|
|
97
|
-
|
|
99
|
+
G,
|
|
98
100
|
w
|
|
99
|
-
]), /* @__PURE__ */
|
|
101
|
+
]), /* @__PURE__ */ H(
|
|
100
102
|
"ul",
|
|
101
103
|
{
|
|
102
104
|
ref: m,
|
|
103
|
-
title:
|
|
105
|
+
title: j,
|
|
104
106
|
role: "listbox",
|
|
105
|
-
className: s(
|
|
106
|
-
|
|
107
|
+
className: s(ie({ className: P })),
|
|
108
|
+
style: z,
|
|
109
|
+
"data-state": S ? "open" : "closed",
|
|
107
110
|
children: [
|
|
108
|
-
|
|
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
|
-
) :
|
|
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
|
-
) :
|
|
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(
|
|
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)) :
|
|
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:
|
|
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(
|
|
173
|
+
children: /* @__PURE__ */ o(te, { className: "w-4 h-4 text-aurora-500 select-none" })
|
|
171
174
|
}
|
|
172
175
|
),
|
|
173
|
-
/* @__PURE__ */ o(
|
|
176
|
+
/* @__PURE__ */ o(oe, { additionalOptions: O })
|
|
174
177
|
]
|
|
175
178
|
}
|
|
176
179
|
);
|
|
177
180
|
}
|
|
178
181
|
);
|
|
179
182
|
export {
|
|
180
|
-
|
|
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
|
};
|