@noxlovette/material 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/dist/components/badge/theme.js +1 -1
  2. package/dist/components/buttons/button-group/theme.d.ts +1 -1
  3. package/dist/components/buttons/button-group/theme.js +1 -1
  4. package/dist/components/buttons/connected/theme.d.ts +1 -1
  5. package/dist/components/buttons/connected/theme.js +1 -1
  6. package/dist/components/buttons/split-button/SplitButton.svelte +1 -1
  7. package/dist/components/buttons/split-button/theme.d.ts +1 -1
  8. package/dist/components/buttons/split-button/theme.js +1 -1
  9. package/dist/components/buttons/theme.d.ts +1 -1
  10. package/dist/components/buttons/theme.js +3 -3
  11. package/dist/components/cards/theme.js +1 -1
  12. package/dist/components/chips/theme.d.ts +1 -1
  13. package/dist/components/chips/theme.js +1 -1
  14. package/dist/components/containers/action-rail/theme.d.ts +1 -1
  15. package/dist/components/containers/action-rail/theme.js +2 -2
  16. package/dist/components/containers/app/theme.d.ts +1 -1
  17. package/dist/components/containers/app/theme.js +1 -1
  18. package/dist/components/containers/bottom-sheet/theme.d.ts +1 -1
  19. package/dist/components/containers/bottom-sheet/theme.js +2 -2
  20. package/dist/components/containers/carousel/theme.d.ts +1 -1
  21. package/dist/components/containers/carousel/theme.js +1 -1
  22. package/dist/components/containers/context-menu/theme.d.ts +1 -1
  23. package/dist/components/containers/context-menu/theme.js +2 -2
  24. package/dist/components/containers/dialogue/Dialogue.svelte +1 -1
  25. package/dist/components/containers/dialogue/theme.d.ts +1 -1
  26. package/dist/components/containers/dialogue/theme.js +3 -3
  27. package/dist/components/containers/dialogue/types.d.ts +1 -1
  28. package/dist/components/containers/divider/theme.d.ts +1 -1
  29. package/dist/components/containers/divider/theme.js +1 -1
  30. package/dist/components/containers/link-preview/theme.d.ts +1 -1
  31. package/dist/components/containers/link-preview/theme.js +2 -2
  32. package/dist/components/containers/list/theme.d.ts +1 -1
  33. package/dist/components/containers/list/theme.js +1 -1
  34. package/dist/components/containers/menu/Menu.svelte +1 -1
  35. package/dist/components/containers/menu/MenuSub.svelte +1 -1
  36. package/dist/components/containers/menu/theme.d.ts +1 -1
  37. package/dist/components/containers/menu/theme.js +1 -1
  38. package/dist/components/containers/pane/theme.d.ts +1 -1
  39. package/dist/components/containers/pane/theme.js +3 -3
  40. package/dist/components/containers/popover/theme.d.ts +1 -1
  41. package/dist/components/containers/popover/theme.js +2 -2
  42. package/dist/components/containers/scroll-area/theme.js +1 -1
  43. package/dist/components/containers/side-sheet/theme.d.ts +1 -1
  44. package/dist/components/containers/side-sheet/theme.js +1 -1
  45. package/dist/components/date/theme.d.ts +1 -1
  46. package/dist/components/date/theme.js +1 -1
  47. package/dist/components/forms/checkbox/theme.d.ts +1 -1
  48. package/dist/components/forms/checkbox/theme.js +1 -1
  49. package/dist/components/forms/command/theme.d.ts +1 -1
  50. package/dist/components/forms/command/theme.js +1 -1
  51. package/dist/components/forms/pin/theme.d.ts +1 -1
  52. package/dist/components/forms/pin/theme.js +1 -1
  53. package/dist/components/forms/radio-group/theme.d.ts +1 -1
  54. package/dist/components/forms/radio-group/theme.js +1 -1
  55. package/dist/components/forms/search/theme.d.ts +1 -1
  56. package/dist/components/forms/search/theme.js +1 -1
  57. package/dist/components/forms/select/Select.svelte +2 -2
  58. package/dist/components/forms/select/theme.d.ts +1 -1
  59. package/dist/components/forms/select/theme.js +2 -2
  60. package/dist/components/forms/slider/theme.d.ts +1 -1
  61. package/dist/components/forms/slider/theme.js +1 -1
  62. package/dist/components/forms/switch/theme.d.ts +1 -1
  63. package/dist/components/forms/switch/theme.js +1 -1
  64. package/dist/components/forms/textfield/theme.d.ts +1 -1
  65. package/dist/components/forms/textfield/theme.js +1 -1
  66. package/dist/components/forms/toggle-group/theme.d.ts +1 -1
  67. package/dist/components/forms/toggle-group/theme.js +1 -1
  68. package/dist/components/forms/tooltip/theme.d.ts +1 -1
  69. package/dist/components/forms/tooltip/theme.js +2 -2
  70. package/dist/components/misc/ThemeSwitcher.svelte +1 -1
  71. package/dist/components/misc/theme.js +1 -1
  72. package/dist/components/nav/appbar/theme.d.ts +1 -1
  73. package/dist/components/nav/appbar/theme.js +2 -2
  74. package/dist/components/nav/breadcrumb/theme.d.ts +1 -1
  75. package/dist/components/nav/breadcrumb/theme.js +1 -1
  76. package/dist/components/nav/navbar/theme.d.ts +3 -3
  77. package/dist/components/nav/navbar/theme.js +2 -2
  78. package/dist/components/nav/rail/Rail.svelte +4 -2
  79. package/dist/components/nav/rail/theme.d.ts +1 -1
  80. package/dist/components/nav/rail/theme.js +2 -2
  81. package/dist/components/nav/rail/types.d.ts +4 -0
  82. package/dist/components/nav/tabs/theme.d.ts +1 -1
  83. package/dist/components/nav/tabs/theme.js +1 -1
  84. package/dist/components/pill/theme.d.ts +1 -1
  85. package/dist/components/pill/theme.js +1 -1
  86. package/dist/components/progress/LinearProgress.svelte +1 -1
  87. package/dist/components/snackbar/theme.d.ts +1 -1
  88. package/dist/components/snackbar/theme.js +2 -2
  89. package/dist/components/table/theme.d.ts +1 -1
  90. package/dist/components/table/theme.js +1 -1
  91. package/dist/components/time/TimeField.svelte +1 -1
  92. package/dist/components/time/theme.d.ts +1 -1
  93. package/dist/components/time/theme.js +1 -1
  94. package/dist/components/toolbar/theme.d.ts +1 -1
  95. package/dist/components/toolbar/theme.js +2 -2
  96. package/dist/components/typography/body/theme.d.ts +1 -1
  97. package/dist/components/typography/body/theme.js +1 -1
  98. package/dist/components/typography/display/theme.d.ts +1 -1
  99. package/dist/components/typography/display/theme.js +1 -1
  100. package/dist/components/typography/headline/theme.d.ts +1 -1
  101. package/dist/components/typography/headline/theme.js +1 -1
  102. package/dist/components/typography/kbd/theme.d.ts +1 -1
  103. package/dist/components/typography/kbd/theme.js +1 -1
  104. package/dist/components/typography/label/theme.js +1 -1
  105. package/dist/components/typography/title/theme.d.ts +1 -1
  106. package/dist/components/typography/title/theme.js +1 -1
  107. package/dist/index.css +1 -0
  108. package/dist/styles/layers.css +33 -0
  109. package/dist/utils/icon/theme.d.ts +1 -1
  110. package/dist/utils/icon/theme.js +1 -1
  111. package/dist/utils/tv.d.ts +6 -0
  112. package/dist/utils/tv.js +12 -0
  113. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from '../../../utils/tv.js';
