@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
package/dist/select.d.ts
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import * as _base_ui_react from '@base-ui/react';
|
|
3
|
-
import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
|
|
4
|
-
import * as tailwind_variants from 'tailwind-variants';
|
|
5
|
-
|
|
6
|
-
declare const selectTv: tailwind_variants.TVReturnType<{
|
|
7
|
-
[key: string]: {
|
|
8
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
9
|
-
value?: tailwind_variants.ClassValue;
|
|
10
|
-
popup?: tailwind_variants.ClassValue;
|
|
11
|
-
icon?: tailwind_variants.ClassValue;
|
|
12
|
-
item?: tailwind_variants.ClassValue;
|
|
13
|
-
itemIndicator?: tailwind_variants.ClassValue;
|
|
14
|
-
groupLabel?: tailwind_variants.ClassValue;
|
|
15
|
-
trigger?: tailwind_variants.ClassValue;
|
|
16
|
-
scrollUpArrow?: tailwind_variants.ClassValue;
|
|
17
|
-
scrollDownArrow?: tailwind_variants.ClassValue;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
} | {
|
|
21
|
-
[x: string]: {
|
|
22
|
-
[x: string]: tailwind_variants.ClassValue | {
|
|
23
|
-
value?: tailwind_variants.ClassValue;
|
|
24
|
-
popup?: tailwind_variants.ClassValue;
|
|
25
|
-
icon?: tailwind_variants.ClassValue;
|
|
26
|
-
item?: tailwind_variants.ClassValue;
|
|
27
|
-
itemIndicator?: tailwind_variants.ClassValue;
|
|
28
|
-
groupLabel?: tailwind_variants.ClassValue;
|
|
29
|
-
trigger?: tailwind_variants.ClassValue;
|
|
30
|
-
scrollUpArrow?: tailwind_variants.ClassValue;
|
|
31
|
-
scrollDownArrow?: tailwind_variants.ClassValue;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
} | {}, {
|
|
35
|
-
trigger: string[];
|
|
36
|
-
value: string;
|
|
37
|
-
icon: string;
|
|
38
|
-
popup: string[];
|
|
39
|
-
item: string[];
|
|
40
|
-
itemIndicator: string;
|
|
41
|
-
groupLabel: string;
|
|
42
|
-
scrollUpArrow: string[];
|
|
43
|
-
scrollDownArrow: string[];
|
|
44
|
-
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
45
|
-
[key: string]: {
|
|
46
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
47
|
-
value?: tailwind_variants.ClassValue;
|
|
48
|
-
popup?: tailwind_variants.ClassValue;
|
|
49
|
-
icon?: tailwind_variants.ClassValue;
|
|
50
|
-
item?: tailwind_variants.ClassValue;
|
|
51
|
-
itemIndicator?: tailwind_variants.ClassValue;
|
|
52
|
-
groupLabel?: tailwind_variants.ClassValue;
|
|
53
|
-
trigger?: tailwind_variants.ClassValue;
|
|
54
|
-
scrollUpArrow?: tailwind_variants.ClassValue;
|
|
55
|
-
scrollDownArrow?: tailwind_variants.ClassValue;
|
|
56
|
-
};
|
|
57
|
-
};
|
|
58
|
-
} | {}>, {
|
|
59
|
-
[key: string]: {
|
|
60
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
61
|
-
value?: tailwind_variants.ClassValue;
|
|
62
|
-
popup?: tailwind_variants.ClassValue;
|
|
63
|
-
icon?: tailwind_variants.ClassValue;
|
|
64
|
-
item?: tailwind_variants.ClassValue;
|
|
65
|
-
itemIndicator?: tailwind_variants.ClassValue;
|
|
66
|
-
groupLabel?: tailwind_variants.ClassValue;
|
|
67
|
-
trigger?: tailwind_variants.ClassValue;
|
|
68
|
-
scrollUpArrow?: tailwind_variants.ClassValue;
|
|
69
|
-
scrollDownArrow?: tailwind_variants.ClassValue;
|
|
70
|
-
};
|
|
71
|
-
};
|
|
72
|
-
} | {}, {
|
|
73
|
-
trigger: string[];
|
|
74
|
-
value: string;
|
|
75
|
-
icon: string;
|
|
76
|
-
popup: string[];
|
|
77
|
-
item: string[];
|
|
78
|
-
itemIndicator: string;
|
|
79
|
-
groupLabel: string;
|
|
80
|
-
scrollUpArrow: string[];
|
|
81
|
-
scrollDownArrow: string[];
|
|
82
|
-
}, tailwind_variants.TVReturnType<unknown, {
|
|
83
|
-
trigger: string[];
|
|
84
|
-
value: string;
|
|
85
|
-
icon: string;
|
|
86
|
-
popup: string[];
|
|
87
|
-
item: string[];
|
|
88
|
-
itemIndicator: string;
|
|
89
|
-
groupLabel: string;
|
|
90
|
-
scrollUpArrow: string[];
|
|
91
|
-
scrollDownArrow: string[];
|
|
92
|
-
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
93
|
-
[key: string]: {
|
|
94
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
95
|
-
value?: tailwind_variants.ClassValue;
|
|
96
|
-
popup?: tailwind_variants.ClassValue;
|
|
97
|
-
icon?: tailwind_variants.ClassValue;
|
|
98
|
-
item?: tailwind_variants.ClassValue;
|
|
99
|
-
itemIndicator?: tailwind_variants.ClassValue;
|
|
100
|
-
groupLabel?: tailwind_variants.ClassValue;
|
|
101
|
-
trigger?: tailwind_variants.ClassValue;
|
|
102
|
-
scrollUpArrow?: tailwind_variants.ClassValue;
|
|
103
|
-
scrollDownArrow?: tailwind_variants.ClassValue;
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
} | {}>, unknown, unknown, undefined>>;
|
|
107
|
-
declare const Select: {
|
|
108
|
-
Root: typeof _base_ui_react.SelectRoot;
|
|
109
|
-
Trigger: react.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.SelectTriggerProps, "ref"> & react.RefAttributes<HTMLButtonElement>, "ref"> & react.RefAttributes<unknown>>;
|
|
110
|
-
Value: react.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.SelectValueProps, "ref"> & react.RefAttributes<HTMLSpanElement>, "ref"> & react.RefAttributes<unknown>>;
|
|
111
|
-
Icon: react.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.SelectIconProps, "ref"> & react.RefAttributes<HTMLSpanElement>, "ref"> & react.RefAttributes<unknown>>;
|
|
112
|
-
Portal: react.ForwardRefExoticComponent<Omit<_base_ui_react.SelectPortalProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
113
|
-
Positioner: react.ForwardRefExoticComponent<Omit<_base_ui_react.SelectPositionerProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
114
|
-
Popup: react.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.SelectPopupProps, "ref"> & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<unknown>>;
|
|
115
|
-
List: react.ForwardRefExoticComponent<Omit<_base_ui_react.SelectListProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
116
|
-
Item: react.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.SelectItemProps, "ref"> & react.RefAttributes<HTMLElement>, "ref"> & react.RefAttributes<unknown>>;
|
|
117
|
-
ItemText: react.NamedExoticComponent<Omit<_base_ui_react.SelectItemTextProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
118
|
-
ItemIndicator: react.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.SelectItemIndicatorProps, "ref"> & react.RefAttributes<HTMLSpanElement>, "ref"> & react.RefAttributes<unknown>>;
|
|
119
|
-
ScrollUpArrow: react.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.SelectScrollUpArrowProps, "ref"> & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
120
|
-
ScrollDownArrow: react.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.SelectScrollDownArrowProps, "ref"> & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
121
|
-
Group: react.ForwardRefExoticComponent<Omit<_base_ui_react.SelectGroupProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
122
|
-
GroupLabel: react.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.SelectGroupLabelProps, "ref"> & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<unknown>>;
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
export { Select, selectTv };
|
package/dist/select.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { createSelect } from '@m3-baseui/core';
|
|
3
|
-
import { tv as tv$1 } from 'tailwind-variants';
|
|
4
|
-
|
|
5
|
-
// src/select.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/select.ts
|
|
35
|
-
var selectTv = tv({
|
|
36
|
-
slots: {
|
|
37
|
-
trigger: [
|
|
38
|
-
"group relative inline-flex items-center justify-between gap-2 box-border",
|
|
39
|
-
"h-14 min-w-[200px] px-4 rounded-extra-small border border-outline bg-transparent",
|
|
40
|
-
"text-on-surface text-body-large cursor-pointer outline-none text-left",
|
|
41
|
-
"transition-colors duration-150 ease-standard",
|
|
42
|
-
// focus/open = 3dp primary outline; padding drops 2px to keep content steady
|
|
43
|
-
"data-[popup-open]:border-primary data-[popup-open]:border-[3px] data-[popup-open]:px-[14px]",
|
|
44
|
-
"focus-visible:border-primary focus-visible:border-[3px] focus-visible:px-[14px]",
|
|
45
|
-
"data-[disabled]:border-on-surface/[0.12] data-[disabled]:text-on-surface/[0.38] data-[disabled]:pointer-events-none"
|
|
46
|
-
],
|
|
47
|
-
value: "flex-1 truncate",
|
|
48
|
-
icon: "flex text-on-surface-variant transition-transform duration-150 group-data-[popup-open]:rotate-180 group-data-[disabled]:text-on-surface/[0.38]",
|
|
49
|
-
popup: [
|
|
50
|
-
"min-w-[var(--anchor-width)] max-h-[var(--available-height)] py-2 overflow-auto",
|
|
51
|
-
"bg-surface-container text-on-surface rounded-extra-small shadow-level2",
|
|
52
|
-
"origin-[var(--transform-origin)] transition-[opacity,transform] duration-150 ease-standard",
|
|
53
|
-
"data-[starting-style]:opacity-0 data-[starting-style]:scale-95",
|
|
54
|
-
"data-[ending-style]:opacity-0",
|
|
55
|
-
"focus:outline-none"
|
|
56
|
-
],
|
|
57
|
-
item: [
|
|
58
|
-
"group relative grid grid-cols-[24px_1fr_auto] items-center gap-2 h-12 px-3 overflow-hidden",
|
|
59
|
-
"cursor-pointer select-none outline-none text-body-large text-on-surface",
|
|
60
|
-
"before:absolute before:inset-0 before:bg-current before:opacity-0 before:pointer-events-none before:transition-opacity before:duration-100",
|
|
61
|
-
"hover:before:opacity-[var(--md-sys-state-hover)]",
|
|
62
|
-
"data-[highlighted]:before:opacity-[var(--md-sys-state-hover)]",
|
|
63
|
-
"active:before:opacity-[var(--md-sys-state-pressed)]",
|
|
64
|
-
// M3 disabled (per-token, not a blanket fade): label + trailing supporting
|
|
65
|
-
// text on-surface/0.38, no state layer.
|
|
66
|
-
"data-[disabled]:text-on-surface/[0.38] data-[disabled]:before:opacity-0 data-[disabled]:pointer-events-none",
|
|
67
|
-
"data-[disabled]:[&_[data-slot=select-trailing]]:text-on-surface/[0.38]",
|
|
68
|
-
// M3 trailing supporting text (e.g. meta) sits in the last column.
|
|
69
|
-
"[&_[data-slot=select-trailing]]:pl-4 [&_[data-slot=select-trailing]]:text-label-large [&_[data-slot=select-trailing]]:text-on-surface-variant"
|
|
70
|
-
],
|
|
71
|
-
itemIndicator: "inline-flex items-center justify-center text-primary invisible group-data-[selected]:visible group-data-[disabled]:text-on-surface/[0.38]",
|
|
72
|
-
groupLabel: "px-3 py-2 text-label-small text-on-surface-variant",
|
|
73
|
-
// Sticky scroll affordances at the popup edges; surface-tinted with a chevron.
|
|
74
|
-
scrollUpArrow: [
|
|
75
|
-
"sticky top-0 z-[1] flex items-center justify-center h-6 cursor-default",
|
|
76
|
-
"bg-surface-container text-on-surface-variant [&>svg]:size-5"
|
|
77
|
-
],
|
|
78
|
-
scrollDownArrow: [
|
|
79
|
-
"sticky bottom-0 z-[1] flex items-center justify-center h-6 cursor-default",
|
|
80
|
-
"bg-surface-container text-on-surface-variant [&>svg]:size-5"
|
|
81
|
-
]
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
var s = selectTv();
|
|
85
|
-
var Select = createSelect({
|
|
86
|
-
trigger: s.trigger(),
|
|
87
|
-
value: s.value(),
|
|
88
|
-
icon: s.icon(),
|
|
89
|
-
popup: s.popup(),
|
|
90
|
-
item: s.item(),
|
|
91
|
-
itemIndicator: s.itemIndicator(),
|
|
92
|
-
groupLabel: s.groupLabel(),
|
|
93
|
-
scrollUpArrow: s.scrollUpArrow(),
|
|
94
|
-
scrollDownArrow: s.scrollDownArrow()
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
export { Select, selectTv };
|
|
98
|
-
//# sourceMappingURL=select.js.map
|
|
99
|
-
//# sourceMappingURL=select.js.map
|
package/dist/select.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tv.ts","../src/select.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;;;AC7BI,IAAM,WAAW,EAAA,CAAG;AAAA,EACzB,KAAA,EAAO;AAAA,IACL,OAAA,EAAS;AAAA,MACP,0EAAA;AAAA,MACA,kFAAA;AAAA,MACA,uEAAA;AAAA,MACA,8CAAA;AAAA;AAAA,MAEA,6FAAA;AAAA,MACA,iFAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,KAAA,EAAO,iBAAA;AAAA,IACP,IAAA,EAAM,gJAAA;AAAA,IACN,KAAA,EAAO;AAAA,MACL,gFAAA;AAAA,MACA,wEAAA;AAAA,MACA,4FAAA;AAAA,MACA,gEAAA;AAAA,MACA,+BAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,IAAA,EAAM;AAAA,MACJ,4FAAA;AAAA,MACA,yEAAA;AAAA,MACA,4IAAA;AAAA,MACA,kDAAA;AAAA,MACA,+DAAA;AAAA,MACA,qDAAA;AAAA;AAAA;AAAA,MAGA,6GAAA;AAAA,MACA,wEAAA;AAAA;AAAA,MAEA;AAAA,KACF;AAAA,IACA,aAAA,EACE,2IAAA;AAAA,IACF,UAAA,EAAY,oDAAA;AAAA;AAAA,IAEZ,aAAA,EAAe;AAAA,MACb,wEAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,eAAA,EAAiB;AAAA,MACf,2EAAA;AAAA,MACA;AAAA;AACF;AAEJ,CAAC;AAED,IAAM,IAAI,QAAA,EAAS;AACZ,IAAM,SAAS,YAAA,CAAa;AAAA,EACjC,OAAA,EAAS,EAAE,OAAA,EAAQ;AAAA,EACnB,KAAA,EAAO,EAAE,KAAA,EAAM;AAAA,EACf,IAAA,EAAM,EAAE,IAAA,EAAK;AAAA,EACb,KAAA,EAAO,EAAE,KAAA,EAAM;AAAA,EACf,IAAA,EAAM,EAAE,IAAA,EAAK;AAAA,EACb,aAAA,EAAe,EAAE,aAAA,EAAc;AAAA,EAC/B,UAAA,EAAY,EAAE,UAAA,EAAW;AAAA,EACzB,aAAA,EAAe,EAAE,aAAA,EAAc;AAAA,EAC/B,eAAA,EAAiB,EAAE,eAAA;AACrB,CAAC","file":"select.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 * select.ts — Tailwind classes for the M3 Select.\n *\n * Trigger = outlined field (56dp; 3dp primary border when open/focused, per the\n * M3 outlined-field focus-outline-width). Popup = M3 menu surface sized to the\n * anchor. Items mirror the Menu item (state layer + ripple) with a leading check\n * indicator. Same DOM as the VE build.\n *\n * Disabled follows the M3 outlined-field per-token opacities (not a blanket\n * fade): outline on-surface/0.12, label/value + icon on-surface/0.38.\n */\nimport { createSelect } from '@m3-baseui/core';\nimport { tv } from './tv';\n\nexport const selectTv = tv({\n slots: {\n trigger: [\n 'group relative inline-flex items-center justify-between gap-2 box-border',\n 'h-14 min-w-[200px] px-4 rounded-extra-small border border-outline bg-transparent',\n 'text-on-surface text-body-large cursor-pointer outline-none text-left',\n 'transition-colors duration-150 ease-standard',\n // focus/open = 3dp primary outline; padding drops 2px to keep content steady\n 'data-[popup-open]:border-primary data-[popup-open]:border-[3px] data-[popup-open]:px-[14px]',\n 'focus-visible:border-primary focus-visible:border-[3px] focus-visible:px-[14px]',\n 'data-[disabled]:border-on-surface/[0.12] data-[disabled]:text-on-surface/[0.38] data-[disabled]:pointer-events-none',\n ],\n value: 'flex-1 truncate',\n icon: 'flex text-on-surface-variant transition-transform duration-150 group-data-[popup-open]:rotate-180 group-data-[disabled]:text-on-surface/[0.38]',\n popup: [\n 'min-w-[var(--anchor-width)] max-h-[var(--available-height)] py-2 overflow-auto',\n 'bg-surface-container text-on-surface rounded-extra-small 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 item: [\n 'group relative grid grid-cols-[24px_1fr_auto] items-center gap-2 h-12 px-3 overflow-hidden',\n 'cursor-pointer select-none outline-none text-body-large text-on-surface',\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 'data-[highlighted]:before:opacity-[var(--md-sys-state-hover)]',\n 'active:before:opacity-[var(--md-sys-state-pressed)]',\n // M3 disabled (per-token, not a blanket fade): label + trailing supporting\n // text on-surface/0.38, no state layer.\n 'data-[disabled]:text-on-surface/[0.38] data-[disabled]:before:opacity-0 data-[disabled]:pointer-events-none',\n 'data-[disabled]:[&_[data-slot=select-trailing]]:text-on-surface/[0.38]',\n // M3 trailing supporting text (e.g. meta) sits in the last column.\n '[&_[data-slot=select-trailing]]:pl-4 [&_[data-slot=select-trailing]]:text-label-large [&_[data-slot=select-trailing]]:text-on-surface-variant',\n ],\n itemIndicator:\n 'inline-flex items-center justify-center text-primary invisible group-data-[selected]:visible group-data-[disabled]:text-on-surface/[0.38]',\n groupLabel: 'px-3 py-2 text-label-small text-on-surface-variant',\n // Sticky scroll affordances at the popup edges; surface-tinted with a chevron.\n scrollUpArrow: [\n 'sticky top-0 z-[1] flex items-center justify-center h-6 cursor-default',\n 'bg-surface-container text-on-surface-variant [&>svg]:size-5',\n ],\n scrollDownArrow: [\n 'sticky bottom-0 z-[1] flex items-center justify-center h-6 cursor-default',\n 'bg-surface-container text-on-surface-variant [&>svg]:size-5',\n ],\n },\n});\n\nconst s = selectTv();\nexport const Select = createSelect({\n trigger: s.trigger(),\n value: s.value(),\n icon: s.icon(),\n popup: s.popup(),\n item: s.item(),\n itemIndicator: s.itemIndicator(),\n groupLabel: s.groupLabel(),\n scrollUpArrow: s.scrollUpArrow(),\n scrollDownArrow: s.scrollDownArrow(),\n});\n"]}
|
package/dist/side-sheet.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tv.ts","../src/side-sheet.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,cAAc,EAAA,CAAG;AAAA,EAC5B,KAAA,EAAO;AAAA,IACL,QAAA,EAAU;AAAA,MACR,gCAAA;AAAA,MACA,iDAAA;AAAA,MACA,gCAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,QAAA,EAAU,uCAAA;AAAA,IACV,KAAA,EAAO;AAAA,MACL,sDAAA;AAAA,MACA,0EAAA;AAAA,MACA,0CAAA;AAAA,MACA,0EAAA;AAAA,MACA,wDAAA;AAAA,MACA,mDAAA;AAAA,MACA,4BAAA;AAAA,MACA,iFAAA;AAAA,MACA,+EAAA;AAAA,MACA,iFAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,MAAA,EAAQ,4CAAA;AAAA,IACR,KAAA,EAAO,CAAC,6CAA6C,CAAA;AAAA,IACrD,WAAA,EAAa,CAAC,wDAAwD,CAAA;AAAA,IACtE,KAAA,EAAO;AAAA,GACT;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAA,EAAS;AAAA,MACP,KAAA,EAAO;AAAA,QACL,KAAA,EAAO;AAAA,UACL,eAAA;AAAA,UACA;AAAA;AACF,OACF;AAAA,MACA,QAAA,EAAU,EAAE,KAAA,EAAO,aAAA;AAAc;AACnC,GACF;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,OAAA,EAAS;AAAA;AAEb,CAAC;AAED,IAAM,IAAI,WAAA,EAAY;AACf,IAAM,YAAY,eAAA,CAAgB;AAAA,EACvC,QAAA,EAAU,EAAE,QAAA,EAAS;AAAA,EACrB,QAAA,EAAU,EAAE,QAAA,EAAS;AAAA,EACrB,KAAA,EAAO,CAAC,EAAE,OAAA,EAAQ,KAAM,YAAY,EAAE,OAAA,EAAS,CAAA,CAAE,KAAA,EAAM;AAAA,EACvD,MAAA,EAAQ,EAAE,MAAA,EAAO;AAAA,EACjB,KAAA,EAAO,EAAE,KAAA,EAAM;AAAA,EACf,WAAA,EAAa,EAAE,WAAA,EAAY;AAAA,EAC3B,KAAA,EAAO,EAAE,KAAA;AACX,CAAC","file":"side-sheet.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 * side-sheet.ts — tailwind-variants slots for the M3 Side sheet.\n *\n * A full-height 320dp `surface-container-low` surface anchored to a side edge.\n * `modal` floats at elevation 1 with the leading edge rounded large (16dp);\n * `standard` sits flush (no elevation). The anchored side is read from Base UI's\n * `data-swipe-direction` on the popup, so one resolver covers both left + right.\n * The popup slides via `--drawer-swipe-movement-x` so the swipe gesture tracks\n * the finger. Same DOM + `data-*` as the VE build.\n */\nimport { createSideSheet } from '@m3-baseui/core';\nimport { tv } from './tv';\n\nexport const sideSheetTv = tv({\n slots: {\n backdrop: [\n 'fixed inset-0 z-40 bg-scrim/32',\n 'transition-opacity duration-300 ease-emphasized',\n 'data-[swiping]:transition-none',\n 'data-[starting-style]:opacity-0 data-[ending-style]:opacity-0',\n ],\n viewport: 'fixed inset-0 z-50 flex items-stretch',\n popup: [\n 'box-border h-full w-[320px] max-w-[calc(100vw-56px)]',\n 'flex flex-col overflow-y-auto overscroll-contain touch-auto outline-none',\n 'bg-surface-container-low text-on-surface',\n 'data-[swipe-direction=right]:ml-auto data-[swipe-direction=left]:mr-auto',\n '[transform:translateX(var(--drawer-swipe-movement-x))]',\n 'transition-transform duration-300 ease-emphasized',\n 'data-[swiping]:select-none',\n 'data-[swipe-direction=right]:data-[starting-style]:[transform:translateX(100%)]',\n 'data-[swipe-direction=right]:data-[ending-style]:[transform:translateX(100%)]',\n 'data-[swipe-direction=left]:data-[starting-style]:[transform:translateX(-100%)]',\n 'data-[swipe-direction=left]:data-[ending-style]:[transform:translateX(-100%)]',\n ],\n header: 'flex items-center gap-2 min-h-14 px-4 py-2',\n title: ['flex-1 m-0 text-title-large text-on-surface'],\n description: ['m-0 px-6 pb-4 text-body-medium text-on-surface-variant'],\n close: 'inline-flex shrink-0',\n },\n variants: {\n variant: {\n modal: {\n popup: [\n 'shadow-level1',\n 'data-[swipe-direction=right]:rounded-s-large data-[swipe-direction=left]:rounded-e-large',\n ],\n },\n standard: { popup: 'shadow-none' },\n },\n },\n defaultVariants: {\n variant: 'modal',\n },\n});\n\nconst s = sideSheetTv();\nexport const SideSheet = createSideSheet({\n backdrop: s.backdrop(),\n viewport: s.viewport(),\n popup: ({ variant }) => sideSheetTv({ variant }).popup(),\n header: s.header(),\n title: s.title(),\n description: s.description(),\n close: s.close(),\n});\nexport type { SideSheetVariant, SideSheetSide } from '@m3-baseui/core';\n"]}
|
package/dist/slider.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tv.ts","../src/slider.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,IAAA,EAAM,gEAAA;AAAA,IACN,OAAA,EAAS,wCAAA;AAAA,IACT,KAAA,EAAO;AAAA,MACL,+DAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,SAAA,EAAW;AAAA,MACT,sCAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,KAAA,EAAO;AAAA,MACL,kEAAA;AAAA,MACA,oHAAA;AAAA,MACA,qHAAA;AAAA,MACA,kDAAA;AAAA,MACA,0DAAA;AAAA,MACA,8DAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,KAAA,EAAO,uDAAA;AAAA,IACP,QAAA,EAAU,sCAAA;AAAA,IACV,IAAA,EAAM;AAAA,MACJ,sFAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,UAAA,EAAY;AAAA,MACV,+GAAA;AAAA,MACA,oEAAA;AAAA,MACA;AAAA;AACF;AAEJ,CAAC;AAED,IAAM,IAAI,QAAA,EAAS;AACZ,IAAM,SAAS,YAAA,CAAa;AAAA,EACjC,IAAA,EAAM,EAAE,IAAA,EAAK;AAAA,EACb,OAAA,EAAS,EAAE,OAAA,EAAQ;AAAA,EACnB,KAAA,EAAO,EAAE,KAAA,EAAM;AAAA,EACf,SAAA,EAAW,EAAE,SAAA,EAAU;AAAA,EACvB,KAAA,EAAO,EAAE,KAAA,EAAM;AAAA,EACf,KAAA,EAAO,EAAE,KAAA,EAAM;AAAA,EACf,QAAA,EAAU,EAAE,QAAA,EAAS;AAAA,EACrB,IAAA,EAAM,EAAE,IAAA,EAAK;AAAA,EACb,UAAA,EAAY,EAAE,UAAA;AAChB,CAAC","file":"slider.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 * slider.ts — Tailwind classes for the M3 Slider.\n *\n * 4dp rail (surface-container-highest) with a primary active indicator and a\n * 20dp primary thumb carrying a 40dp circular state layer (hover/focus/drag).\n *\n * Disabled follows M3 per-token opacities (not a blanket fade): inactive track\n * on-surface/0.12, active track + handle on-surface/0.38. The root carries a\n * `group` so the descendant parts can react to Base UI's data-disabled on Root.\n */\nimport { createSlider } from '@m3-baseui/core';\nimport { tv } from './tv';\n\nexport const sliderTv = tv({\n slots: {\n root: 'group relative flex items-center select-none w-full touch-none',\n control: 'relative flex items-center w-full h-10',\n track: [\n 'relative w-full h-1 rounded-full bg-surface-container-highest',\n 'group-data-[disabled]:bg-on-surface/[0.12]',\n ],\n indicator: [\n 'absolute h-1 rounded-full bg-primary',\n 'group-data-[disabled]:bg-on-surface/[0.38]',\n ],\n thumb: [\n 'group/thumb relative size-5 rounded-full bg-primary outline-none',\n 'before:content-[\"\"] before:absolute before:left-1/2 before:top-1/2 before:-translate-x-1/2 before:-translate-y-1/2',\n 'before:size-10 before:rounded-full before:bg-primary before:opacity-0 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-[dragging]:before:opacity-[var(--md-sys-state-dragged)]',\n 'group-data-[disabled]:bg-on-surface/[0.38]',\n ],\n value: 'text-label-large text-on-surface-variant tabular-nums',\n tickList: 'pointer-events-none absolute inset-0',\n tick: [\n 'absolute size-1 -translate-x-1/2 -translate-y-1/2 rounded-full bg-on-surface-variant',\n 'data-[active]:bg-on-primary/[0.38]',\n ],\n valueLabel: [\n 'pointer-events-none absolute bottom-full left-1/2 mb-2 -translate-x-1/2 whitespace-nowrap rounded px-2 py-0.5',\n 'bg-primary text-label-large text-on-primary tabular-nums opacity-0',\n 'data-[visible]:opacity-100',\n ],\n },\n});\n\nconst s = sliderTv();\nexport const Slider = createSlider({\n root: s.root(),\n control: s.control(),\n track: s.track(),\n indicator: s.indicator(),\n thumb: s.thumb(),\n value: s.value(),\n tickList: s.tickList(),\n tick: s.tick(),\n valueLabel: s.valueLabel(),\n});\n"]}
|
package/dist/snackbar.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/snackbar.ts"],"names":[],"mappings":";;;;;;AAYO,IAAM,aAAa,EAAA,CAAG;AAAA,EAC3B,KAAA,EAAO;AAAA,IACL,QAAA,EAAU;AAAA,MACR,+CAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,IAAA,EAAM;AAAA,MACJ,qEAAA;AAAA,MACA,8EAAA;AAAA,MACA,kBAAA;AAAA,MACA,6DAAA;AAAA,MACA,qEAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,OAAA,EAAS,sCAAA;AAAA,IACT,KAAA,EAAO,kBAAA;AAAA,IACP,WAAA,EAAa,kBAAA;AAAA,IACb,MAAA,EAAQ;AAAA,MACN,oFAAA;AAAA,MACA,yEAAA;AAAA,MACA,uCAAA;AAAA,MACA,4IAAA;AAAA,MACA,kDAAA;AAAA,MACA,0DAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,KAAA,EAAO;AAAA,MACL,+FAAA;AAAA,MACA,6EAAA;AAAA,MACA,4IAAA;AAAA,MACA,kDAAA;AAAA,MACA,0DAAA;AAAA,MACA,qDAAA;AAAA,MACA;AAAA;AACF;AAEJ,CAAC;AAED,IAAM,IAAI,UAAA,EAAW;AACd,IAAM,WAAW,cAAA,CAAe;AAAA,EACrC,QAAA,EAAU,EAAE,QAAA,EAAS;AAAA,EACrB,IAAA,EAAM,EAAE,IAAA,EAAK;AAAA,EACb,OAAA,EAAS,EAAE,OAAA,EAAQ;AAAA,EACnB,KAAA,EAAO,EAAE,KAAA,EAAM;AAAA,EACf,WAAA,EAAa,EAAE,WAAA,EAAY;AAAA,EAC3B,MAAA,EAAQ,EAAE,MAAA,EAAO;AAAA,EACjB,KAAA,EAAO,EAAE,KAAA;AACX,CAAC","file":"snackbar.js","sourcesContent":["/**\n * snackbar.ts — tailwind-variants slots for the M3 Snackbar.\n *\n * Inverse-surface container, extra-small corners, elevation level3. The Action\n * is an inverse-primary text button with a state layer + ripple. Enter/exit key\n * off Toast's `data-starting-style` / `data-ending-style`. Same DOM as VE.\n */\nimport { createSnackbar } from '@m3-baseui/core';\nimport { tv } from 'tailwind-variants';\n\nexport { useSnackbar } from '@m3-baseui/core';\n\nexport const snackbarTv = tv({\n slots: {\n viewport: [\n 'fixed bottom-4 left-1/2 -translate-x-1/2 z-50',\n 'flex flex-col gap-2 w-[min(560px,calc(100vw-32px))]',\n ],\n root: [\n 'relative flex items-center gap-2 min-h-12 box-border pl-4 pr-2 py-2',\n 'rounded-extra-small bg-inverse-surface text-inverse-on-surface shadow-level3',\n 'text-body-medium',\n 'transition-[opacity,transform] duration-200 ease-emphasized',\n 'data-[starting-style]:opacity-0 data-[starting-style]:translate-y-2',\n 'data-[ending-style]:opacity-0',\n ],\n content: 'flex flex-col flex-1 min-w-0 gap-0.5',\n title: 'text-body-medium',\n description: 'text-body-medium',\n action: [\n 'relative inline-flex items-center justify-center shrink-0 h-9 px-3 overflow-hidden',\n 'rounded-extra-small bg-transparent border-0 cursor-pointer outline-none',\n 'text-inverse-primary text-label-large',\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 close: [\n 'relative inline-flex items-center justify-center shrink-0 size-8 rounded-full overflow-hidden',\n 'bg-transparent border-0 cursor-pointer text-inverse-on-surface 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 'active:before:opacity-[var(--md-sys-state-pressed)]',\n 'data-[pressed]:before:opacity-[var(--md-sys-state-pressed)]',\n ],\n },\n});\n\nconst s = snackbarTv();\nexport const Snackbar = createSnackbar({\n viewport: s.viewport(),\n root: s.root(),\n content: s.content(),\n title: s.title(),\n description: s.description(),\n action: s.action(),\n close: s.close(),\n});\n"]}
|
package/dist/split-button.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tv.ts","../src/split-button.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;;;AC5BH,IAAM,OAAA,GAAU;AAAA,EACd,wHAAA;AAAA,EACA,kBAAA;AAAA,EACA,6EAAA;AAAA,EACA,4IAAA;AAAA,EACA,kDAAA;AAAA,EACA,0DAAA;AAAA,EACA,qDAAA;AAAA,EACA,6DAAA;AAAA,EACA,4FAAA;AAAA,EACA,wDAAA;AAAA,EACA;AACF,CAAA;AAIA,IAAM,cAAA,GAAiB;AAAA,EACrB,4BAAA;AAAA,EACA,uDAAA;AAAA,EACA;AACF,CAAA;AACA,IAAM,aAAA,GAAgB;AAAA,EACpB,oDAAA;AAAA,EACA,uDAAA;AAAA,EACA;AACF,CAAA;AACA,IAAM,gBAAA,GAAmB;AAAA,EACvB,mDAAA;AAAA,EACA,2DAAA;AAAA,EACA;AACF,CAAA;AACA,IAAM,gBAAA,GAAmB;AAAA,EACvB,qDAAA;AAAA,EACA,4EAAA;AAAA,EACA;AACF,CAAA;AACA,IAAM,YAAA,GAAe;AAAA,EACnB,6BAAA;AAAA,EACA,6BAAA;AAAA,EACA;AACF,CAAA;AAEO,IAAM,gBAAgB,EAAA,CAAG;AAAA,EAC9B,KAAA,EAAO;AAAA,IACL,KAAA,EAAO,kCAAA;AAAA;AAAA,IAEP,OAAA,EAAS,CAAC,GAAG,OAAA,EAAS,2CAA2C,CAAA;AAAA;AAAA,IAEjE,QAAA,EAAU,CAAC,GAAG,OAAA,EAAS,iDAAiD,CAAA;AAAA,IACxE,OAAA,EAAS;AAAA,MACP,sEAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,KAAA,EAAO;AAAA,MACL,kCAAA;AAAA,MACA,wEAAA;AAAA,MACA,4FAAA;AAAA,MACA,gEAAA;AAAA,MACA,+BAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,IAAA,EAAM;AAAA,MACJ,oGAAA;AAAA,MACA,kCAAA;AAAA,MACA,4IAAA;AAAA,MACA,kDAAA;AAAA,MACA,+DAAA;AAAA,MACA,qDAAA;AAAA,MACA;AAAA;AACF,GACF;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAA,EAAS;AAAA,MACP,MAAA,EAAQ,EAAE,OAAA,EAAS,cAAA,EAAgB,UAAU,cAAA,EAAe;AAAA,MAC5D,KAAA,EAAO,EAAE,OAAA,EAAS,aAAA,EAAe,UAAU,aAAA,EAAc;AAAA,MACzD,QAAA,EAAU,EAAE,OAAA,EAAS,gBAAA,EAAkB,UAAU,gBAAA,EAAiB;AAAA,MAClE,QAAA,EAAU,EAAE,OAAA,EAAS,gBAAA,EAAkB,UAAU,gBAAA,EAAiB;AAAA,MAClE,IAAA,EAAM,EAAE,OAAA,EAAS,YAAA,EAAc,UAAU,YAAA;AAAa;AACxD,GACF;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,OAAA,EAAS;AAAA;AAEb,CAAC;AAEM,IAAM,cAAc,iBAAA,CAAkB;AAAA,EAC3C,KAAA,EAAO,aAAA,EAAc,CAAE,KAAA,EAAM;AAAA,EAC7B,OAAA,EAAS,CAAC,OAAA,KAAY,aAAA,CAAc,EAAE,OAAA,EAAS,EAAE,OAAA,EAAQ;AAAA,EACzD,QAAA,EAAU,CAAC,OAAA,KAAY,aAAA,CAAc,EAAE,OAAA,EAAS,EAAE,QAAA,EAAS;AAAA,EAC3D,OAAA,EAAS,aAAA,EAAc,CAAE,OAAA,EAAQ;AAAA,EACjC,KAAA,EAAO,aAAA,EAAc,CAAE,KAAA,EAAM;AAAA,EAC7B,IAAA,EAAM,aAAA,EAAc,CAAE,IAAA;AACxB,CAAC","file":"split-button.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 * split-button.ts — tailwind-variants slots for the M3 SplitButton.\n *\n * Two 40dp surfaces joined by a 2dp seam: the leading primary-action button\n * keeps its outer (start) corner full and reduces the seam (end) corner; the\n * trailing menu trigger mirrors it. Both share the variant container color. The\n * trigger carries `group` so the default chevron can rotate via Base UI's\n * `data-[popup-open]`. The dropdown reuses the M3 menu surface. State layer is\n * the `::before` overlay; the pointer ripple is added by the factory. Same DOM\n * as the VE build.\n */\nimport { createSplitButton } from '@m3-baseui/core';\nimport { tv } from './tv';\n\n// Shared surface base for both the leading + trailing buttons.\nconst surface = [\n 'relative inline-flex items-center justify-center h-10 overflow-hidden cursor-pointer select-none border-0 outline-none',\n 'text-label-large',\n 'transition-[background-color,color,border-color] duration-200 ease-standard',\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 'data-[pressed]:before:opacity-[var(--md-sys-state-pressed)]',\n 'focus-visible:outline-[3px] focus-visible:outline-offset-2 focus-visible:outline-secondary',\n 'disabled:pointer-events-none disabled:before:opacity-0',\n 'data-[disabled]:pointer-events-none data-[disabled]:before:opacity-0',\n];\n\n// Per-variant container colors (identical on both surfaces). M3 disabled is\n// per-token (container on-surface/12, label on-surface/38), not a blanket fade.\nconst VARIANT_FILLED = [\n 'bg-primary text-on-primary',\n 'disabled:bg-on-surface/12 disabled:text-on-surface/38',\n 'data-[disabled]:bg-on-surface/12 data-[disabled]:text-on-surface/38',\n];\nconst VARIANT_TONAL = [\n 'bg-secondary-container text-on-secondary-container',\n 'disabled:bg-on-surface/12 disabled:text-on-surface/38',\n 'data-[disabled]:bg-on-surface/12 data-[disabled]:text-on-surface/38',\n];\nconst VARIANT_OUTLINED = [\n 'bg-transparent text-primary border border-outline',\n 'disabled:text-on-surface/38 disabled:border-on-surface/12',\n 'data-[disabled]:text-on-surface/38 data-[disabled]:border-on-surface/12',\n];\nconst VARIANT_ELEVATED = [\n 'bg-surface-container-low text-primary shadow-level1',\n 'disabled:bg-on-surface/12 disabled:text-on-surface/38 disabled:shadow-none',\n 'data-[disabled]:bg-on-surface/12 data-[disabled]:text-on-surface/38 data-[disabled]:shadow-none',\n];\nconst VARIANT_TEXT = [\n 'bg-transparent text-primary',\n 'disabled:text-on-surface/38',\n 'data-[disabled]:text-on-surface/38',\n];\n\nexport const splitButtonTv = tv({\n slots: {\n group: 'inline-flex items-center gap-0.5',\n // leading: outer (start) corner full, seam (end) corner reduced.\n leading: [...surface, 'gap-2 px-6 rounded-s-full rounded-e-small'],\n // trailing: seam (start) corner reduced, outer (end) corner full.\n trailing: [...surface, 'group gap-1 px-3 rounded-s-small rounded-e-full'],\n chevron: [\n 'inline-flex items-center justify-center shrink-0 [&>svg]:size-[18px]',\n 'transition-transform duration-200 ease-standard group-data-[popup-open]:rotate-180',\n ],\n popup: [\n 'min-w-[112px] max-w-[280px] py-2',\n 'bg-surface-container text-on-surface rounded-extra-small 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 item: [\n 'relative flex items-center gap-3 h-12 px-3 overflow-hidden cursor-pointer select-none outline-none',\n 'text-label-large text-on-surface',\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 'data-[highlighted]:before:opacity-[var(--md-sys-state-hover)]',\n 'active:before:opacity-[var(--md-sys-state-pressed)]',\n 'data-[disabled]:text-on-surface/[0.38] data-[disabled]:before:opacity-0 data-[disabled]:pointer-events-none',\n ],\n },\n variants: {\n variant: {\n filled: { leading: VARIANT_FILLED, trailing: VARIANT_FILLED },\n tonal: { leading: VARIANT_TONAL, trailing: VARIANT_TONAL },\n outlined: { leading: VARIANT_OUTLINED, trailing: VARIANT_OUTLINED },\n elevated: { leading: VARIANT_ELEVATED, trailing: VARIANT_ELEVATED },\n text: { leading: VARIANT_TEXT, trailing: VARIANT_TEXT },\n },\n },\n defaultVariants: {\n variant: 'filled',\n },\n});\n\nexport const SplitButton = createSplitButton({\n group: splitButtonTv().group(),\n leading: (variant) => splitButtonTv({ variant }).leading(),\n trailing: (variant) => splitButtonTv({ variant }).trailing(),\n chevron: splitButtonTv().chevron(),\n popup: splitButtonTv().popup(),\n item: splitButtonTv().item(),\n});\n"]}
|
package/dist/switch.d.ts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
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_dist_config_js from 'tailwind-variants/dist/config.js';
|
|
5
|
-
import * as tailwind_variants from 'tailwind-variants';
|
|
6
|
-
|
|
7
|
-
declare const switchTv: tailwind_variants.TVReturnType<{
|
|
8
|
-
[key: string]: {
|
|
9
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
10
|
-
root?: tailwind_variants.ClassValue;
|
|
11
|
-
thumb?: tailwind_variants.ClassValue;
|
|
12
|
-
iconChecked?: tailwind_variants.ClassValue;
|
|
13
|
-
iconUnchecked?: tailwind_variants.ClassValue;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
} | {
|
|
17
|
-
[x: string]: {
|
|
18
|
-
[x: string]: tailwind_variants.ClassValue | {
|
|
19
|
-
root?: tailwind_variants.ClassValue;
|
|
20
|
-
thumb?: tailwind_variants.ClassValue;
|
|
21
|
-
iconChecked?: tailwind_variants.ClassValue;
|
|
22
|
-
iconUnchecked?: tailwind_variants.ClassValue;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
} | {}, {
|
|
26
|
-
root: string[];
|
|
27
|
-
thumb: string[];
|
|
28
|
-
iconChecked: string[];
|
|
29
|
-
iconUnchecked: string[];
|
|
30
|
-
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
31
|
-
[key: string]: {
|
|
32
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
33
|
-
root?: tailwind_variants.ClassValue;
|
|
34
|
-
thumb?: tailwind_variants.ClassValue;
|
|
35
|
-
iconChecked?: tailwind_variants.ClassValue;
|
|
36
|
-
iconUnchecked?: tailwind_variants.ClassValue;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
} | {}>, {
|
|
40
|
-
[key: string]: {
|
|
41
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
42
|
-
root?: tailwind_variants.ClassValue;
|
|
43
|
-
thumb?: tailwind_variants.ClassValue;
|
|
44
|
-
iconChecked?: tailwind_variants.ClassValue;
|
|
45
|
-
iconUnchecked?: tailwind_variants.ClassValue;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
} | {}, {
|
|
49
|
-
root: string[];
|
|
50
|
-
thumb: string[];
|
|
51
|
-
iconChecked: string[];
|
|
52
|
-
iconUnchecked: string[];
|
|
53
|
-
}, tailwind_variants.TVReturnType<unknown, {
|
|
54
|
-
root: string[];
|
|
55
|
-
thumb: string[];
|
|
56
|
-
iconChecked: string[];
|
|
57
|
-
iconUnchecked: string[];
|
|
58
|
-
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
59
|
-
[key: string]: {
|
|
60
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
61
|
-
root?: tailwind_variants.ClassValue;
|
|
62
|
-
thumb?: tailwind_variants.ClassValue;
|
|
63
|
-
iconChecked?: tailwind_variants.ClassValue;
|
|
64
|
-
iconUnchecked?: tailwind_variants.ClassValue;
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
} | {}>, unknown, unknown, undefined>>;
|
|
68
|
-
declare const Switch: react.ForwardRefExoticComponent<Omit<Omit<_base_ui_react.SwitchRootProps, "ref"> & react.RefAttributes<HTMLElement>, "ref"> & {
|
|
69
|
-
icons?: _m3_baseui_core.SwitchIcons;
|
|
70
|
-
} & react.RefAttributes<HTMLElement>>;
|
|
71
|
-
|
|
72
|
-
export { Switch, switchTv };
|
package/dist/switch.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/switch.ts"],"names":[],"mappings":";;;;;AAUO,IAAM,WAAW,EAAA,CAAG;AAAA,EACzB,KAAA,EAAO;AAAA,IACL,IAAA,EAAM;AAAA,MACJ,kGAAA;AAAA,MACA,6CAAA;AAAA,MACA,8CAAA;AAAA,MACA,yDAAA;AAAA,MACA,4FAAA;AAAA,MACA,qCAAA;AAAA;AAAA;AAAA,MAGA,sFAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,KAAA,EAAO;AAAA,MACL,sFAAA;AAAA,MACA,kCAAA;AAAA,MACA,4BAAA;AAAA;AAAA;AAAA;AAAA,MAIA,iFAAA;AAAA,MACA,2GAAA;AAAA;AAAA,MAEA,mFAAA;AAAA;AAAA;AAAA,MAGA,gHAAA;AAAA,MACA,0JAAA;AAAA;AAAA,MAEA,yCAAA;AAAA,MACA,uEAAA;AAAA;AAAA,MAEA,wCAAA;AAAA,MACA,iDAAA;AAAA;AAAA,MAEA,oHAAA;AAAA,MACA,qHAAA;AAAA,MACA,wDAAA;AAAA,MACA,gEAAA;AAAA,MACA;AAAA,KACF;AAAA;AAAA,IAEA,WAAA,EAAa;AAAA,MACX,qEAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,aAAA,EAAe;AAAA,MACb,qEAAA;AAAA,MACA;AAAA;AACF;AAEJ,CAAC;AAED,IAAM,IAAI,QAAA,EAAS;AACZ,IAAM,SAAS,YAAA,CAAa;AAAA,EACjC,IAAA,EAAM,EAAE,IAAA,EAAK;AAAA,EACb,KAAA,EAAO,EAAE,KAAA,EAAM;AAAA,EACf,WAAA,EAAa,EAAE,WAAA,EAAY;AAAA,EAC3B,aAAA,EAAe,EAAE,aAAA;AACnB,CAAC","file":"switch.js","sourcesContent":["/**\n * switch.ts — tailwind-variants slots for the M3 Switch.\n *\n * Track + handle styled off Base UI's data-checked/data-disabled state. The\n * thumb grows and slides when checked; a 40dp circular state layer (`before:`)\n * reacts to hover/focus/press on the root via the `group` utility.\n */\nimport { createSwitch } from '@m3-baseui/core';\nimport { tv } from 'tailwind-variants';\n\nexport const switchTv = tv({\n slots: {\n root: [\n 'group relative inline-flex shrink-0 w-[52px] h-8 rounded-full border-2 box-border cursor-pointer',\n 'bg-surface-container-highest border-outline',\n 'transition-colors duration-200 ease-standard',\n 'data-[checked]:bg-primary data-[checked]:border-primary',\n 'focus-visible:outline-[3px] focus-visible:outline-offset-2 focus-visible:outline-secondary',\n 'data-[disabled]:pointer-events-none',\n // M3 disabled: faint track + outline (unselected); on-surface/12 track,\n // no outline (selected). Not a blanket element opacity.\n 'data-[disabled]:bg-surface-container-highest/12 data-[disabled]:border-on-surface/12',\n 'data-[disabled]:data-[checked]:bg-on-surface/12 data-[disabled]:data-[checked]:border-transparent',\n ],\n thumb: [\n 'absolute top-1/2 -translate-y-1/2 left-[6px] size-4 rounded-full pointer-events-none',\n 'flex items-center justify-center',\n 'bg-outline text-on-surface',\n // M3 spatial motion: the handle slides/grows with emphasized easing over\n // 300ms (token-backed). emphasized is overshoot-free, so it stays safe for\n // the handle's color transitions too (no spring flicker on background-color).\n 'transition-all ease-emphasized duration-[var(--md-sys-motion-duration-medium2)]',\n 'data-[checked]:left-[22px] data-[checked]:size-6 data-[checked]:bg-on-primary data-[checked]:text-primary',\n // M3 with-icon: the unchecked handle grows to 24dp to fit its icon\n 'data-[with-icon]:data-[unchecked]:left-1 data-[with-icon]:data-[unchecked]:size-6',\n // M3 handle interaction colors: unselected outline→on-surface-variant,\n // selected on-primary→primary-container on hover/focus/press\n 'group-hover:bg-on-surface-variant group-focus-visible:bg-on-surface-variant group-active:bg-on-surface-variant',\n 'group-hover:data-[checked]:bg-primary-container group-focus-visible:data-[checked]:bg-primary-container group-active:data-[checked]:bg-primary-container',\n // M3 squish: handle grows to 28px while pressed, staying on its side\n 'group-active:left-0 group-active:size-7',\n 'group-active:data-[checked]:left-5 group-active:data-[checked]:size-7',\n // M3 disabled handle: on-surface/38 (unselected), surface (selected)\n 'group-data-[disabled]:bg-on-surface/38',\n 'group-data-[disabled]:data-[checked]:bg-surface',\n // 40dp circular state layer centered on the thumb\n 'before:content-[\"\"] before:absolute before:left-1/2 before:top-1/2 before:-translate-x-1/2 before:-translate-y-1/2',\n 'before:size-10 before:rounded-full before:bg-current before:opacity-0 before:transition-opacity before:duration-100',\n 'group-hover:before:opacity-[var(--md-sys-state-hover)]',\n 'group-focus-visible:before:opacity-[var(--md-sys-state-focus)]',\n 'group-active:before:opacity-[var(--md-sys-state-pressed)]',\n ],\n // Handle icons (16dp). Both stay mounted; the root's data-checked reveals one.\n iconChecked: [\n 'hidden group-data-[checked]:inline-flex items-center justify-center',\n 'text-on-primary-container [&>svg]:size-4',\n ],\n iconUnchecked: [\n 'inline-flex group-data-[checked]:hidden items-center justify-center',\n 'text-surface-container-highest [&>svg]:size-4',\n ],\n },\n});\n\nconst s = switchTv();\nexport const Switch = createSwitch({\n root: s.root(),\n thumb: s.thumb(),\n iconChecked: s.iconChecked(),\n iconUnchecked: s.iconUnchecked(),\n});\n"]}
|
package/dist/tabs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tv.ts","../src/tabs.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;;;ACjCI,IAAM,SAAS,EAAA,CAAG;AAAA,EACvB,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,eAAA;AAAA,IACN,IAAA,EAAM;AAAA,MACJ,+CAAA;AAAA;AAAA,MAEA,iEAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,GAAA,EAAK;AAAA,MACH,oFAAA;AAAA,MACA,kFAAA;AAAA,MACA,yBAAA;AAAA;AAAA,MAEA,0EAAA;AAAA,MACA,4IAAA;AAAA,MACA,kDAAA;AAAA,MACA,0DAAA;AAAA,MACA,qDAAA;AAAA;AAAA;AAAA,MAGA,6GAAA;AAAA;AAAA;AAAA,MAGA;AAAA,KACF;AAAA,IACA,SAAA,EAAW;AAAA,MACT,qCAAA;AAAA,MACA,kEAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,KAAA,EAAO;AAAA,GACT;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAA,EAAS;AAAA;AAAA;AAAA,MAGP,OAAA,EAAS;AAAA,QACP,GAAA,EAAK,mGAAA;AAAA,QACL,SAAA,EAAW;AAAA,OACb;AAAA;AAAA,MAEA,SAAA,EAAW,EAAE,GAAA,EAAK,+BAAA,EAAiC,WAAW,SAAA;AAAU;AAC1E,GACF;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,OAAA,EAAS;AAAA;AAEb,CAAC;AAEM,IAAM,IAAA,GAAO,UAAA,CAAW,CAAC,OAAA,KAAY;AAC1C,EAAA,MAAM,CAAA,GAAI,MAAA,CAAO,EAAE,OAAA,EAAS,CAAA;AAC5B,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,EAAE,IAAA,EAAK;AAAA,IACb,IAAA,EAAM,EAAE,IAAA,EAAK;AAAA,IACb,GAAA,EAAK,EAAE,GAAA,EAAI;AAAA,IACX,SAAA,EAAW,EAAE,SAAA,EAAU;AAAA,IACvB,KAAA,EAAO,EAAE,KAAA;AAAM,GACjB;AACF,CAAC","file":"tabs.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 * tabs.ts — tailwind-variants slots for the M3 Tabs.\n *\n * The active-tab underline reads Base UI's --active-tab-width/left CSS vars on\n * the indicator. The `variant` recolors the active tab (primary → primary,\n * secondary → on-surface). Tabs carry a `before:` state layer + ripple.\n */\nimport { createTabs } from '@m3-baseui/core';\nimport { tv } from './tv';\n\nexport const tabsTv = tv({\n slots: {\n root: 'flex flex-col',\n list: [\n 'relative flex border-b border-surface-variant',\n // M3 scrollable tabs: horizontal overflow, no wrap, hidden scrollbar.\n 'data-[scrollable]:overflow-x-auto data-[scrollable]:flex-nowrap',\n 'data-[scrollable]:[scrollbar-width:none] data-[scrollable]:[&::-webkit-scrollbar]:hidden',\n ],\n tab: [\n 'relative flex shrink-0 items-center justify-center gap-2 h-12 px-4 overflow-hidden',\n 'cursor-pointer select-none border-0 bg-transparent outline-none text-title-small',\n 'text-on-surface-variant',\n // Icon slot (24dp), centered.\n '[&_[data-slot=tab-icon]]:inline-flex [&_[data-slot=tab-icon]>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 // M3 disabled (per-token, not a blanket fade): label + icon on-surface/0.38,\n // no state layer. currentColor carries the dim to the icon slot.\n 'data-[disabled]:text-on-surface/[0.38] data-[disabled]:before:opacity-0 data-[disabled]:pointer-events-none',\n // A disabled tab that is also the active value stays dimmed: the variant's\n // data-[active] color has equal specificity, so a combined selector wins.\n 'data-[disabled]:data-[active]:text-on-surface/[0.38]',\n ],\n indicator: [\n 'absolute bottom-0 left-0 bg-primary',\n 'w-[var(--active-tab-width)] translate-x-[var(--active-tab-left)]',\n 'transition-all duration-200 ease-standard',\n ],\n panel: 'p-4 outline-none',\n },\n variants: {\n variant: {\n // primary: 3dp active indicator with rounded top corners; icon stacks\n // above the label (64dp tall) when a tab carries an icon.\n primary: {\n tab: 'data-[active]:text-primary data-[with-icon]:flex-col data-[with-icon]:h-16 data-[with-icon]:gap-1',\n indicator: 'h-[3px] rounded-t-[3px]',\n },\n // secondary: 2dp square active indicator, active label = on-surface\n secondary: { tab: 'data-[active]:text-on-surface', indicator: 'h-[2px]' },\n },\n },\n defaultVariants: {\n variant: 'primary',\n },\n});\n\nexport const Tabs = createTabs((variant) => {\n const s = tabsTv({ variant });\n return {\n root: s.root(),\n list: s.list(),\n tab: s.tab(),\n indicator: s.indicator(),\n panel: s.panel(),\n };\n});\nexport type { TabsVariant } from '@m3-baseui/core';\n"]}
|
package/dist/textfield.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/textfield.ts"],"names":[],"mappings":";;;;;AAYO,IAAM,cAAc,EAAA,CAAG;AAAA,EAC5B,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,mCAAA;AAAA,IACN,KAAA,EAAO;AAAA,MACL,wDAAA;AAAA,MACA,8DAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,SAAA,EAAW,2CAAA;AAAA,IACX,KAAA,EAAO;AAAA,MACL,sFAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,KAAA,EAAO;AAAA,MACL,iDAAA;AAAA,MACA,kEAAA;AAAA,MACA,2CAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,WAAA,EAAa,oDAAA;AAAA,IACb,YAAA,EAAc,oDAAA;AAAA,IACd,UAAA,EAAY;AAAA,MACV,yEAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,cAAA,EAAgB,SAAA;AAAA,IAChB,OAAA,EAAS;AAAA,GACX;AAAA,EACA,QAAA,EAAU;AAAA,IACR,OAAA,EAAS;AAAA,MACP,MAAA,EAAQ;AAAA,QACN,KAAA,EAAO;AAAA,UACL,oDAAA;AAAA,UACA,2BAAA;AAAA;AAAA,UAEA;AAAA,SACF;AAAA,QACA,KAAA,EAAO,MAAA;AAAA,QACP,KAAA,EAAO;AAAA,UACL,sGAAA;AAAA,UACA;AAAA;AACF,OACF;AAAA,MACA,QAAA,EAAU;AAAA,QACR,KAAA,EAAO;AAAA,UACL,2CAAA;AAAA;AAAA;AAAA,UAGA,sGAAA;AAAA,UACA;AAAA,SACF;AAAA,QACA,KAAA,EAAO;AAAA,UACL,iKAAA;AAAA,UACA;AAAA;AACF;AACF;AACF,GACF;AAAA,EACA,eAAA,EAAiB;AAAA,IACf,OAAA,EAAS;AAAA;AAEb,CAAC;AAEM,IAAM,SAAA,GAAY,eAAA,CAAgB,CAAC,EAAE,SAAQ,KAAM;AACxD,EAAA,MAAM,CAAA,GAAI,WAAA,CAAY,EAAE,OAAA,EAAS,CAAA;AACjC,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,EAAE,IAAA,EAAK;AAAA,IACb,KAAA,EAAO,EAAE,KAAA,EAAM;AAAA,IACf,SAAA,EAAW,EAAE,SAAA,EAAU;AAAA,IACvB,KAAA,EAAO,EAAE,KAAA,EAAM;AAAA,IACf,KAAA,EAAO,EAAE,KAAA,EAAM;AAAA,IACf,WAAA,EAAa,EAAE,WAAA,EAAY;AAAA,IAC3B,YAAA,EAAc,EAAE,YAAA,EAAa;AAAA,IAC7B,UAAA,EAAY,EAAE,UAAA,EAAW;AAAA,IACzB,cAAA,EAAgB,EAAE,cAAA,EAAe;AAAA,IACjC,OAAA,EAAS,EAAE,OAAA;AAAQ,GACrB;AACF,CAAC","file":"textfield.js","sourcesContent":["/**\n * textfield.ts — tailwind-variants slots for the M3 TextField.\n *\n * 56dp tall. The floating label and focus/filled border key off Field's\n * `data-focused` / `data-filled` / `data-invalid` via the `group` on Root.\n * Filled = surface-container-highest with a bottom indicator; outlined = a\n * border that thickens to 3dp primary on focus (M3 focus-outline-width). Same\n * DOM as the VE build.\n */\nimport { createTextField } from '@m3-baseui/core';\nimport { tv } from 'tailwind-variants';\n\nexport const textFieldTv = tv({\n slots: {\n root: 'flex flex-col gap-1 min-w-[210px]',\n field: [\n 'relative flex items-stretch gap-3 h-14 px-4 box-border',\n 'transition-[border-color,padding] duration-150 ease-standard',\n 'group-data-[disabled]:opacity-[0.38] group-data-[disabled]:pointer-events-none',\n ],\n inputWrap: 'relative flex-1 flex items-center min-w-0',\n input: [\n 'peer w-full bg-transparent outline-none border-0 p-0 text-body-large text-on-surface',\n 'placeholder:text-on-surface-variant',\n ],\n label: [\n 'absolute left-0 pointer-events-none origin-left',\n 'top-1/2 -translate-y-1/2 text-body-large text-on-surface-variant',\n 'transition-all duration-150 ease-standard',\n 'group-data-[focused]:text-primary group-data-[invalid]:text-error',\n ],\n leadingIcon: 'flex items-center shrink-0 text-on-surface-variant',\n trailingIcon: 'flex items-center shrink-0 text-on-surface-variant',\n supporting: [\n 'flex justify-between gap-4 px-4 text-body-small text-on-surface-variant',\n 'group-data-[invalid]:text-error',\n ],\n supportingText: 'min-w-0',\n counter: 'shrink-0 tabular-nums',\n },\n variants: {\n variant: {\n filled: {\n field: [\n 'rounded-t-extra-small bg-surface-container-highest',\n 'border-b-2 border-outline',\n // M3 filled focus-active-indicator-height is 3dp (resting/error stay 2dp).\n 'group-data-[focused]:border-b-[3px] group-data-[focused]:border-primary group-data-[invalid]:border-error',\n ],\n input: 'pt-3',\n label: [\n 'group-data-[focused]:top-1.5 group-data-[focused]:translate-y-0 group-data-[focused]:text-body-small',\n 'group-data-[filled]:top-1.5 group-data-[filled]:translate-y-0 group-data-[filled]:text-body-small',\n ],\n },\n outlined: {\n field: [\n 'rounded-extra-small border border-outline',\n // M3 outlined focus-outline-width is 3dp (matches Select's trigger);\n // padding drops 2px so content stays steady as the 1dp border grows.\n 'group-data-[focused]:border-[3px] group-data-[focused]:border-primary group-data-[focused]:px-[14px]',\n 'group-data-[invalid]:border-error',\n ],\n label: [\n 'group-data-[focused]:top-0 group-data-[focused]:-translate-y-1/2 group-data-[focused]:text-body-small group-data-[focused]:bg-surface group-data-[focused]:px-1',\n 'group-data-[filled]:top-0 group-data-[filled]:-translate-y-1/2 group-data-[filled]:text-body-small group-data-[filled]:bg-surface group-data-[filled]:px-1',\n ],\n },\n },\n },\n defaultVariants: {\n variant: 'filled',\n },\n});\n\nexport const TextField = createTextField(({ variant }) => {\n const c = textFieldTv({ variant });\n return {\n root: c.root(),\n field: c.field(),\n inputWrap: c.inputWrap(),\n input: c.input(),\n label: c.label(),\n leadingIcon: c.leadingIcon(),\n trailingIcon: c.trailingIcon(),\n supporting: c.supporting(),\n supportingText: c.supportingText(),\n counter: c.counter(),\n };\n});\n\nexport type { TextFieldProps, TextFieldVariant } from '@m3-baseui/core';\n"]}
|
package/dist/time-picker.d.ts
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import * as _m3_baseui_core from '@m3-baseui/core';
|
|
2
|
-
export { TimePickerVariant, TimeValue } from '@m3-baseui/core';
|
|
3
|
-
import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
|
|
4
|
-
import * as tailwind_variants from 'tailwind-variants';
|
|
5
|
-
|
|
6
|
-
declare const timePickerTv: tailwind_variants.TVReturnType<{
|
|
7
|
-
[key: string]: {
|
|
8
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
9
|
-
root?: tailwind_variants.ClassValue;
|
|
10
|
-
header?: tailwind_variants.ClassValue;
|
|
11
|
-
dial?: tailwind_variants.ClassValue;
|
|
12
|
-
field?: tailwind_variants.ClassValue;
|
|
13
|
-
colon?: tailwind_variants.ClassValue;
|
|
14
|
-
periods?: tailwind_variants.ClassValue;
|
|
15
|
-
period?: tailwind_variants.ClassValue;
|
|
16
|
-
dialNumber?: tailwind_variants.ClassValue;
|
|
17
|
-
dialHand?: tailwind_variants.ClassValue;
|
|
18
|
-
dialCenter?: tailwind_variants.ClassValue;
|
|
19
|
-
inputs?: tailwind_variants.ClassValue;
|
|
20
|
-
inputBox?: tailwind_variants.ClassValue;
|
|
21
|
-
inputCaption?: tailwind_variants.ClassValue;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
} | {
|
|
25
|
-
[x: string]: {
|
|
26
|
-
[x: string]: tailwind_variants.ClassValue | {
|
|
27
|
-
root?: tailwind_variants.ClassValue;
|
|
28
|
-
header?: tailwind_variants.ClassValue;
|
|
29
|
-
dial?: tailwind_variants.ClassValue;
|
|
30
|
-
field?: tailwind_variants.ClassValue;
|
|
31
|
-
colon?: tailwind_variants.ClassValue;
|
|
32
|
-
periods?: tailwind_variants.ClassValue;
|
|
33
|
-
period?: tailwind_variants.ClassValue;
|
|
34
|
-
dialNumber?: tailwind_variants.ClassValue;
|
|
35
|
-
dialHand?: tailwind_variants.ClassValue;
|
|
36
|
-
dialCenter?: tailwind_variants.ClassValue;
|
|
37
|
-
inputs?: tailwind_variants.ClassValue;
|
|
38
|
-
inputBox?: tailwind_variants.ClassValue;
|
|
39
|
-
inputCaption?: tailwind_variants.ClassValue;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
} | {}, {
|
|
43
|
-
root: string[];
|
|
44
|
-
header: string[];
|
|
45
|
-
field: string[];
|
|
46
|
-
colon: string[];
|
|
47
|
-
periods: string[];
|
|
48
|
-
period: string[];
|
|
49
|
-
dial: string[];
|
|
50
|
-
dialNumber: string[];
|
|
51
|
-
dialHand: string[];
|
|
52
|
-
dialCenter: string[];
|
|
53
|
-
inputs: string[];
|
|
54
|
-
inputBox: string[];
|
|
55
|
-
inputCaption: string[];
|
|
56
|
-
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
57
|
-
[key: string]: {
|
|
58
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
59
|
-
root?: tailwind_variants.ClassValue;
|
|
60
|
-
header?: tailwind_variants.ClassValue;
|
|
61
|
-
dial?: tailwind_variants.ClassValue;
|
|
62
|
-
field?: tailwind_variants.ClassValue;
|
|
63
|
-
colon?: tailwind_variants.ClassValue;
|
|
64
|
-
periods?: tailwind_variants.ClassValue;
|
|
65
|
-
period?: tailwind_variants.ClassValue;
|
|
66
|
-
dialNumber?: tailwind_variants.ClassValue;
|
|
67
|
-
dialHand?: tailwind_variants.ClassValue;
|
|
68
|
-
dialCenter?: tailwind_variants.ClassValue;
|
|
69
|
-
inputs?: tailwind_variants.ClassValue;
|
|
70
|
-
inputBox?: tailwind_variants.ClassValue;
|
|
71
|
-
inputCaption?: tailwind_variants.ClassValue;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
} | {}>, {
|
|
75
|
-
[key: string]: {
|
|
76
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
77
|
-
root?: tailwind_variants.ClassValue;
|
|
78
|
-
header?: tailwind_variants.ClassValue;
|
|
79
|
-
dial?: tailwind_variants.ClassValue;
|
|
80
|
-
field?: tailwind_variants.ClassValue;
|
|
81
|
-
colon?: tailwind_variants.ClassValue;
|
|
82
|
-
periods?: tailwind_variants.ClassValue;
|
|
83
|
-
period?: tailwind_variants.ClassValue;
|
|
84
|
-
dialNumber?: tailwind_variants.ClassValue;
|
|
85
|
-
dialHand?: tailwind_variants.ClassValue;
|
|
86
|
-
dialCenter?: tailwind_variants.ClassValue;
|
|
87
|
-
inputs?: tailwind_variants.ClassValue;
|
|
88
|
-
inputBox?: tailwind_variants.ClassValue;
|
|
89
|
-
inputCaption?: tailwind_variants.ClassValue;
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
} | {}, {
|
|
93
|
-
root: string[];
|
|
94
|
-
header: string[];
|
|
95
|
-
field: string[];
|
|
96
|
-
colon: string[];
|
|
97
|
-
periods: string[];
|
|
98
|
-
period: string[];
|
|
99
|
-
dial: string[];
|
|
100
|
-
dialNumber: string[];
|
|
101
|
-
dialHand: string[];
|
|
102
|
-
dialCenter: string[];
|
|
103
|
-
inputs: string[];
|
|
104
|
-
inputBox: string[];
|
|
105
|
-
inputCaption: string[];
|
|
106
|
-
}, tailwind_variants.TVReturnType<unknown, {
|
|
107
|
-
root: string[];
|
|
108
|
-
header: string[];
|
|
109
|
-
field: string[];
|
|
110
|
-
colon: string[];
|
|
111
|
-
periods: string[];
|
|
112
|
-
period: string[];
|
|
113
|
-
dial: string[];
|
|
114
|
-
dialNumber: string[];
|
|
115
|
-
dialHand: string[];
|
|
116
|
-
dialCenter: string[];
|
|
117
|
-
inputs: string[];
|
|
118
|
-
inputBox: string[];
|
|
119
|
-
inputCaption: string[];
|
|
120
|
-
}, undefined, tailwind_variants_dist_config_js.TVConfig<unknown, {
|
|
121
|
-
[key: string]: {
|
|
122
|
-
[key: string]: tailwind_variants.ClassValue | {
|
|
123
|
-
root?: tailwind_variants.ClassValue;
|
|
124
|
-
header?: tailwind_variants.ClassValue;
|
|
125
|
-
dial?: tailwind_variants.ClassValue;
|
|
126
|
-
field?: tailwind_variants.ClassValue;
|
|
127
|
-
colon?: tailwind_variants.ClassValue;
|
|
128
|
-
periods?: tailwind_variants.ClassValue;
|
|
129
|
-
period?: tailwind_variants.ClassValue;
|
|
130
|
-
dialNumber?: tailwind_variants.ClassValue;
|
|
131
|
-
dialHand?: tailwind_variants.ClassValue;
|
|
132
|
-
dialCenter?: tailwind_variants.ClassValue;
|
|
133
|
-
inputs?: tailwind_variants.ClassValue;
|
|
134
|
-
inputBox?: tailwind_variants.ClassValue;
|
|
135
|
-
inputCaption?: tailwind_variants.ClassValue;
|
|
136
|
-
};
|
|
137
|
-
};
|
|
138
|
-
} | {}>, unknown, unknown, undefined>>;
|
|
139
|
-
declare const TimePicker: {
|
|
140
|
-
({ variant, format, value, defaultValue, onValueChange, className, }: _m3_baseui_core.TimePickerOwnProps): React.JSX.Element;
|
|
141
|
-
displayName: string;
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
export { TimePicker, timePickerTv };
|
package/dist/time-picker.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tv.ts","../src/time-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;;;AC7BI,IAAM,eAAe,EAAA,CAAG;AAAA,EAC7B,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,CAAC,6DAA6D,CAAA;AAAA,IACpE,MAAA,EAAQ,CAAC,yBAAyB,CAAA;AAAA,IAClC,KAAA,EAAO;AAAA,MACL,mFAAA;AAAA,MACA,6FAAA;AAAA,MACA,0DAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,KAAA,EAAO,CAAC,sDAAsD,CAAA;AAAA,IAC9D,OAAA,EAAS;AAAA,MACP,uFAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,MAAA,EAAQ;AAAA,MACN,uEAAA;AAAA,MACA,yBAAA;AAAA,MACA,uEAAA;AAAA,MACA,oFAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,IAAA,EAAM;AAAA,MACJ;AAAA,KACF;AAAA,IACA,UAAA,EAAY;AAAA,MACV,gGAAA;AAAA,MACA,yBAAA;AAAA,MACA,yEAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,QAAA,EAAU;AAAA,MACR;AAAA,KACF;AAAA,IACA,UAAA,EAAY;AAAA,MACV;AAAA,KACF;AAAA,IACA,MAAA,EAAQ,CAAC,wBAAwB,CAAA;AAAA,IACjC,QAAA,EAAU;AAAA,MACR,gDAAA;AAAA,MACA,8EAAA;AAAA,MACA,2DAAA;AAAA,MACA;AAAA,KACF;AAAA,IACA,YAAA,EAAc,CAAC,oDAAoD;AAAA;AAEvE,CAAC;AAED,IAAM,KAAK,YAAA,EAAa;AACjB,IAAM,UAAA,GAAa,iBAAiB,OAAO;AAAA,EAChD,IAAA,EAAM,GAAG,IAAA,EAAK;AAAA,EACd,MAAA,EAAQ,GAAG,MAAA,EAAO;AAAA,EAClB,KAAA,EAAO,GAAG,KAAA,EAAM;AAAA,EAChB,KAAA,EAAO,GAAG,KAAA,EAAM;AAAA,EAChB,OAAA,EAAS,GAAG,OAAA,EAAQ;AAAA,EACpB,MAAA,EAAQ,GAAG,MAAA,EAAO;AAAA,EAClB,IAAA,EAAM,GAAG,IAAA,EAAK;AAAA,EACd,UAAA,EAAY,GAAG,UAAA,EAAW;AAAA,EAC1B,QAAA,EAAU,GAAG,QAAA,EAAS;AAAA,EACtB,UAAA,EAAY,GAAG,UAAA,EAAW;AAAA,EAC1B,MAAA,EAAQ,GAAG,MAAA,EAAO;AAAA,EAClB,QAAA,EAAU,GAAG,QAAA,EAAS;AAAA,EACtB,YAAA,EAAc,GAAG,YAAA;AACnB,CAAA,CAAE","file":"time-picker.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 * time-picker.ts — Tailwind classes for the M3 Time picker (dial + input).\n *\n * The header time fields are surface-container-highest blocks (display-large)\n * that fill with primary-container when active; the AM/PM toggle fills with\n * secondary-container. The dial is a surface-container-highest face whose\n * selected number fills with primary and is reached by a primary hand. Same DOM\n * + data-* as the VE build.\n */\nimport { createTimePicker } from '@m3-baseui/core';\nimport { tv } from './tv';\n\nexport type { TimePickerVariant, TimeValue } from '@m3-baseui/core';\n\nexport const timePickerTv = tv({\n slots: {\n root: ['inline-flex flex-col items-center gap-2 p-2 text-on-surface'],\n header: ['flex items-center gap-2'],\n field: [\n 'inline-grid place-items-center w-24 h-20 rounded-small overflow-hidden box-border',\n 'bg-surface-container-highest text-on-surface text-display-large cursor-pointer outline-none',\n 'border border-transparent transition-colors duration-100',\n 'data-[selected]:bg-primary-container data-[selected]:text-on-primary-container',\n ],\n colon: ['text-display-large text-on-surface px-1 leading-none'],\n periods: [\n 'inline-flex flex-col rounded-small overflow-hidden border border-outline self-stretch',\n 'm-0 p-0 min-w-0',\n ],\n period: [\n 'flex-1 inline-flex items-center justify-center px-3 min-h-[38px] w-14',\n 'border-0 bg-transparent',\n 'text-title-medium text-on-surface-variant cursor-pointer outline-none',\n 'data-[selected]:bg-secondary-container data-[selected]:text-on-secondary-container',\n '[&+&]:border-t [&+&]:border-outline',\n ],\n dial: [\n 'relative size-[256px] my-2 p-0 min-w-0 border-0 rounded-full bg-surface-container-highest',\n ],\n dialNumber: [\n 'absolute -translate-x-1/2 -translate-y-1/2 inline-grid place-items-center size-12 rounded-full',\n 'border-0 bg-transparent',\n 'text-body-large text-on-surface cursor-pointer outline-none select-none',\n 'data-[selected]:bg-primary data-[selected]:text-on-primary',\n ],\n dialHand: [\n 'absolute left-1/2 top-[12%] h-[38%] w-0.5 origin-bottom bg-primary -translate-x-1/2 pointer-events-none',\n ],\n dialCenter: [\n 'absolute left-1/2 top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary pointer-events-none',\n ],\n inputs: ['flex items-start gap-2'],\n inputBox: [\n 'w-24 h-20 rounded-small box-border text-center',\n 'bg-surface-container-highest text-on-surface text-display-large outline-none',\n 'border border-outline focus:border-2 focus:border-primary',\n '[appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none',\n ],\n inputCaption: ['block mt-1 text-body-small text-on-surface-variant'],\n },\n});\n\nconst tp = timePickerTv();\nexport const TimePicker = createTimePicker(() => ({\n root: tp.root(),\n header: tp.header(),\n field: tp.field(),\n colon: tp.colon(),\n periods: tp.periods(),\n period: tp.period(),\n dial: tp.dial(),\n dialNumber: tp.dialNumber(),\n dialHand: tp.dialHand(),\n dialCenter: tp.dialCenter(),\n inputs: tp.inputs(),\n inputBox: tp.inputBox(),\n inputCaption: tp.inputCaption(),\n}));\n"]}
|
package/dist/toolbar.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/tv.ts","../src/toolbar.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;;;AC5BI,IAAM,YAAY,EAAA,CAAG;AAAA,EAC1B,IAAA,EAAM,oGAAA;AAAA,EACN,QAAA,EAAU;AAAA,IACR,OAAA,EAAS;AAAA,MACP,QAAA,EAAU,8CAAA;AAAA,MACV,OAAA,EACE;AAAA,KACJ;AAAA,IACA,WAAA,EAAa;AAAA,MACX,UAAA,EAAY,oBAAA;AAAA,MACZ,QAAA,EAAU;AAAA;AACZ,GACF;AAAA,EACA,eAAA,EAAiB,EAAE,OAAA,EAAS,UAAA,EAAY,aAAa,YAAA;AACvD,CAAC;AAEM,IAAM,OAAA,GAAU,aAAA;AAAA,EAAc,CAAC,EAAE,OAAA,EAAS,WAAA,OAC/C,SAAA,CAAU,EAAE,OAAA,EAAS,WAAA,EAAa;AACpC","file":"toolbar.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 * toolbar.ts — tailwind-variants for the M3 Expressive Toolbar.\n *\n * A floating, full-radius pill (elevation level3) that groups action icons.\n * `standard` rides on surface-container; `vibrant` on primary-container — and\n * forces its interactive children (icon buttons / links) to the matching\n * on-primary-container foreground, since `IconButton` otherwise paints its own\n * `on-surface-variant`. The descendant selector outranks the button's own color\n * class but not its higher-specificity `data-[disabled]` rule, so disabled\n * actions still dim. `vertical` swaps the main axis and the fixed dimension.\n * Same DOM + `data-*` as the VE build.\n */\nimport { createToolbar } from '@m3-baseui/core';\nimport { tv } from './tv';\n\nexport const toolbarTv = tv({\n base: 'inline-flex items-center justify-center gap-1 box-border rounded-full shadow-level3 [&_svg]:size-6',\n variants: {\n variant: {\n standard: 'bg-surface-container text-on-surface-variant',\n vibrant:\n 'bg-primary-container text-on-primary-container [&_button]:text-on-primary-container [&_a]:text-on-primary-container',\n },\n orientation: {\n horizontal: 'flex-row h-16 px-2',\n vertical: 'flex-col w-16 py-2',\n },\n },\n defaultVariants: { variant: 'standard', orientation: 'horizontal' },\n});\n\nexport const Toolbar = createToolbar(({ variant, orientation }) =>\n toolbarTv({ variant, orientation }),\n);\nexport type { ToolbarProps, ToolbarVariant, ToolbarOrientation } from '@m3-baseui/core';\n"]}
|