winduum 2.2.20 → 3.0.0-next.1
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/main.css +1 -1
- package/package.json +6 -4
- package/src/base/reset.css +4 -0
- package/src/common.js +9 -1
- package/src/components/details/default.css +14 -0
- package/src/components/details/index.css +1 -0
- package/src/components/dialog/content.css +9 -2
- package/src/components/dialog/default.css +16 -2
- package/src/components/dialog/index.js +5 -80
- package/src/components/dialog/readme.md +1 -5
- package/src/components/index.css +1 -0
- package/src/components/popover/content.css +5 -94
- package/src/components/popover/default.css +15 -2
- package/src/components/popover/index.css +1 -0
- package/src/components/popover/index.d.ts +14 -18
- package/src/components/popover/index.js +40 -80
- package/src/components/popover/props/content.css +1 -2
- package/src/components/popover/props/default.css +4 -0
- package/src/components/popover/readme.md +1 -2
- package/src/components/tooltip/default.css +8 -8
- package/src/theme/config/easing.css +9 -0
- package/src/theme/config/index.css +1 -0
- package/src/theme/config/transition.css +1 -4
- package/tailwindcss/theme/config/easing.css +5 -0
- package/tailwindcss/theme/config/index.css +1 -0
- package/tailwindcss/utilities/index.css +1 -0
- package/tailwindcss/utilities/position.css +179 -0
- package/types/index.d.ts +15 -46
- package/types/index.d.ts.map +3 -17
- package/src/components/details/index.d.ts +0 -9
- package/src/components/details/index.js +0 -78
- package/src/components/dialog/index.d.ts +0 -13
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
@utility bottom {
|
|
2
|
+
position-area: block-end center;
|
|
3
|
+
position-try-fallbacks: flip-block;
|
|
4
|
+
|
|
5
|
+
> * {
|
|
6
|
+
transform-origin: top;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
@container anchored(fallback: flip-block) {
|
|
10
|
+
> * {
|
|
11
|
+
transform-origin: bottom;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@utility bottom-start {
|
|
17
|
+
position-area: block-end span-inline-end;
|
|
18
|
+
position-try-fallbacks: flip-block;
|
|
19
|
+
|
|
20
|
+
> * {
|
|
21
|
+
transform-origin: top left;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@container anchored(fallback: flip-block) {
|
|
25
|
+
> * {
|
|
26
|
+
transform-origin: bottom left;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@utility bottom-end {
|
|
32
|
+
position-area: block-end span-inline-start;
|
|
33
|
+
position-try-fallbacks: flip-block;
|
|
34
|
+
|
|
35
|
+
> * {
|
|
36
|
+
transform-origin: top right;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@container anchored(fallback: flip-block) {
|
|
40
|
+
> * {
|
|
41
|
+
transform-origin: bottom right;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@utility top {
|
|
47
|
+
position-area: block-start center;
|
|
48
|
+
position-try-fallbacks: flip-block;
|
|
49
|
+
|
|
50
|
+
> * {
|
|
51
|
+
transform-origin: bottom;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@container anchored(fallback: flip-block) {
|
|
55
|
+
> * {
|
|
56
|
+
transform-origin: top;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@utility top-start {
|
|
62
|
+
position-area: block-start span-inline-end;
|
|
63
|
+
position-try-fallbacks: flip-block;
|
|
64
|
+
|
|
65
|
+
> * {
|
|
66
|
+
transform-origin: bottom left;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
@container anchored(fallback: flip-block) {
|
|
70
|
+
> * {
|
|
71
|
+
transform-origin: top left;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@utility top-end {
|
|
77
|
+
position-area: block-start span-inline-start;
|
|
78
|
+
position-try-fallbacks: flip-block;
|
|
79
|
+
|
|
80
|
+
> * {
|
|
81
|
+
transform-origin: bottom right;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@container anchored(fallback: flip-block) {
|
|
85
|
+
> * {
|
|
86
|
+
transform-origin: top right;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@utility left {
|
|
92
|
+
position-area: inline-start center;
|
|
93
|
+
position-try-fallbacks: flip-inline;
|
|
94
|
+
|
|
95
|
+
> * {
|
|
96
|
+
transform-origin: right;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@container anchored(fallback: flip-block) {
|
|
100
|
+
> * {
|
|
101
|
+
transform-origin: left;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@utility left-start {
|
|
107
|
+
position-area: inline-start span-block-end;
|
|
108
|
+
position-try-fallbacks: flip-inline;
|
|
109
|
+
|
|
110
|
+
> * {
|
|
111
|
+
transform-origin: right top;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
@container anchored(fallback: flip-block) {
|
|
115
|
+
> * {
|
|
116
|
+
transform-origin: left top;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@utility left-end {
|
|
122
|
+
position-area: inline-start span-block-start;
|
|
123
|
+
position-try-fallbacks: flip-inline;
|
|
124
|
+
|
|
125
|
+
> * {
|
|
126
|
+
transform-origin: right bottom;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@container anchored(fallback: flip-block) {
|
|
130
|
+
> * {
|
|
131
|
+
transform-origin: left bottom;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@utility right {
|
|
137
|
+
position-area: inline-end center;
|
|
138
|
+
position-try-fallbacks: flip-inline;
|
|
139
|
+
|
|
140
|
+
> * {
|
|
141
|
+
transform-origin: left;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@container anchored(fallback: flip-block) {
|
|
145
|
+
> * {
|
|
146
|
+
transform-origin: right;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@utility right-start {
|
|
152
|
+
position-area: inline-end span-block-end;
|
|
153
|
+
position-try-fallbacks: flip-inline;
|
|
154
|
+
|
|
155
|
+
> * {
|
|
156
|
+
transform-origin: left top;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
@container anchored(fallback: flip-block) {
|
|
160
|
+
> * {
|
|
161
|
+
transform-origin: right top;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
@utility right-end {
|
|
167
|
+
position-area: inline-end span-block-start;
|
|
168
|
+
position-try-fallbacks: flip-inline;
|
|
169
|
+
|
|
170
|
+
> * {
|
|
171
|
+
transform-origin: left bottom;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
@container anchored(fallback: flip-block) {
|
|
175
|
+
> * {
|
|
176
|
+
transform-origin: right bottom;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
package/types/index.d.ts
CHANGED
|
@@ -85,34 +85,7 @@ declare module 'winduum/src/components/compare' {
|
|
|
85
85
|
export {};
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
declare module 'winduum/src/components/details' {
|
|
89
|
-
export interface DefaultOptions {
|
|
90
|
-
selector?: string
|
|
91
|
-
summarySelector?: string
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
export const defaultOptions: DefaultOptions
|
|
95
|
-
export function showDetails(selector: HTMLInputElement | HTMLElement, options?: DefaultOptions): Promise<void>
|
|
96
|
-
export function closeDetails(selector: HTMLInputElement | HTMLElement, options?: DefaultOptions): Promise<void>
|
|
97
|
-
export function toggleDetails(selector: HTMLInputElement | HTMLElement, options?: DefaultOptions): Promise<void>
|
|
98
|
-
|
|
99
|
-
export {};
|
|
100
|
-
}
|
|
101
|
-
|
|
102
88
|
declare module 'winduum/src/components/dialog' {
|
|
103
|
-
export interface DefaultOptions {
|
|
104
|
-
remove?: boolean | null
|
|
105
|
-
closable?: boolean | null
|
|
106
|
-
modal?: boolean
|
|
107
|
-
openAttribute?: string
|
|
108
|
-
closedAttribute?: string
|
|
109
|
-
contentSelector?: string
|
|
110
|
-
scrollbarWidthProperty?: string | null
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
export const defaultOptions: DefaultOptions
|
|
114
|
-
export function showDialog(element: HTMLDialogElement | HTMLElement, options?: DefaultOptions): Promise<void>
|
|
115
|
-
export function closeDialog(element: HTMLDialogElement | HTMLElement, options?: DefaultOptions): Promise<void>
|
|
116
89
|
|
|
117
90
|
export {};
|
|
118
91
|
}
|
|
@@ -215,25 +188,21 @@ declare module 'winduum/src/components/toaster' {
|
|
|
215
188
|
}
|
|
216
189
|
|
|
217
190
|
declare module 'winduum/src/components/popover' {
|
|
218
|
-
import type {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
export function showPopover(element: HTMLElement | Element, options?: ShowPopoverOptions): Promise<void>
|
|
235
|
-
export function hidePopover(element: HTMLElement | Element): Promise<void>
|
|
236
|
-
export function togglePopover(element: HTMLElement | Element, options?: ShowPopoverOptions): Promise<void>
|
|
191
|
+
import type { ComputePositionConfig } from '@floating-ui/dom';
|
|
192
|
+
import type { Placement } from '@floating-ui/utils';
|
|
193
|
+
export function computePositionPopover(
|
|
194
|
+
referenceElement: HTMLElement,
|
|
195
|
+
floatingElement: HTMLElement & { $currentPlacement?: string },
|
|
196
|
+
placement: Placement,
|
|
197
|
+
options?: ComputePositionConfig | boolean
|
|
198
|
+
): Promise<void>
|
|
199
|
+
|
|
200
|
+
export function autoUpdatePopover(
|
|
201
|
+
referenceElement: HTMLElement,
|
|
202
|
+
floatingElement: HTMLElement,
|
|
203
|
+
placement: Placement,
|
|
204
|
+
options?: ComputePositionConfig | boolean
|
|
205
|
+
): Promise<() => void>
|
|
237
206
|
|
|
238
207
|
export {};
|
|
239
208
|
}
|
package/types/index.d.ts.map
CHANGED
|
@@ -23,13 +23,6 @@
|
|
|
23
23
|
"setPosition",
|
|
24
24
|
"setKeyboardStep",
|
|
25
25
|
"setMouseStep",
|
|
26
|
-
"DefaultOptions",
|
|
27
|
-
"defaultOptions",
|
|
28
|
-
"showDetails",
|
|
29
|
-
"closeDetails",
|
|
30
|
-
"toggleDetails",
|
|
31
|
-
"showDialog",
|
|
32
|
-
"closeDialog",
|
|
33
26
|
"ScrollDrawerOptions",
|
|
34
27
|
"showDrawer",
|
|
35
28
|
"closeDrawer",
|
|
@@ -48,11 +41,8 @@
|
|
|
48
41
|
"closeToast",
|
|
49
42
|
"showToast",
|
|
50
43
|
"closeToaster",
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"showPopover",
|
|
54
|
-
"hidePopover",
|
|
55
|
-
"togglePopover",
|
|
44
|
+
"computePositionPopover",
|
|
45
|
+
"autoUpdatePopover",
|
|
56
46
|
"SetTrackPropertyOptions",
|
|
57
47
|
"SetValueOptions",
|
|
58
48
|
"SetOutputOptions",
|
|
@@ -67,8 +57,6 @@
|
|
|
67
57
|
"../plugin/index.d.ts",
|
|
68
58
|
"../src/components/carousel/index.d.ts",
|
|
69
59
|
"../src/components/compare/index.d.ts",
|
|
70
|
-
"../src/components/details/index.d.ts",
|
|
71
|
-
"../src/components/dialog/index.d.ts",
|
|
72
60
|
"../src/components/drawer/index.d.ts",
|
|
73
61
|
"../src/components/form/index.d.ts",
|
|
74
62
|
"../src/components/tabs/index.d.ts",
|
|
@@ -91,10 +79,8 @@
|
|
|
91
79
|
null,
|
|
92
80
|
null,
|
|
93
81
|
null,
|
|
94
|
-
null,
|
|
95
|
-
null,
|
|
96
82
|
null
|
|
97
83
|
],
|
|
98
|
-
"mappings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AAUA;iBACVC,SAASA;;;;;;kBCdRF,iBAAiBA;;;;;iBAKlBG,YAAYA;;;;;;;;kBCFJC,sBAAsBA;;;;;;;kBAOtBC,iBAAiBA;;;;;;;;;;;kBCVxBC,uBAAuBA;;;;;;;kBAOvBC,eAAeA;;;;;kBAKfC,gBAAgBA;;;;;iBAKjBC,gBAAgBA;iBAChBC,QAAQA;iBACRC,cAAcA;;;;;;kBCnBbC,eAAeA;;;;;;iBAMhBC,UAAUA;;;;;;iBCNVC,UAAUA",
|
|
99
85
|
"ignoreList": []
|
|
100
86
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export interface DefaultOptions {
|
|
2
|
-
selector?: string
|
|
3
|
-
summarySelector?: string
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
export const defaultOptions: DefaultOptions
|
|
7
|
-
export function showDetails(selector: HTMLInputElement | HTMLElement, options?: DefaultOptions): Promise<void>
|
|
8
|
-
export function closeDetails(selector: HTMLInputElement | HTMLElement, options?: DefaultOptions): Promise<void>
|
|
9
|
-
export function toggleDetails(selector: HTMLInputElement | HTMLElement, options?: DefaultOptions): Promise<void>
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @type {import("./").DefaultOptions}
|
|
3
|
-
*/
|
|
4
|
-
export const defaultOptions = {
|
|
5
|
-
selector: 'details',
|
|
6
|
-
summarySelector: 'summary',
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @param {HTMLInputElement | HTMLElement} element
|
|
11
|
-
* @param {import("./").DefaultOptions} options
|
|
12
|
-
* @returns Promise<void>
|
|
13
|
-
*/
|
|
14
|
-
export const showDetails = async (element, options = {}) => {
|
|
15
|
-
options = {
|
|
16
|
-
...defaultOptions,
|
|
17
|
-
...options,
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const details = element.closest(options.selector)
|
|
21
|
-
const { down } = await import('slide-element')
|
|
22
|
-
const content = details.querySelector(options.summarySelector).nextElementSibling
|
|
23
|
-
|
|
24
|
-
details._isHiding = false
|
|
25
|
-
details.open = true
|
|
26
|
-
|
|
27
|
-
await down(content, {
|
|
28
|
-
display: '',
|
|
29
|
-
})
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* @param {HTMLInputElement | HTMLElement} element
|
|
34
|
-
* @param {import("./").DefaultOptions} options
|
|
35
|
-
* @returns Promise<void>
|
|
36
|
-
*/
|
|
37
|
-
export const closeDetails = async (element, options = {}) => {
|
|
38
|
-
options = {
|
|
39
|
-
...defaultOptions,
|
|
40
|
-
...options,
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const details = element.closest(options.selector)
|
|
44
|
-
const { up } = await import('slide-element')
|
|
45
|
-
const content = details.querySelector(options.summarySelector).nextElementSibling
|
|
46
|
-
|
|
47
|
-
details._isHiding = true
|
|
48
|
-
|
|
49
|
-
await up(content, {
|
|
50
|
-
display: '',
|
|
51
|
-
})
|
|
52
|
-
|
|
53
|
-
details._isHiding && (details.open = false)
|
|
54
|
-
details._isHiding = false
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* @param {HTMLInputElement | HTMLElement} element
|
|
59
|
-
* @param {import("./").DefaultOptions} options
|
|
60
|
-
* @returns Promise<void>
|
|
61
|
-
*/
|
|
62
|
-
export const toggleDetails = async (element, options = {}) => {
|
|
63
|
-
options = {
|
|
64
|
-
...defaultOptions,
|
|
65
|
-
...options,
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const details = element.closest(options.selector)
|
|
69
|
-
|
|
70
|
-
if (details._isHiding && !element.checked) return
|
|
71
|
-
|
|
72
|
-
if (element.checked ?? !details.open) {
|
|
73
|
-
await showDetails(element, options)
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
await closeDetails(element, options)
|
|
77
|
-
}
|
|
78
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface DefaultOptions {
|
|
2
|
-
remove?: boolean | null
|
|
3
|
-
closable?: boolean | null
|
|
4
|
-
modal?: boolean
|
|
5
|
-
openAttribute?: string
|
|
6
|
-
closedAttribute?: string
|
|
7
|
-
contentSelector?: string
|
|
8
|
-
scrollbarWidthProperty?: string | null
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export const defaultOptions: DefaultOptions
|
|
12
|
-
export function showDialog(element: HTMLDialogElement | HTMLElement, options?: DefaultOptions): Promise<void>
|
|
13
|
-
export function closeDialog(element: HTMLDialogElement | HTMLElement, options?: DefaultOptions): Promise<void>
|