winduum 2.2.28 → 3.0.0-next.10

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.
Files changed (69) hide show
  1. package/package.json +19 -12
  2. package/src/base/defaults.css +3 -0
  3. package/src/base/reset.css +4 -0
  4. package/src/common.d.ts +4 -0
  5. package/src/common.js +9 -1
  6. package/src/components/carousel/content.css +1 -0
  7. package/src/components/carousel/index.d.ts +14 -35
  8. package/src/components/carousel/index.js +75 -194
  9. package/src/components/check/props/default.css +1 -1
  10. package/src/components/control/props/select-picker.css +4 -4
  11. package/src/components/control/props/select.css +2 -2
  12. package/src/components/control/tel-country-code.css +24 -0
  13. package/src/components/details/default.css +14 -0
  14. package/src/components/details/index.css +1 -0
  15. package/src/components/details/index.d.ts +2 -6
  16. package/src/components/details/index.js +7 -72
  17. package/src/components/details/readme.md +2 -5
  18. package/src/components/dialog/content.css +8 -2
  19. package/src/components/dialog/default.css +16 -2
  20. package/src/components/dialog/drawer.css +20 -0
  21. package/src/components/dialog/index.css +1 -0
  22. package/src/components/dialog/index.js +8 -79
  23. package/src/components/dialog/readme.md +1 -5
  24. package/src/components/drawer/content.css +2 -1
  25. package/src/components/drawer/default.css +13 -31
  26. package/src/components/drawer/index.css +3 -0
  27. package/src/components/drawer/index.d.ts +8 -15
  28. package/src/components/drawer/index.js +67 -50
  29. package/src/components/drawer/keyframes/default.css +9 -0
  30. package/src/components/drawer/noscript.css +32 -0
  31. package/src/components/drawer/nosnap.css +32 -0
  32. package/src/components/drawer/props/content.css +2 -2
  33. package/src/components/drawer/props/default.css +6 -0
  34. package/src/components/drawer/scroller.css +32 -0
  35. package/src/components/form/index.d.ts +5 -12
  36. package/src/components/form/index.js +35 -70
  37. package/src/components/heading/lg.css +1 -1
  38. package/src/components/heading/props/default.css +1 -1
  39. package/src/components/heading/sm.css +1 -1
  40. package/src/components/index.css +1 -0
  41. package/src/components/label/props/default.css +3 -2
  42. package/src/components/popover/content.css +7 -94
  43. package/src/components/popover/default.css +16 -3
  44. package/src/components/popover/index.css +2 -0
  45. package/src/components/popover/index.d.ts +14 -18
  46. package/src/components/popover/index.js +40 -80
  47. package/src/components/popover/props/content.css +1 -2
  48. package/src/components/popover/props/default.css +4 -0
  49. package/src/components/popover/readme.md +1 -2
  50. package/src/components/popover/tooltip.css +11 -0
  51. package/src/components/tabs/index.d.ts +2 -2
  52. package/src/components/text/content.css +241 -0
  53. package/src/components/text/default.css +0 -238
  54. package/src/components/text/index.css +2 -0
  55. package/src/components/text/props/content.css +9 -0
  56. package/src/components/text/props/default.css +1 -7
  57. package/src/components/toast/default.css +6 -0
  58. package/src/components/toast/index.js +2 -1
  59. package/src/components/toaster/index.d.ts +1 -0
  60. package/src/components/toaster/index.js +18 -0
  61. package/src/components/tooltip/default.css +8 -8
  62. package/src/polyfill.js +13 -0
  63. package/src/supports.js +15 -0
  64. package/src/utilities/container/props/default.css +3 -3
  65. package/tailwindcss/utilities/animation-trigger-fallback.css +18 -0
  66. package/tailwindcss/utilities/index.css +1 -0
  67. package/tailwindcss/utilities/position.css +203 -0
  68. package/types/index.d.ts +20 -58
  69. package/src/components/dialog/index.d.ts +0 -13
@@ -8,6 +8,7 @@
8
8
  @import "./grid-area.css";
9
9
  @import "./grid-cols-container.css";
10
10
  @import "./link.css";
11
+ @import "./position.css";
11
12
  @import "./ripple.css";
12
13
  @import "./skeleton.css";
13
14
  @import "./spinner.css";
