@vialiq/web-components 0.20.0 → 0.21.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 +126 -0
- package/base/controllers/floating-controller.d.ts +2 -2
- package/base/controllers/floating-controller.d.ts.map +1 -1
- package/base/flatpickr-mixin.d.ts +38 -0
- package/base/flatpickr-mixin.d.ts.map +1 -0
- package/base/validity-mixin.d.ts +2 -0
- package/base/validity-mixin.d.ts.map +1 -1
- package/date-picker/i18n.d.ts +19 -0
- package/date-picker/i18n.d.ts.map +1 -0
- package/date-picker/index.d.ts +4 -0
- package/date-picker/index.d.ts.map +1 -0
- package/date-picker/index.js +2 -0
- package/date-picker/iso-week.d.ts +18 -0
- package/date-picker/iso-week.d.ts.map +1 -0
- package/date-picker/locale-registry.d.ts +8 -0
- package/date-picker/locale-registry.d.ts.map +1 -0
- package/date-picker/plugin-registry.d.ts +7 -0
- package/date-picker/plugin-registry.d.ts.map +1 -0
- package/date-picker/plugin-utils.d.ts +10 -0
- package/date-picker/plugin-utils.d.ts.map +1 -0
- package/date-picker/plugins/vi-month-year-plugin.d.ts +17 -0
- package/date-picker/plugins/vi-month-year-plugin.d.ts.map +1 -0
- package/date-picker/plugins/vi-range-plugin.d.ts +12 -0
- package/date-picker/plugins/vi-range-plugin.d.ts.map +1 -0
- package/date-picker/plugins/vi-shadow-dom-plugin.d.ts +18 -0
- package/date-picker/plugins/vi-shadow-dom-plugin.d.ts.map +1 -0
- package/date-picker/types.d.ts +34 -0
- package/date-picker/types.d.ts.map +1 -0
- package/date-picker/vi-date-picker-input.d.ts +34 -0
- package/date-picker/vi-date-picker-input.d.ts.map +1 -0
- package/date-picker/vi-date-picker-input.js +599 -0
- package/date-picker/vi-date-picker.d.ts +95 -0
- package/date-picker/vi-date-picker.d.ts.map +1 -0
- package/date-picker/vi-date-picker.js +2273 -0
- package/index.d.ts +5 -0
- package/index.js +4 -0
- package/{keyboard-controller-DqpJtUuK.js → keyboard-controller-D3htDhGR.js} +25 -23
- package/package.json +23 -4
package/index.d.ts
CHANGED
|
@@ -41,4 +41,9 @@ export type { SwitchSize, LabelPlacement } from './switch/vi-switch.js';
|
|
|
41
41
|
export { ViSelect } from './select/vi-select.js';
|
|
42
42
|
export { ViSelectOption } from './select/vi-select-option.js';
|
|
43
43
|
export { ViSelectGroup } from './select/vi-select-group.js';
|
|
44
|
+
export { ViCombobox } from './combobox/vi-combobox.js';
|
|
45
|
+
export { ViComboboxItem } from './combobox/vi-combobox-item.js';
|
|
46
|
+
export { ViDatePicker, VIALIQ_CHANGE } from './date-picker/vi-date-picker.js';
|
|
47
|
+
export { ViDatePickerInput } from './date-picker/vi-date-picker-input.js';
|
|
48
|
+
export type { DatePickerMode, DatePickerChangeDetail } from './date-picker/types.js';
|
|
44
49
|
//# sourceMappingURL=index.d.ts.map
|
package/index.js
CHANGED
|
@@ -23,3 +23,7 @@ export { ViSwitch } from './switch/vi-switch.js';
|
|
|
23
23
|
export { ViSelect } from './select/vi-select.js';
|
|
24
24
|
export { ViSelectOption } from './select/vi-select-option.js';
|
|
25
25
|
export { ViSelectGroup } from './select/vi-select-group.js';
|
|
26
|
+
export { ViCombobox } from './combobox/vi-combobox.js';
|
|
27
|
+
export { ViComboboxItem } from './combobox/vi-combobox-item.js';
|
|
28
|
+
export { VIALIQ_CHANGE, ViDatePicker } from './date-picker/vi-date-picker.js';
|
|
29
|
+
export { ViDatePickerInput } from './date-picker/vi-date-picker-input.js';
|
|
@@ -3,12 +3,12 @@ import { O as OverlayManager } from './overlay-manager-Ch_6fr_D.js';
|
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* FloatingController
|
|
6
|
-
*
|
|
6
|
+
*
|
|
7
7
|
* A Lit Reactive Controller that manages `@floating-ui/dom` positioning logic.
|
|
8
|
-
* It abstracts away the complex math and event listeners (autoUpdate) required to
|
|
8
|
+
* It abstracts away the complex math and event listeners (autoUpdate) required to
|
|
9
9
|
* keep a popup/dropdown anchored to a reference element during scrolling/resizing.
|
|
10
|
-
*
|
|
11
|
-
* It also automatically registers the floating element with the `OverlayManager`
|
|
10
|
+
*
|
|
11
|
+
* It also automatically registers the floating element with the `OverlayManager`
|
|
12
12
|
* to ensure correct z-index stacking when `hoist` is true.
|
|
13
13
|
*/ class FloatingController {
|
|
14
14
|
host;
|
|
@@ -26,7 +26,7 @@ import { O as OverlayManager } from './overlay-manager-Ch_6fr_D.js';
|
|
|
26
26
|
/**
|
|
27
27
|
* Starts the floating UI `autoUpdate` listener cycle.
|
|
28
28
|
* This should be called when the popover physically opens (e.g., in `updated()`).
|
|
29
|
-
*
|
|
29
|
+
*
|
|
30
30
|
* If `hoist` is true, it also acquires a high z-index from the `OverlayManager`.
|
|
31
31
|
*/ start() {
|
|
32
32
|
const ref = this.options.reference();
|
|
@@ -48,7 +48,7 @@ import { O as OverlayManager } from './overlay-manager-Ch_6fr_D.js';
|
|
|
48
48
|
/**
|
|
49
49
|
* Stops the floating UI `autoUpdate` listener cycle.
|
|
50
50
|
* This should be called when the popover closes, or when the host component disconnects.
|
|
51
|
-
*
|
|
51
|
+
*
|
|
52
52
|
* It also releases its z-index back to the `OverlayManager`.
|
|
53
53
|
*/ stop() {
|
|
54
54
|
if (this._cleanup) {
|
|
@@ -65,9 +65,9 @@ import { O as OverlayManager } from './overlay-manager-Ch_6fr_D.js';
|
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
67
|
* Imperatively calculates and applies the new coordinates (`x`, `y`) using Floating UI.
|
|
68
|
-
*
|
|
69
|
-
* This method applies various CSS property resets (`margin`, `bottom`, `right`, `minWidth`)
|
|
70
|
-
* to ensure that the base CSS of the floating element does not distort the absolute coordinates
|
|
68
|
+
*
|
|
69
|
+
* This method applies various CSS property resets (`margin`, `bottom`, `right`, `minWidth`)
|
|
70
|
+
* to ensure that the base CSS of the floating element does not distort the absolute coordinates
|
|
71
71
|
* provided by Floating UI.
|
|
72
72
|
*/ async updatePosition() {
|
|
73
73
|
const ref = this.options.reference();
|
|
@@ -96,21 +96,23 @@ import { O as OverlayManager } from './overlay-manager-Ch_6fr_D.js';
|
|
|
96
96
|
})
|
|
97
97
|
];
|
|
98
98
|
const matchWidthVal = typeof this.options.matchWidth === 'function' ? this.options.matchWidth() : this.options.matchWidth;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
99
|
+
if (matchWidthVal !== 'none') {
|
|
100
|
+
middlewares.push(size({
|
|
101
|
+
apply: ({ rects })=>{
|
|
102
|
+
if (matchWidthVal !== false) {
|
|
103
|
+
Object.assign(floating.style, {
|
|
104
|
+
width: `${rects.reference.width}px`,
|
|
105
|
+
minWidth: 'auto'
|
|
106
|
+
});
|
|
107
|
+
} else {
|
|
108
|
+
Object.assign(floating.style, {
|
|
109
|
+
width: 'auto',
|
|
110
|
+
minWidth: `${rects.reference.width}px`
|
|
111
|
+
});
|
|
112
|
+
}
|
|
111
113
|
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
+
}));
|
|
115
|
+
}
|
|
114
116
|
const { x, y, placement } = await computePosition(ref, floating, {
|
|
115
117
|
placement: placementStr,
|
|
116
118
|
strategy: hoist ? 'fixed' : 'absolute',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vialiq/web-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -99,12 +99,25 @@
|
|
|
99
99
|
"./accordion/vi-accordion-item": {
|
|
100
100
|
"types": "./accordion/vi-accordion-item.d.ts",
|
|
101
101
|
"default": "./accordion/vi-accordion-item.js"
|
|
102
|
+
},
|
|
103
|
+
"./date-picker": {
|
|
104
|
+
"types": "./date-picker/index.d.ts",
|
|
105
|
+
"default": "./date-picker/index.js"
|
|
106
|
+
},
|
|
107
|
+
"./date-picker/vi-date-picker": {
|
|
108
|
+
"types": "./date-picker/vi-date-picker.d.ts",
|
|
109
|
+
"default": "./date-picker/vi-date-picker.js"
|
|
110
|
+
},
|
|
111
|
+
"./date-picker/vi-date-picker-input": {
|
|
112
|
+
"types": "./date-picker/vi-date-picker-input.d.ts",
|
|
113
|
+
"default": "./date-picker/vi-date-picker-input.js"
|
|
102
114
|
}
|
|
103
115
|
},
|
|
104
116
|
"peerDependencies": {
|
|
105
117
|
"@floating-ui/dom": ">=1.0.0",
|
|
106
|
-
"@vialiq/flux-ui": "^0.
|
|
107
|
-
"@vialiq/icons": "
|
|
118
|
+
"@vialiq/flux-ui": "^0.17.0",
|
|
119
|
+
"@vialiq/icons": "^0.4.0",
|
|
120
|
+
"flatpickr": ">=4.6.0",
|
|
108
121
|
"lit": "^3.0.0"
|
|
109
122
|
},
|
|
110
123
|
"keywords": [
|
|
@@ -126,6 +139,12 @@
|
|
|
126
139
|
"checkbox/",
|
|
127
140
|
"tooltip/",
|
|
128
141
|
"badge/",
|
|
142
|
+
"date-picker/",
|
|
129
143
|
"README.md"
|
|
130
|
-
]
|
|
144
|
+
],
|
|
145
|
+
"peerDependenciesMeta": {
|
|
146
|
+
"flatpickr": {
|
|
147
|
+
"optional": false
|
|
148
|
+
}
|
|
149
|
+
}
|
|
131
150
|
}
|