@delightui/components 0.1.24 → 0.1.25
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/cjs/components/atoms/List/components/{ListItem.d.ts → RootListItem.d.ts} +1 -1
- package/dist/cjs/components/atoms/ListItem/ListItem.d.ts +4 -0
- package/dist/cjs/components/atoms/ListItem/ListItem.types.d.ts +23 -0
- package/dist/cjs/components/atoms/ListItem/index.d.ts +4 -0
- package/dist/cjs/components/atoms/index.d.ts +2 -0
- package/dist/cjs/library.css +52 -0
- package/dist/cjs/library.js +3 -3
- package/dist/cjs/library.js.map +1 -1
- package/dist/esm/components/atoms/List/components/{ListItem.d.ts → RootListItem.d.ts} +1 -1
- package/dist/esm/components/atoms/ListItem/ListItem.d.ts +4 -0
- package/dist/esm/components/atoms/ListItem/ListItem.types.d.ts +23 -0
- package/dist/esm/components/atoms/ListItem/index.d.ts +4 -0
- package/dist/esm/components/atoms/index.d.ts +2 -0
- package/dist/esm/library.css +52 -0
- package/dist/esm/library.js +3 -3
- package/dist/esm/library.js.map +1 -1
- package/dist/index.d.ts +26 -1
- package/package.json +1 -1
|
@@ -7,4 +7,4 @@ import { ListItemProps, ListItemType } from "../List.types";
|
|
|
7
7
|
* @param {ListItemProps<T>} props - The properties for the list item.
|
|
8
8
|
* @returns {JSX.Element} The rendered list item.
|
|
9
9
|
*/
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const RootListItem: <T extends ListItemType>(props: ListItemProps<T>) => React.JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { HTMLAttributes, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
export type ListItemProps = Omit<HTMLAttributes<HTMLDivElement>, 'style'> & {
|
|
3
|
+
/**
|
|
4
|
+
* Icon to be displayed before the button's content.
|
|
5
|
+
*/
|
|
6
|
+
leadingIcon?: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Icon to be displayed after the button's content.
|
|
9
|
+
*/
|
|
10
|
+
trailingIcon?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the list item is disabled.
|
|
13
|
+
*/
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Click event handler for the list item.
|
|
17
|
+
*/
|
|
18
|
+
onClick?: (event?: MouseEvent<HTMLElement>) => void;
|
|
19
|
+
/**
|
|
20
|
+
* Additional class for styling.
|
|
21
|
+
*/
|
|
22
|
+
className?: string;
|
|
23
|
+
};
|
|
@@ -12,6 +12,7 @@ export { default as Spinner } from './Spinner';
|
|
|
12
12
|
export { default as Text } from './Text';
|
|
13
13
|
export { default as TextArea } from './TextArea';
|
|
14
14
|
export { default as ResponsiveComponent } from './ResponsiveComponent';
|
|
15
|
+
export { default as ListItem } from './ListItem';
|
|
15
16
|
export * from './ActionCard';
|
|
16
17
|
export * from './ActionImage';
|
|
17
18
|
export * from './Button';
|
|
@@ -26,3 +27,4 @@ export * from './Spinner';
|
|
|
26
27
|
export * from './Text';
|
|
27
28
|
export * from './TextArea';
|
|
28
29
|
export * from './ResponsiveComponent';
|
|
30
|
+
export * from './ListItem';
|
package/dist/esm/library.css
CHANGED
|
@@ -2390,6 +2390,58 @@ span.flatpickr-weekday {
|
|
|
2390
2390
|
line-height: var(--text-area-placeholder-line-height);
|
|
2391
2391
|
color: var(--text-area-placeholder-color);
|
|
2392
2392
|
}
|
|
2393
|
+
.ListItem-module_button__yiYWw {
|
|
2394
|
+
display: flex;
|
|
2395
|
+
align-items: center;
|
|
2396
|
+
justify-content: center;
|
|
2397
|
+
position: relative;
|
|
2398
|
+
height: var(--list-item-height);
|
|
2399
|
+
min-height: var(--list-item-min-height);
|
|
2400
|
+
max-height: var(--list-item-max-height);
|
|
2401
|
+
width: var(--list-item-width);
|
|
2402
|
+
min-width: var(--list-item-min-width);
|
|
2403
|
+
max-width: var(--list-item-max-width);
|
|
2404
|
+
padding-top: calc(var(--list-item-padding-top) - var(--list-item-border-top-width));
|
|
2405
|
+
padding-bottom: calc(var(--list-item-padding-bottom) - var(--list-item-border-bottom-width));
|
|
2406
|
+
padding-left: calc(var(--list-item-padding-left) - var(--list-item-border-left-width));
|
|
2407
|
+
padding-right: calc(var(--list-item-padding-right) - var(--list-item-border-right-width));
|
|
2408
|
+
row-gap: var(--list-item-row-gap);
|
|
2409
|
+
-moz-column-gap: var(--list-item-column-gap);
|
|
2410
|
+
column-gap: var(--list-item-column-gap);
|
|
2411
|
+
border-bottom-width: var(--list-item-border-bottom-width);
|
|
2412
|
+
border-left-width: var(--list-item-border-left-width);
|
|
2413
|
+
border-right-width: var(--list-item-border-right-width);
|
|
2414
|
+
border-top-width: var(--list-item-border-top-width);
|
|
2415
|
+
border-style: var(--list-item-border-style);
|
|
2416
|
+
border-color: var(--list-item-border-color);
|
|
2417
|
+
border-top-left-radius: var(--list-item-border-top-left-radius);
|
|
2418
|
+
border-top-right-radius: var(--list-item-border-top-right-radius);
|
|
2419
|
+
border-bottom-right-radius: var(--list-item-border-bottom-right-radius);
|
|
2420
|
+
border-bottom-left-radius: var(--list-item-border-bottom-left-radius);
|
|
2421
|
+
outline-width: var(--list-item-outline-width);
|
|
2422
|
+
outline-style: var(--list-item-outline-style);
|
|
2423
|
+
outline-color: var(--list-item-outline-color);
|
|
2424
|
+
background-color: var(--list-item-background-color);
|
|
2425
|
+
font-family: var(--list-item-font-family);
|
|
2426
|
+
font-size: var(--list-item-font-size);
|
|
2427
|
+
font-weight: var(--list-item-font-weight);
|
|
2428
|
+
line-height: var(--list-item-line-height);
|
|
2429
|
+
color: var(--list-item-color);
|
|
2430
|
+
}
|
|
2431
|
+
.ListItem-module_button__yiYWw .ListItem-module_content__I-1o- {
|
|
2432
|
+
flex: 1;
|
|
2433
|
+
display: flex;
|
|
2434
|
+
justify-content: center;
|
|
2435
|
+
justify-content: var(--list-item-content-justify-content, center);
|
|
2436
|
+
}
|
|
2437
|
+
.ListItem-module_button__yiYWw .ListItem-module_content__I-1o- > *,
|
|
2438
|
+
.ListItem-module_button__yiYWw .ListItem-module_leadingIcon__BvSjG > *,
|
|
2439
|
+
.ListItem-module_button__yiYWw .ListItem-module_trailingIcon__qgDgt > * {
|
|
2440
|
+
color: var(--list-item-color);
|
|
2441
|
+
}
|
|
2442
|
+
.ListItem-module_button__yiYWw:disabled {
|
|
2443
|
+
cursor: not-allowed;
|
|
2444
|
+
}
|
|
2393
2445
|
.Form-module_form__9JYdv {
|
|
2394
2446
|
display: flex;
|
|
2395
2447
|
flex-direction: column;
|