@delightui/components 0.1.26 → 0.1.27
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/molecules/DatePicker/DatePicker.types.d.ts +6 -8
- package/dist/cjs/components/molecules/DatePicker/Plugins/customTimeSelector.d.ts +4 -0
- package/dist/cjs/components/molecules/DatePicker/Plugins/utils.d.ts +3 -1
- package/dist/cjs/components/molecules/Popover/Popover.types.d.ts +5 -0
- package/dist/cjs/library.css +27 -2
- package/dist/cjs/library.js +3 -3
- package/dist/cjs/library.js.map +1 -1
- package/dist/esm/components/molecules/DatePicker/DatePicker.types.d.ts +6 -8
- package/dist/esm/components/molecules/DatePicker/Plugins/customTimeSelector.d.ts +4 -0
- package/dist/esm/components/molecules/DatePicker/Plugins/utils.d.ts +3 -1
- package/dist/esm/components/molecules/Popover/Popover.types.d.ts +5 -0
- package/dist/esm/library.css +27 -2
- package/dist/esm/library.js +3 -3
- package/dist/esm/library.js.map +1 -1
- package/dist/index.d.ts +11 -8
- package/package.json +1 -1
|
@@ -82,10 +82,6 @@ export type DatePickerProps = {
|
|
|
82
82
|
* @default false
|
|
83
83
|
*/
|
|
84
84
|
allowInput?: boolean;
|
|
85
|
-
/**
|
|
86
|
-
* Container element for the calendar when used inside a Popover
|
|
87
|
-
*/
|
|
88
|
-
container?: HTMLElement | null;
|
|
89
85
|
/**
|
|
90
86
|
* Custom time picker plugin
|
|
91
87
|
*/
|
|
@@ -94,12 +90,14 @@ export type DatePickerProps = {
|
|
|
94
90
|
* Custom time picker plugin
|
|
95
91
|
*/
|
|
96
92
|
customDateTimePickerPlugin?: (config: CustomTimePickerConfig) => Plugin;
|
|
93
|
+
/**
|
|
94
|
+
* Use custom time input same as date picker input
|
|
95
|
+
* This is useful when the datepicker is inline and is re-added to the DOM after closing
|
|
96
|
+
* For example using this inside a Popover as content
|
|
97
|
+
*/
|
|
98
|
+
useCustomTimeInputForTimePicker?: boolean;
|
|
97
99
|
};
|
|
98
100
|
export type CustomTimePickerConfig = {
|
|
99
101
|
minuteStep: number;
|
|
100
|
-
/**
|
|
101
|
-
* Container element for the calendar when used inside a Popover
|
|
102
|
-
*/
|
|
103
|
-
container?: HTMLElement | null;
|
|
104
102
|
};
|
|
105
103
|
export {};
|
|
@@ -15,8 +15,10 @@ export declare const filterDropdownOptions: (dropdown: HTMLDivElement, query: st
|
|
|
15
15
|
* Positions the dropdown relative to the input field.
|
|
16
16
|
* @param dropdown - The dropdown element to position.
|
|
17
17
|
* @param inputElement - The input element to base the dropdown positioning on.
|
|
18
|
+
* @param wrapperElement - The wrapper element to base the dropdown positioning on. This will take precedence over the input element.
|
|
19
|
+
* @param dropdownPosition - The position of the dropdown. 'fixed' or 'absolute'.
|
|
18
20
|
*/
|
|
19
|
-
export declare const positionDropdownRelativeToInput: (dropdown: HTMLDivElement, inputElement: HTMLInputElement, wrapperElement?: HTMLElement) => void;
|
|
21
|
+
export declare const positionDropdownRelativeToInput: (dropdown: HTMLDivElement, inputElement: HTMLInputElement, wrapperElement?: HTMLElement, dropdownPosition?: "fixed" | "absolute") => void;
|
|
20
22
|
/**
|
|
21
23
|
* Formats a Date object into a time string (HH:MM AM/PM).
|
|
22
24
|
* @param date - The Date object to format.
|
|
@@ -100,6 +100,11 @@ export type PopoverProps = {
|
|
|
100
100
|
* Additional class for overlay container styling.
|
|
101
101
|
*/
|
|
102
102
|
overlayClassName?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Position of the Popover.
|
|
105
|
+
* @default 'absolute'
|
|
106
|
+
*/
|
|
107
|
+
contentPosition?: 'absolute' | 'fixed';
|
|
103
108
|
};
|
|
104
109
|
export type PopoverHandle = {
|
|
105
110
|
close: () => void;
|
package/dist/cjs/library.css
CHANGED
|
@@ -1461,7 +1461,6 @@ span.flatpickr-weekday {
|
|
|
1461
1461
|
.custom-time-wrapper {
|
|
1462
1462
|
display: flex;
|
|
1463
1463
|
flex-direction: column;
|
|
1464
|
-
position: relative;
|
|
1465
1464
|
width: 100%;
|
|
1466
1465
|
margin-top: var(--spacing-large);
|
|
1467
1466
|
gap: var(--spacing-large);
|
|
@@ -1487,6 +1486,7 @@ span.flatpickr-weekday {
|
|
|
1487
1486
|
align-items: center;
|
|
1488
1487
|
padding-left: var(--spacing-medium);
|
|
1489
1488
|
color: var(--text-primary);
|
|
1489
|
+
position: relative;
|
|
1490
1490
|
}
|
|
1491
1491
|
.custom-time-input-wrapper:focus-within {
|
|
1492
1492
|
outline: 1px solid var(--border-primary);
|
|
@@ -1503,6 +1503,31 @@ span.flatpickr-weekday {
|
|
|
1503
1503
|
color: var(--text-primary);
|
|
1504
1504
|
caret-color: var(--text-primary);
|
|
1505
1505
|
}
|
|
1506
|
+
.custom-time-only-input-wrapper {
|
|
1507
|
+
display: flex;
|
|
1508
|
+
width: 100%;
|
|
1509
|
+
height: auto;
|
|
1510
|
+
gap: var(--spacing-medium);
|
|
1511
|
+
border-radius: var(--corner-radius-extra-small);
|
|
1512
|
+
border: medium none currentcolor;
|
|
1513
|
+
border: initial;
|
|
1514
|
+
background: var(--interactive-surface-secondary-default);
|
|
1515
|
+
align-items: center;
|
|
1516
|
+
padding-left: var(--spacing-medium);
|
|
1517
|
+
color: var(--text-primary);
|
|
1518
|
+
}
|
|
1519
|
+
.custom-time-only-input-wrapper .custom-time-input {
|
|
1520
|
+
width: 100%;
|
|
1521
|
+
font-family: var(--font-family-body);
|
|
1522
|
+
font-size: var(--font-size-body-small);
|
|
1523
|
+
font-weight: 400;
|
|
1524
|
+
line-height: var(--line-height-body-small);
|
|
1525
|
+
text-align: left;
|
|
1526
|
+
padding: var(--spacing-medium);
|
|
1527
|
+
padding-left: 0px;
|
|
1528
|
+
color: var(--text-primary);
|
|
1529
|
+
caret-color: var(--text-primary);
|
|
1530
|
+
}
|
|
1506
1531
|
.time-dropdown {
|
|
1507
1532
|
display: flex;
|
|
1508
1533
|
flex-direction: column;
|
|
@@ -1519,7 +1544,7 @@ span.flatpickr-weekday {
|
|
|
1519
1544
|
overflow: auto;
|
|
1520
1545
|
padding: var(--spacing-medium);
|
|
1521
1546
|
border-radius: var(--corner-radius-extra-small);
|
|
1522
|
-
margin-top:
|
|
1547
|
+
margin-top: 2px;
|
|
1523
1548
|
}
|
|
1524
1549
|
.time-dropdown .dropdown-option {
|
|
1525
1550
|
align-items: center;
|