@@ -0,0 +1,203 @@
1
+ @utility bottom {
2
+ position-area: block-end center;
3
+ position-try-fallbacks: flip-block;
4
+
5
+ > * {
6
+ transform-origin: top;
7
+ }
8
+
9
+ /*
10
+ @container anchored(fallback: flip-block) {
11
+ > * {
12
+ transform-origin: bottom;
13
+ }
14
+ }
15
+ */
16
+ }
17
+
18
+ @utility bottom-start {
19
+ position-area: block-end span-inline-end;
20
+ position-try-fallbacks: flip-block;
21
+
22
+ > * {
23
+ transform-origin: top left;
24
+ }
25
+
26
+ /*
27
+ @container anchored(fallback: flip-block) {
28
+ > * {
29
+ transform-origin: bottom left;
30
+ }
31
+ }
32
+ */
33
+ }
34
+
35
+ @utility bottom-end {
36
+ position-area: block-end span-inline-start;
37
+ position-try-fallbacks: flip-block;
38
+
39
+ > * {
40
+ transform-origin: top right;
41
+ }
42
+
43
+ /*
44
+ @container anchored(fallback: flip-block) {
45
+ > * {
46
+ transform-origin: bottom right;
47
+ }
48
+ }
49
+ */
50
+ }
51
+
52
+ @utility top {
53
+ position-area: block-start center;
54
+ position-try-fallbacks: flip-block;
55
+
56
+ > * {
57
+ transform-origin: bottom;
58
+ }
59
+
60
+ /*
61
+ @container anchored(fallback: flip-block) {
62
+ > * {
63
+ transform-origin: top;
64
+ }
65
+ }
66
+ */
67
+ }
68
+
69
+ @utility top-start {
70
+ position-area: block-start span-inline-end;
71
+ position-try-fallbacks: flip-block;
72
+
73
+ > * {
74
+ transform-origin: bottom left;
75
+ }
76
+
77
+ /*
78
+ @container anchored(fallback: flip-block) {
79
+ > * {
80
+ transform-origin: top left;
81
+ }
82
+ }
83
+ */
84
+ }
85
+
86
+ @utility top-end {
87
+ position-area: block-start span-inline-start;
88
+ position-try-fallbacks: flip-block;
89
+
90
+ > * {
91
+ transform-origin: bottom right;
92
+ }
93
+
94
+ /*
95
+ @container anchored(fallback: flip-block) {
96
+ > * {
97
+ transform-origin: top right;
98
+ }
99
+ }
100
+ */
101
+ }
102
+
103
+ @utility left {
104
+ position-area: inline-start center;
105
+ position-try-fallbacks: flip-inline;
106
+
107
+ > * {
108
+ transform-origin: right;
109
+ }
110
+
111
+ /*
112
+ @container anchored(fallback: flip-block) {
113
+ > * {
114
+ transform-origin: left;
115
+ }
116
+ }
117
+ */
118
+ }
119
+
120
+ @utility left-start {
121
+ position-area: inline-start span-block-end;
122
+ position-try-fallbacks: flip-inline;
123
+
124
+ > * {
125
+ transform-origin: right top;
126
+ }
127
+
128
+ /*
129
+ @container anchored(fallback: flip-block) {
130
+ > * {
131
+ transform-origin: left top;
132
+ }
133
+ }
134
+ */
135
+ }
136
+
137
+ @utility left-end {
138
+ position-area: inline-start span-block-start;
139
+ position-try-fallbacks: flip-inline;
140
+
141
+ > * {
142
+ transform-origin: right bottom;
143
+ }
144
+
145
+ /*
146
+ @container anchored(fallback: flip-block) {
147
+ > * {
148
+ transform-origin: left bottom;
149
+ }
150
+ }
151
+ */
152
+ }
153
+
154
+ @utility right {
155
+ position-area: inline-end center;
156
+ position-try-fallbacks: flip-inline;
157
+
158
+ > * {
159
+ transform-origin: left;
160
+ }
161
+
162
+ /*
163
+ @container anchored(fallback: flip-block) {
164
+ > * {
165
+ transform-origin: right;
166
+ }
167
+ }
168
+ */
169
+ }
170
+
171
+ @utility right-start {
172
+ position-area: inline-end span-block-end;
173
+ position-try-fallbacks: flip-inline;
174
+
175
+ > * {
176
+ transform-origin: left top;
177
+ }
178
+
179
+ /*
180
+ @container anchored(fallback: flip-block) {
181
+ > * {
182
+ transform-origin: right top;
183
+ }
184
+ }
185
+ */
186
+ }
187
+
188
+ @utility right-end {
189
+ position-area: inline-end span-block-start;
190
+ position-try-fallbacks: flip-inline;
191
+
192
+ > * {
193
+ transform-origin: left bottom;
194
+ }
195
+
196
+ /*
197
+ @container anchored(fallback: flip-block) {
198
+ > * {
199
+ transform-origin: right bottom;
200
+ }
201
+ }
202
+ */
203
+ }
package/types/index.d.ts CHANGED
@@ -93,34 +93,7 @@ declare module 'winduum/src/components/compare' {
93
93
  export {};
94
94
  }
95
95
 
