@kenlo/kdls-design-system 2.0.0
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/README.md +27 -0
- package/dist/components/Accordion/Accordion.d.ts +44 -0
- package/dist/components/Accordion/Accordion.test.d.ts +1 -0
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/AccordionGroup/AccordionGroup.d.ts +13 -0
- package/dist/components/AccordionGroup/AccordionGroup.test.d.ts +1 -0
- package/dist/components/AccordionGroup/index.d.ts +1 -0
- package/dist/components/Alert/Alert.d.ts +37 -0
- package/dist/components/Alert/Alert.test.d.ts +1 -0
- package/dist/components/Alert/index.d.ts +2 -0
- package/dist/components/AttachmentList/AttachmentList.d.ts +63 -0
- package/dist/components/AttachmentList/AttachmentList.test.d.ts +1 -0
- package/dist/components/AttachmentList/index.d.ts +2 -0
- package/dist/components/Avatar/Avatar.d.ts +18 -0
- package/dist/components/Avatar/Avatar.test.d.ts +1 -0
- package/dist/components/Avatar/index.d.ts +2 -0
- package/dist/components/Badge/Badge.d.ts +32 -0
- package/dist/components/Badge/Badge.test.d.ts +1 -0
- package/dist/components/Badge/index.d.ts +2 -0
- package/dist/components/BottomSheet/BottomSheet.d.ts +59 -0
- package/dist/components/BottomSheet/BottomSheet.test.d.ts +1 -0
- package/dist/components/BottomSheet/index.d.ts +2 -0
- package/dist/components/BulkActionBar/BulkActionBar.d.ts +69 -0
- package/dist/components/BulkActionBar/BulkActionBar.test.d.ts +1 -0
- package/dist/components/BulkActionBar/index.d.ts +1 -0
- package/dist/components/Button/Button.d.ts +39 -0
- package/dist/components/Button/Button.test.d.ts +1 -0
- package/dist/components/Button/index.d.ts +2 -0
- package/dist/components/Card/Card.d.ts +126 -0
- package/dist/components/Card/Card.test.d.ts +1 -0
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +36 -0
- package/dist/components/Checkbox/Checkbox.test.d.ts +1 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/ColorPicker/ColorPicker.d.ts +22 -0
- package/dist/components/ColorPicker/ColorPicker.test.d.ts +1 -0
- package/dist/components/ColorPicker/index.d.ts +1 -0
- package/dist/components/ColorScheme/ColorScheme.d.ts +15 -0
- package/dist/components/ColorScheme/index.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +84 -0
- package/dist/components/DatePicker/DatePicker.test.d.ts +1 -0
- package/dist/components/DatePicker/dateUtils.d.ts +18 -0
- package/dist/components/DatePicker/index.d.ts +3 -0
- package/dist/components/Drawer/Drawer.d.ts +90 -0
- package/dist/components/Drawer/Drawer.test.d.ts +1 -0
- package/dist/components/Drawer/index.d.ts +2 -0
- package/dist/components/Field/Field.d.ts +44 -0
- package/dist/components/Field/Field.test.d.ts +1 -0
- package/dist/components/Field/index.d.ts +1 -0
- package/dist/components/Floating/Floating.d.ts +25 -0
- package/dist/components/Form/Form.d.ts +13 -0
- package/dist/components/Form/index.d.ts +3 -0
- package/dist/components/Grid/Grid.d.ts +35 -0
- package/dist/components/Grid/index.d.ts +2 -0
- package/dist/components/Header/Header.d.ts +48 -0
- package/dist/components/Header/Header.test.d.ts +1 -0
- package/dist/components/Header/index.d.ts +2 -0
- package/dist/components/Icon/Icon.d.ts +31 -0
- package/dist/components/Icon/Icon.test.d.ts +1 -0
- package/dist/components/Icon/custom/index.d.ts +10 -0
- package/dist/components/Icon/products/index.d.ts +27 -0
- package/dist/components/Icon/social/index.d.ts +24 -0
- package/dist/components/IconButton/IconButton.d.ts +24 -0
- package/dist/components/IconButton/IconButton.test.d.ts +1 -0
- package/dist/components/IconButton/index.d.ts +2 -0
- package/dist/components/Incrementer/Incrementer.d.ts +20 -0
- package/dist/components/Incrementer/index.d.ts +2 -0
- package/dist/components/Input/Input.d.ts +136 -0
- package/dist/components/Input/Input.test.d.ts +1 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/KenloLogo/KenloLogo.d.ts +13 -0
- package/dist/components/KenloLogo/KenloLogo.test.d.ts +1 -0
- package/dist/components/KenloLogo/index.d.ts +2 -0
- package/dist/components/LyaLogo/LyaLogo.d.ts +11 -0
- package/dist/components/LyaLogo/LyaLogo.test.d.ts +1 -0
- package/dist/components/LyaLogo/index.d.ts +2 -0
- package/dist/components/Menu/Menu.d.ts +171 -0
- package/dist/components/Menu/Menu.test.d.ts +1 -0
- package/dist/components/Menu/index.d.ts +1 -0
- package/dist/components/Modal/Modal.d.ts +81 -0
- package/dist/components/Modal/Modal.test.d.ts +1 -0
- package/dist/components/Modal/index.d.ts +2 -0
- package/dist/components/Nav/Nav.d.ts +42 -0
- package/dist/components/Nav/index.d.ts +1 -0
- package/dist/components/Notification/Notification.d.ts +24 -0
- package/dist/components/Notification/Notification.test.d.ts +1 -0
- package/dist/components/Notification/index.d.ts +2 -0
- package/dist/components/Pagination/Pagination.d.ts +24 -0
- package/dist/components/Pagination/Pagination.test.d.ts +1 -0
- package/dist/components/Pagination/index.d.ts +1 -0
- package/dist/components/Pill/Pill.d.ts +38 -0
- package/dist/components/Pill/Pill.test.d.ts +1 -0
- package/dist/components/Pill/index.d.ts +2 -0
- package/dist/components/Popover/Popover.d.ts +24 -0
- package/dist/components/Popover/Popover.test.d.ts +1 -0
- package/dist/components/Popover/index.d.ts +1 -0
- package/dist/components/Radio/Radio.d.ts +21 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +43 -0
- package/dist/components/RadioGroup/RadioGroup.test.d.ts +1 -0
- package/dist/components/RadioGroup/index.d.ts +2 -0
- package/dist/components/SearchBar/SearchBar.d.ts +31 -0
- package/dist/components/SearchBar/SearchBar.test.d.ts +1 -0
- package/dist/components/SearchBar/index.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +117 -0
- package/dist/components/Select/Select.test.d.ts +1 -0
- package/dist/components/Select/index.d.ts +1 -0
- package/dist/components/Separator/Separator.d.ts +11 -0
- package/dist/components/Separator/Separator.test.d.ts +1 -0
- package/dist/components/Separator/index.d.ts +2 -0
- package/dist/components/Skeleton/Skeleton.d.ts +62 -0
- package/dist/components/Skeleton/Skeleton.test.d.ts +1 -0
- package/dist/components/Skeleton/index.d.ts +1 -0
- package/dist/components/Spinner/Spinner.d.ts +20 -0
- package/dist/components/Spinner/Spinner.test.d.ts +1 -0
- package/dist/components/Spinner/index.d.ts +1 -0
- package/dist/components/StatCard/StatCard.d.ts +23 -0
- package/dist/components/StatCard/StatCard.test.d.ts +1 -0
- package/dist/components/StatCard/index.d.ts +1 -0
- package/dist/components/Switch/Switch.d.ts +27 -0
- package/dist/components/Switch/Switch.test.d.ts +1 -0
- package/dist/components/Switch/index.d.ts +2 -0
- package/dist/components/Table/Table.d.ts +88 -0
- package/dist/components/Table/Table.test.d.ts +1 -0
- package/dist/components/Table/index.d.ts +1 -0
- package/dist/components/Text/Text.d.ts +24 -0
- package/dist/components/Text/Text.test.d.ts +1 -0
- package/dist/components/Text/index.d.ts +1 -0
- package/dist/components/TextEditor/TextEditor.d.ts +11 -0
- package/dist/components/TextEditor/index.d.ts +1 -0
- package/dist/components/Toast/Toast.d.ts +30 -0
- package/dist/components/Toast/Toast.imperative.test.d.ts +1 -0
- package/dist/components/Toast/Toast.test.d.ts +1 -0
- package/dist/components/Toast/Toaster.d.ts +4 -0
- package/dist/components/Toast/index.d.ts +5 -0
- package/dist/components/Toast/toast-api.d.ts +19 -0
- package/dist/components/Toast/toast-store.d.ts +47 -0
- package/dist/components/Toggle/Toggle.d.ts +33 -0
- package/dist/components/Toggle/Toggle.test.d.ts +1 -0
- package/dist/components/Toggle/index.d.ts +2 -0
- package/dist/components/Tooltip/Tooltip.d.ts +15 -0
- package/dist/components/Tooltip/Tooltip.test.d.ts +1 -0
- package/dist/components/Tooltip/index.d.ts +2 -0
- package/dist/components/Uploader/Uploader.d.ts +34 -0
- package/dist/components/Uploader/Uploader.test.d.ts +1 -0
- package/dist/components/Uploader/index.d.ts +1 -0
- package/dist/components/getVisibleBounds.d.ts +6 -0
- package/dist/components/index.d.ts +51 -0
- package/dist/components/useFloatingPosition.d.ts +54 -0
- package/dist/components/useFloatingPosition.test.d.ts +1 -0
- package/dist/components/useIsMobile.d.ts +1 -0
- package/dist/foundations/Scrollbar/index.d.ts +5 -0
- package/dist/index.cjs +3 -0
- package/dist/index.css +1 -0
- package/dist/index.js +6509 -0
- package/foundations/Scrollbar/Scrollbar.css +26 -0
- package/foundations/styles.css +269 -0
- package/foundations/tailwind-preset.cjs +39 -0
- package/foundations/tokens.css +1338 -0
- package/package.json +73 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { InputFeedback } from '../Input/Input';
|
|
3
|
+
import './Checkbox.css';
|
|
4
|
+
export type CheckboxSize = 'sm' | 'md';
|
|
5
|
+
export interface CheckboxProps {
|
|
6
|
+
/** Text associated with the checkbox */
|
|
7
|
+
label?: string;
|
|
8
|
+
/** Checkbox's visual size */
|
|
9
|
+
size?: CheckboxSize;
|
|
10
|
+
/** Width: 'hug' = fits content | 'fill' = 100% */
|
|
11
|
+
width?: 'hug' | 'fill';
|
|
12
|
+
/** Label position relative to the box: 'right' (default) | 'left' */
|
|
13
|
+
labelPosition?: 'right' | 'left';
|
|
14
|
+
/** Checked state (controlled) */
|
|
15
|
+
checked?: boolean;
|
|
16
|
+
/** Indeterminate state — shows a dash instead of a checkmark; maps to aria-checked="mixed" */
|
|
17
|
+
indeterminate?: boolean;
|
|
18
|
+
/** Callback fired on click — receives the new checked state */
|
|
19
|
+
onChange?: (checked: boolean) => void;
|
|
20
|
+
/** Shows a wrapper with padding and border */
|
|
21
|
+
container?: boolean;
|
|
22
|
+
/** Disables interaction and applies disabled visual style */
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
/** Validation visual state — colors the box's border (when unchecked) and the hint */
|
|
25
|
+
feedback?: InputFeedback;
|
|
26
|
+
/** Helper text shown below the label — hint or error, color follows the feedback */
|
|
27
|
+
hint?: string;
|
|
28
|
+
/** Field name for native form submission — renders an input[type=hidden] with the checked state */
|
|
29
|
+
name?: string;
|
|
30
|
+
/** Marks the field as required — asterisk on the label and aria-required on the box */
|
|
31
|
+
required?: boolean;
|
|
32
|
+
/** Additional CSS classes */
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
export declare const Checkbox: React.FC<CheckboxProps>;
|
|
36
|
+
export default Checkbox;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './ColorPicker.css';
|
|
3
|
+
export interface ColorPickerProps {
|
|
4
|
+
/** Label shown on the trigger — identifies the color field */
|
|
5
|
+
label: string;
|
|
6
|
+
/** Trigger width: 'hug' = fits content | 'fill' = 100% */
|
|
7
|
+
width?: 'hug' | 'fill';
|
|
8
|
+
/** Controlled HEX value (e.g. "#FF4B4A"). Syncs internal state when changed externally — the picker keeps its own edits until "Apply". null = no color selected */
|
|
9
|
+
value?: string | null;
|
|
10
|
+
/** Callback with the selected HEX, fired when clicking Apply on the panel */
|
|
11
|
+
onChange?: (hex: string) => void;
|
|
12
|
+
/** Overrides the panel's z-index. Use when the ColorPicker is inside another elevated layer (e.g. a Popover with a high z-index) */
|
|
13
|
+
zIndex?: number;
|
|
14
|
+
/** Removes the transparency (alpha) slider and input from the panel */
|
|
15
|
+
disableAlpha?: boolean;
|
|
16
|
+
/** Disables the component — prevents opening the panel and applies disabled visual style */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** Additional CSS classes applied to the root element */
|
|
19
|
+
className?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare const ColorPicker: React.FC<ColorPickerProps>;
|
|
22
|
+
export default ColorPicker;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ColorPicker';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface CustomPalette {
|
|
2
|
+
10: string;
|
|
3
|
+
20: string;
|
|
4
|
+
30: string;
|
|
5
|
+
40: string;
|
|
6
|
+
50: string;
|
|
7
|
+
60: string;
|
|
8
|
+
70: string;
|
|
9
|
+
80: string;
|
|
10
|
+
90: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function generatePalette(hex: string): CustomPalette;
|
|
13
|
+
export declare function applyCustomScheme(hex: string): void;
|
|
14
|
+
export declare function clearCustomScheme(): void;
|
|
15
|
+
export declare function useCustomScheme(hex: string | null | undefined): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ColorScheme';
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { InputFeedback } from '../Input';
|
|
3
|
+
import './DatePicker.css';
|
|
4
|
+
import '../../foundations/Scrollbar/Scrollbar.css';
|
|
5
|
+
export interface DateRange {
|
|
6
|
+
start: Date | null;
|
|
7
|
+
end: Date | null;
|
|
8
|
+
}
|
|
9
|
+
interface DatePickerBase {
|
|
10
|
+
/** Input trigger's label */
|
|
11
|
+
label?: string;
|
|
12
|
+
/** Trigger style: 'input' = text field (default) | 'pill' = pill button */
|
|
13
|
+
trigger?: 'input' | 'pill';
|
|
14
|
+
/** Trigger width: 'hug' = fits content | 'fill' = 100% */
|
|
15
|
+
width?: 'hug' | 'fill';
|
|
16
|
+
/** Single mode: Date | null. isRange mode: { start, end } */
|
|
17
|
+
value?: Date | null | DateRange;
|
|
18
|
+
/** Callback on selection. Single mode: Date | null. isRange mode: { start, end } */
|
|
19
|
+
onChange?: (value: Date | null | DateRange) => void;
|
|
20
|
+
/** Minimum selectable date */
|
|
21
|
+
minDate?: Date;
|
|
22
|
+
/** Maximum selectable date */
|
|
23
|
+
maxDate?: Date;
|
|
24
|
+
/** Return false to disable a specific date */
|
|
25
|
+
filterDate?: (date: Date) => boolean;
|
|
26
|
+
/** Specific disabled dates */
|
|
27
|
+
excludeDates?: Date[];
|
|
28
|
+
/** Only these dates stay enabled */
|
|
29
|
+
includeDates?: Date[];
|
|
30
|
+
/** Interval in minutes between time slots (default: 60) */
|
|
31
|
+
timeIntervals?: number;
|
|
32
|
+
/** Return false to disable a time slot */
|
|
33
|
+
filterTime?: (date: Date) => boolean;
|
|
34
|
+
/** These times stay disabled */
|
|
35
|
+
excludeTimes?: Date[];
|
|
36
|
+
/** Only these times stay enabled */
|
|
37
|
+
includeTimes?: Date[];
|
|
38
|
+
/** Month/year shown initially when there's no selected value */
|
|
39
|
+
defaultViewDate?: Date;
|
|
40
|
+
/** Disables all interaction */
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
/** Shows a spinner on the trigger and blocks interaction — use while data is loading */
|
|
43
|
+
isLoading?: boolean;
|
|
44
|
+
/** Visual feedback state: 'error' | 'success' | 'alert' | 'none' */
|
|
45
|
+
feedback?: InputFeedback;
|
|
46
|
+
/** Message shown below the field (e.g. validation error message) */
|
|
47
|
+
hint?: string;
|
|
48
|
+
/** Field name — for native submission via <form> */
|
|
49
|
+
name?: string;
|
|
50
|
+
/** Required field — shows asterisk and aria-required */
|
|
51
|
+
required?: boolean;
|
|
52
|
+
/** Additional CSS classes */
|
|
53
|
+
className?: string;
|
|
54
|
+
}
|
|
55
|
+
/** isRange=true: hasTime and onlyTime are forbidden — they don't make sense in range mode */
|
|
56
|
+
interface DatePickerRangeProps extends DatePickerBase {
|
|
57
|
+
isRange: true;
|
|
58
|
+
hasTime?: never;
|
|
59
|
+
onlyTime?: never;
|
|
60
|
+
disablePast?: boolean;
|
|
61
|
+
disableFuture?: boolean;
|
|
62
|
+
disableToday?: boolean;
|
|
63
|
+
}
|
|
64
|
+
/** onlyTime=true: disablePast, disableFuture, and disableToday are forbidden — there's no calendar */
|
|
65
|
+
interface DatePickerOnlyTimeProps extends DatePickerBase {
|
|
66
|
+
isRange?: false;
|
|
67
|
+
onlyTime: true;
|
|
68
|
+
hasTime?: boolean;
|
|
69
|
+
disablePast?: never;
|
|
70
|
+
disableFuture?: never;
|
|
71
|
+
disableToday?: never;
|
|
72
|
+
}
|
|
73
|
+
/** Default mode (single date): all props available */
|
|
74
|
+
interface DatePickerDefaultProps extends DatePickerBase {
|
|
75
|
+
isRange?: false;
|
|
76
|
+
onlyTime?: false;
|
|
77
|
+
hasTime?: boolean;
|
|
78
|
+
disablePast?: boolean;
|
|
79
|
+
disableFuture?: boolean;
|
|
80
|
+
disableToday?: boolean;
|
|
81
|
+
}
|
|
82
|
+
export type DatePickerProps = DatePickerRangeProps | DatePickerOnlyTimeProps | DatePickerDefaultProps;
|
|
83
|
+
export declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<HTMLDivElement>>;
|
|
84
|
+
export default DatePicker;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns a Date to use as minDate.
|
|
3
|
+
* includeToday=true (default): today counts as 1 of the n days.
|
|
4
|
+
* includeToday=false: combine with disableToday to exclude today.
|
|
5
|
+
*
|
|
6
|
+
* lastDays(3) → minDate = today-2 → [today-2, today-1, today] = 3 days
|
|
7
|
+
* lastDays(3, false) → minDate = today-3 → with disableToday: [today-3, today-2, today-1] = 3 days
|
|
8
|
+
*/
|
|
9
|
+
export declare function lastDays(n: number, includeToday?: boolean): Date;
|
|
10
|
+
/**
|
|
11
|
+
* Returns a Date to use as maxDate.
|
|
12
|
+
* includeToday=true (default): today counts as 1 of the n days.
|
|
13
|
+
* includeToday=false: combine with disableToday to exclude today.
|
|
14
|
+
*
|
|
15
|
+
* nextDays(30) → maxDate = today+29 → [today, ..., today+29] = 30 days
|
|
16
|
+
* nextDays(30, false) → maxDate = today+30 → with disableToday: [today+1, ..., today+30] = 30 days
|
|
17
|
+
*/
|
|
18
|
+
export declare function nextDays(n: number, includeToday?: boolean): Date;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TooltipPosition } from '../Tooltip';
|
|
3
|
+
import './Drawer.css';
|
|
4
|
+
import '../../foundations/Scrollbar/Scrollbar.css';
|
|
5
|
+
export interface DrawerProps {
|
|
6
|
+
/** Controls visibility. When false, the drawer is unmounted from the DOM */
|
|
7
|
+
isOpen: boolean;
|
|
8
|
+
/** Called when the overlay or the close button is clicked */
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
/** Drawer title (Bold 24px). Truncated with ellipsis when long */
|
|
11
|
+
title: string;
|
|
12
|
+
/** Tooltip text shown on hover of the info icon (ⓘ) beside the title */
|
|
13
|
+
titleTooltip?: string;
|
|
14
|
+
/** Position of the title tooltip — default 'bottom' */
|
|
15
|
+
titleTooltipPosition?: TooltipPosition;
|
|
16
|
+
/** Side to slide from (default 'right') */
|
|
17
|
+
placement?: 'right' | 'left';
|
|
18
|
+
/** When provided, renders a chevron-left button before the title — use for stacked drawers navigation */
|
|
19
|
+
onBack?: () => void;
|
|
20
|
+
/** Label of the link-style button rendered in the header, between title and close button. When absent, the button isn't rendered */
|
|
21
|
+
headerActionLabel?: string;
|
|
22
|
+
/** Callback for the header action button. When it returns a Promise, the spinner activates automatically until it resolves */
|
|
23
|
+
onHeaderAction?: () => void | Promise<void>;
|
|
24
|
+
/** Shows a loading spinner on the header action button. Also activated automatically when onHeaderAction returns a Promise */
|
|
25
|
+
headerActionLoading?: boolean;
|
|
26
|
+
/** Disables the header action button */
|
|
27
|
+
headerActionDisabled?: boolean;
|
|
28
|
+
/** Tooltip text shown when hovering the disabled header action button */
|
|
29
|
+
headerActionDisabledTooltip?: string;
|
|
30
|
+
/** Position of the header action's disabled tooltip — default 'top' */
|
|
31
|
+
headerActionDisabledTooltipPosition?: TooltipPosition;
|
|
32
|
+
/** Drawer body content */
|
|
33
|
+
children?: React.ReactNode;
|
|
34
|
+
/** Custom footer — overrides built-in footer buttons */
|
|
35
|
+
footer?: React.ReactNode;
|
|
36
|
+
/** Primary (filled) action label. When absent, the button isn't rendered */
|
|
37
|
+
primaryLabel?: string;
|
|
38
|
+
/** Callback for the primary button. When it returns a Promise, the spinner activates automatically until it resolves */
|
|
39
|
+
onPrimary?: () => void | Promise<void>;
|
|
40
|
+
/** Shows a loading spinner on the primary button. Also activated automatically when onPrimary returns a Promise */
|
|
41
|
+
primaryLoading?: boolean;
|
|
42
|
+
/** Disables the primary button */
|
|
43
|
+
primaryDisabled?: boolean;
|
|
44
|
+
/** Tooltip text shown when hovering the disabled primary button */
|
|
45
|
+
primaryDisabledTooltip?: string;
|
|
46
|
+
/** Position of the primary button's disabled tooltip — default 'top' */
|
|
47
|
+
primaryDisabledTooltipPosition?: TooltipPosition;
|
|
48
|
+
/** Secondary (outlined) action label. When absent, the button isn't rendered */
|
|
49
|
+
secondaryLabel?: string;
|
|
50
|
+
/** Callback for the secondary button. When it returns a Promise, the spinner activates automatically until it resolves */
|
|
51
|
+
onSecondary?: () => void | Promise<void>;
|
|
52
|
+
/** Shows a loading spinner on the secondary button. Also activated automatically when onSecondary returns a Promise */
|
|
53
|
+
secondaryLoading?: boolean;
|
|
54
|
+
/** Disables the secondary button */
|
|
55
|
+
secondaryDisabled?: boolean;
|
|
56
|
+
/** Tooltip text shown when hovering the disabled secondary button */
|
|
57
|
+
secondaryDisabledTooltip?: string;
|
|
58
|
+
/** Position of the secondary button's disabled tooltip — default 'top' */
|
|
59
|
+
secondaryDisabledTooltipPosition?: TooltipPosition;
|
|
60
|
+
/** Tertiary (link) action label. When absent, the button isn't rendered */
|
|
61
|
+
tertiaryLabel?: string;
|
|
62
|
+
/** Callback for the tertiary button. When it returns a Promise, the spinner activates automatically until it resolves */
|
|
63
|
+
onTertiary?: () => void | Promise<void>;
|
|
64
|
+
/** Shows a loading spinner on the tertiary button. Also activated automatically when onTertiary returns a Promise */
|
|
65
|
+
tertiaryLoading?: boolean;
|
|
66
|
+
/** Disables the tertiary button */
|
|
67
|
+
tertiaryDisabled?: boolean;
|
|
68
|
+
/** Tooltip text shown when hovering the disabled tertiary button */
|
|
69
|
+
tertiaryDisabledTooltip?: string;
|
|
70
|
+
/** Position of the tertiary button's disabled tooltip — default 'top' */
|
|
71
|
+
tertiaryDisabledTooltipPosition?: TooltipPosition;
|
|
72
|
+
/** aria-label for the close button */
|
|
73
|
+
closeLabel?: string;
|
|
74
|
+
/** When true, clicking the overlay does not close the drawer. × button and Escape still work */
|
|
75
|
+
disableOverlayClose?: boolean;
|
|
76
|
+
/** Show a confirmation dialog before closing */
|
|
77
|
+
confirmClose?: boolean;
|
|
78
|
+
/** Confirmation dialog title */
|
|
79
|
+
confirmTitle?: string;
|
|
80
|
+
/** Confirmation dialog body message */
|
|
81
|
+
confirmMessage?: string;
|
|
82
|
+
/** Confirmation dialog confirm button label */
|
|
83
|
+
confirmActionLabel?: string;
|
|
84
|
+
/** Confirmation dialog cancel button label */
|
|
85
|
+
confirmCancelLabel?: string;
|
|
86
|
+
/** Extra className on the container */
|
|
87
|
+
className?: string;
|
|
88
|
+
}
|
|
89
|
+
export declare const Drawer: React.FC<DrawerProps>;
|
|
90
|
+
export default Drawer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IconElement } from '../Icon/Icon';
|
|
3
|
+
import './Field.css';
|
|
4
|
+
export type FieldSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
export type FieldFeedback = 'none' | 'success' | 'alert' | 'error';
|
|
6
|
+
export type FieldLabelMode = 'float' | 'placeholder';
|
|
7
|
+
/**
|
|
8
|
+
* Field — primitive for the field shell (like Floating is for Popover).
|
|
9
|
+
* Mirrors Input's structure: a flex row with 24px icons as children,
|
|
10
|
+
* floating label or placeholder, and the native control (<input>/<textarea>)
|
|
11
|
+
* injected as `children` by the consumer (Input, SearchBar). Doesn't know about
|
|
12
|
+
* search, tags, password, or phone.
|
|
13
|
+
*/
|
|
14
|
+
export interface FieldProps {
|
|
15
|
+
/** Height: 'lg' = 56px · 'md' = 48px · 'sm' = 40px */
|
|
16
|
+
size?: FieldSize;
|
|
17
|
+
/** Label text */
|
|
18
|
+
label?: string;
|
|
19
|
+
/** 'float' = label rises on focus/fill · 'placeholder' = disappears on focus/fill */
|
|
20
|
+
labelMode?: FieldLabelMode;
|
|
21
|
+
/** Native control's id — connects the label via htmlFor */
|
|
22
|
+
htmlFor?: string;
|
|
23
|
+
/** true when the field has a value — controls the label's float/hide */
|
|
24
|
+
filled?: boolean;
|
|
25
|
+
/** Disabled state */
|
|
26
|
+
disabled?: boolean;
|
|
27
|
+
/** Shows a spinner in place of iconRight and signals loading */
|
|
28
|
+
isLoading?: boolean;
|
|
29
|
+
/** Border color from validation */
|
|
30
|
+
feedback?: FieldFeedback;
|
|
31
|
+
/** Left icon */
|
|
32
|
+
iconLeft?: IconElement;
|
|
33
|
+
/** Right icon */
|
|
34
|
+
iconRight?: IconElement;
|
|
35
|
+
/** Makes iconRight clickable (hover + cursor) */
|
|
36
|
+
onClickIconRight?: () => void;
|
|
37
|
+
/** aria-label for iconRight when clickable (e.g. "Clear search") */
|
|
38
|
+
iconRightLabel?: string;
|
|
39
|
+
/** Native control (<input> / <textarea>) — with className="kdls-field__input" */
|
|
40
|
+
children: React.ReactNode;
|
|
41
|
+
/** Additional CSS class on the root element */
|
|
42
|
+
className?: string;
|
|
43
|
+
}
|
|
44
|
+
export declare function Field({ size, label, labelMode, htmlFor, filled, disabled, isLoading, feedback, iconLeft, iconRight, onClickIconRight, iconRightLabel, children, className, }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Field';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Floating.css';
|
|
3
|
+
export type FloatingPlacement = 'top' | 'topLeft' | 'topRight' | 'right' | 'rightTop' | 'rightBottom' | 'bottom' | 'bottomLeft' | 'bottomRight' | 'left' | 'leftTop' | 'leftBottom';
|
|
4
|
+
export type FloatingTriggerMode = 'click' | 'hover' | 'focus' | 'contextMenu';
|
|
5
|
+
export interface FloatingProps {
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
content: React.ReactNode | ((activePlacement: FloatingPlacement) => React.ReactNode);
|
|
8
|
+
placement?: FloatingPlacement;
|
|
9
|
+
gap?: number;
|
|
10
|
+
trigger?: FloatingTriggerMode | FloatingTriggerMode[];
|
|
11
|
+
mouseEnterDelay?: number;
|
|
12
|
+
mouseLeaveDelay?: number;
|
|
13
|
+
open?: boolean;
|
|
14
|
+
onOpenChange?: (open: boolean) => void;
|
|
15
|
+
defaultOpen?: boolean;
|
|
16
|
+
destroyOnClose?: boolean;
|
|
17
|
+
getPopupContainer?: () => HTMLElement;
|
|
18
|
+
zIndex?: number;
|
|
19
|
+
matchTriggerWidth?: boolean;
|
|
20
|
+
className?: string;
|
|
21
|
+
openClassName?: string;
|
|
22
|
+
triggerClassName?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const Floating: React.FC<FloatingProps>;
|
|
25
|
+
export default Floating;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type FormValidateOn = 'change' | 'blur' | 'submit';
|
|
3
|
+
export interface FormContextValue {
|
|
4
|
+
validateOn: FormValidateOn;
|
|
5
|
+
submitted: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const FormContext: React.Context<FormContextValue>;
|
|
8
|
+
export declare function useFormContext(): FormContextValue;
|
|
9
|
+
export interface FormProps extends React.FormHTMLAttributes<HTMLFormElement> {
|
|
10
|
+
/** Defines when child inputs' validation rules are evaluated */
|
|
11
|
+
validateOn?: FormValidateOn;
|
|
12
|
+
}
|
|
13
|
+
export declare function Form({ validateOn, onSubmit, children, ...rest }: FormProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Grid.css';
|
|
3
|
+
export type SpacingScale = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 14 | 16;
|
|
4
|
+
export interface GridProps {
|
|
5
|
+
/** Number of columns (default: 12) */
|
|
6
|
+
cols?: 1 | 2 | 3 | 4 | 6 | 12;
|
|
7
|
+
/** Uniform gap — DS spacing scale (default: 4 = 16px) */
|
|
8
|
+
gap?: SpacingScale;
|
|
9
|
+
/** Vertical gap — DS spacing scale (overrides gap) */
|
|
10
|
+
rowGap?: SpacingScale;
|
|
11
|
+
/** Horizontal gap — DS spacing scale (overrides gap) */
|
|
12
|
+
colGap?: SpacingScale;
|
|
13
|
+
/** Vertical alignment of items */
|
|
14
|
+
align?: 'start' | 'center' | 'end' | 'stretch';
|
|
15
|
+
className?: string;
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export interface ColProps {
|
|
19
|
+
/** Default span: 1–12 (default: 12) */
|
|
20
|
+
span?: number;
|
|
21
|
+
/** Span at xs — < 800px */
|
|
22
|
+
xs?: number;
|
|
23
|
+
/** Span at sm — 800px+ */
|
|
24
|
+
sm?: number;
|
|
25
|
+
/** Span at md — 1024px+ */
|
|
26
|
+
md?: number;
|
|
27
|
+
/** Span at lg — 1280px+ */
|
|
28
|
+
lg?: number;
|
|
29
|
+
/** Span at xl — 1440px+ */
|
|
30
|
+
xl?: number;
|
|
31
|
+
className?: string;
|
|
32
|
+
children?: React.ReactNode;
|
|
33
|
+
}
|
|
34
|
+
export declare function Grid({ cols, gap, rowGap, colGap, align, className, children, }: GridProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare function Col({ span, xs, sm, md, lg, xl, className, children, }: ColProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Header.css';
|
|
3
|
+
import type { KenloLogoProduct } from '../KenloLogo';
|
|
4
|
+
import '../../foundations/Scrollbar/Scrollbar.css';
|
|
5
|
+
export interface HeaderNavItem {
|
|
6
|
+
label: string;
|
|
7
|
+
href?: string;
|
|
8
|
+
isNew?: boolean;
|
|
9
|
+
children?: {
|
|
10
|
+
label: string;
|
|
11
|
+
href?: string;
|
|
12
|
+
}[];
|
|
13
|
+
onClick?: () => void;
|
|
14
|
+
}
|
|
15
|
+
export interface HeaderNotification {
|
|
16
|
+
id: string;
|
|
17
|
+
title: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
time: string;
|
|
20
|
+
read?: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface HeaderProps {
|
|
23
|
+
/** Kenlo product that determines the logo */
|
|
24
|
+
product?: KenloLogoProduct;
|
|
25
|
+
/** Main navigation items */
|
|
26
|
+
navItems?: HeaderNavItem[];
|
|
27
|
+
/** Active items (by label) */
|
|
28
|
+
activeNav?: string;
|
|
29
|
+
/** Notifications */
|
|
30
|
+
notifications?: HeaderNotification[];
|
|
31
|
+
onClearNotifications?: () => void;
|
|
32
|
+
/** User data */
|
|
33
|
+
user?: {
|
|
34
|
+
name: string;
|
|
35
|
+
code?: string;
|
|
36
|
+
company?: string;
|
|
37
|
+
avatarSrc?: string;
|
|
38
|
+
initials?: string;
|
|
39
|
+
};
|
|
40
|
+
/** Slot for context selector (unit/site) */
|
|
41
|
+
contextSelector?: React.ReactNode;
|
|
42
|
+
/** FAQs callback */
|
|
43
|
+
onFAQs?: () => void;
|
|
44
|
+
showFAQs?: boolean;
|
|
45
|
+
className?: string;
|
|
46
|
+
}
|
|
47
|
+
export declare const Header: React.FC<HeaderProps>;
|
|
48
|
+
export default Header;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './Icon.css';
|
|
3
|
+
/** An already-instantiated icon element — from @fluentui/react-icons (e.g. <SearchRegular />),
|
|
4
|
+
* a KDLS custom icon (e.g. <LyaEditorIcon />), or the consumer's own SVG. */
|
|
5
|
+
export type IconElement = React.ReactElement;
|
|
6
|
+
/** Any color-family token that follows the `--color-{family}-{step}` scale — same set and
|
|
7
|
+
* same order used everywhere else in the DS (tokens.scss / tokens-reference.md). */
|
|
8
|
+
export type IconColor = 'neutral' | 'primary' | 'secondary' | 'tertiary' | 'lya' | 'success' | 'alert' | 'error' | 'leaf' | 'sand' | 'wood' | 'clay' | 'flower' | 'dusk' | 'sky' | 'sea' | 'lake';
|
|
9
|
+
export interface IconProps {
|
|
10
|
+
/** Icon element to render — e.g. <SearchRegular /> (@fluentui/react-icons) or <LyaEditorIcon /> (KDLS) */
|
|
11
|
+
icon: IconElement;
|
|
12
|
+
/** Size: 'sm' 16px · 'md' 24px (default) · 'lg' 32px */
|
|
13
|
+
size?: 'sm' | 'md' | 'lg';
|
|
14
|
+
/** Solid color from any scheme color-family token (e.g. "dusk", "error") — resolves to that
|
|
15
|
+
* family's -50 step. `color="lya"` is the one special case: activates the Lya gradient
|
|
16
|
+
* instead of a solid fill. For anything outside these families, use `style` instead. */
|
|
17
|
+
color?: IconColor;
|
|
18
|
+
/** Accessible label — use when the icon carries meaning with no visible text next to it */
|
|
19
|
+
'aria-label'?: string;
|
|
20
|
+
/** Custom ARIA role for interactive icons */
|
|
21
|
+
role?: string;
|
|
22
|
+
/** When passed, the icon becomes clickable (cursor pointer) */
|
|
23
|
+
onClick?: React.MouseEventHandler<HTMLSpanElement>;
|
|
24
|
+
/** Additional inline style (e.g. cursor, or any color outside the `IconColor` families) */
|
|
25
|
+
style?: React.CSSProperties;
|
|
26
|
+
/** Hides the icon from assistive technology — use on purely decorative icons */
|
|
27
|
+
'aria-hidden'?: boolean;
|
|
28
|
+
/** Additional CSS class */
|
|
29
|
+
className?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare const Icon: React.FC<IconProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface CustomIconProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
}
|
|
4
|
+
export declare function VideoHorizontalFilled({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function VideoHorizontalRegular({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function VideoTour3DFilled({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function VideoTour3DRegular({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function VideoVerticalFilled({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function VideoVerticalRegular({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
interface CustomIconProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
}
|
|
4
|
+
export declare function KenloKFilled({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function KenloKRegular({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function LeadDoubleFilled({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function LeadDoubleRegular({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function LeadInfoFilled({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function LeadInfoRegular({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function LeadSingleFilled({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function LeadSingleRegular({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function LeadUndefinedFilled({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function LeadUndefinedRegular({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function LeadVerifiedFilled({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function LeadVerifiedRegular({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function LyaDoubleFilled({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function LyaDoubleRegular({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function LyaEditor({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function LyaFichaLimpa({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function LyaKoin({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function LyaOmni({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function LyaOraculo({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function LyaSdr({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare function LyaSingleFilled({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare function LyaSingleRegular({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function LyaStudio({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface CustomIconProps {
|
|
2
|
+
className?: string;
|
|
3
|
+
}
|
|
4
|
+
export declare function Facebook({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare function FacebookColor({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function Google({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function GoogleColor({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function Instagram({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function InstagramColor({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export declare function LinkedIn({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function LinkedInColor({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function Messenger({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare function MessengerColor({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function Pinterest({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function PinterestColor({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function Telegram({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function TelegramColor({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function WhatsApp({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export declare function WhatsAppColor({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare function X({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function XColor({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare function YouTube({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare function YouTubeColor({ className }: CustomIconProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './IconButton.css';
|
|
3
|
+
import { IconElement } from '../Icon/Icon';
|
|
4
|
+
export type IconButtonSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
export interface IconButtonProps {
|
|
6
|
+
/** Icon to display — e.g. <DeleteRegular /> */
|
|
7
|
+
icon: IconElement;
|
|
8
|
+
/** Callback fired when clicking the button. Not called when disabled or isLoading are active */
|
|
9
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
10
|
+
/** 'primary' = theme color (default) · 'neutral' = gray. Use 'neutral' for chevrons and secondary actions */
|
|
11
|
+
variant?: 'neutral' | 'primary';
|
|
12
|
+
/** Click-area size — 'sm' 32px (default) · 'md' 40px · 'lg' 48px. The icon itself is always 24px */
|
|
13
|
+
size?: IconButtonSize;
|
|
14
|
+
/** Shows a spinner in place of the icon and blocks clicks while an async action is in progress */
|
|
15
|
+
isLoading?: boolean;
|
|
16
|
+
/** Disabled state — only the icon color changes to neutral-40, the background is never touched */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** Accessible label — required: there's no way to derive an automatic label from an arbitrary icon */
|
|
19
|
+
'aria-label': string;
|
|
20
|
+
/** Additional CSS classes */
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const IconButton: React.FC<IconButtonProps>;
|
|
24
|
+
export default IconButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|