@m3-baseui/react-tailwind 1.3.0 → 2.0.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/{badge.js → components/badge/index.js} +4 -4
- package/dist/components/badge/index.js.map +1 -0
- package/dist/{bottom-app-bar.d.ts → components/bottom-app-bar/index.d.ts} +22 -21
- package/dist/{bottom-app-bar.js → components/bottom-app-bar/index.js} +4 -4
- package/dist/components/bottom-app-bar/index.js.map +1 -0
- package/dist/{bottom-sheet.d.ts → components/bottom-sheet/index.d.ts} +37 -36
- package/dist/{bottom-sheet.js → components/bottom-sheet/index.js} +4 -4
- package/dist/components/bottom-sheet/index.js.map +1 -0
- package/dist/{button.js → components/button/index.js} +3 -3
- package/dist/components/button/index.js.map +1 -0
- package/dist/{button-group.js → components/button-group/index.js} +4 -4
- package/dist/components/button-group/index.js.map +1 -0
- package/dist/{card.js → components/card/index.js} +4 -4
- package/dist/components/card/index.js.map +1 -0
- package/dist/{carousel.js → components/carousel/index.js} +4 -4
- package/dist/components/carousel/index.js.map +1 -0
- package/dist/{checkbox.d.ts → components/checkbox/index.d.ts} +22 -21
- package/dist/{checkbox.js → components/checkbox/index.js} +3 -3
- package/dist/components/checkbox/index.js.map +1 -0
- package/dist/{chip.js → components/chip/index.js} +3 -3
- package/dist/components/chip/index.js.map +1 -0
- package/dist/components/date-picker/index.d.ts +189 -0
- package/dist/{date-picker.js → components/date-picker/index.js} +4 -4
- package/dist/components/date-picker/index.js.map +1 -0
- package/dist/components/dialog/index.d.ts +116 -0
- package/dist/components/dialog/index.js +103 -0
- package/dist/components/dialog/index.js.map +1 -0
- package/dist/{divider.js → components/divider/index.js} +3 -3
- package/dist/components/divider/index.js.map +1 -0
- package/dist/{fab.d.ts → components/fab/index.d.ts} +29 -15
- package/dist/components/fab/index.js +79 -0
- package/dist/components/fab/index.js.map +1 -0
- package/dist/{fab-menu.d.ts → components/fab-menu/index.d.ts} +0 -21
- package/dist/{fab-menu.js → components/fab-menu/index.js} +49 -18
- package/dist/components/fab-menu/index.js.map +1 -0
- package/dist/{icon-button.js → components/icon-button/index.js} +3 -3
- package/dist/components/icon-button/index.js.map +1 -0
- package/dist/components/item/index.d.ts +95 -0
- package/dist/{item.js → components/item/index.js} +12 -6
- package/dist/components/item/index.js.map +1 -0
- package/dist/{list.d.ts → components/list/index.d.ts} +4 -4
- package/dist/{list.js → components/list/index.js} +12 -6
- package/dist/components/list/index.js.map +1 -0
- package/dist/{loading-indicator.js → components/loading-indicator/index.js} +4 -4
- package/dist/components/loading-indicator/index.js.map +1 -0
- package/dist/{menu.d.ts → components/menu/index.d.ts} +61 -60
- package/dist/components/menu/index.js +179 -0
- package/dist/components/menu/index.js.map +1 -0
- package/dist/components/navigation-bar/index.d.ts +92 -0
- package/dist/{navigation-bar.js → components/navigation-bar/index.js} +3 -3
- package/dist/components/navigation-bar/index.js.map +1 -0
- package/dist/{navigation-drawer.js → components/navigation-drawer/index.js} +4 -4
- package/dist/components/navigation-drawer/index.js.map +1 -0
- package/dist/components/navigation-rail/index.d.ts +102 -0
- package/dist/{navigation-rail.js → components/navigation-rail/index.js} +4 -4
- package/dist/components/navigation-rail/index.js.map +1 -0
- package/dist/components/progress/index.d.ts +127 -0
- package/dist/components/progress/index.js +101 -0
- package/dist/components/progress/index.js.map +1 -0
- package/dist/{radio.d.ts → components/radio/index.d.ts} +17 -16
- package/dist/{radio.js → components/radio/index.js} +3 -3
- package/dist/components/radio/index.js.map +1 -0
- package/dist/{search.d.ts → components/search/index.d.ts} +62 -61
- package/dist/{search.js → components/search/index.js} +4 -4
- package/dist/components/search/index.js.map +1 -0
- package/dist/{segmented-button.d.ts → components/segmented-button/index.d.ts} +32 -31
- package/dist/{segmented-button.js → components/segmented-button/index.js} +4 -4
- package/dist/components/segmented-button/index.js.map +1 -0
- package/dist/components/select/index.d.ts +253 -0
- package/dist/components/select/index.js +271 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/{side-sheet.js → components/side-sheet/index.js} +4 -4
- package/dist/components/side-sheet/index.js.map +1 -0
- package/dist/{slider.d.ts → components/slider/index.d.ts} +52 -51
- package/dist/{slider.js → components/slider/index.js} +4 -4
- package/dist/components/slider/index.js.map +1 -0
- package/dist/{snackbar.d.ts → components/snackbar/index.d.ts} +42 -41
- package/dist/{snackbar.js → components/snackbar/index.js} +9 -4
- package/dist/components/snackbar/index.js.map +1 -0
- package/dist/{split-button.js → components/split-button/index.js} +4 -4
- package/dist/components/split-button/index.js.map +1 -0
- package/dist/components/switch/index.d.ts +73 -0
- package/dist/{switch.js → components/switch/index.js} +3 -3
- package/dist/components/switch/index.js.map +1 -0
- package/dist/{tabs.js → components/tabs/index.js} +4 -4
- package/dist/components/tabs/index.js.map +1 -0
- package/dist/{textfield.d.ts → components/textfield/index.d.ts} +7 -1
- package/dist/{textfield.js → components/textfield/index.js} +35 -13
- package/dist/components/textfield/index.js.map +1 -0
- package/dist/components/time-picker/index.d.ts +153 -0
- package/dist/{time-picker.js → components/time-picker/index.js} +28 -13
- package/dist/components/time-picker/index.js.map +1 -0
- package/dist/{toolbar.js → components/toolbar/index.js} +4 -4
- package/dist/components/toolbar/index.js.map +1 -0
- package/dist/components/tooltip/index.d.ts +143 -0
- package/dist/components/tooltip/index.js +80 -0
- package/dist/components/tooltip/index.js.map +1 -0
- package/dist/{top-app-bar.js → components/top-app-bar/index.js} +4 -4
- package/dist/components/top-app-bar/index.js.map +1 -0
- package/dist/index.d.ts +40 -39
- package/dist/index.js +489 -129
- package/dist/index.js.map +1 -1
- package/package.json +151 -151
- package/styles/preset.css +75 -7
- package/styles/theme.css +2 -0
- package/styles/tokens.css +2 -0
- package/dist/badge.js.map +0 -1
- package/dist/bottom-app-bar.js.map +0 -1
- package/dist/bottom-sheet.js.map +0 -1
- package/dist/button-group.js.map +0 -1
- package/dist/button.js.map +0 -1
- package/dist/card.js.map +0 -1
- package/dist/carousel.js.map +0 -1
- package/dist/checkbox.js.map +0 -1
- package/dist/chip.js.map +0 -1
- package/dist/date-picker.d.ts +0 -188
- package/dist/date-picker.js.map +0 -1
- package/dist/dialog.d.ts +0 -86
- package/dist/dialog.js +0 -68
- package/dist/dialog.js.map +0 -1
- package/dist/divider.js.map +0 -1
- package/dist/fab-menu.js.map +0 -1
- package/dist/fab.js +0 -47
- package/dist/fab.js.map +0 -1
- package/dist/icon-button.js.map +0 -1
- package/dist/item.d.ts +0 -94
- package/dist/item.js.map +0 -1
- package/dist/list.js.map +0 -1
- package/dist/loading-indicator.js.map +0 -1
- package/dist/menu.js +0 -114
- package/dist/menu.js.map +0 -1
- package/dist/navigation-bar.d.ts +0 -91
- package/dist/navigation-bar.js.map +0 -1
- package/dist/navigation-drawer.js.map +0 -1
- package/dist/navigation-rail.d.ts +0 -101
- package/dist/navigation-rail.js.map +0 -1
- package/dist/progress.d.ts +0 -118
- package/dist/progress.js +0 -41
- package/dist/progress.js.map +0 -1
- package/dist/radio.js.map +0 -1
- package/dist/search.js.map +0 -1
- package/dist/segmented-button.js.map +0 -1
- package/dist/select.d.ts +0 -125
- package/dist/select.js +0 -99
- package/dist/select.js.map +0 -1
- package/dist/side-sheet.js.map +0 -1
- package/dist/slider.js.map +0 -1
- package/dist/snackbar.js.map +0 -1
- package/dist/split-button.js.map +0 -1
- package/dist/switch.d.ts +0 -72
- package/dist/switch.js.map +0 -1
- package/dist/tabs.js.map +0 -1
- package/dist/textfield.js.map +0 -1
- package/dist/time-picker.d.ts +0 -144
- package/dist/time-picker.js.map +0 -1
- package/dist/toolbar.js.map +0 -1
- package/dist/tooltip.d.ts +0 -61
- package/dist/tooltip.js +0 -52
- package/dist/tooltip.js.map +0 -1
- package/dist/top-app-bar.js.map +0 -1
- /package/dist/{badge.d.ts → components/badge/index.d.ts} +0 -0
- /package/dist/{button.d.ts → components/button/index.d.ts} +0 -0
- /package/dist/{button-group.d.ts → components/button-group/index.d.ts} +0 -0
- /package/dist/{card.d.ts → components/card/index.d.ts} +0 -0
- /package/dist/{carousel.d.ts → components/carousel/index.d.ts} +0 -0
- /package/dist/{chip.d.ts → components/chip/index.d.ts} +0 -0
- /package/dist/{divider.d.ts → components/divider/index.d.ts} +0 -0
- /package/dist/{icon-button.d.ts → components/icon-button/index.d.ts} +0 -0
- /package/dist/{loading-indicator.d.ts → components/loading-indicator/index.d.ts} +0 -0
- /package/dist/{navigation-drawer.d.ts → components/navigation-drawer/index.d.ts} +0 -0
- /package/dist/{side-sheet.d.ts → components/side-sheet/index.d.ts} +0 -0
- /package/dist/{split-button.d.ts → components/split-button/index.d.ts} +0 -0
- /package/dist/{tabs.d.ts → components/tabs/index.d.ts} +0 -0
- /package/dist/{toolbar.d.ts → components/toolbar/index.d.ts} +0 -0
- /package/dist/{top-app-bar.d.ts → components/top-app-bar/index.d.ts} +0 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
|
|
3
|
+
import * as tailwind_merge from 'tailwind-merge';
|
|
4
|
+
import { createDatePicker } from '@m3-baseui/core';
|
|
5
|
+
|
|
6
|
+
declare const datePickerTv: tailwind_variants.TVReturnType<{
|
|
7
|
+
[key: string]: {
|
|
8
|
+
[key: string]: tailwind_merge.ClassNameValue | {
|
|
9
|
+
input?: tailwind_merge.ClassNameValue;
|
|
10
|
+
grid?: tailwind_merge.ClassNameValue;
|
|
11
|
+
popup?: tailwind_merge.ClassNameValue;
|
|
12
|
+
header?: tailwind_merge.ClassNameValue;
|
|
13
|
+
weekday?: tailwind_merge.ClassNameValue;
|
|
14
|
+
field?: tailwind_merge.ClassNameValue;
|
|
15
|
+
calendar?: tailwind_merge.ClassNameValue;
|
|
16
|
+
navButton?: tailwind_merge.ClassNameValue;
|
|
17
|
+
monthLabel?: tailwind_merge.ClassNameValue;
|
|
18
|
+
weekdays?: tailwind_merge.ClassNameValue;
|
|
19
|
+
day?: tailwind_merge.ClassNameValue;
|
|
20
|
+
yearGrid?: tailwind_merge.ClassNameValue;
|
|
21
|
+
yearButton?: tailwind_merge.ClassNameValue;
|
|
22
|
+
fieldIcon?: tailwind_merge.ClassNameValue;
|
|
23
|
+
modalBackdrop?: tailwind_merge.ClassNameValue;
|
|
24
|
+
modalPopup?: tailwind_merge.ClassNameValue;
|
|
25
|
+
modalHeader?: tailwind_merge.ClassNameValue;
|
|
26
|
+
modalHeadline?: tailwind_merge.ClassNameValue;
|
|
27
|
+
modalActions?: tailwind_merge.ClassNameValue;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
} | {
|
|
31
|
+
[x: string]: {
|
|
32
|
+
[x: string]: tailwind_merge.ClassNameValue | {
|
|
33
|
+
input?: tailwind_merge.ClassNameValue;
|
|
34
|
+
grid?: tailwind_merge.ClassNameValue;
|
|
35
|
+
popup?: tailwind_merge.ClassNameValue;
|
|
36
|
+
header?: tailwind_merge.ClassNameValue;
|
|
37
|
+
weekday?: tailwind_merge.ClassNameValue;
|
|
38
|
+
field?: tailwind_merge.ClassNameValue;
|
|
39
|
+
calendar?: tailwind_merge.ClassNameValue;
|
|
40
|
+
navButton?: tailwind_merge.ClassNameValue;
|
|
41
|
+
monthLabel?: tailwind_merge.ClassNameValue;
|
|
42
|
+
weekdays?: tailwind_merge.ClassNameValue;
|
|
43
|
+
day?: tailwind_merge.ClassNameValue;
|
|
44
|
+
yearGrid?: tailwind_merge.ClassNameValue;
|
|
45
|
+
yearButton?: tailwind_merge.ClassNameValue;
|
|
46
|
+
fieldIcon?: tailwind_merge.ClassNameValue;
|
|
47
|
+
modalBackdrop?: tailwind_merge.ClassNameValue;
|
|
48
|
+
modalPopup?: tailwind_merge.ClassNameValue;
|
|
49
|
+
modalHeader?: tailwind_merge.ClassNameValue;
|
|
50
|
+
modalHeadline?: tailwind_merge.ClassNameValue;
|
|
51
|
+
modalActions?: tailwind_merge.ClassNameValue;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
} | {}, {
|
|
55
|
+
calendar: string[];
|
|
56
|
+
header: string[];
|
|
57
|
+
navButton: string[];
|
|
58
|
+
monthLabel: string[];
|
|
59
|
+
grid: string[];
|
|
60
|
+
weekdays: string[];
|
|
61
|
+
weekday: string[];
|
|
62
|
+
day: string[];
|
|
63
|
+
yearGrid: string[];
|
|
64
|
+
yearButton: string[];
|
|
65
|
+
field: string[];
|
|
66
|
+
input: string[];
|
|
67
|
+
fieldIcon: string[];
|
|
68
|
+
popup: string[];
|
|
69
|
+
modalBackdrop: string[];
|
|
70
|
+
modalPopup: string[];
|
|
71
|
+
modalHeader: string[];
|
|
72
|
+
modalHeadline: string[];
|
|
73
|
+
modalActions: string[];
|
|
74
|
+
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
75
|
+
[key: string]: {
|
|
76
|
+
[key: string]: tailwind_merge.ClassNameValue | {
|
|
77
|
+
input?: tailwind_merge.ClassNameValue;
|
|
78
|
+
grid?: tailwind_merge.ClassNameValue;
|
|
79
|
+
popup?: tailwind_merge.ClassNameValue;
|
|
80
|
+
header?: tailwind_merge.ClassNameValue;
|
|
81
|
+
weekday?: tailwind_merge.ClassNameValue;
|
|
82
|
+
field?: tailwind_merge.ClassNameValue;
|
|
83
|
+
calendar?: tailwind_merge.ClassNameValue;
|
|
84
|
+
navButton?: tailwind_merge.ClassNameValue;
|
|
85
|
+
monthLabel?: tailwind_merge.ClassNameValue;
|
|
86
|
+
weekdays?: tailwind_merge.ClassNameValue;
|
|
87
|
+
day?: tailwind_merge.ClassNameValue;
|
|
88
|
+
yearGrid?: tailwind_merge.ClassNameValue;
|
|
89
|
+
yearButton?: tailwind_merge.ClassNameValue;
|
|
90
|
+
fieldIcon?: tailwind_merge.ClassNameValue;
|
|
91
|
+
modalBackdrop?: tailwind_merge.ClassNameValue;
|
|
92
|
+
modalPopup?: tailwind_merge.ClassNameValue;
|
|
93
|
+
modalHeader?: tailwind_merge.ClassNameValue;
|
|
94
|
+
modalHeadline?: tailwind_merge.ClassNameValue;
|
|
95
|
+
modalActions?: tailwind_merge.ClassNameValue;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
} | {}>, {
|
|
99
|
+
[key: string]: {
|
|
100
|
+
[key: string]: tailwind_merge.ClassNameValue | {
|
|
101
|
+
input?: tailwind_merge.ClassNameValue;
|
|
102
|
+
grid?: tailwind_merge.ClassNameValue;
|
|
103
|
+
popup?: tailwind_merge.ClassNameValue;
|
|
104
|
+
header?: tailwind_merge.ClassNameValue;
|
|
105
|
+
weekday?: tailwind_merge.ClassNameValue;
|
|
106
|
+
field?: tailwind_merge.ClassNameValue;
|
|
107
|
+
calendar?: tailwind_merge.ClassNameValue;
|
|
108
|
+
navButton?: tailwind_merge.ClassNameValue;
|
|
109
|
+
monthLabel?: tailwind_merge.ClassNameValue;
|
|
110
|
+
weekdays?: tailwind_merge.ClassNameValue;
|
|
111
|
+
day?: tailwind_merge.ClassNameValue;
|
|
112
|
+
yearGrid?: tailwind_merge.ClassNameValue;
|
|
113
|
+
yearButton?: tailwind_merge.ClassNameValue;
|
|
114
|
+
fieldIcon?: tailwind_merge.ClassNameValue;
|
|
115
|
+
modalBackdrop?: tailwind_merge.ClassNameValue;
|
|
116
|
+
modalPopup?: tailwind_merge.ClassNameValue;
|
|
117
|
+
modalHeader?: tailwind_merge.ClassNameValue;
|
|
118
|
+
modalHeadline?: tailwind_merge.ClassNameValue;
|
|
119
|
+
modalActions?: tailwind_merge.ClassNameValue;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
} | {}, {
|
|
123
|
+
calendar: string[];
|
|
124
|
+
header: string[];
|
|
125
|
+
navButton: string[];
|
|
126
|
+
monthLabel: string[];
|
|
127
|
+
grid: string[];
|
|
128
|
+
weekdays: string[];
|
|
129
|
+
weekday: string[];
|
|
130
|
+
day: string[];
|
|
131
|
+
yearGrid: string[];
|
|
132
|
+
yearButton: string[];
|
|
133
|
+
field: string[];
|
|
134
|
+
input: string[];
|
|
135
|
+
fieldIcon: string[];
|
|
136
|
+
popup: string[];
|
|
137
|
+
modalBackdrop: string[];
|
|
138
|
+
modalPopup: string[];
|
|
139
|
+
modalHeader: string[];
|
|
140
|
+
modalHeadline: string[];
|
|
141
|
+
modalActions: string[];
|
|
142
|
+
}, tailwind_variants.TVReturnType<unknown, {
|
|
143
|
+
calendar: string[];
|
|
144
|
+
header: string[];
|
|
145
|
+
navButton: string[];
|
|
146
|
+
monthLabel: string[];
|
|
147
|
+
grid: string[];
|
|
148
|
+
weekdays: string[];
|
|
149
|
+
weekday: string[];
|
|
150
|
+
day: string[];
|
|
151
|
+
yearGrid: string[];
|
|
152
|
+
yearButton: string[];
|
|
153
|
+
field: string[];
|
|
154
|
+
input: string[];
|
|
155
|
+
fieldIcon: string[];
|
|
156
|
+
popup: string[];
|
|
157
|
+
modalBackdrop: string[];
|
|
158
|
+
modalPopup: string[];
|
|
159
|
+
modalHeader: string[];
|
|
160
|
+
modalHeadline: string[];
|
|
161
|
+
modalActions: string[];
|
|
162
|
+
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
163
|
+
[key: string]: {
|
|
164
|
+
[key: string]: tailwind_merge.ClassNameValue | {
|
|
165
|
+
input?: tailwind_merge.ClassNameValue;
|
|
166
|
+
grid?: tailwind_merge.ClassNameValue;
|
|
167
|
+
popup?: tailwind_merge.ClassNameValue;
|
|
168
|
+
header?: tailwind_merge.ClassNameValue;
|
|
169
|
+
weekday?: tailwind_merge.ClassNameValue;
|
|
170
|
+
field?: tailwind_merge.ClassNameValue;
|
|
171
|
+
calendar?: tailwind_merge.ClassNameValue;
|
|
172
|
+
navButton?: tailwind_merge.ClassNameValue;
|
|
173
|
+
monthLabel?: tailwind_merge.ClassNameValue;
|
|
174
|
+
weekdays?: tailwind_merge.ClassNameValue;
|
|
175
|
+
day?: tailwind_merge.ClassNameValue;
|
|
176
|
+
yearGrid?: tailwind_merge.ClassNameValue;
|
|
177
|
+
yearButton?: tailwind_merge.ClassNameValue;
|
|
178
|
+
fieldIcon?: tailwind_merge.ClassNameValue;
|
|
179
|
+
modalBackdrop?: tailwind_merge.ClassNameValue;
|
|
180
|
+
modalPopup?: tailwind_merge.ClassNameValue;
|
|
181
|
+
modalHeader?: tailwind_merge.ClassNameValue;
|
|
182
|
+
modalHeadline?: tailwind_merge.ClassNameValue;
|
|
183
|
+
modalActions?: tailwind_merge.ClassNameValue;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
} | {}>, unknown, unknown, undefined>>;
|
|
187
|
+
declare const DatePicker: ReturnType<typeof createDatePicker>;
|
|
188
|
+
|
|
189
|
+
export { DatePicker, datePickerTv };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createDatePicker } from '@m3-baseui/core';
|
|
3
3
|
import { tv as tv$1 } from 'tailwind-variants';
|
|
4
4
|
|
|
5
|
-
// src/date-picker.ts
|
|
5
|
+
// src/components/date-picker/date-picker.ts
|
|
6
6
|
var TYPESCALE = [
|
|
7
7
|
"display-large",
|
|
8
8
|
"display-medium",
|
|
@@ -31,7 +31,7 @@ var tv = (options, config) => tv$1(options, {
|
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
|
|
34
|
-
// src/date-picker.ts
|
|
34
|
+
// src/components/date-picker/date-picker.ts
|
|
35
35
|
var datePickerTv = tv({
|
|
36
36
|
slots: {
|
|
37
37
|
calendar: ["w-[328px] max-w-full p-3 text-on-surface"],
|
|
@@ -147,5 +147,5 @@ var DatePicker = createDatePicker({
|
|
|
147
147
|
});
|
|
148
148
|
|
|
149
149
|
export { DatePicker, datePickerTv };
|
|
150
|
-
//# sourceMappingURL=
|
|
151
|
-
//# sourceMappingURL=
|
|
150
|
+
//# sourceMappingURL=index.js.map
|
|
151
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/tv.ts","../../../src/components/date-picker/date-picker.ts"],"names":["baseTv"],"mappings":";;;;;AAeA,IAAM,SAAA,GAAY;AAAA,EAChB,eAAA;AAAA,EACA,gBAAA;AAAA,EACA,eAAA;AAAA,EACA,gBAAA;AAAA,EACA,iBAAA;AAAA,EACA,gBAAA;AAAA,EACA,aAAA;AAAA,EACA,cAAA;AAAA,EACA,aAAA;AAAA,EACA,YAAA;AAAA,EACA,aAAA;AAAA,EACA,YAAA;AAAA,EACA,aAAA;AAAA,EACA,cAAA;AAAA,EACA;AACF,CAAA;AAEO,IAAM,EAAA,GAAS,CAAC,OAAA,EAAS,MAAA,KAC9BA,KAAO,OAAA,EAAS;AAAA,EACd,GAAG,MAAA;AAAA,EACH,aAAA,EAAe;AAAA,IACb,MAAA,EAAQ;AAAA,MACN,WAAA,EAAa;AAAA,QACX,WAAA,EAAa,CAAC,EAAE,IAAA,EAAM,CAAC,GAAG,SAAS,GAAG;AAAA;AACxC;AACF;AAEJ,CAAC,CAAA;;;AC/BI,IAAM,eAAe,EAAA,CAAG;AAAA,EAC7B,KAAA,EAAO;AAAA,IACL,QAAA,EAAU,CAAC,0CAA0C,CAAA;AAAA,IACrD,MAAA,EAAQ,CAAC,wDAAwD,CAAA;AAAA,IACjE,SAAA,EAAW;AAAA,MACT,uFAAA;AAAA,MACA,oEAAA;AAAA,MACA,4IAAA;AAAA,MACA,kDAAA;AAAA,MACA,0DAAA;AAAA,MACA,qDAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,UAAA,EAAY;AAAA,MACV,+EAAA;AAAA,MACA,sEAAA;AAAA,MACA,4IAAA;AAAA,MACA,kDAAA;AAAA,MACA,0DAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,IAAA,EAAM,CAAC,sBAAA,EAAwB,+BAA+B,CAAA;AAAA,IAC9D,QAAA,EAAU,CAAC,EAAE,CAAA;AAAA,IACb,OAAA,EAAS,CAAC,6DAA6D,CAAA;AAAA,IACvE,GAAA,EAAK;AAAA,MACH,uFAAA;AAAA,MACA,6DAAA;AAAA,MACA,gKAAA;AAAA,MACA,kDAAA;AAAA,MACA,0DAAA;AAAA,MACA,qDAAA;AAAA;AAAA,MAEA,uEAAA;AAAA;AAAA,MAEA,4DAAA;AAAA,MACA;AAAA,KACF;AAAA;AAAA,IAEA,QAAA,EAAU,CAAC,gEAAgE,CAAA;AAAA,IAC3E,UAAA,EAAY;AAAA,MACV,mFAAA;AAAA,MACA,sEAAA;AAAA,MACA,4IAAA;AAAA,MACA,kDAAA;AAAA,MACA,0DAAA;AAAA,MACA;AAAA,KACF;AAAA,IAEA,KAAA,EAAO;AAAA,MACL,6DAAA;AAAA,MACA,oEAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,KAAA,EAAO;AAAA,MACL,4DAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,SAAA,EAAW;AAAA,MACT,uFAAA;AAAA,MACA,oEAAA;AAAA,MACA,4IAAA;AAAA,MACA,kDAAA;AAAA,MACA,0DAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,KAAA,EAAO;AAAA,MACL,uEAAA;AAAA,MACA,4FAAA;AAAA,MACA,gEAAA;AAAA,MACA,+BAAA;AAAA,MACA;AAAA,KACF;AAAA,IAEA,aAAA,EAAe;AAAA,MACb,gCAAA;AAAA,MACA,+CAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,UAAA,EAAY;AAAA,MACV,+DAAA;AAAA,MACA,wEAAA;AAAA,MACA,6EAAA;AAAA,MACA,eAAA;AAAA,MACA,8FAAA;AAAA,MACA,gEAAA;AAAA,MACA,4DAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,WAAA,EAAa,CAAC,yDAAyD,CAAA;AAAA,IACvE,aAAA,EAAe,CAAC,wDAAwD,CAAA;AAAA,IACxE,YAAA,EAAc,CAAC,uCAAuC;AAAA;AAE1D,CAAC;AAED,IAAM,KAAK,YAAA,EAAa;AACjB,IAAM,aAAkD,gBAAA,CAAiB;AAAA,EAC9E,QAAA,EAAU,GAAG,QAAA,EAAS;AAAA,EACtB,MAAA,EAAQ,GAAG,MAAA,EAAO;AAAA,EAClB,SAAA,EAAW,GAAG,SAAA,EAAU;AAAA,EACxB,UAAA,EAAY,GAAG,UAAA,EAAW;AAAA,EAC1B,IAAA,EAAM,GAAG,IAAA,EAAK;AAAA,EACd,QAAA,EAAU,GAAG,QAAA,EAAS;AAAA,EACtB,OAAA,EAAS,GAAG,OAAA,EAAQ;AAAA,EACpB,GAAA,EAAK,GAAG,GAAA,EAAI;AAAA,EACZ,QAAA,EAAU,GAAG,QAAA,EAAS;AAAA,EACtB,UAAA,EAAY,GAAG,UAAA,EAAW;AAAA,EAC1B,KAAA,EAAO,GAAG,KAAA,EAAM;AAAA,EAChB,KAAA,EAAO,GAAG,KAAA,EAAM;AAAA,EAChB,SAAA,EAAW,GAAG,SAAA,EAAU;AAAA,EACxB,KAAA,EAAO,GAAG,KAAA,EAAM;AAAA,EAChB,aAAA,EAAe,GAAG,aAAA,EAAc;AAAA,EAChC,UAAA,EAAY,GAAG,UAAA,EAAW;AAAA,EAC1B,WAAA,EAAa,GAAG,WAAA,EAAY;AAAA,EAC5B,aAAA,EAAe,GAAG,aAAA,EAAc;AAAA,EAChC,YAAA,EAAc,GAAG,YAAA;AACnB,CAAC","file":"index.js","sourcesContent":["/**\n * tv.ts — a tailwind-variants factory pre-configured for the M3 typescale.\n *\n * The Tailwind v4 preset exposes the 15 typescale roles as `text-<role>`\n * font-size utilities (e.g. `text-body-small`, `text-label-large`). Stock\n * tailwind-merge does not know these custom names, so it groups them with the\n * `text-<color>` utilities and drops one when a slot sets both a color *and* a\n * typescale (the common M3 case). That silently strips either the color or the\n * type, breaking token compliance.\n *\n * Teaching tailwind-merge that the typescale names belong to the `font-size`\n * group keeps color and type independent, so both survive the merge.\n */\nimport { type TV, tv as baseTv } from 'tailwind-variants';\n\nconst TYPESCALE = [\n 'display-large',\n 'display-medium',\n 'display-small',\n 'headline-large',\n 'headline-medium',\n 'headline-small',\n 'title-large',\n 'title-medium',\n 'title-small',\n 'body-large',\n 'body-medium',\n 'body-small',\n 'label-large',\n 'label-medium',\n 'label-small',\n] as const;\n\nexport const tv: TV = (options, config) =>\n baseTv(options, {\n ...config,\n twMergeConfig: {\n extend: {\n classGroups: {\n 'font-size': [{ text: [...TYPESCALE] }],\n },\n },\n },\n });\n","/**\n * date-picker.ts — Tailwind classes for the M3 Date picker.\n *\n * The month-grid Calendar plus its two surfaces: a docked Popover\n * (surface-container-high, elevation 2, large corners) and a modal Dialog\n * (surface-container-high, elevation 3, extra-large corners). Day cells carry a\n * circular `before:` state layer keyed to hover; the selected day fills with\n * primary. Same DOM + ripple as the VE build.\n */\nimport { createDatePicker } from '@m3-baseui/core';\nimport { tv } from '../../tv';\n\nexport const datePickerTv = tv({\n slots: {\n calendar: ['w-[328px] max-w-full p-3 text-on-surface'],\n header: ['flex items-center justify-between gap-2 h-12 pl-3 pr-1'],\n navButton: [\n 'relative inline-flex items-center justify-center size-10 rounded-full overflow-hidden',\n 'text-on-surface-variant cursor-pointer outline-none [&>svg]:size-6',\n 'before:absolute before:inset-0 before:bg-current before:opacity-0 before:pointer-events-none before:transition-opacity before:duration-100',\n 'hover:before:opacity-[var(--md-sys-state-hover)]',\n 'focus-visible:before:opacity-[var(--md-sys-state-focus)]',\n 'active:before:opacity-[var(--md-sys-state-pressed)]',\n 'disabled:text-on-surface/[0.38] disabled:before:opacity-0 disabled:pointer-events-none',\n ],\n monthLabel: [\n 'relative inline-flex items-center gap-1 h-9 px-3 rounded-full overflow-hidden',\n 'text-label-large text-on-surface-variant cursor-pointer outline-none',\n 'before:absolute before:inset-0 before:bg-current before:opacity-0 before:pointer-events-none before:transition-opacity before:duration-100',\n 'hover:before:opacity-[var(--md-sys-state-hover)]',\n 'focus-visible:before:opacity-[var(--md-sys-state-focus)]',\n '[&>svg]:transition-transform data-[view=years]:[&>svg]:rotate-180',\n ],\n grid: ['mt-2 border-collapse', '[&_td]:p-0 [&_td]:text-center'],\n weekdays: [''],\n weekday: ['size-12 font-normal text-body-large text-on-surface-variant'],\n day: [\n 'relative inline-flex items-center justify-center size-12 rounded-full overflow-hidden',\n 'text-body-large text-on-surface cursor-pointer outline-none',\n 'before:absolute before:inset-0 before:rounded-full before:bg-current before:opacity-0 before:pointer-events-none before:transition-opacity before:duration-100',\n 'hover:before:opacity-[var(--md-sys-state-hover)]',\n 'focus-visible:before:opacity-[var(--md-sys-state-focus)]',\n 'active:before:opacity-[var(--md-sys-state-pressed)]',\n // today: 1px primary outline ring\n 'data-[today]:ring-1 data-[today]:ring-inset data-[today]:ring-primary',\n // selected: primary fill, on-primary label, no state layer tint shift\n 'data-[selected]:bg-primary data-[selected]:text-on-primary',\n 'data-[disabled]:text-on-surface/[0.38] data-[disabled]:before:opacity-0 data-[disabled]:pointer-events-none',\n ],\n // weeks render as 7-col rows; force grid layout on each row\n yearGrid: ['grid grid-cols-3 gap-2 max-h-[280px] overflow-y-auto px-3 py-2'],\n yearButton: [\n 'relative inline-flex items-center justify-center h-9 rounded-full overflow-hidden',\n 'text-label-large text-on-surface-variant cursor-pointer outline-none',\n 'before:absolute before:inset-0 before:bg-current before:opacity-0 before:pointer-events-none before:transition-opacity before:duration-100',\n 'hover:before:opacity-[var(--md-sys-state-hover)]',\n 'focus-visible:before:opacity-[var(--md-sys-state-focus)]',\n 'data-[selected]:bg-primary data-[selected]:text-on-primary',\n ],\n\n field: [\n 'inline-flex items-center gap-1 h-14 pl-4 pr-1 min-w-[200px]',\n 'bg-surface-container-highest text-on-surface rounded-t-extra-small',\n 'border-b border-on-surface-variant',\n ],\n input: [\n 'flex-1 min-w-0 h-full bg-transparent border-0 outline-none',\n 'text-body-large text-on-surface placeholder:text-on-surface-variant',\n ],\n fieldIcon: [\n 'relative inline-flex items-center justify-center size-10 rounded-full overflow-hidden',\n 'text-on-surface-variant cursor-pointer outline-none [&>svg]:size-6',\n 'before:absolute before:inset-0 before:bg-current before:opacity-0 before:pointer-events-none before:transition-opacity before:duration-100',\n 'hover:before:opacity-[var(--md-sys-state-hover)]',\n 'focus-visible:before:opacity-[var(--md-sys-state-focus)]',\n 'active:before:opacity-[var(--md-sys-state-pressed)]',\n ],\n popup: [\n 'bg-surface-container-high text-on-surface rounded-large shadow-level2',\n 'origin-[var(--transform-origin)] transition-[opacity,transform] duration-150 ease-standard',\n 'data-[starting-style]:opacity-0 data-[starting-style]:scale-95',\n 'data-[ending-style]:opacity-0',\n 'focus:outline-none',\n ],\n\n modalBackdrop: [\n 'fixed inset-0 z-40 bg-scrim/32',\n 'transition-opacity duration-200 ease-standard',\n 'data-[starting-style]:opacity-0 data-[ending-style]:opacity-0',\n ],\n modalPopup: [\n 'fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2',\n 'w-[min(360px,calc(100vw-48px))] max-h-[calc(100vh-48px)] overflow-auto',\n 'bg-surface-container-high text-on-surface rounded-extra-large shadow-level3',\n 'flex flex-col',\n 'origin-[var(--transform-origin)] transition-[opacity,transform] duration-200 ease-emphasized',\n 'data-[starting-style]:opacity-0 data-[starting-style]:scale-95',\n 'data-[ending-style]:opacity-0 data-[ending-style]:scale-95',\n 'focus:outline-none',\n ],\n modalHeader: ['px-6 pt-4 text-label-medium text-on-surface-variant m-0'],\n modalHeadline: ['px-6 pt-1 pb-4 text-headline-large text-on-surface m-0'],\n modalActions: ['flex justify-end gap-2 px-6 pb-4 pt-2'],\n },\n});\n\nconst dp = datePickerTv();\nexport const DatePicker: ReturnType<typeof createDatePicker> = createDatePicker({\n calendar: dp.calendar(),\n header: dp.header(),\n navButton: dp.navButton(),\n monthLabel: dp.monthLabel(),\n grid: dp.grid(),\n weekdays: dp.weekdays(),\n weekday: dp.weekday(),\n day: dp.day(),\n yearGrid: dp.yearGrid(),\n yearButton: dp.yearButton(),\n field: dp.field(),\n input: dp.input(),\n fieldIcon: dp.fieldIcon(),\n popup: dp.popup(),\n modalBackdrop: dp.modalBackdrop(),\n modalPopup: dp.modalPopup(),\n modalHeader: dp.modalHeader(),\n modalHeadline: dp.modalHeadline(),\n modalActions: dp.modalActions(),\n});\n"]}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import * as _m3_baseui_core from '@m3-baseui/core';
|
|
2
|
+
import * as react from 'react';
|
|
3
|
+
import * as _base_ui_react from '@base-ui/react';
|
|
4
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
5
|
+
import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
|
|
6
|
+
|
|
7
|
+
declare const dialogTv: tailwind_variants.TVReturnType<{
|
|
8
|
+
fullscreen: {
|
|
9
|
+
false: {
|
|
10
|
+
popup: string[];
|
|
11
|
+
};
|
|
12
|
+
true: {
|
|
13
|
+
popup: string[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}, {
|
|
17
|
+
backdrop: string[];
|
|
18
|
+
popup: string[];
|
|
19
|
+
header: string[];
|
|
20
|
+
icon: string[];
|
|
21
|
+
title: string[];
|
|
22
|
+
description: string[];
|
|
23
|
+
divider: string[];
|
|
24
|
+
actions: string[];
|
|
25
|
+
close: string[];
|
|
26
|
+
}, undefined, tailwind_variants_dist_config_js.TVConfig<{
|
|
27
|
+
fullscreen: {
|
|
28
|
+
false: {
|
|
29
|
+
popup: string[];
|
|
30
|
+
};
|
|
31
|
+
true: {
|
|
32
|
+
popup: string[];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
}, {
|
|
36
|
+
fullscreen: {
|
|
37
|
+
false: {
|
|
38
|
+
popup: string[];
|
|
39
|
+
};
|
|
40
|
+
true: {
|
|
41
|
+
popup: string[];
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
}>, {
|
|
45
|
+
fullscreen: {
|
|
46
|
+
false: {
|
|
47
|
+
popup: string[];
|
|
48
|
+
};
|
|
49
|
+
true: {
|
|
50
|
+
popup: string[];
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
}, {
|
|
54
|
+
backdrop: string[];
|
|
55
|
+
popup: string[];
|
|
56
|
+
header: string[];
|
|
57
|
+
icon: string[];
|
|
58
|
+
title: string[];
|
|
59
|
+
description: string[];
|
|
60
|
+
divider: string[];
|
|
61
|
+
actions: string[];
|
|
62
|
+
close: string[];
|
|
63
|
+
}, tailwind_variants.TVReturnType<{
|
|
64
|
+
fullscreen: {
|
|
65
|
+
false: {
|
|
66
|
+
popup: string[];
|
|
67
|
+
};
|
|
68
|
+
true: {
|
|
69
|
+
popup: string[];
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
}, {
|
|
73
|
+
backdrop: string[];
|
|
74
|
+
popup: string[];
|
|
75
|
+
header: string[];
|
|
76
|
+
icon: string[];
|
|
77
|
+
title: string[];
|
|
78
|
+
description: string[];
|
|
79
|
+
divider: string[];
|
|
80
|
+
actions: string[];
|
|
81
|
+
close: string[];
|
|
82
|
+
}, undefined, tailwind_variants_dist_config_js.TVConfig<{
|
|
83
|
+
fullscreen: {
|
|
84
|
+
false: {
|
|
85
|
+
popup: string[];
|
|
86
|
+
};
|
|
87
|
+
true: {
|
|
88
|
+
popup: string[];
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
}, {
|
|
92
|
+
fullscreen: {
|
|
93
|
+
false: {
|
|
94
|
+
popup: string[];
|
|
95
|
+
};
|
|
96
|
+
true: {
|
|
97
|
+
popup: string[];
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
}>, unknown, unknown, undefined>>;
|
|
101
|
+
declare const Dialog: {
|
|
102
|
+
Root: typeof _base_ui_react.DialogRoot;
|
|
103
|
+
Trigger: _base_ui_react.DialogTrigger;
|
|
104
|
+
Portal: react.ForwardRefExoticComponent<Omit<_base_ui_react.AlertDialogPortalProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
105
|
+
Backdrop: react.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.AlertDialogBackdropProps, "ref"> & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<unknown>>;
|
|
106
|
+
Popup: react.ForwardRefExoticComponent<Omit<_m3_baseui_core.DialogPopupOwnProps & Omit<_base_ui_react.AlertDialogPopupProps, "ref"> & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
107
|
+
Icon: react.ForwardRefExoticComponent<react.HTMLAttributes<HTMLSpanElement> & react.RefAttributes<HTMLSpanElement>>;
|
|
108
|
+
Header: react.ForwardRefExoticComponent<react.HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
109
|
+
Title: react.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.AlertDialogTitleProps, "ref"> & react.RefAttributes<HTMLHeadingElement>, "ref"> & react.RefAttributes<unknown>>;
|
|
110
|
+
Description: react.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.AlertDialogDescriptionProps, "ref"> & react.RefAttributes<HTMLParagraphElement>, "ref"> & react.RefAttributes<unknown>>;
|
|
111
|
+
Divider: react.ForwardRefExoticComponent<react.HTMLAttributes<HTMLHRElement> & react.RefAttributes<HTMLHRElement>>;
|
|
112
|
+
Actions: react.ForwardRefExoticComponent<react.HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>>;
|
|
113
|
+
Close: react.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.AlertDialogCloseProps, "ref"> & react.RefAttributes<HTMLButtonElement>, "ref"> & react.RefAttributes<unknown>>;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export { Dialog, dialogTv };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createDialog } from '@m3-baseui/core';
|
|
3
|
+
import { tv as tv$1 } from 'tailwind-variants';
|
|
4
|
+
|
|
5
|
+
// src/components/dialog/dialog.ts
|
|
6
|
+
var TYPESCALE = [
|
|
7
|
+
"display-large",
|
|
8
|
+
"display-medium",
|
|
9
|
+
"display-small",
|
|
10
|
+
"headline-large",
|
|
11
|
+
"headline-medium",
|
|
12
|
+
"headline-small",
|
|
13
|
+
"title-large",
|
|
14
|
+
"title-medium",
|
|
15
|
+
"title-small",
|
|
16
|
+
"body-large",
|
|
17
|
+
"body-medium",
|
|
18
|
+
"body-small",
|
|
19
|
+
"label-large",
|
|
20
|
+
"label-medium",
|
|
21
|
+
"label-small"
|
|
22
|
+
];
|
|
23
|
+
var tv = (options, config) => tv$1(options, {
|
|
24
|
+
...config,
|
|
25
|
+
twMergeConfig: {
|
|
26
|
+
extend: {
|
|
27
|
+
classGroups: {
|
|
28
|
+
"font-size": [{ text: [...TYPESCALE] }]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
// src/components/dialog/dialog.ts
|
|
35
|
+
var dialogTv = tv({
|
|
36
|
+
slots: {
|
|
37
|
+
backdrop: [
|
|
38
|
+
"fixed inset-0 z-40 bg-scrim/32",
|
|
39
|
+
"transition-opacity duration-200 ease-standard",
|
|
40
|
+
"data-[starting-style]:opacity-0 data-[ending-style]:opacity-0"
|
|
41
|
+
],
|
|
42
|
+
popup: [
|
|
43
|
+
"fixed z-50 box-border overflow-auto flex flex-col text-on-surface focus:outline-none",
|
|
44
|
+
"origin-[var(--transform-origin)] transition-[opacity,transform] duration-200 ease-emphasized",
|
|
45
|
+
// Icon present → center the headline + supporting text (M3 hero icon).
|
|
46
|
+
"has-[[data-slot=dialog-icon]]:text-center"
|
|
47
|
+
],
|
|
48
|
+
// Fullscreen header row: leading close icon + title (grows, but shrinks +
|
|
49
|
+
// ellipsizes instead of pushing the trailing action off-screen) + action.
|
|
50
|
+
header: [
|
|
51
|
+
"flex items-center gap-2 px-2 h-14 shrink-0",
|
|
52
|
+
"[&>*:nth-child(2)]:grow [&>*:nth-child(2)]:min-w-0 [&>*:nth-child(2)]:overflow-hidden [&>*:nth-child(2)]:text-ellipsis [&>*:nth-child(2)]:whitespace-nowrap"
|
|
53
|
+
],
|
|
54
|
+
// Centered 24dp hero icon in the secondary color.
|
|
55
|
+
icon: ["inline-flex self-center text-secondary"],
|
|
56
|
+
title: ["text-headline-small text-on-surface m-0"],
|
|
57
|
+
description: ["text-body-medium text-on-surface-variant m-0"],
|
|
58
|
+
// 1dp outline-variant rule under the fullscreen header.
|
|
59
|
+
divider: ["h-px w-full bg-outline-variant shrink-0 m-0 border-0"],
|
|
60
|
+
// End-aligned action row: 8dp between buttons; the popup gap (16dp) + mt-2
|
|
61
|
+
// (8dp) totals the 24dp M3 spacing above the actions.
|
|
62
|
+
actions: ["flex justify-end items-center gap-2 mt-2"],
|
|
63
|
+
close: ["inline-flex"]
|
|
64
|
+
},
|
|
65
|
+
variants: {
|
|
66
|
+
fullscreen: {
|
|
67
|
+
false: {
|
|
68
|
+
popup: [
|
|
69
|
+
"left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",
|
|
70
|
+
"w-[min(560px,calc(100vw-48px))] min-w-[280px] max-h-[calc(100vh-48px)]",
|
|
71
|
+
"p-6 gap-4 rounded-extra-large bg-surface-container-high shadow-level3",
|
|
72
|
+
"data-[starting-style]:opacity-0 data-[starting-style]:scale-95",
|
|
73
|
+
"data-[ending-style]:opacity-0 data-[ending-style]:scale-95"
|
|
74
|
+
]
|
|
75
|
+
},
|
|
76
|
+
true: {
|
|
77
|
+
popup: [
|
|
78
|
+
"inset-0 w-screen h-screen max-w-none rounded-none bg-surface",
|
|
79
|
+
"data-[starting-style]:opacity-0 data-[ending-style]:opacity-0"
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
defaultVariants: {
|
|
85
|
+
fullscreen: false
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
var d = dialogTv();
|
|
89
|
+
var Dialog = createDialog({
|
|
90
|
+
backdrop: d.backdrop(),
|
|
91
|
+
popup: ({ fullscreen }) => dialogTv({ fullscreen }).popup(),
|
|
92
|
+
header: d.header(),
|
|
93
|
+
icon: d.icon(),
|
|
94
|
+
title: d.title(),
|
|
95
|
+
description: d.description(),
|
|
96
|
+
divider: d.divider(),
|
|
97
|
+
actions: d.actions(),
|
|
98
|
+
close: d.close()
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
export { Dialog, dialogTv };
|
|
102
|
+
//# sourceMappingURL=index.js.map
|
|
103
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/tv.ts","../../../src/components/dialog/dialog.ts"],"names":["baseTv"],"mappings":";;;;;AAeA,IAAM,SAAA,GAAY;AAAA,EAChB,eAAA;AAAA,EACA,gBAAA;AAAA,EACA,eAAA;AAAA,EACA,gBAAA;AAAA,EACA,iBAAA;AAAA,EACA,gBAAA;AAAA,EACA,aAAA;AAAA,EACA,cAAA;AAAA,EACA,aAAA;AAAA,EACA,YAAA;AAAA,EACA,aAAA;AAAA,EACA,YAAA;AAAA,EACA,aAAA;AAAA,EACA,cAAA;AAAA,EACA;AACF,CAAA;AAEO,IAAM,EAAA,GAAS,CAAC,OAAA,EAAS,MAAA,KAC9BA,KAAO,OAAA,EAAS;AAAA,EACd,GAAG,MAAA;AAAA,EACH,aAAA,EAAe;AAAA,IACb,MAAA,EAAQ;AAAA,MACN,WAAA,EAAa;AAAA,QACX,WAAA,EAAa,CAAC,EAAE,IAAA,EAAM,CAAC,GAAG,SAAS,GAAG;AAAA;AACxC;AACF;AAEJ,CAAC,CAAA;;;AC9BI,IAAM,WAAW,EAAA,CAAG;AAAA,EACzB,KAAA,EAAO;AAAA,IACL,QAAA,EAAU;AAAA,MACR,gCAAA;AAAA,MACA,+CAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,KAAA,EAAO;AAAA,MACL,sFAAA;AAAA,MACA,8FAAA;AAAA;AAAA,MAEA;AAAA,KACF;AAAA;AAAA;AAAA,IAGA,MAAA,EAAQ;AAAA,MACN,4CAAA;AAAA,MACA;AAAA,KACF;AAAA;AAAA,IAEA,IAAA,EAAM,CAAC,wCAAwC,CAAA;AAAA,IAC/C,KAAA,EAAO,CAAC,yCAAyC,CAAA;AAAA,IACjD,WAAA,EAAa,CAAC,8CAA8C,CAAA;AAAA;AAAA,IAE5D,OAAA,EAAS,CAAC,sDAAsD,CAAA;AAAA;AAAA;AAAA,IAGhE,OAAA,EAAS,CAAC,0CAA0C,CAAA;AAAA,IACpD,KAAA,EAAO,CAAC,aAAa;AAAA,GACvB;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAA,EAAY;AAAA,MACV,KAAA,EAAO;AAAA,QACL,KAAA,EAAO;AAAA,UACL,oDAAA;AAAA,UACA,wEAAA;AAAA,UACA,uEAAA;AAAA,UACA,gEAAA;AAAA,UACA;AAAA;AACF,OACF;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,KAAA,EAAO;AAAA,UACL,8DAAA;AAAA,UACA;AAAA;AACF;AACF;AACF,GACF;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,UAAA,EAAY;AAAA;AAEhB,CAAC;AAED,IAAM,IAAI,QAAA,EAAS;AACZ,IAAM,SAAS,YAAA,CAAa;AAAA,EACjC,QAAA,EAAU,EAAE,QAAA,EAAS;AAAA,EACrB,KAAA,EAAO,CAAC,EAAE,UAAA,EAAW,KAAM,SAAS,EAAE,UAAA,EAAY,CAAA,CAAE,KAAA,EAAM;AAAA,EAC1D,MAAA,EAAQ,EAAE,MAAA,EAAO;AAAA,EACjB,IAAA,EAAM,EAAE,IAAA,EAAK;AAAA,EACb,KAAA,EAAO,EAAE,KAAA,EAAM;AAAA,EACf,WAAA,EAAa,EAAE,WAAA,EAAY;AAAA,EAC3B,OAAA,EAAS,EAAE,OAAA,EAAQ;AAAA,EACnB,OAAA,EAAS,EAAE,OAAA,EAAQ;AAAA,EACnB,KAAA,EAAO,EAAE,KAAA;AACX,CAAC","file":"index.js","sourcesContent":["/**\n * tv.ts — a tailwind-variants factory pre-configured for the M3 typescale.\n *\n * The Tailwind v4 preset exposes the 15 typescale roles as `text-<role>`\n * font-size utilities (e.g. `text-body-small`, `text-label-large`). Stock\n * tailwind-merge does not know these custom names, so it groups them with the\n * `text-<color>` utilities and drops one when a slot sets both a color *and* a\n * typescale (the common M3 case). That silently strips either the color or the\n * type, breaking token compliance.\n *\n * Teaching tailwind-merge that the typescale names belong to the `font-size`\n * group keeps color and type independent, so both survive the merge.\n */\nimport { type TV, tv as baseTv } from 'tailwind-variants';\n\nconst TYPESCALE = [\n 'display-large',\n 'display-medium',\n 'display-small',\n 'headline-large',\n 'headline-medium',\n 'headline-small',\n 'title-large',\n 'title-medium',\n 'title-small',\n 'body-large',\n 'body-medium',\n 'body-small',\n 'label-large',\n 'label-medium',\n 'label-small',\n] as const;\n\nexport const tv: TV = (options, config) =>\n baseTv(options, {\n ...config,\n twMergeConfig: {\n extend: {\n classGroups: {\n 'font-size': [{ text: [...TYPESCALE] }],\n },\n },\n },\n });\n","/**\n * dialog.ts — Tailwind classes for the M3 Dialog (basic + fullscreen).\n *\n * Scrim backdrop + a surface popup with an emphasized fade/scale transition off\n * Base UI's data-[starting-style] / data-[ending-style] attributes. The basic\n * variant is a centered surface-container-high card (extra-large corners,\n * elevation 3, 280–560dp wide); the `fullscreen` variant is an edge-to-edge\n * `surface` with a header row + divider. An optional centered hero icon\n * (`data-slot=\"dialog-icon\"`) center-aligns the headline/supporting text.\n */\nimport { createDialog } from '@m3-baseui/core';\nimport { tv } from '../../tv';\n\nexport const dialogTv = tv({\n slots: {\n backdrop: [\n 'fixed inset-0 z-40 bg-scrim/32',\n 'transition-opacity duration-200 ease-standard',\n 'data-[starting-style]:opacity-0 data-[ending-style]:opacity-0',\n ],\n popup: [\n 'fixed z-50 box-border overflow-auto flex flex-col text-on-surface focus:outline-none',\n 'origin-[var(--transform-origin)] transition-[opacity,transform] duration-200 ease-emphasized',\n // Icon present → center the headline + supporting text (M3 hero icon).\n 'has-[[data-slot=dialog-icon]]:text-center',\n ],\n // Fullscreen header row: leading close icon + title (grows, but shrinks +\n // ellipsizes instead of pushing the trailing action off-screen) + action.\n header: [\n 'flex items-center gap-2 px-2 h-14 shrink-0',\n '[&>*:nth-child(2)]:grow [&>*:nth-child(2)]:min-w-0 [&>*:nth-child(2)]:overflow-hidden [&>*:nth-child(2)]:text-ellipsis [&>*:nth-child(2)]:whitespace-nowrap',\n ],\n // Centered 24dp hero icon in the secondary color.\n icon: ['inline-flex self-center text-secondary'],\n title: ['text-headline-small text-on-surface m-0'],\n description: ['text-body-medium text-on-surface-variant m-0'],\n // 1dp outline-variant rule under the fullscreen header.\n divider: ['h-px w-full bg-outline-variant shrink-0 m-0 border-0'],\n // End-aligned action row: 8dp between buttons; the popup gap (16dp) + mt-2\n // (8dp) totals the 24dp M3 spacing above the actions.\n actions: ['flex justify-end items-center gap-2 mt-2'],\n close: ['inline-flex'],\n },\n variants: {\n fullscreen: {\n false: {\n popup: [\n 'left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2',\n 'w-[min(560px,calc(100vw-48px))] min-w-[280px] max-h-[calc(100vh-48px)]',\n 'p-6 gap-4 rounded-extra-large bg-surface-container-high shadow-level3',\n 'data-[starting-style]:opacity-0 data-[starting-style]:scale-95',\n 'data-[ending-style]:opacity-0 data-[ending-style]:scale-95',\n ],\n },\n true: {\n popup: [\n 'inset-0 w-screen h-screen max-w-none rounded-none bg-surface',\n 'data-[starting-style]:opacity-0 data-[ending-style]:opacity-0',\n ],\n },\n },\n },\n defaultVariants: {\n fullscreen: false,\n },\n});\n\nconst d = dialogTv();\nexport const Dialog = createDialog({\n backdrop: d.backdrop(),\n popup: ({ fullscreen }) => dialogTv({ fullscreen }).popup(),\n header: d.header(),\n icon: d.icon(),\n title: d.title(),\n description: d.description(),\n divider: d.divider(),\n actions: d.actions(),\n close: d.close(),\n});\n"]}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createDivider } from '@m3-baseui/core';
|
|
3
3
|
import { tv } from 'tailwind-variants';
|
|
4
4
|
|
|
5
|
-
// src/divider.ts
|
|
5
|
+
// src/components/divider/divider.ts
|
|
6
6
|
var dividerTv = tv({
|
|
7
7
|
base: "shrink-0 self-stretch border-0 bg-outline-variant",
|
|
8
8
|
variants: {
|
|
@@ -31,5 +31,5 @@ var dividerTv = tv({
|
|
|
31
31
|
var Divider = createDivider(({ inset, orientation }) => dividerTv({ inset, orientation }));
|
|
32
32
|
|
|
33
33
|
export { Divider, dividerTv };
|
|
34
|
-
//# sourceMappingURL=
|
|
35
|
-
//# sourceMappingURL=
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/divider/divider.ts"],"names":[],"mappings":";;;;;AAWO,IAAM,YAAY,EAAA,CAAG;AAAA,EAC1B,IAAA,EAAM,mDAAA;AAAA,EACN,QAAA,EAAU;AAAA,IACR,WAAA,EAAa;AAAA,MACX,UAAA,EAAY,aAAA;AAAA,MACZ,QAAA,EAAU;AAAA,KACZ;AAAA,IACA,KAAA,EAAO;AAAA,MACL,IAAA,EAAM,EAAA;AAAA,MACN,KAAA,EAAO,EAAA;AAAA,MACP,MAAA,EAAQ;AAAA;AACV,GACF;AAAA,EACA,gBAAA,EAAkB;AAAA,IAChB,EAAE,WAAA,EAAa,YAAA,EAAc,KAAA,EAAO,OAAA,EAAS,OAAO,MAAA,EAAO;AAAA,IAC3D,EAAE,WAAA,EAAa,YAAA,EAAc,KAAA,EAAO,QAAA,EAAU,OAAO,MAAA,EAAO;AAAA;AAAA,IAE5D,EAAE,WAAA,EAAa,UAAA,EAAY,KAAA,EAAO,OAAA,EAAS,OAAO,2BAAA,EAA4B;AAAA,IAC9E,EAAE,WAAA,EAAa,UAAA,EAAY,KAAA,EAAO,QAAA,EAAU,OAAO,MAAA;AAAO,GAC5D;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,WAAA,EAAa,YAAA;AAAA,IACb,KAAA,EAAO;AAAA;AAEX,CAAC;AAEM,IAAM,OAAA,GAAU,aAAA,CAAc,CAAC,EAAE,KAAA,EAAO,WAAA,EAAY,KAAM,SAAA,CAAU,EAAE,KAAA,EAAO,WAAA,EAAa,CAAC","file":"index.js","sourcesContent":["/**\n * divider.ts — tailwind-variants for the M3 Divider.\n *\n * 1dp `outline-variant` rule. `self-stretch` fills the cross axis in flex\n * layouts; horizontal is 1dp tall, vertical 1dp wide. The inset variants add a\n * 16dp leading (`inset`) or both-ends (`middle`) margin along the main axis.\n * Same DOM + `role=\"separator\"` as the VE build.\n */\nimport { createDivider } from '@m3-baseui/core';\nimport { tv } from 'tailwind-variants';\n\nexport const dividerTv = tv({\n base: 'shrink-0 self-stretch border-0 bg-outline-variant',\n variants: {\n orientation: {\n horizontal: 'h-px w-auto',\n vertical: 'w-px h-auto',\n },\n inset: {\n full: '',\n inset: '',\n middle: '',\n },\n },\n compoundVariants: [\n { orientation: 'horizontal', inset: 'inset', class: 'ms-4' },\n { orientation: 'horizontal', inset: 'middle', class: 'mx-4' },\n // Logical block-start margin mirrors the VE recipe's `marginBlockStart`.\n { orientation: 'vertical', inset: 'inset', class: '[margin-block-start:1rem]' },\n { orientation: 'vertical', inset: 'middle', class: 'my-4' },\n ],\n defaultVariants: {\n orientation: 'horizontal',\n inset: 'full',\n },\n});\n\nexport const Divider = createDivider(({ inset, orientation }) => dividerTv({ inset, orientation }));\nexport type { DividerProps, DividerInset, DividerOrientation } from '@m3-baseui/core';\n"]}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import * as _base_ui_react from '@base-ui/react';
|
|
2
2
|
import * as react from 'react';
|
|
3
3
|
import * as _m3_baseui_core from '@m3-baseui/core';
|
|
4
|
-
export { FabColor, FabProps, FabSize } from '@m3-baseui/core';
|
|
4
|
+
export { FabColor, FabProps, FabSize, FabVariant } from '@m3-baseui/core';
|
|
5
5
|
import * as tailwind_variants from 'tailwind-variants';
|
|
6
6
|
import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
|
|
7
7
|
|
|
8
8
|
declare const fabTv: tailwind_variants.TVReturnType<{
|
|
9
9
|
size: {
|
|
10
10
|
small: string;
|
|
11
|
-
|
|
11
|
+
medium: string;
|
|
12
12
|
large: string;
|
|
13
|
+
};
|
|
14
|
+
variant: {
|
|
15
|
+
standard: string;
|
|
13
16
|
extended: string;
|
|
14
17
|
};
|
|
15
18
|
color: {
|
|
16
|
-
surface: string;
|
|
17
19
|
primary: string;
|
|
18
20
|
secondary: string;
|
|
19
21
|
tertiary: string;
|
|
@@ -21,12 +23,14 @@ declare const fabTv: tailwind_variants.TVReturnType<{
|
|
|
21
23
|
}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
|
|
22
24
|
size: {
|
|
23
25
|
small: string;
|
|
24
|
-
|
|
26
|
+
medium: string;
|
|
25
27
|
large: string;
|
|
28
|
+
};
|
|
29
|
+
variant: {
|
|
30
|
+
standard: string;
|
|
26
31
|
extended: string;
|
|
27
32
|
};
|
|
28
33
|
color: {
|
|
29
|
-
surface: string;
|
|
30
34
|
primary: string;
|
|
31
35
|
secondary: string;
|
|
32
36
|
tertiary: string;
|
|
@@ -34,12 +38,14 @@ declare const fabTv: tailwind_variants.TVReturnType<{
|
|
|
34
38
|
}, {
|
|
35
39
|
size: {
|
|
36
40
|
small: string;
|
|
37
|
-
|
|
41
|
+
medium: string;
|
|
38
42
|
large: string;
|
|
43
|
+
};
|
|
44
|
+
variant: {
|
|
45
|
+
standard: string;
|
|
39
46
|
extended: string;
|
|
40
47
|
};
|
|
41
48
|
color: {
|
|
42
|
-
surface: string;
|
|
43
49
|
primary: string;
|
|
44
50
|
secondary: string;
|
|
45
51
|
tertiary: string;
|
|
@@ -47,12 +53,14 @@ declare const fabTv: tailwind_variants.TVReturnType<{
|
|
|
47
53
|
}>, {
|
|
48
54
|
size: {
|
|
49
55
|
small: string;
|
|
50
|
-
|
|
56
|
+
medium: string;
|
|
51
57
|
large: string;
|
|
58
|
+
};
|
|
59
|
+
variant: {
|
|
60
|
+
standard: string;
|
|
52
61
|
extended: string;
|
|
53
62
|
};
|
|
54
63
|
color: {
|
|
55
|
-
surface: string;
|
|
56
64
|
primary: string;
|
|
57
65
|
secondary: string;
|
|
58
66
|
tertiary: string;
|
|
@@ -60,12 +68,14 @@ declare const fabTv: tailwind_variants.TVReturnType<{
|
|
|
60
68
|
}, undefined, tailwind_variants.TVReturnType<{
|
|
61
69
|
size: {
|
|
62
70
|
small: string;
|
|
63
|
-
|
|
71
|
+
medium: string;
|
|
64
72
|
large: string;
|
|
73
|
+
};
|
|
74
|
+
variant: {
|
|
75
|
+
standard: string;
|
|
65
76
|
extended: string;
|
|
66
77
|
};
|
|
67
78
|
color: {
|
|
68
|
-
surface: string;
|
|
69
79
|
primary: string;
|
|
70
80
|
secondary: string;
|
|
71
81
|
tertiary: string;
|
|
@@ -73,12 +83,14 @@ declare const fabTv: tailwind_variants.TVReturnType<{
|
|
|
73
83
|
}, undefined, string[], tailwind_variants_dist_config_js.TVConfig<{
|
|
74
84
|
size: {
|
|
75
85
|
small: string;
|
|
76
|
-
|
|
86
|
+
medium: string;
|
|
77
87
|
large: string;
|
|
88
|
+
};
|
|
89
|
+
variant: {
|
|
90
|
+
standard: string;
|
|
78
91
|
extended: string;
|
|
79
92
|
};
|
|
80
93
|
color: {
|
|
81
|
-
surface: string;
|
|
82
94
|
primary: string;
|
|
83
95
|
secondary: string;
|
|
84
96
|
tertiary: string;
|
|
@@ -86,12 +98,14 @@ declare const fabTv: tailwind_variants.TVReturnType<{
|
|
|
86
98
|
}, {
|
|
87
99
|
size: {
|
|
88
100
|
small: string;
|
|
89
|
-
|
|
101
|
+
medium: string;
|
|
90
102
|
large: string;
|
|
103
|
+
};
|
|
104
|
+
variant: {
|
|
105
|
+
standard: string;
|
|
91
106
|
extended: string;
|
|
92
107
|
};
|
|
93
108
|
color: {
|
|
94
|
-
surface: string;
|
|
95
109
|
primary: string;
|
|
96
110
|
secondary: string;
|
|
97
111
|
tertiary: string;
|