96
- declare module 'winduum/src/components/details' {
97
- export interface DefaultOptions {
98
- selector?: string
99
- summarySelector?: string
100
- }
101
-
102
- export const defaultOptions: DefaultOptions
103
- export function showDetails(selector: HTMLInputElement | HTMLElement, options?: DefaultOptions): Promise<void>
104
- export function closeDetails(selector: HTMLInputElement | HTMLElement, options?: DefaultOptions): Promise<void>
105
- export function toggleDetails(selector: HTMLInputElement | HTMLElement, options?: DefaultOptions): Promise<void>
106
-
107
- export {};
108
- }
109
-
110
96
  declare module 'winduum/src/components/dialog' {
111
- export interface DefaultOptions {
112
- remove?: boolean | null
113
- closable?: boolean | null
114
- modal?: boolean
115
- openAttribute?: string
116
- closedAttribute?: string
117
- contentSelector?: string
118
- scrollbarWidthProperty?: string | null
119
- }
120
-
121
- export const defaultOptions: DefaultOptions
122
- export function showDialog(element: HTMLDialogElement | HTMLElement, options?: DefaultOptions): Promise<void>
123
- export function closeDialog(element: HTMLDialogElement | HTMLElement, options?: DefaultOptions): Promise<void>
124
97
 
125
98
  export {};
126
99
  }
@@ -148,7 +121,7 @@ declare module 'winduum/src/components/drawer' {
148
121
 
149
122
  declare module 'winduum/src/components/form' {
150
123
  export interface ValidateFormOptions {
151
- validateSelectors?: string
124
+ validateSelector?: string
152
125
  validateOptions?: ValidateFieldOptions
153
126
  validateField?: typeof validateField
154
127
  scrollOptions?: ScrollIntoViewOptions
@@ -156,26 +129,19 @@ declare module 'winduum/src/components/form' {
156
129
  }
157
130
 
158
131
  export interface ValidateFieldOptions {
159
- validate?: boolean
160
132
  validationMessage?: string
161
133
  selector?: string
162
- ignoreMatch?: RegExp
163
134
  validitySelector?: string
164
- infoParentSelector?: string
165
- infoSelector?: string
166
135
  infoContent?: string
167
- endParentSelector?: string
168
- endSelector?: string
169
- endContent?: string
170
- validAttribute?: string
136
+ iconParentSelector?: string
137
+ iconSelector?: string
138
+ iconContent?: string
171
139
  validIcon?: string | null
172
- invalidAttribute?: string
173
140
  invalidIcon?: string
174
- activeAttribute?: string
175
141
  }
176
142
 
177
143
  export function validateForm(event: Event | SubmitEvent, options?: ValidateFormOptions): void
178
- export function validateField(element: HTMLElement | SubmitEvent, options?: ValidateFieldOptions): void
144
+ export function validateField(element: HTMLElement, options?: ValidateFieldOptions): void
179
145
 
180
146
  export {};
181
147
  }
@@ -223,25 +189,21 @@ declare module 'winduum/src/components/toaster' {
223
189
  }
224
190
 
225
191
  declare module 'winduum/src/components/popover' {
226
- import type { FlipOptions, Middleware, OffsetOptions, Placement, ShiftOptions } from '@floating-ui/dom';
227
- export interface ShowPopoverOptions {
228
- anchorSelector: string,
229
- openAttribute?: string
230
- compute?: boolean
231
- placement?: Placement
232
- middleware?: Array<Middleware | null | undefined | false>
233
- offset?: OffsetOptions
234
- flip?: FlipOptions
235
- shift?: ShiftOptions
236
- }
237
-
238
- export interface HidePopoverOptions {
239
- openAttribute?: string
240
- }
241
-
242
- export function showPopover(element: HTMLElement | Element, options?: ShowPopoverOptions): Promise<void>
243
- export function hidePopover(element: HTMLElement | Element): Promise<void>
244
- export function togglePopover(element: HTMLElement | Element, options?: ShowPopoverOptions): Promise<void>
192
+ import type { ComputePositionConfig } from '@floating-ui/dom';
193
+ import type { Placement } from '@floating-ui/utils';
194
+ export function computePositionPopover(
195
+ referenceElement: HTMLElement,
196
+ floatingElement: HTMLElement & { $currentPlacement?: string },
197
+ placement: Placement,
198
+ options?: ComputePositionConfig | boolean
199
+ ): Promise<void>
200
+
201
+ export function autoUpdatePopover(
202
+ referenceElement: HTMLElement,
203
+ floatingElement: HTMLElement,
204
+ placement: Placement,
205
+ options?: ComputePositionConfig | boolean
206
+ ): Promise<() => void>
245
207
 
246
208
  export {};
247
209
  }
@@ -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>