dap-design-system 0.54.8 → 0.55.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/dist/components/datepicker/datepicker.component.d.ts +7 -74
- package/dist/{components-B4VmOYHn.js → components-CSqPA5oW.js} +478 -443
- package/dist/components-CSqPA5oW.js.map +1 -0
- package/dist/components.js +1 -1
- package/dist/dds.js +1 -1
- package/dist/manifest/types/vue/index.d.ts +187 -257
- package/dist/manifest/vscode.html-custom-data.json +218 -213
- package/dist/manifest/web-types.json +295 -432
- package/dist/react/dap-ds-datepicker/index.d.ts +1 -92
- package/dist/react/index.d.ts +7 -7
- package/dist/react-types.ts +10 -10
- package/dist/react.js +252 -260
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
- package/dist/components-B4VmOYHn.js.map +0 -1
|
@@ -2,80 +2,6 @@ import { Dayjs } from 'dayjs';
|
|
|
2
2
|
import { PropertyValueMap } from 'lit';
|
|
3
3
|
import { FloatingStrategy, PopupPlacement } from '../../common/types';
|
|
4
4
|
import { GenericFormElement } from '../../internal/mixin/genericFormElement';
|
|
5
|
-
/**
|
|
6
|
-
* `dap-ds-datepicker`
|
|
7
|
-
* @summary A datepicker is a graphical user interface widget that allows the user to select a date from a calendar and/or time from a time range.
|
|
8
|
-
* @element dap-ds-datepicker
|
|
9
|
-
* @title - Datepicker
|
|
10
|
-
*
|
|
11
|
-
* @property {Dayjs} value - The value of the datepicker.
|
|
12
|
-
* @property {string} label - The label of the datepicker.
|
|
13
|
-
* @property {string} description - The description of the datepicker.
|
|
14
|
-
* @property {'xs' | 'sm' | 'sm'} size - The size of the datepicker.
|
|
15
|
-
* @property {boolean} disabled - The disabled state of the datepicker.
|
|
16
|
-
* @property {boolean} required - The required state of the datepicker.
|
|
17
|
-
* @property {boolean} readonly - The readonly state of the datepicker.
|
|
18
|
-
* @property {boolean} autofocus - The autofocus state of the datepicker.
|
|
19
|
-
* @property {string} tooltip - The tooltip of the datepicker.
|
|
20
|
-
* @property {'top' | 'right' | 'bottom' | 'left'} tooltipPlacement - The tooltip placement of the datepicker.
|
|
21
|
-
* @property {string} feedback - The feedback of the datepicker.
|
|
22
|
-
* @property {'negative' | 'positive' | 'warning'} feedbackType - The feedback type of the datepicker.
|
|
23
|
-
* @property {boolean} optional - The optional state of the datepicker.
|
|
24
|
-
* @property {string} optionalLabel - The optional label of the datepicker.
|
|
25
|
-
* @property {boolean} subtle - The weight of the label. Default is `false`
|
|
26
|
-
* @property {string} autocomplete - The autocomplete of the datepicker.
|
|
27
|
-
* @property {boolean} autofocus - The autofocus of the datepicker.
|
|
28
|
-
*
|
|
29
|
-
* @event {{ value: string }} dds-change - Fired when the datepicker value changes.
|
|
30
|
-
* @event {{ value: string }} dds-input - Fired when the datepicker input value changes.
|
|
31
|
-
* @event {{ value: string }} dds-valid-date - Fired when the datepicker input value is valid. Happens on manual input typing.
|
|
32
|
-
* @event {{ value: string, type: 'invalid' | 'out-of-range' }} dds-invalid-date - Fired when the datepicker input value is invalid. Happens on manual input typing.
|
|
33
|
-
* @event {{ void }} dds-clear - Fired when the datepicker is cleared.
|
|
34
|
-
* @event {{ void }} dds-focus - Emitted when the datepicker gains focus.
|
|
35
|
-
* @event {{ void }} dds-blur - Emitted when the datepicker loses focus.
|
|
36
|
-
*
|
|
37
|
-
* @csspart base - The main datepicker container.
|
|
38
|
-
* @csspart calendar - The calendar of the datepicker.
|
|
39
|
-
* @csspart trigger - The trigger button of the datepicker.
|
|
40
|
-
* @csspart label - The label of the datepicker.
|
|
41
|
-
* @csspart description - The description of the datepicker.
|
|
42
|
-
* @csspart feedback - The feedback of the datepicker.
|
|
43
|
-
* @csspart tooltip - The tooltip of the datepicker.
|
|
44
|
-
* @csspart input - The input of the datepicker.
|
|
45
|
-
* @csspart clear-button - The clear button of the datepicker.
|
|
46
|
-
* @csspart calendar-grid-cell-base - The base of the calendar grid cell.
|
|
47
|
-
* @csspart calendar-grid-cell - The cell of the calendar grid.
|
|
48
|
-
* @csspart calendar-grid-header-cell-base - The base of the calendar grid header cell.
|
|
49
|
-
* @csspart calendar-grid-header-cell - The header cell of the calendar grid.
|
|
50
|
-
* @csspart calendar-grid-cell-today-mark - The today mark of the calendar grid cell.
|
|
51
|
-
*
|
|
52
|
-
* @cssproperty --dds-combobox-background - The background color of the combobox. (default: var(--dds-fields-background-default))
|
|
53
|
-
* @cssproperty --dds-combobox-border-color - The border color of the combobox. (default: var(--dds-border-neutral-base))
|
|
54
|
-
* @cssproperty --dds-combobox-border-width - The border width of the combobox. (default: var(--dds-border-width-base, 1px))
|
|
55
|
-
* @cssproperty --dds-combobox-border-radius - The border radius of the combobox. (default: var(--dds-radius-base))
|
|
56
|
-
* @cssproperty --dds-combobox-text-color - The text color of the combobox. (default: var(--dds-text-neutral-base))
|
|
57
|
-
* @cssproperty --dds-combobox-placeholder-color - The placeholder text color. (default: var(--dds-text-neutral-subtle))
|
|
58
|
-
* @cssproperty --dds-combobox-disabled-background - The background color when disabled. (default: var(--dds-background-neutral-stronger))
|
|
59
|
-
* @cssproperty --dds-combobox-disabled-text - The text color when disabled. (default: var(--dds-text-neutral-disabled))
|
|
60
|
-
* @cssproperty --dds-combobox-error-border - The border color for error state. (default: var(--dds-border-negative-base))
|
|
61
|
-
* @cssproperty --dds-combobox-success-border - The border color for success state. (default: var(--dds-border-positive-base))
|
|
62
|
-
* @cssproperty --dds-combobox-icon-color - The color of the icons. (default: var(--dds-text-icon-neutral-subtle))
|
|
63
|
-
* @cssproperty --dds-combobox-clear-icon-color - The color of the clear icon. (default: var(--dds-button-subtle-icon-neutral-enabled))
|
|
64
|
-
* @cssproperty --dds-combobox-popup-background - The background color of the popup. (default: var(--dds-background-neutral-subtle))
|
|
65
|
-
* @cssproperty --dds-combobox-popup-shadow - The box shadow of the popup. (default: 0 4px 6px -1px rgb(0 0 0 / 8%), 0 2px 4px -1px rgb(0 0 0 / 6%))
|
|
66
|
-
* @cssproperty --dds-combobox-padding-xs - The padding for extra small size. (default: var(--dds-spacing-200))
|
|
67
|
-
* @cssproperty --dds-combobox-padding-sm - The padding for small size. (default: var(--dds-spacing-200))
|
|
68
|
-
* @cssproperty --dds-combobox-padding-lg - The padding for large size. (default: var(--dds-spacing-300))
|
|
69
|
-
* @cssproperty --dds-combobox-padding-horizontal - The horizontal padding. (default: var(--dds-spacing-300))
|
|
70
|
-
* @cssproperty --dds-combobox-padding-vertical - The vertical padding. (default: var(--dds-spacing-200))
|
|
71
|
-
* @cssproperty --dds-combobox-gap - The gap between elements. (default: var(--dds-spacing-100))
|
|
72
|
-
* @cssproperty --dds-combobox-icon-gap - The gap between icons. (default: var(--dds-spacing-200))
|
|
73
|
-
* @cssproperty --dds-combobox-action-gap - The gap between action elements. (default: var(--dds-spacing-200))
|
|
74
|
-
* @cssproperty --dds-combobox-action-padding - The padding for action elements. (default: var(--dds-spacing-300))
|
|
75
|
-
* @cssproperty --dds-combobox-clear-icon-width - The width of the clear icon. (default: var(--dds-spacing-800))
|
|
76
|
-
* @cssproperty --dds-combobox-dropdown-icon-right - The right position of the dropdown icon. (default: var(--dds-spacing-600))
|
|
77
|
-
* @cssproperty --dds-combobox-min-width - The minimum width of the combobox. (default: 7.5rem)
|
|
78
|
-
*/
|
|
79
5
|
export default class DapDSDatePicker extends GenericFormElement {
|
|
80
6
|
private static nextId;
|
|
81
7
|
/**
|
|
@@ -144,6 +70,8 @@ export default class DapDSDatePicker extends GenericFormElement {
|
|
|
144
70
|
placeholder: string | null;
|
|
145
71
|
/** The loading state of the datepicker. */
|
|
146
72
|
loading?: boolean;
|
|
73
|
+
/** Whether to enable input masking. When active, only digit characters are accepted and format separators are auto-inserted after each complete digit group. Only works in single mode with a single configured format. */
|
|
74
|
+
mask: boolean;
|
|
147
75
|
/** The format of the datepicker. This is a comma separated list of [formats](https://day.js.org/docs/en/display/format). */
|
|
148
76
|
format?: string;
|
|
149
77
|
/** The format separator character in the format attribute. */
|
|
@@ -166,6 +94,7 @@ export default class DapDSDatePicker extends GenericFormElement {
|
|
|
166
94
|
hideAdjacentMonths?: boolean;
|
|
167
95
|
private formatOptions;
|
|
168
96
|
private setValueState;
|
|
97
|
+
private lastMaskDigitCount;
|
|
169
98
|
static readonly styles: import('lit').CSSResult;
|
|
170
99
|
constructor();
|
|
171
100
|
/**
|
|
@@ -181,6 +110,10 @@ export default class DapDSDatePicker extends GenericFormElement {
|
|
|
181
110
|
isInputValid(): boolean;
|
|
182
111
|
setValue(value?: Dayjs, setInputValue?: boolean, sendEmptyEventOnInput?: boolean): void;
|
|
183
112
|
clearSelection(): Promise<void>;
|
|
113
|
+
private isMaskActive;
|
|
114
|
+
private getActiveMaskFormat;
|
|
115
|
+
private parseMaskTokens;
|
|
116
|
+
private buildMaskedValue;
|
|
184
117
|
private readonly handleDocumentMouseDown;
|
|
185
118
|
private readonly handlePopupAutoClose;
|
|
186
119
|
private readonly handleInput;
|