@m3-baseui/react-tailwind 1.1.0 → 1.2.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/button-group.d.ts +48 -0
- package/dist/button-group.js +58 -0
- package/dist/button-group.js.map +1 -0
- package/dist/carousel.d.ts +115 -0
- package/dist/carousel.js +63 -0
- package/dist/carousel.js.map +1 -0
- package/dist/chip.js +5 -2
- package/dist/chip.js.map +1 -1
- package/dist/date-picker.d.ts +188 -0
- package/dist/date-picker.js +151 -0
- package/dist/date-picker.js.map +1 -0
- package/dist/icon-button.js +4 -1
- package/dist/icon-button.js.map +1 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +439 -17
- package/dist/index.js.map +1 -1
- package/dist/loading-indicator.d.ts +68 -0
- package/dist/loading-indicator.js +61 -0
- package/dist/loading-indicator.js.map +1 -0
- package/dist/navigation-bar.d.ts +5 -5
- package/dist/navigation-rail.d.ts +5 -5
- package/dist/search.d.ts +148 -0
- package/dist/search.js +105 -0
- package/dist/search.js.map +1 -0
- package/dist/split-button.d.ts +201 -0
- package/dist/split-button.js +126 -0
- package/dist/split-button.js.map +1 -0
- package/dist/time-picker.d.ts +144 -0
- package/dist/time-picker.js +101 -0
- package/dist/time-picker.js.map +1 -0
- package/dist/toolbar.d.ts +73 -0
- package/dist/toolbar.js +55 -0
- package/dist/toolbar.js.map +1 -0
- package/package.json +41 -1
- package/styles/preset.css +15 -0
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { createButton, createIconButton, createSwitch, createCheckbox, createRadio, createRadioGroup, createChip, createTooltip, createDialog, createMenu, createTabs, createSlider, createSelect, createTextField, createNavigationBar, createFab, createFabMenu, createDivider, createProgress, createList, createSnackbar, createItem, createBadge, createCard, createSegmentedButton, createNavigationDrawer, createTopAppBar, createBottomAppBar, createNavigationRail, createBottomSheet, createSideSheet } from '@m3-baseui/core';
|
|
2
|
+
import { createButton, createIconButton, createSwitch, createCheckbox, createRadio, createRadioGroup, createChip, createTooltip, createDialog, createMenu, createTabs, createSlider, createSelect, createTextField, createNavigationBar, createFab, createFabMenu, createDivider, createProgress, createLoadingIndicator, createList, createSnackbar, createItem, createBadge, createCard, createSegmentedButton, createButtonGroup, createSplitButton, createNavigationDrawer, createTopAppBar, createBottomAppBar, createNavigationRail, createBottomSheet, createSideSheet, createSearch, createDatePicker, createTimePicker, createToolbar, createCarousel } from '@m3-baseui/core';
|
|
3
3
|
export { Ripple, ThemeProvider, applyScheme, generateScheme, schemeToCssText, useSnackbar, useTheme } from '@m3-baseui/core';
|
|
4
4
|
import { tv } from 'tailwind-variants';
|
|
5
5
|
|
|
@@ -91,7 +91,10 @@ var widthCompounds = Object.entries(WIDTHS).flatMap(
|
|
|
91
91
|
var iconButton = tv({
|
|
92
92
|
base: [
|
|
93
93
|
"relative inline-flex items-center justify-center shrink-0",
|
|
94
|
-
|
|
94
|
+
// No `overflow-hidden`: it would clip the 48dp touch target on small sizes.
|
|
95
|
+
// The state layer is already rounded (before:rounded-[inherit]); the ripple
|
|
96
|
+
// self-clips.
|
|
97
|
+
"rounded-full cursor-pointer select-none border-0 bg-transparent",
|
|
95
98
|
"transition-[box-shadow,background-color,color] duration-200 ease-standard",
|
|
96
99
|
// State layer overlay
|
|
97
100
|
"before:absolute before:inset-0 before:rounded-[inherit] before:bg-current before:opacity-0 before:pointer-events-none",
|
|
@@ -331,9 +334,12 @@ var chipTv = tv({
|
|
|
331
334
|
slots: {
|
|
332
335
|
root: [
|
|
333
336
|
"group relative inline-flex items-center justify-center gap-2 box-border",
|
|
334
|
-
|
|
337
|
+
// No `overflow-hidden`: it would clip the 48dp touch target. The state
|
|
338
|
+
// layer is rounded to match instead (before:rounded-[inherit]); the ripple
|
|
339
|
+
// self-clips.
|
|
340
|
+
"h-8 px-4 rounded-[8px] select-none border bg-transparent text-label-large",
|
|
335
341
|
"transition-colors duration-150 ease-standard",
|
|
336
|
-
"before:absolute before:inset-0 before:bg-current before:opacity-0 before:pointer-events-none before:transition-opacity before:duration-100",
|
|
342
|
+
"before:absolute before:inset-0 before:rounded-[inherit] before:bg-current before:opacity-0 before:pointer-events-none before:transition-opacity before:duration-100",
|
|
337
343
|
"hover:before:opacity-[var(--md-sys-state-hover)]",
|
|
338
344
|
"focus-visible:before:opacity-[var(--md-sys-state-focus)]",
|
|
339
345
|
"active:before:opacity-[var(--md-sys-state-pressed)]",
|
|
@@ -593,13 +599,13 @@ var tabsTv = tv7({
|
|
|
593
599
|
}
|
|
594
600
|
});
|
|
595
601
|
var Tabs = createTabs((variant) => {
|
|
596
|
-
const
|
|
602
|
+
const s14 = tabsTv({ variant });
|
|
597
603
|
return {
|
|
598
|
-
root:
|
|
599
|
-
list:
|
|
600
|
-
tab:
|
|
601
|
-
indicator:
|
|
602
|
-
panel:
|
|
604
|
+
root: s14.root(),
|
|
605
|
+
list: s14.list(),
|
|
606
|
+
tab: s14.tab(),
|
|
607
|
+
indicator: s14.indicator(),
|
|
608
|
+
panel: s14.panel()
|
|
603
609
|
};
|
|
604
610
|
});
|
|
605
611
|
var sliderTv = tv7({
|
|
@@ -964,6 +970,29 @@ var Progress = createProgress({
|
|
|
964
970
|
linear: { root: l.root(), track: l.track(), indicator: l.indicator() },
|
|
965
971
|
circular: { root: c2.root(), track: c2.track(), indicator: c2.indicator() }
|
|
966
972
|
});
|
|
973
|
+
var loadingIndicatorTv = tv7({
|
|
974
|
+
slots: {
|
|
975
|
+
// The SVG is a fixed 38dp active indicator. Uncontained: the box shrinks to
|
|
976
|
+
// the shape. Contained: a 48dp pill wraps it (5dp inset on each side).
|
|
977
|
+
root: "inline-flex items-center justify-center [&_svg]:block [&_svg]:size-[38px]",
|
|
978
|
+
indicator: [
|
|
979
|
+
"fill-primary",
|
|
980
|
+
// Morph + rotate about the shape's own centre (transform-box: fill-box).
|
|
981
|
+
"[transform-box:fill-box] origin-center animate-m3-loading"
|
|
982
|
+
]
|
|
983
|
+
},
|
|
984
|
+
variants: {
|
|
985
|
+
contained: {
|
|
986
|
+
true: { root: "size-12 rounded-full bg-secondary-container" },
|
|
987
|
+
false: {}
|
|
988
|
+
}
|
|
989
|
+
},
|
|
990
|
+
defaultVariants: { contained: false }
|
|
991
|
+
});
|
|
992
|
+
var LoadingIndicator = createLoadingIndicator(({ contained }) => {
|
|
993
|
+
const s14 = loadingIndicatorTv({ contained });
|
|
994
|
+
return { root: s14.root(), indicator: s14.indicator() };
|
|
995
|
+
});
|
|
967
996
|
var listTv = tv7({
|
|
968
997
|
slots: {
|
|
969
998
|
root: "list-none m-0 px-0 py-2 bg-transparent",
|
|
@@ -1182,6 +1211,114 @@ var SegmentedButton = createSegmentedButton({
|
|
|
1182
1211
|
icon: s7.icon(),
|
|
1183
1212
|
label: s7.label()
|
|
1184
1213
|
});
|
|
1214
|
+
var buttonGroup = tv7({
|
|
1215
|
+
base: "inline-flex items-center",
|
|
1216
|
+
variants: {
|
|
1217
|
+
variant: {
|
|
1218
|
+
standard: "gap-2",
|
|
1219
|
+
connected: [
|
|
1220
|
+
"gap-0.5",
|
|
1221
|
+
"[&>*:not(:first-child):not(:last-child)]:rounded-small",
|
|
1222
|
+
// Guard against a lone child (it is both first *and* last) — only morph
|
|
1223
|
+
// the inner-facing corner when there is actually a sibling to face.
|
|
1224
|
+
"[&>*:first-child:not(:last-child)]:rounded-e-small",
|
|
1225
|
+
"[&>*:last-child:not(:first-child)]:rounded-s-small"
|
|
1226
|
+
]
|
|
1227
|
+
}
|
|
1228
|
+
},
|
|
1229
|
+
defaultVariants: {
|
|
1230
|
+
variant: "standard"
|
|
1231
|
+
}
|
|
1232
|
+
});
|
|
1233
|
+
var ButtonGroup = createButtonGroup(({ variant }) => buttonGroup({ variant }));
|
|
1234
|
+
var surface = [
|
|
1235
|
+
"relative inline-flex items-center justify-center h-10 overflow-hidden cursor-pointer select-none border-0 outline-none",
|
|
1236
|
+
"text-label-large",
|
|
1237
|
+
"transition-[background-color,color,border-color] duration-200 ease-standard",
|
|
1238
|
+
"before:absolute before:inset-0 before:bg-current before:opacity-0 before:pointer-events-none before:transition-opacity before:duration-100",
|
|
1239
|
+
"hover:before:opacity-[var(--md-sys-state-hover)]",
|
|
1240
|
+
"focus-visible:before:opacity-[var(--md-sys-state-focus)]",
|
|
1241
|
+
"active:before:opacity-[var(--md-sys-state-pressed)]",
|
|
1242
|
+
"data-[pressed]:before:opacity-[var(--md-sys-state-pressed)]",
|
|
1243
|
+
"focus-visible:outline-[3px] focus-visible:outline-offset-2 focus-visible:outline-secondary",
|
|
1244
|
+
"disabled:pointer-events-none disabled:before:opacity-0",
|
|
1245
|
+
"data-[disabled]:pointer-events-none data-[disabled]:before:opacity-0"
|
|
1246
|
+
];
|
|
1247
|
+
var VARIANT_FILLED = [
|
|
1248
|
+
"bg-primary text-on-primary",
|
|
1249
|
+
"disabled:bg-on-surface/12 disabled:text-on-surface/38",
|
|
1250
|
+
"data-[disabled]:bg-on-surface/12 data-[disabled]:text-on-surface/38"
|
|
1251
|
+
];
|
|
1252
|
+
var VARIANT_TONAL = [
|
|
1253
|
+
"bg-secondary-container text-on-secondary-container",
|
|
1254
|
+
"disabled:bg-on-surface/12 disabled:text-on-surface/38",
|
|
1255
|
+
"data-[disabled]:bg-on-surface/12 data-[disabled]:text-on-surface/38"
|
|
1256
|
+
];
|
|
1257
|
+
var VARIANT_OUTLINED = [
|
|
1258
|
+
"bg-transparent text-primary border border-outline",
|
|
1259
|
+
"disabled:text-on-surface/38 disabled:border-on-surface/12",
|
|
1260
|
+
"data-[disabled]:text-on-surface/38 data-[disabled]:border-on-surface/12"
|
|
1261
|
+
];
|
|
1262
|
+
var VARIANT_ELEVATED = [
|
|
1263
|
+
"bg-surface-container-low text-primary shadow-level1",
|
|
1264
|
+
"disabled:bg-on-surface/12 disabled:text-on-surface/38 disabled:shadow-none",
|
|
1265
|
+
"data-[disabled]:bg-on-surface/12 data-[disabled]:text-on-surface/38 data-[disabled]:shadow-none"
|
|
1266
|
+
];
|
|
1267
|
+
var VARIANT_TEXT = [
|
|
1268
|
+
"bg-transparent text-primary",
|
|
1269
|
+
"disabled:text-on-surface/38",
|
|
1270
|
+
"data-[disabled]:text-on-surface/38"
|
|
1271
|
+
];
|
|
1272
|
+
var splitButtonTv = tv7({
|
|
1273
|
+
slots: {
|
|
1274
|
+
group: "inline-flex items-center gap-0.5",
|
|
1275
|
+
// leading: outer (start) corner full, seam (end) corner reduced.
|
|
1276
|
+
leading: [...surface, "gap-2 px-6 rounded-s-full rounded-e-small"],
|
|
1277
|
+
// trailing: seam (start) corner reduced, outer (end) corner full.
|
|
1278
|
+
trailing: [...surface, "group gap-1 px-3 rounded-s-small rounded-e-full"],
|
|
1279
|
+
chevron: [
|
|
1280
|
+
"inline-flex items-center justify-center shrink-0 [&>svg]:size-[18px]",
|
|
1281
|
+
"transition-transform duration-200 ease-standard group-data-[popup-open]:rotate-180"
|
|
1282
|
+
],
|
|
1283
|
+
popup: [
|
|
1284
|
+
"min-w-[112px] max-w-[280px] py-2",
|
|
1285
|
+
"bg-surface-container text-on-surface rounded-extra-small shadow-level2",
|
|
1286
|
+
"origin-[var(--transform-origin)] transition-[opacity,transform] duration-150 ease-standard",
|
|
1287
|
+
"data-[starting-style]:opacity-0 data-[starting-style]:scale-95",
|
|
1288
|
+
"data-[ending-style]:opacity-0",
|
|
1289
|
+
"focus:outline-none"
|
|
1290
|
+
],
|
|
1291
|
+
item: [
|
|
1292
|
+
"relative flex items-center gap-3 h-12 px-3 overflow-hidden cursor-pointer select-none outline-none",
|
|
1293
|
+
"text-label-large text-on-surface",
|
|
1294
|
+
"before:absolute before:inset-0 before:bg-current before:opacity-0 before:pointer-events-none before:transition-opacity before:duration-100",
|
|
1295
|
+
"hover:before:opacity-[var(--md-sys-state-hover)]",
|
|
1296
|
+
"data-[highlighted]:before:opacity-[var(--md-sys-state-hover)]",
|
|
1297
|
+
"active:before:opacity-[var(--md-sys-state-pressed)]",
|
|
1298
|
+
"data-[disabled]:text-on-surface/[0.38] data-[disabled]:before:opacity-0 data-[disabled]:pointer-events-none"
|
|
1299
|
+
]
|
|
1300
|
+
},
|
|
1301
|
+
variants: {
|
|
1302
|
+
variant: {
|
|
1303
|
+
filled: { leading: VARIANT_FILLED, trailing: VARIANT_FILLED },
|
|
1304
|
+
tonal: { leading: VARIANT_TONAL, trailing: VARIANT_TONAL },
|
|
1305
|
+
outlined: { leading: VARIANT_OUTLINED, trailing: VARIANT_OUTLINED },
|
|
1306
|
+
elevated: { leading: VARIANT_ELEVATED, trailing: VARIANT_ELEVATED },
|
|
1307
|
+
text: { leading: VARIANT_TEXT, trailing: VARIANT_TEXT }
|
|
1308
|
+
}
|
|
1309
|
+
},
|
|
1310
|
+
defaultVariants: {
|
|
1311
|
+
variant: "filled"
|
|
1312
|
+
}
|
|
1313
|
+
});
|
|
1314
|
+
var SplitButton = createSplitButton({
|
|
1315
|
+
group: splitButtonTv().group(),
|
|
1316
|
+
leading: (variant) => splitButtonTv({ variant }).leading(),
|
|
1317
|
+
trailing: (variant) => splitButtonTv({ variant }).trailing(),
|
|
1318
|
+
chevron: splitButtonTv().chevron(),
|
|
1319
|
+
popup: splitButtonTv().popup(),
|
|
1320
|
+
item: splitButtonTv().item()
|
|
1321
|
+
});
|
|
1185
1322
|
var navigationDrawerTv = tv7({
|
|
1186
1323
|
slots: {
|
|
1187
1324
|
root: "flex flex-col gap-1 box-border w-[360px] p-3 bg-surface-container-low text-on-surface",
|
|
@@ -1243,13 +1380,13 @@ var topAppBarTv = tv7({
|
|
|
1243
1380
|
}
|
|
1244
1381
|
});
|
|
1245
1382
|
var TopAppBar = createTopAppBar((args) => {
|
|
1246
|
-
const
|
|
1383
|
+
const s14 = topAppBarTv({ variant: args.variant });
|
|
1247
1384
|
return {
|
|
1248
|
-
root:
|
|
1249
|
-
row:
|
|
1250
|
-
leading:
|
|
1251
|
-
headline:
|
|
1252
|
-
trailing:
|
|
1385
|
+
root: s14.root(),
|
|
1386
|
+
row: s14.row(),
|
|
1387
|
+
leading: s14.leading(),
|
|
1388
|
+
headline: s14.headline(),
|
|
1389
|
+
trailing: s14.trailing()
|
|
1253
1390
|
};
|
|
1254
1391
|
});
|
|
1255
1392
|
var bottomAppBarTv = tv7({
|
|
@@ -1403,7 +1540,292 @@ var SideSheet = createSideSheet({
|
|
|
1403
1540
|
description: s12.description(),
|
|
1404
1541
|
close: s12.close()
|
|
1405
1542
|
});
|
|
1543
|
+
var searchTv = tv7({
|
|
1544
|
+
slots: {
|
|
1545
|
+
bar: [
|
|
1546
|
+
"flex items-center gap-1 h-14 min-w-[360px] max-w-full pl-4 pr-2",
|
|
1547
|
+
"bg-surface-container-high text-on-surface rounded-full",
|
|
1548
|
+
"transition-shadow duration-150 ease-standard",
|
|
1549
|
+
"focus-within:shadow-level1"
|
|
1550
|
+
],
|
|
1551
|
+
icon: [
|
|
1552
|
+
"inline-flex shrink-0 items-center justify-center text-on-surface-variant",
|
|
1553
|
+
"[&>svg]:size-6"
|
|
1554
|
+
],
|
|
1555
|
+
input: [
|
|
1556
|
+
"flex-1 min-w-0 h-full bg-transparent border-0 outline-none",
|
|
1557
|
+
"text-body-large text-on-surface placeholder:text-on-surface-variant"
|
|
1558
|
+
],
|
|
1559
|
+
clear: [
|
|
1560
|
+
"relative inline-flex shrink-0 items-center justify-center size-10 rounded-full overflow-hidden",
|
|
1561
|
+
"text-on-surface-variant cursor-pointer outline-none [&>svg]:size-6",
|
|
1562
|
+
"before:absolute before:inset-0 before:bg-current before:opacity-0 before:pointer-events-none before:transition-opacity before:duration-100",
|
|
1563
|
+
"hover:before:opacity-[var(--md-sys-state-hover)]",
|
|
1564
|
+
"focus-visible:before:opacity-[var(--md-sys-state-focus)]",
|
|
1565
|
+
"active:before:opacity-[var(--md-sys-state-pressed)]"
|
|
1566
|
+
],
|
|
1567
|
+
popup: [
|
|
1568
|
+
"w-[var(--anchor-width)] min-w-[360px] max-h-[min(72vh,480px)] overflow-y-auto py-2",
|
|
1569
|
+
"bg-surface-container-high text-on-surface rounded-large shadow-level3",
|
|
1570
|
+
"origin-[var(--transform-origin)] transition-[opacity,transform] duration-150 ease-standard",
|
|
1571
|
+
"data-[starting-style]:opacity-0 data-[starting-style]:scale-95",
|
|
1572
|
+
"data-[ending-style]:opacity-0",
|
|
1573
|
+
"focus:outline-none"
|
|
1574
|
+
],
|
|
1575
|
+
list: ["outline-none"],
|
|
1576
|
+
item: [
|
|
1577
|
+
"group relative grid grid-cols-[24px_1fr_24px] items-center gap-4 h-14 px-4 overflow-hidden",
|
|
1578
|
+
"cursor-pointer select-none outline-none text-body-large text-on-surface",
|
|
1579
|
+
"before:absolute before:inset-0 before:bg-current before:opacity-0 before:pointer-events-none before:transition-opacity before:duration-100",
|
|
1580
|
+
"hover:before:opacity-[var(--md-sys-state-hover)]",
|
|
1581
|
+
"data-[highlighted]:before:opacity-[var(--md-sys-state-hover)]",
|
|
1582
|
+
"data-[selected]:before:opacity-[var(--md-sys-state-pressed)]",
|
|
1583
|
+
"active:before:opacity-[var(--md-sys-state-pressed)]",
|
|
1584
|
+
"data-[disabled]:text-on-surface/[0.38] data-[disabled]:before:opacity-0 data-[disabled]:pointer-events-none",
|
|
1585
|
+
"[&_[data-slot=search-leading]]:inline-flex [&_[data-slot=search-leading]]:text-on-surface-variant [&_[data-slot=search-leading]>svg]:size-6"
|
|
1586
|
+
],
|
|
1587
|
+
itemIndicator: [
|
|
1588
|
+
"inline-flex items-center justify-center text-on-surface",
|
|
1589
|
+
"invisible group-data-[selected]:visible"
|
|
1590
|
+
],
|
|
1591
|
+
empty: ["px-4 py-3 text-body-medium text-on-surface-variant"],
|
|
1592
|
+
separator: ["my-2 h-px border-0 bg-outline-variant"],
|
|
1593
|
+
groupLabel: ["px-4 py-2 text-label-small text-on-surface-variant"]
|
|
1594
|
+
}
|
|
1595
|
+
});
|
|
1596
|
+
var s13 = searchTv();
|
|
1597
|
+
var Search = createSearch({
|
|
1598
|
+
bar: s13.bar(),
|
|
1599
|
+
icon: s13.icon(),
|
|
1600
|
+
input: s13.input(),
|
|
1601
|
+
clear: s13.clear(),
|
|
1602
|
+
popup: s13.popup(),
|
|
1603
|
+
list: s13.list(),
|
|
1604
|
+
item: s13.item(),
|
|
1605
|
+
itemIndicator: s13.itemIndicator(),
|
|
1606
|
+
empty: s13.empty(),
|
|
1607
|
+
separator: s13.separator(),
|
|
1608
|
+
groupLabel: s13.groupLabel()
|
|
1609
|
+
});
|
|
1610
|
+
var datePickerTv = tv7({
|
|
1611
|
+
slots: {
|
|
1612
|
+
calendar: ["w-[328px] max-w-full p-3 text-on-surface"],
|
|
1613
|
+
header: ["flex items-center justify-between gap-2 h-12 pl-3 pr-1"],
|
|
1614
|
+
navButton: [
|
|
1615
|
+
"relative inline-flex items-center justify-center size-10 rounded-full overflow-hidden",
|
|
1616
|
+
"text-on-surface-variant cursor-pointer outline-none [&>svg]:size-6",
|
|
1617
|
+
"before:absolute before:inset-0 before:bg-current before:opacity-0 before:pointer-events-none before:transition-opacity before:duration-100",
|
|
1618
|
+
"hover:before:opacity-[var(--md-sys-state-hover)]",
|
|
1619
|
+
"focus-visible:before:opacity-[var(--md-sys-state-focus)]",
|
|
1620
|
+
"active:before:opacity-[var(--md-sys-state-pressed)]",
|
|
1621
|
+
"disabled:text-on-surface/[0.38] disabled:before:opacity-0 disabled:pointer-events-none"
|
|
1622
|
+
],
|
|
1623
|
+
monthLabel: [
|
|
1624
|
+
"relative inline-flex items-center gap-1 h-9 px-3 rounded-full overflow-hidden",
|
|
1625
|
+
"text-label-large text-on-surface-variant cursor-pointer outline-none",
|
|
1626
|
+
"before:absolute before:inset-0 before:bg-current before:opacity-0 before:pointer-events-none before:transition-opacity before:duration-100",
|
|
1627
|
+
"hover:before:opacity-[var(--md-sys-state-hover)]",
|
|
1628
|
+
"focus-visible:before:opacity-[var(--md-sys-state-focus)]",
|
|
1629
|
+
"[&>svg]:transition-transform data-[view=years]:[&>svg]:rotate-180"
|
|
1630
|
+
],
|
|
1631
|
+
grid: ["mt-2 border-collapse", "[&_td]:p-0 [&_td]:text-center"],
|
|
1632
|
+
weekdays: [""],
|
|
1633
|
+
weekday: ["size-12 font-normal text-body-large text-on-surface-variant"],
|
|
1634
|
+
day: [
|
|
1635
|
+
"relative inline-flex items-center justify-center size-12 rounded-full overflow-hidden",
|
|
1636
|
+
"text-body-large text-on-surface cursor-pointer outline-none",
|
|
1637
|
+
"before:absolute before:inset-0 before:rounded-full before:bg-current before:opacity-0 before:pointer-events-none before:transition-opacity before:duration-100",
|
|
1638
|
+
"hover:before:opacity-[var(--md-sys-state-hover)]",
|
|
1639
|
+
"focus-visible:before:opacity-[var(--md-sys-state-focus)]",
|
|
1640
|
+
"active:before:opacity-[var(--md-sys-state-pressed)]",
|
|
1641
|
+
// today: 1px primary outline ring
|
|
1642
|
+
"data-[today]:ring-1 data-[today]:ring-inset data-[today]:ring-primary",
|
|
1643
|
+
// selected: primary fill, on-primary label, no state layer tint shift
|
|
1644
|
+
"data-[selected]:bg-primary data-[selected]:text-on-primary",
|
|
1645
|
+
"data-[disabled]:text-on-surface/[0.38] data-[disabled]:before:opacity-0 data-[disabled]:pointer-events-none"
|
|
1646
|
+
],
|
|
1647
|
+
// weeks render as 7-col rows; force grid layout on each row
|
|
1648
|
+
yearGrid: ["grid grid-cols-3 gap-2 max-h-[280px] overflow-y-auto px-3 py-2"],
|
|
1649
|
+
yearButton: [
|
|
1650
|
+
"relative inline-flex items-center justify-center h-9 rounded-full overflow-hidden",
|
|
1651
|
+
"text-label-large text-on-surface-variant cursor-pointer outline-none",
|
|
1652
|
+
"before:absolute before:inset-0 before:bg-current before:opacity-0 before:pointer-events-none before:transition-opacity before:duration-100",
|
|
1653
|
+
"hover:before:opacity-[var(--md-sys-state-hover)]",
|
|
1654
|
+
"focus-visible:before:opacity-[var(--md-sys-state-focus)]",
|
|
1655
|
+
"data-[selected]:bg-primary data-[selected]:text-on-primary"
|
|
1656
|
+
],
|
|
1657
|
+
field: [
|
|
1658
|
+
"inline-flex items-center gap-1 h-14 pl-4 pr-1 min-w-[200px]",
|
|
1659
|
+
"bg-surface-container-highest text-on-surface rounded-t-extra-small",
|
|
1660
|
+
"border-b border-on-surface-variant"
|
|
1661
|
+
],
|
|
1662
|
+
input: [
|
|
1663
|
+
"flex-1 min-w-0 h-full bg-transparent border-0 outline-none",
|
|
1664
|
+
"text-body-large text-on-surface placeholder:text-on-surface-variant"
|
|
1665
|
+
],
|
|
1666
|
+
fieldIcon: [
|
|
1667
|
+
"relative inline-flex items-center justify-center size-10 rounded-full overflow-hidden",
|
|
1668
|
+
"text-on-surface-variant cursor-pointer outline-none [&>svg]:size-6",
|
|
1669
|
+
"before:absolute before:inset-0 before:bg-current before:opacity-0 before:pointer-events-none before:transition-opacity before:duration-100",
|
|
1670
|
+
"hover:before:opacity-[var(--md-sys-state-hover)]",
|
|
1671
|
+
"focus-visible:before:opacity-[var(--md-sys-state-focus)]",
|
|
1672
|
+
"active:before:opacity-[var(--md-sys-state-pressed)]"
|
|
1673
|
+
],
|
|
1674
|
+
popup: [
|
|
1675
|
+
"bg-surface-container-high text-on-surface rounded-large shadow-level2",
|
|
1676
|
+
"origin-[var(--transform-origin)] transition-[opacity,transform] duration-150 ease-standard",
|
|
1677
|
+
"data-[starting-style]:opacity-0 data-[starting-style]:scale-95",
|
|
1678
|
+
"data-[ending-style]:opacity-0",
|
|
1679
|
+
"focus:outline-none"
|
|
1680
|
+
],
|
|
1681
|
+
modalBackdrop: [
|
|
1682
|
+
"fixed inset-0 z-40 bg-scrim/32",
|
|
1683
|
+
"transition-opacity duration-200 ease-standard",
|
|
1684
|
+
"data-[starting-style]:opacity-0 data-[ending-style]:opacity-0"
|
|
1685
|
+
],
|
|
1686
|
+
modalPopup: [
|
|
1687
|
+
"fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2",
|
|
1688
|
+
"w-[min(360px,calc(100vw-48px))] max-h-[calc(100vh-48px)] overflow-auto",
|
|
1689
|
+
"bg-surface-container-high text-on-surface rounded-extra-large shadow-level3",
|
|
1690
|
+
"flex flex-col",
|
|
1691
|
+
"origin-[var(--transform-origin)] transition-[opacity,transform] duration-200 ease-emphasized",
|
|
1692
|
+
"data-[starting-style]:opacity-0 data-[starting-style]:scale-95",
|
|
1693
|
+
"data-[ending-style]:opacity-0 data-[ending-style]:scale-95",
|
|
1694
|
+
"focus:outline-none"
|
|
1695
|
+
],
|
|
1696
|
+
modalHeader: ["px-6 pt-4 text-label-medium text-on-surface-variant m-0"],
|
|
1697
|
+
modalHeadline: ["px-6 pt-1 pb-4 text-headline-large text-on-surface m-0"],
|
|
1698
|
+
modalActions: ["flex justify-end gap-2 px-6 pb-4 pt-2"]
|
|
1699
|
+
}
|
|
1700
|
+
});
|
|
1701
|
+
var dp = datePickerTv();
|
|
1702
|
+
var DatePicker = createDatePicker({
|
|
1703
|
+
calendar: dp.calendar(),
|
|
1704
|
+
header: dp.header(),
|
|
1705
|
+
navButton: dp.navButton(),
|
|
1706
|
+
monthLabel: dp.monthLabel(),
|
|
1707
|
+
grid: dp.grid(),
|
|
1708
|
+
weekdays: dp.weekdays(),
|
|
1709
|
+
weekday: dp.weekday(),
|
|
1710
|
+
day: dp.day(),
|
|
1711
|
+
yearGrid: dp.yearGrid(),
|
|
1712
|
+
yearButton: dp.yearButton(),
|
|
1713
|
+
field: dp.field(),
|
|
1714
|
+
input: dp.input(),
|
|
1715
|
+
fieldIcon: dp.fieldIcon(),
|
|
1716
|
+
popup: dp.popup(),
|
|
1717
|
+
modalBackdrop: dp.modalBackdrop(),
|
|
1718
|
+
modalPopup: dp.modalPopup(),
|
|
1719
|
+
modalHeader: dp.modalHeader(),
|
|
1720
|
+
modalHeadline: dp.modalHeadline(),
|
|
1721
|
+
modalActions: dp.modalActions()
|
|
1722
|
+
});
|
|
1723
|
+
var timePickerTv = tv7({
|
|
1724
|
+
slots: {
|
|
1725
|
+
root: ["inline-flex flex-col items-center gap-2 p-2 text-on-surface"],
|
|
1726
|
+
header: ["flex items-center gap-2"],
|
|
1727
|
+
field: [
|
|
1728
|
+
"inline-grid place-items-center w-24 h-20 rounded-small overflow-hidden box-border",
|
|
1729
|
+
"bg-surface-container-highest text-on-surface text-display-large cursor-pointer outline-none",
|
|
1730
|
+
"border border-transparent transition-colors duration-100",
|
|
1731
|
+
"data-[selected]:bg-primary-container data-[selected]:text-on-primary-container"
|
|
1732
|
+
],
|
|
1733
|
+
colon: ["text-display-large text-on-surface px-1 leading-none"],
|
|
1734
|
+
periods: [
|
|
1735
|
+
"inline-flex flex-col rounded-small overflow-hidden border border-outline self-stretch",
|
|
1736
|
+
"m-0 p-0 min-w-0"
|
|
1737
|
+
],
|
|
1738
|
+
period: [
|
|
1739
|
+
"flex-1 inline-flex items-center justify-center px-3 min-h-[38px] w-14",
|
|
1740
|
+
"border-0 bg-transparent",
|
|
1741
|
+
"text-title-medium text-on-surface-variant cursor-pointer outline-none",
|
|
1742
|
+
"data-[selected]:bg-secondary-container data-[selected]:text-on-secondary-container",
|
|
1743
|
+
"[&+&]:border-t [&+&]:border-outline"
|
|
1744
|
+
],
|
|
1745
|
+
dial: [
|
|
1746
|
+
"relative size-[256px] my-2 p-0 min-w-0 border-0 rounded-full bg-surface-container-highest"
|
|
1747
|
+
],
|
|
1748
|
+
dialNumber: [
|
|
1749
|
+
"absolute -translate-x-1/2 -translate-y-1/2 inline-grid place-items-center size-12 rounded-full",
|
|
1750
|
+
"border-0 bg-transparent",
|
|
1751
|
+
"text-body-large text-on-surface cursor-pointer outline-none select-none",
|
|
1752
|
+
"data-[selected]:bg-primary data-[selected]:text-on-primary"
|
|
1753
|
+
],
|
|
1754
|
+
dialHand: [
|
|
1755
|
+
"absolute left-1/2 top-[12%] h-[38%] w-0.5 origin-bottom bg-primary -translate-x-1/2 pointer-events-none"
|
|
1756
|
+
],
|
|
1757
|
+
dialCenter: [
|
|
1758
|
+
"absolute left-1/2 top-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary pointer-events-none"
|
|
1759
|
+
],
|
|
1760
|
+
inputs: ["flex items-start gap-2"],
|
|
1761
|
+
inputBox: [
|
|
1762
|
+
"w-24 h-20 rounded-small box-border text-center",
|
|
1763
|
+
"bg-surface-container-highest text-on-surface text-display-large outline-none",
|
|
1764
|
+
"border border-outline focus:border-2 focus:border-primary",
|
|
1765
|
+
"[appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none"
|
|
1766
|
+
],
|
|
1767
|
+
inputCaption: ["block mt-1 text-body-small text-on-surface-variant"]
|
|
1768
|
+
}
|
|
1769
|
+
});
|
|
1770
|
+
var tp = timePickerTv();
|
|
1771
|
+
var TimePicker = createTimePicker(() => ({
|
|
1772
|
+
root: tp.root(),
|
|
1773
|
+
header: tp.header(),
|
|
1774
|
+
field: tp.field(),
|
|
1775
|
+
colon: tp.colon(),
|
|
1776
|
+
periods: tp.periods(),
|
|
1777
|
+
period: tp.period(),
|
|
1778
|
+
dial: tp.dial(),
|
|
1779
|
+
dialNumber: tp.dialNumber(),
|
|
1780
|
+
dialHand: tp.dialHand(),
|
|
1781
|
+
dialCenter: tp.dialCenter(),
|
|
1782
|
+
inputs: tp.inputs(),
|
|
1783
|
+
inputBox: tp.inputBox(),
|
|
1784
|
+
inputCaption: tp.inputCaption()
|
|
1785
|
+
}));
|
|
1786
|
+
var toolbarTv = tv7({
|
|
1787
|
+
base: "inline-flex items-center justify-center gap-1 box-border rounded-full shadow-level3 [&_svg]:size-6",
|
|
1788
|
+
variants: {
|
|
1789
|
+
variant: {
|
|
1790
|
+
standard: "bg-surface-container text-on-surface-variant",
|
|
1791
|
+
vibrant: "bg-primary-container text-on-primary-container [&_button]:text-on-primary-container [&_a]:text-on-primary-container"
|
|
1792
|
+
},
|
|
1793
|
+
orientation: {
|
|
1794
|
+
horizontal: "flex-row h-16 px-2",
|
|
1795
|
+
vertical: "flex-col w-16 py-2"
|
|
1796
|
+
}
|
|
1797
|
+
},
|
|
1798
|
+
defaultVariants: { variant: "standard", orientation: "horizontal" }
|
|
1799
|
+
});
|
|
1800
|
+
var Toolbar = createToolbar(
|
|
1801
|
+
({ variant, orientation }) => toolbarTv({ variant, orientation })
|
|
1802
|
+
);
|
|
1803
|
+
var carouselTv = tv7({
|
|
1804
|
+
slots: {
|
|
1805
|
+
root: [
|
|
1806
|
+
"flex gap-2 overflow-x-auto snap-x snap-mandatory scroll-smooth",
|
|
1807
|
+
"[scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
|
|
1808
|
+
],
|
|
1809
|
+
item: "snap-start shrink-0 overflow-hidden rounded-large"
|
|
1810
|
+
},
|
|
1811
|
+
variants: {
|
|
1812
|
+
variant: {
|
|
1813
|
+
"multi-browse": { item: "w-40 h-56" },
|
|
1814
|
+
hero: { item: "w-72 h-56 snap-center" },
|
|
1815
|
+
"full-screen": {
|
|
1816
|
+
// gap-0: full-screen slides fill the viewport with no inter-slide gap.
|
|
1817
|
+
root: "flex-col gap-0 overflow-x-hidden overflow-y-auto snap-y h-full",
|
|
1818
|
+
item: "w-full h-full snap-center"
|
|
1819
|
+
}
|
|
1820
|
+
}
|
|
1821
|
+
},
|
|
1822
|
+
defaultVariants: { variant: "multi-browse" }
|
|
1823
|
+
});
|
|
1824
|
+
var Carousel = createCarousel((variant) => {
|
|
1825
|
+
const s14 = carouselTv({ variant });
|
|
1826
|
+
return { root: s14.root(), item: s14.item() };
|
|
1827
|
+
});
|
|
1406
1828
|
|
|
1407
|
-
export { Badge, BottomAppBar, BottomSheet, Button, Card, Checkbox, Chip, Dialog, Divider, Fab, FabMenu, IconButton, Item, List, Menu, NavigationBar, NavigationDrawer, NavigationRail, Progress, Radio, RadioGroup, SegmentedButton, Select, SideSheet, Slider, Snackbar, Switch, Tabs, TextField, Tooltip, TopAppBar, badgeTv, bottomAppBarTv, bottomSheetTv, button, cardTv, checkboxTv, chipTv, circularTv, dialogTv, dividerTv, fabMenuTv, fabTv, iconButton, itemTv, linearTv, listTv, menuTv, navigationBarTv, navigationDrawerTv, navigationRailTv, radioTv, segmentedButtonTv, selectTv, sideSheetTv, sliderTv, snackbarTv, switchTv, tabsTv, textFieldTv, tooltipTv, topAppBarTv };
|
|
1829
|
+
export { Badge, BottomAppBar, BottomSheet, Button, ButtonGroup, Card, Carousel, Checkbox, Chip, DatePicker, Dialog, Divider, Fab, FabMenu, IconButton, Item, List, LoadingIndicator, Menu, NavigationBar, NavigationDrawer, NavigationRail, Progress, Radio, RadioGroup, Search, SegmentedButton, Select, SideSheet, Slider, Snackbar, SplitButton, Switch, Tabs, TextField, TimePicker, Toolbar, Tooltip, TopAppBar, badgeTv, bottomAppBarTv, bottomSheetTv, button, buttonGroup, cardTv, carouselTv, checkboxTv, chipTv, circularTv, datePickerTv, dialogTv, dividerTv, fabMenuTv, fabTv, iconButton, itemTv, linearTv, listTv, loadingIndicatorTv, menuTv, navigationBarTv, navigationDrawerTv, navigationRailTv, radioTv, searchTv, segmentedButtonTv, selectTv, sideSheetTv, sliderTv, snackbarTv, splitButtonTv, switchTv, tabsTv, textFieldTv, timePickerTv, toolbarTv, tooltipTv, topAppBarTv };
|
|
1408
1830
|
//# sourceMappingURL=index.js.map
|
|
1409
1831
|
//# sourceMappingURL=index.js.map
|