2
2
  export const tooltip = tv({
3
3
  slots: {
4
- base: 'min-w-60 py-spacing-150 px-spacing-200 shadow-elevation-2 rounded-md relative z-[100] pointer-events-auto',
4
+ base: 'min-w-60 py-spacing-150 px-spacing-200 shadow-elevation-2 rounded-md relative z-layer-popup pointer-events-auto',
5
5
  subhead: '',
6
6
  supportingText: '',
7
7
  textContainer: '',
@@ -6,7 +6,7 @@
6
6
  let open = $state(false);
7
7
  </script>
8
8
 
9
- <div class="right-spacing-200 bottom-spacing-200 fixed z-50 hidden md:block">
9
+ <div class="right-spacing-200 bottom-spacing-200 z-layer-fab fixed hidden md:block">
10
10
  <Popover bind:open title="Theme Settings" side="top" align="end" sideOffset={16}>
11
11
  {#snippet trigger(triggerProps)}
12
12
  <FAB iconProps={{ name: 'palette' }} {...triggerProps} />
@@ -1,4 +1,4 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from '../../utils/tv.js';
2
2
  export const avatar = tv({
3
3
  slots: {
4
4
  root: 'relative flex aspect-square shrink-0 items-center justify-center overflow-hidden rounded-full',
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from 'tailwind-variants';
1
+ import { type VariantProps } from '../../../utils/tv.js';
2
2
  import type { Breakpoint } from '../../containers/pane/theme.js';
3
3
  export type AppbarVariants = VariantProps<typeof appbar>;
4
4
  export type AppBarSize = 'small' | 'medium' | 'large';
@@ -1,4 +1,4 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from '../../../utils/tv.js';
2
2
  /*
3
3
  M3 Expressive app bar (https://m3.material.io/components/app-bars/specs), laid out on one
4
4
  3-column grid (leading · text · trailing) so the size can change per breakpoint in CSS alone:
@@ -121,7 +121,7 @@ export function appbarSize(size, hasSubtitle) {
121
121
  }
122
122
  export const appbar = tv({
123
123
  slots: {
124
- base: 'fixed top-spacing-0 left-spacing-0 w-full flex flex-col z-30 transition-colors md-sys-motion-effects',
124
+ base: 'fixed top-spacing-0 left-spacing-0 w-full flex flex-col z-layer-bar transition-colors md-sys-motion-effects',
125
125
  row: 'grid w-full items-center px-spacing-50',
126
126
  childrenRow: 'w-full px-spacing-100 pb-spacing-100',
127
127
  ghost: 'w-full shrink-0 pointer-events-none',
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from 'tailwind-variants';
1
+ import { type VariantProps } from '../../../utils/tv.js';
2
2
  export type BreadcrumbVariants = VariantProps<typeof breadcrumb>;
3
3
  export declare const breadcrumb: import("tailwind-variants").TVReturnType<{
4
4
  color: {
@@ -1,4 +1,4 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from '../../../utils/tv.js';
2
2
  export const breadcrumb = tv({
3
3
  slots: {
4
4
  base: 'flex',
@@ -1,19 +1,19 @@
1
1
  export declare const navbar: import("tailwind-variants").TVReturnType<{
2
2
  [key: string]: {
3
3
  [key: string]: import("tailwind-variants").ClassValue | {
4
+ fab?: import("tailwind-variants").ClassValue;
4
5
  base?: import("tailwind-variants").ClassValue;
5
6
  items?: import("tailwind-variants").ClassValue;
6
7
  ghost?: import("tailwind-variants").ClassValue;
7
- fab?: import("tailwind-variants").ClassValue;
8
8
  };
9
9
  };
10
10
  } | {
11
11
  [x: string]: {
12
12
  [x: string]: import("tailwind-variants").ClassValue | {
13
+ fab?: import("tailwind-variants").ClassValue;
13
14
  base?: import("tailwind-variants").ClassValue;
14
15
  items?: import("tailwind-variants").ClassValue;
15
16
  ghost?: import("tailwind-variants").ClassValue;
16
- fab?: import("tailwind-variants").ClassValue;
17
17
  };
18
18
  };
19
19
  } | {}, {
@@ -24,10 +24,10 @@ export declare const navbar: import("tailwind-variants").TVReturnType<{
24
24
  }, undefined, {
25
25
  [key: string]: {
26
26
  [key: string]: import("tailwind-variants").ClassValue | {
27
+ fab?: import("tailwind-variants").ClassValue;
27
28
  base?: import("tailwind-variants").ClassValue;
28
29
  items?: import("tailwind-variants").ClassValue;
29
30
  ghost?: import("tailwind-variants").ClassValue;
30
- fab?: import("tailwind-variants").ClassValue;
31
31
  };
32
32
  };
33
33
  } | {}, {
@@ -1,7 +1,7 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from '../../../utils/tv.js';
2
2
  export const navbar = tv({
3
3
  slots: {
4
- base: 'shadow-elevation-2 bg-md-sys-color-surface-container relative z-20 flex h-20 fixed bottom-spacing-0 w-full left-spacing-0 justify-around py-spacing-150 md:hidden',
4
+ base: 'shadow-elevation-2 bg-md-sys-color-surface-container z-layer-bar flex h-20 fixed bottom-spacing-0 w-full left-spacing-0 justify-around py-spacing-150 md:hidden',
5
5
  items: 'flex justify-around w-full',
6
6
  fab: 'bottom-24 right-spacing-200 absolute',
7
7
  ghost: 'h-20 w-full shrink-0 md:hidden pointer-events-none'
@@ -25,6 +25,8 @@ On mobile (< md) it automatically renders as a bottom navigation bar.
25
25
  collapsed = $bindable(true),
26
26
  anchor = 'viewport',
27
27
  railTop = 0,
28
+ expandLabel = 'Expand navigation',
29
+ collapseLabel = 'Collapse navigation',
28
30
  class: className
29
31
  }: RailProps = $props();
30
32
 
@@ -68,7 +70,7 @@ On mobile (< md) it automatically renders as a bottom navigation bar.
68
70
  <ButtonIcon
69
71
  variant="standard"
70
72
  type="button"
71
- tooltipContent={collapsed ? 'Открыть' : 'Закрыть'}
73
+ tooltipContent={collapsed ? expandLabel : collapseLabel}
72
74
  iconProps={{ name: `${collapsed ? 'menu' : 'menu_open'}` }}
73
75
  class={toggleClass}
74
76
  onclick={() => (collapsed = !collapsed)}
@@ -98,6 +100,6 @@ On mobile (< md) it automatically renders as a bottom navigation bar.
98
100
  opacity: 1;
99
101
  pointer-events: auto;
100
102
  background-color: rgb(0 0 0 / 0.4);
101
- z-index: 30;
103
+ z-index: var(--z-layer-rail);
102
104
  }
103
105
  </style>
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from 'tailwind-variants';
1
+ import { type VariantProps } from '../../../utils/tv.js';
2
2
  export type RailVariants = VariantProps<typeof rail>;
3
3
  export type RailItemVariants = VariantProps<typeof railElement>;
4
4
  export declare const rail: import("tailwind-variants").TVReturnType<{
@@ -1,7 +1,7 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from '../../../utils/tv.js';
2
2
  export const rail = tv({
3
3
  slots: {
4
- base: 'py-spacing-600 hidden bg-md-sys-color-surface-container z-40 flex-col md:flex gap-spacing-300 transition-[width,padding,background-color] md-sys-motion-spatial',
4
+ base: 'py-spacing-600 hidden bg-md-sys-color-surface-container z-layer-rail flex-col md:flex gap-spacing-300 transition-[width,padding,background-color] md-sys-motion-spatial',
5
5
  items: 'flex flex-col gap-spacing-150 pt-spacing-300 scrollbar-none w-full overflow-x-hidden',
6
6
  ghost: 'hidden md:block shrink-0 transition-[width] md-sys-motion-spatial',
7
7
  scrim: 'hidden md:block lg:hidden inset-spacing-0'
@@ -41,6 +41,10 @@ export type RailProps = RailVariants & HTMLAttributes<HTMLDivElement> & {
41
41
  anchor?: RailVariants['anchor'];
42
42
  /** Top offset in px for viewport/parent anchor (e.g. height of a top bar). Default 0. */
43
43
  railTop?: number;
44
+ /** Tooltip and accessible name of the toggle while collapsed. Default 'Expand navigation'. */
45
+ expandLabel?: string;
46
+ /** Tooltip and accessible name of the toggle while expanded. Default 'Collapse navigation'. */
47
+ collapseLabel?: string;
44
48
  /**
45
49
  * @deprecated No effect: Rail no longer renders a navigation bar below `md`. Mount a `Navbar`
46
50
  * next to it for small windows.
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from 'tailwind-variants';
1
+ import { type VariantProps } from '../../../utils/tv.js';
2
2
  export type TabVariants = VariantProps<typeof tab>;
3
3
  export type TabHolderVariants = VariantProps<typeof tabHolder>;
4
4
  export declare const tabHolder: import("tailwind-variants").TVReturnType<{
@@ -1,4 +1,4 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from '../../../utils/tv.js';
2
2
  export const tabHolder = tv({
3
3
  slots: {
4
4
  base: 'relative flex w-full bg-md-sys-color-surface',
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from 'tailwind-variants';
1
+ import { type VariantProps } from '../../utils/tv.js';
2
2
  export type PillVariants = VariantProps<typeof pill>;
3
3
  export declare const pill: import("tailwind-variants").TVReturnType<{
4
4
  variant: {
@@ -1,4 +1,4 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from '../../utils/tv.js';
2
2
  export const pill = tv({
3
3
  base: 'relative inline-flex items-center justify-center px-spacing-200 py-spacing-75 md-sys-typescale-label-large select-none rounded-full whitespace-nowrap',
4
4
  variants: {
@@ -11,7 +11,7 @@ The track always keeps a gap either side of the bar.
11
11
  -->
12
12
  <script lang="ts">
13
13
  import clsx from 'clsx';
14
- import { tv } from 'tailwind-variants';
14
+ import { tv } from '../../utils/tv.js';
15
15
  import { Progress } from 'bits-ui';
16
16
  import { animate, type AnimationPlaybackControls } from 'motion';
17
17
  import { springTokens, springTransition } from '../../animation/spring.js';
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from 'tailwind-variants';
1
+ import { type VariantProps } from '../../utils/tv.js';
2
2
  export type SnackBarVariants = VariantProps<typeof snackbar>;
3
3
  export declare const snackbar: import("tailwind-variants").TVReturnType<{
4
4
  fixed: {
@@ -1,7 +1,7 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from '../../utils/tv.js';
2
2
  export const snackbar = tv({
3
3
  slots: {
4
- base: 'rounded-xs relative min-h-spacing-600 md:max-h-17 flex z-[100] items-center bg-md-sys-color-inverse-surface shadow-elevation-3 pr-spacing-100 pl-spacing-200 justify-between h-max py-spacing-150',
4
+ base: 'rounded-xs relative min-h-spacing-600 md:max-h-17 flex z-layer-snackbar items-center bg-md-sys-color-inverse-surface shadow-elevation-3 pr-spacing-100 pl-spacing-200 justify-between h-max py-spacing-150',
5
5
  label: 'text-md-sys-color-inverse-primary md-sys-typescale-label-large px-spacing-150 cursor-pointer ',
6
6
  actionWrapper: 'flex items-center z-40',
7
7
  supportingText: 'text-md-sys-color-inverse-on-surface md-sys-typescale-body-medium max-w-[60ch] ',
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from 'tailwind-variants';
1
+ import { type VariantProps } from '../../utils/tv.js';
2
2
  export declare const table: import("tailwind-variants").TVReturnType<{
3
3
  hoverable: {
4
4
  true: {
@@ -1,4 +1,4 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from '../../utils/tv.js';
2
2
  export const table = tv({
3
3
  slots: {
4
4
  root: 'w-full border-collapse text-left md-sys-typescale-body-medium text-md-sys-color-on-surface',
@@ -92,7 +92,7 @@ It combines a Material 3 Textfield with a TimepickerInput for intuitive time sel
92
92
  align="start"
93
93
  sideOffset={12}
94
94
  collisionPadding={8}
95
- class="z-100"
95
+ class="z-layer-popup"
96
96
  >
97
97
  {#snippet child({ wrapperProps, props, open })}
98
98
  <div {...wrapperProps}>
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from 'tailwind-variants';
1
+ import { type VariantProps } from '../../utils/tv.js';
2
2
  export type TimepickerVariants = VariantProps<typeof timepicker>;
3
3
  export declare const timepicker: import("tailwind-variants").TVReturnType<{
4
4
  [key: string]: {
@@ -1,4 +1,4 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from '../../utils/tv.js';
2
2
  export const timepicker = tv({
3
3
  slots: {
4
4
  base: 'bg-md-sys-color-surface-container-high shadow-elevation-3 rounded-xl max-w-fit p-spacing-300 group relative',
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from 'tailwind-variants';
1
+ import { type VariantProps } from '../../utils/tv.js';
2
2
  export type ToolbarVariants = VariantProps<typeof toolbar>;
3
3
  export type ToolbarButtonVariants = VariantProps<typeof toolbarButton>;
4
4
  export type ToolbarGroupItemVariants = VariantProps<typeof toolbarGroupItem>;
@@ -1,4 +1,4 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from '../../utils/tv.js';
2
2
  export const toolbar = tv({
3
3
  slots: {
4
4
  // Layout/position only — no paint. Holds one implicit `segment` by default, or,
@@ -33,7 +33,7 @@ export const toolbar = tv({
33
33
  },
34
34
  variant: {
35
35
  floating: { root: 'inline-flex', segment: 'rounded-full shadow-elevation-1' },
36
- docked: { root: 'fixed left-spacing-0 z-10 w-full', segment: 'w-full rounded-none' }
36
+ docked: { root: 'fixed left-spacing-0 z-layer-bar w-full', segment: 'w-full rounded-none' }
37
37
  },
38
38
  color: {
39
39
  standard: { segment: 'bg-md-sys-color-surface-container' },
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from 'tailwind-variants';
1
+ import { type VariantProps } from '../../../utils/tv.js';
2
2
  export type BodyVariants = VariantProps<typeof body>;
3
3
  export declare const body: import("tailwind-variants").TVReturnType<{
4
4
  emphasized: {
@@ -1,4 +1,4 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from '../../../utils/tv.js';
2
2
  export const body = tv({
3
3
  base: '',
4
4
  variants: {
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from 'tailwind-variants';
1
+ import { type VariantProps } from '../../../utils/tv.js';
2
2
  export type DisplayVariants = VariantProps<typeof display>;
3
3
  export declare const display: import("tailwind-variants").TVReturnType<{
4
4
  emphasized: {
@@ -1,4 +1,4 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from '../../../utils/tv.js';
2
2
  export const display = tv({
3
3
  base: '',
4
4
  variants: {
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from 'tailwind-variants';
1
+ import { type VariantProps } from '../../../utils/tv.js';
2
2
  export type HeadlineVariants = VariantProps<typeof headline>;
3
3
  export declare const headline: import("tailwind-variants").TVReturnType<{
4
4
  emphasized: {
@@ -1,4 +1,4 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from '../../../utils/tv.js';
2
2
  export const headline = tv({
3
3
  base: '',
4
4
  variants: {
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from 'tailwind-variants';
1
+ import { type VariantProps } from '../../../utils/tv.js';
2
2
  export type KbdVariants = VariantProps<typeof kbd>;
3
3
  export declare const kbd: import("tailwind-variants").TVReturnType<{
4
4
  position: {
@@ -1,4 +1,4 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from '../../../utils/tv.js';
2
2
  export const kbd = tv({
3
3
  base: 'md-sys-typescale-emphasized-label-small text-md-sys-color-on-surface-variant',
4
4
  variants: {
@@ -1,4 +1,4 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from '../../../utils/tv.js';
2
2
  export const label = tv({
3
3
  base: '',
4
4
  variants: {
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from 'tailwind-variants';
1
+ import { type VariantProps } from '../../../utils/tv.js';
2
2
  export type TitleVariants = VariantProps<typeof title>;
3
3
  export declare const title: import("tailwind-variants").TVReturnType<{
4
4
  emphasized: {
@@ -1,4 +1,4 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from '../../../utils/tv.js';
2
2
  export const title = tv({
3
3
  base: '',
4
4
  variants: {
package/dist/index.css CHANGED
@@ -3,5 +3,6 @@
3
3
  @import './styles/motion.css';
4
4
  @import './styles/rounding.css';
5
5
  @import './styles/elevation.css';
6
+ @import './styles/layers.css';
6
7
  @import './styles/prose.css';
7
8
  @import './styles/component.css';
@@ -0,0 +1,33 @@
1
+ /*
2
+ * Stacking layers for surfaces that float over the page. M3 defines no z-index tokens, so the
3
+ * library names its own: every fixed, sticky or portaled component takes one of these instead
4
+ * of a number, so their relative order is set here and nowhere else. Apply with
5
+ * `z-layer-<name>` (z-layer-modal); override the value on :root with `--z-layer-<name>`.
6
+ * Stacking inside one component (a slider thumb over its track) keeps plain z-10/z-20.
7
+ *
8
+ * Order, lowest first:
9
+ * bar Navbar, AppBar, ActionRail, docked Toolbar
10
+ * rail Rail and its tablet scrim (the expanded rail covers the bars)
11
+ * sheet standard (non-modal) BottomSheet
12
+ * fab fixed FABs such as ThemeSwitcher
13
+ * pane DraggablePane and its minimised pill, floating windows over app chrome
14
+ * modal Dialogue scrim and content, a FAB's container-transform surface
15
+ * snackbar stays readable while a dialog is open
16
+ * popup menus, selects, tooltips, popovers, date/time pickers, opened from any layer
17
+ * beneath, including a dialog or a pane
18
+ * Modal sheets are native <dialog>s in the top layer and sit above all of these.
19
+ */
20
+ @theme static {
21
+ --z-layer-bar: 30;
22
+ --z-layer-rail: 40;
23
+ --z-layer-sheet: 40;
24
+ --z-layer-fab: 50;
25
+ --z-layer-pane: 60;
26
+ --z-layer-modal: 70;
27
+ --z-layer-snackbar: 80;
28
+ --z-layer-popup: 90;
29
+ }
30
+
31
+ @utility z-layer-* {
32
+ z-index: --value(--z-layer-*);
33
+ }
@@ -1,4 +1,4 @@
1
- import { type VariantProps } from 'tailwind-variants';
1
+ import { type VariantProps } from '../tv.js';
2
2
  export type LoadingIndicatorVariants = VariantProps<typeof loadingIndicator>;
3
3
  export declare const loadingIndicator: import("tailwind-variants").TVReturnType<{
4
4
  center: {
@@ -1,4 +1,4 @@
1
- import { tv } from 'tailwind-variants';
1
+ import { tv } from '../tv.js';
2
2
  export const loadingIndicator = tv({
3
3
  base: 'rounded-full',
4
4
  variants: {
@@ -0,0 +1,6 @@
1
+ export type { VariantProps } from 'tailwind-variants';
2
+ /**
3
+ * The library's `tv`. It teaches tailwind-merge that `z-layer-*` sets z-index, so a consumer's
4
+ * `class="z-40"` replaces a component's layer instead of fighting it in CSS order.
5
+ */
6
+ export declare const tv: import("tailwind-variants").TV;
@@ -0,0 +1,12 @@
1
+ import { createTV } from 'tailwind-variants';
2
+ /** The layer names from `styles/layers.css`. Keep the two in sync. */
3
+ const LAYERS = ['bar', 'rail', 'sheet', 'fab', 'pane', 'modal', 'snackbar', 'popup'];
4
+ /**
5
+ * The library's `tv`. It teaches tailwind-merge that `z-layer-*` sets z-index, so a consumer's
6
+ * `class="z-40"` replaces a component's layer instead of fighting it in CSS order.
7
+ */
8
+ export const tv = createTV({
9
+ twMergeConfig: {
10
+ extend: { classGroups: { z: [{ 'z-layer': LAYERS }] } }
11
+ }
12
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noxlovette/material",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "type": "module",
5
5
  "description": "A Material Design 3 component library for Svelte, built on Bits UI.",
6
6
  "keywords": [