@noxlovette/material 0.4.7 → 0.5.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.
Files changed (134) hide show
  1. package/dist/animation/TransitionPatterns.stories.svelte +357 -0
  2. package/dist/animation/TransitionPatterns.stories.svelte.d.ts +3 -0
  3. package/dist/animation/containerTransform.d.ts +26 -12
  4. package/dist/animation/containerTransform.js +22 -138
  5. package/dist/animation/enterExit.d.ts +21 -3
  6. package/dist/animation/enterExit.js +69 -22
  7. package/dist/animation/index.d.ts +1 -1
  8. package/dist/animation/index.js +1 -1
  9. package/dist/animation/presence.svelte.d.ts +47 -0
  10. package/dist/animation/presence.svelte.js +84 -0
  11. package/dist/animation/sharedAxisTransition.d.ts +35 -37
  12. package/dist/animation/sharedAxisTransition.js +50 -22
  13. package/dist/animation/skeleton.d.ts +11 -0
  14. package/dist/animation/skeleton.js +23 -0
  15. package/dist/animation/spring.d.ts +61 -0
  16. package/dist/animation/spring.js +53 -0
  17. package/dist/animation/springValue.svelte.d.ts +22 -0
  18. package/dist/animation/springValue.svelte.js +42 -0
  19. package/dist/animation/transition.d.ts +3 -1
  20. package/dist/animation/transition.js +3 -1
  21. package/dist/attachments/clickOutside.d.ts +13 -0
  22. package/dist/attachments/clickOutside.js +18 -0
  23. package/dist/attachments/index.d.ts +1 -0
  24. package/dist/attachments/index.js +1 -0
  25. package/dist/components/buttons/FAB.svelte +23 -16
  26. package/dist/components/buttons/FABMenu.svelte +24 -29
  27. package/dist/components/buttons/FABMenu.svelte.d.ts +2 -1
  28. package/dist/components/buttons/FABMenuItem.svelte +23 -20
  29. package/dist/components/buttons/FABMenuItem.svelte.d.ts +5 -1
  30. package/dist/components/buttons/split-button/SplitButton.svelte +10 -17
  31. package/dist/components/buttons/split-button/theme.js +1 -1
  32. package/dist/components/buttons/types.d.ts +3 -3
  33. package/dist/components/cards/theme.js +1 -1
  34. package/dist/components/containers/bottom-sheet/BottomSheet.stories.svelte +8 -12
  35. package/dist/components/containers/bottom-sheet/BottomSheet.svelte +67 -55
  36. package/dist/components/containers/bottom-sheet/BottomSheet.svelte.d.ts +1 -1
  37. package/dist/components/containers/bottom-sheet/types.d.ts +8 -2
  38. package/dist/components/containers/context-menu/ContextMenu.svelte +23 -36
  39. package/dist/components/containers/context-menu/theme.js +2 -2
  40. package/dist/components/containers/dialogue/Dialogue.svelte +49 -65
  41. package/dist/components/containers/link-preview/LinkPreview.svelte +12 -23
  42. package/dist/components/containers/link-preview/theme.d.ts +3 -3
  43. package/dist/components/containers/menu/Menu.svelte +14 -21
  44. package/dist/components/containers/menu/MenuSub.svelte +10 -17
  45. package/dist/components/containers/pane/DraggablePane.svelte +90 -5
  46. package/dist/components/containers/pane/DraggablePane.svelte.d.ts +1 -1
  47. package/dist/components/containers/pane/theme.js +2 -2
  48. package/dist/components/containers/popover/Popover.svelte +31 -42
  49. package/dist/components/containers/popover/theme.d.ts +3 -3
  50. package/dist/components/containers/scroll-area/theme.js +2 -2
  51. package/dist/components/containers/side-sheet/SideSheet.stories.svelte +10 -15
  52. package/dist/components/containers/side-sheet/SideSheet.svelte +44 -44
  53. package/dist/components/containers/side-sheet/SideSheet.svelte.d.ts +4 -3
  54. package/dist/components/containers/side-sheet/types.d.ts +8 -2
  55. package/dist/components/date/DateField.svelte +85 -92
  56. package/dist/components/date/DateField.svelte.d.ts +2 -5
  57. package/dist/components/date/DateRangeField.svelte +113 -155
  58. package/dist/components/date/DateRangeField.svelte.d.ts +2 -5
  59. package/dist/components/date/theme.d.ts +95 -0
  60. package/dist/components/date/theme.js +99 -14
  61. package/dist/components/date/types.d.ts +13 -0
  62. package/dist/components/forms/checkbox/theme.js +2 -2
  63. package/dist/components/forms/command/theme.d.ts +3 -3
  64. package/dist/components/forms/command/theme.js +1 -1
  65. package/dist/components/forms/pin/theme.js +2 -2
  66. package/dist/components/forms/radio-group/theme.js +2 -2
  67. package/dist/components/forms/select/Select.svelte +42 -54
  68. package/dist/components/forms/select/theme.js +4 -4
  69. package/dist/components/forms/slider/Slider.svelte +144 -126
  70. package/dist/components/forms/slider/Slider.svelte.d.ts +3 -0
  71. package/dist/components/forms/slider/theme.d.ts +154 -48
  72. package/dist/components/forms/slider/theme.js +60 -20
  73. package/dist/components/forms/slider/types.d.ts +1 -1
  74. package/dist/components/forms/switch/theme.js +4 -4
  75. package/dist/components/forms/textfield/Textfield.svelte +1 -1
  76. package/dist/components/forms/textfield/theme.d.ts +9 -0
  77. package/dist/components/forms/textfield/theme.js +26 -9
  78. package/dist/components/forms/toggle-group/theme.js +1 -1
  79. package/dist/components/forms/tooltip/Tooltip.svelte +24 -35
  80. package/dist/components/nav/breadcrumb/theme.js +1 -1
  81. package/dist/components/nav/navbar/theme.js +2 -2
  82. package/dist/components/nav/rail/Rail.svelte +4 -5
  83. package/dist/components/nav/rail/theme.js +7 -7
  84. package/dist/components/nav/tabs/theme.js +1 -1
  85. package/dist/components/pill/theme.d.ts +1 -1
  86. package/dist/components/pill/theme.js +1 -1
  87. package/dist/components/progress/CircularProgress.svelte +78 -4
  88. package/dist/components/progress/CircularProgress.svelte.d.ts +5 -0
  89. package/dist/components/progress/LinearProgress.svelte +70 -7
  90. package/dist/components/progress/LinearProgress.svelte.d.ts +5 -0
  91. package/dist/components/progress/WavyLinearProgress.svelte +27 -3
  92. package/dist/components/progress/WavyLinearProgress.svelte.d.ts +3 -0
  93. package/dist/components/progress/_wavy.d.ts +2 -0
  94. package/dist/components/progress/_wavy.js +3 -1
  95. package/dist/components/snackbar/Snackbar.svelte +13 -17
  96. package/dist/components/table/Table.stories.svelte +24 -0
  97. package/dist/components/table/TableBody.svelte +3 -16
  98. package/dist/components/table/TableBody.svelte.d.ts +1 -5
  99. package/dist/components/table/TableHeader.svelte +1 -1
  100. package/dist/components/table/theme.js +2 -2
  101. package/dist/components/table/types.d.ts +0 -7
  102. package/dist/components/time/TimeField.stories.svelte +41 -0
  103. package/dist/components/time/TimeField.stories.svelte.d.ts +19 -0
  104. package/dist/components/time/TimeField.svelte +62 -61
  105. package/dist/components/toolbar/theme.js +2 -2
  106. package/dist/index.d.ts +1 -1
  107. package/dist/index.js +1 -1
  108. package/dist/styles/component.css +21 -22
  109. package/dist/styles/motion.css +317 -38
  110. package/dist/utils/Layer.svelte +16 -29
  111. package/dist/utils/icon/LoadingIndicator.svelte +61 -22
  112. package/dist/utils/icon/loadingShapes.d.ts +1 -0
  113. package/dist/utils/icon/loadingShapes.js +15 -0
  114. package/package.json +5 -2
  115. package/dist/actions/clickOutside.d.ts +0 -3
  116. package/dist/actions/clickOutside.js +0 -13
  117. package/dist/actions/floating.d.ts +0 -20
  118. package/dist/actions/floating.js +0 -87
  119. package/dist/actions/index.d.ts +0 -6
  120. package/dist/actions/index.js +0 -6
  121. package/dist/actions/keyboard.d.ts +0 -3
  122. package/dist/actions/keyboard.js +0 -14
  123. package/dist/actions/portal.d.ts +0 -3
  124. package/dist/actions/portal.js +0 -8
  125. package/dist/actions/positionFloating.d.ts +0 -10
  126. package/dist/actions/positionFloating.js +0 -59
  127. package/dist/actions/rovingFocusGroup.d.ts +0 -20
  128. package/dist/actions/rovingFocusGroup.js +0 -82
  129. package/dist/animation/easing.d.ts +0 -6
  130. package/dist/animation/easing.js +0 -78
  131. package/dist/animation/outroClass.d.ts +0 -3
  132. package/dist/animation/outroClass.js +0 -20
  133. package/dist/animation/transitionTypes.d.ts +0 -8
  134. package/dist/animation/transitionTypes.js +0 -1
@@ -6,12 +6,11 @@ It combines a Material 3 Textfield with a TimepickerInput for intuitive time sel
6
6
  @see https://m3.material.io/components/time-pickers/overview
7
7
  -->
8
8
  <script lang="ts">
9
+ import { enterExit, presence } from '../../animation/index.js';
9
10
  import type { HTMLInputAttributes } from 'svelte/elements';
10
11
  import Textfield from '../forms/textfield/Textfield.svelte';
11
12
  import TimepickerInput from './TimepickerInput.svelte';
12
- import { clickOutside, positionFloating } from '../../actions/index.js';
13
- import { enterExit } from '../../animation/enterExit.js';
14
- import { easeEmphasizedDecel, easeEmphasizedAccel } from '../../animation/easing.js';
13
+ import { Popover } from 'bits-ui';
15
14
 
16
15
  let {
17
16
  label = 'Время',
@@ -48,64 +47,66 @@ It combines a Material 3 Textfield with a TimepickerInput for intuitive time sel
48
47
  let anchorEl = $state<HTMLDivElement>();
49
48
  </script>
50
49
 
51
- <div
52
- class="relative w-full"
53
- bind:this={anchorEl}
54
- use:clickOutside={() => {
55
- picker = false;
56
- }}
57
- >
58
- <Textfield
59
- id={id as string}
60
- {label}
61
- {value}
62
- {name}
63
- {disabled}
64
- {error}
65
- {leadingIconProps}
66
- class="pointer-events-none"
67
- trailingIconProps={{ name: 'timer' }}
68
- trailingOnClick={() => !disabled && (picker = !picker)}
69
- {...restProps as any}
70
- >
71
- {#snippet supportingText()}
72
- ЧЧ-ММ
73
- {/snippet}
74
- </Textfield>
50
+ <Popover.Root bind:open={picker}>
51
+ <div class="relative w-full" bind:this={anchorEl}>
52
+ <Textfield
53
+ id={id as string}
54
+ {label}
55
+ {value}
56
+ {name}
57
+ {disabled}
58
+ {error}
59
+ {leadingIconProps}
60
+ class="pointer-events-none"
61
+ trailingIconProps={{ name: 'timer' }}
62
+ trailingOnClick={() => !disabled && (picker = !picker)}
63
+ {...restProps as any}
64
+ >
65
+ {#snippet supportingText()}
66
+ ЧЧ-ММ
67
+ {/snippet}
68
+ </Textfield>
75
69
 
76
- <button
77
- {disabled}
78
- title="time-overlay"
79
- class="absolute inset-0 cursor-pointer disabled:cursor-not-allowed"
80
- type="button"
81
- onclick={() => !disabled && (picker = !picker)}
82
- data-cy="calendar-time-toggle"
83
- ></button>
70
+ <Popover.Trigger {disabled}>
71
+ {#snippet child({ props })}
72
+ <button
73
+ {...props}
74
+ title="time-overlay"
75
+ class="absolute inset-0 cursor-pointer disabled:cursor-not-allowed"
76
+ type="button"
77
+ data-cy="calendar-time-toggle"
78
+ ></button>
79
+ {/snippet}
80
+ </Popover.Trigger>
81
+ </div>
84
82
 
85
- {#if picker}
86
- <div
87
- class="picker"
88
- use:positionFloating={{ anchor: anchorEl, offset: 12 }}
89
- in:enterExit={{
90
- duration: 200,
91
- easing: easeEmphasizedDecel,
92
- mode: 'scale'
93
- }}
94
- out:enterExit={{
95
- duration: 150,
96
- easing: easeEmphasizedAccel,
97
- mode: 'scale'
98
- }}
99
- style="transform-origin: top center;"
83
+ <Popover.Portal>
84
+ <Popover.Content
85
+ customAnchor={anchorEl}
86
+ side="bottom"
87
+ align="start"
88
+ sideOffset={12}
89
+ collisionPadding={8}
90
+ class="z-100"
100
91
  >
101
- <TimepickerInput time={value} close={() => (picker = false)} setTime={(t) => (value = t)} />
102
- </div>
103
- {/if}
104
- </div>
105
-
106
- <style>
107
- .picker {
108
- z-index: 1;
109
- position: absolute;
110
- }
111
- </style>
92
+ {#snippet child({ wrapperProps, props, open })}
93
+ <div {...wrapperProps}>
94
+ <div
95
+ {...props}
96
+ class={[
97
+ props.class,
98
+ 'max-h-(--bits-floating-available-height) min-w-(--bits-floating-anchor-width) overflow-auto'
99
+ ]}
100
+ {@attach presence(() => open, enterExit.scale)}
101
+ >
102
+ <TimepickerInput
103
+ time={value}
104
+ close={() => (picker = false)}
105
+ setTime={(t) => (value = t)}
106
+ />
107
+ </div>
108
+ </div>
109
+ {/snippet}
110
+ </Popover.Content>
111
+ </Popover.Portal>
112
+ </Popover.Root>
@@ -48,7 +48,7 @@ export const toolbar = tv({
48
48
  });
49
49
  export const toolbarButton = tv({
50
50
  slots: {
51
- base: 'layer-container state-layer before:rounded-full relative inline-flex size-10 items-center justify-center rounded-full outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-38',
51
+ base: 'layer-container state-layer before:rounded-full relative inline-flex size-10 items-center justify-center rounded-full outline-none transition-colors md-sys-motion-fast-effects disabled:cursor-not-allowed disabled:opacity-38',
52
52
  icon: 'size-5 text-[20px]'
53
53
  },
54
54
  variants: {
@@ -61,7 +61,7 @@ export const toolbarButton = tv({
61
61
  });
62
62
  export const toolbarGroupItem = tv({
63
63
  slots: {
64
- base: 'layer-container state-layer before:rounded-full relative inline-flex size-10 items-center justify-center rounded-full outline-none transition-colors disabled:cursor-not-allowed disabled:opacity-38',
64
+ base: 'layer-container state-layer before:rounded-full relative inline-flex size-10 items-center justify-center rounded-full outline-none transition-colors md-sys-motion-fast-effects disabled:cursor-not-allowed disabled:opacity-38',
65
65
  icon: 'size-5 text-[20px]'
66
66
  },
67
67
  variants: {
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from './actions/index.js';
2
1
  export * from './animation/index.js';
2
+ export * from './attachments/index.js';
3
3
  export * from './components/index.js';
4
4
  export * from './utils/index.js';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export * from './actions/index.js';
2
1
  export * from './animation/index.js';
2
+ export * from './attachments/index.js';
3
3
  export * from './components/index.js';
4
4
  export * from './utils/index.js';
@@ -12,17 +12,20 @@
12
12
  * `fixed`/`absolute`/`sticky` override. Baking it into this custom class's own compiled
13
13
  * CSS rule would set `position` outside of anything twMerge can see or override. */
14
14
  @apply state-layer md-sys-state-focus-indicator disabled:bg-md-sys-color-on-surface/10 disabled:text-md-sys-color-on-surface/38 disabled:before:bg-md-sys-color-on-surface/38 inline-flex items-center justify-center select-none disabled:cursor-not-allowed;
15
- transition: box-shadow var(--md-sys-motion-duration, 200ms)
16
- var(--md-sys-motion-timing-function, cubic-bezier(0.2, 0, 0, 1));
15
+ transition: box-shadow var(--md-sys-motion-duration-effects-spring)
16
+ var(--md-sys-motion-timing-function-effects-spring);
17
17
  }
18
18
 
19
+ /* Shape morphs run on the fast spatial spring in both directions (press and release). */
19
20
  .md-btn-morph {
20
21
  border-radius: var(--btn-shape-override, var(--btn-shape, 9999px));
21
- transition: border-radius 200ms var(--md-sys-motion-timing-function-emphasized-accel);
22
+ transition: border-radius var(--md-sys-motion-duration-fast-spatial)
23
+ var(--md-sys-motion-timing-function-fast-spatial);
22
24
 
23
25
  &::before {
24
26
  border-radius: inherit;
25
- transition: border-radius 200ms var(--md-sys-motion-timing-function-emphasized-accel);
27
+ transition: border-radius var(--md-sys-motion-duration-fast-spatial)
28
+ var(--md-sys-motion-timing-function-fast-spatial);
26
29
  }
27
30
 
28
31
  &:active:not(:disabled) {
@@ -30,7 +33,6 @@
30
33
  --btn-pressed-shape,
31
34
  var(--btn-shape-override, var(--btn-shape, 9999px))
32
35
  ) !important;
33
- transition-timing-function: var(--md-sys-motion-timing-function-emphasized-decel);
34
36
  }
35
37
  }
36
38
 
@@ -85,9 +87,10 @@
85
87
  > * {
86
88
  padding-inline: var(--btn-group-base-px, 1rem);
87
89
  transition:
88
- padding-inline var(--md-sys-motion-duration-fast-spatial, 350ms)
89
- var(--md-sys-motion-timing-function-fast-spatial, cubic-bezier(0.42, 1.67, 0.21, 0.9)),
90
- border-radius 200ms var(--md-sys-motion-timing-function-emphasized-accel);
90
+ padding-inline var(--md-sys-motion-duration-fast-spatial)
91
+ var(--md-sys-motion-timing-function-fast-spatial),
92
+ border-radius var(--md-sys-motion-duration-fast-spatial)
93
+ var(--md-sys-motion-timing-function-fast-spatial);
91
94
  }
92
95
 
93
96
  > *:active:not(:disabled) {
@@ -114,11 +117,12 @@
114
117
  .md-btn-connected {
115
118
  border-radius: var(--cbg-inner, 9999px);
116
119
  transition:
117
- border-radius 250ms var(--md-sys-motion-timing-function-emphasized-accel),
118
- background-color var(--md-sys-motion-duration-fast, 150ms)
119
- var(--md-sys-motion-timing-function, cubic-bezier(0.2, 0, 0, 1)),
120
- color var(--md-sys-motion-duration-fast, 150ms)
121
- var(--md-sys-motion-timing-function, cubic-bezier(0.2, 0, 0, 1));
120
+ border-radius var(--md-sys-motion-duration-fast-spatial)
121
+ var(--md-sys-motion-timing-function-fast-spatial),
122
+ background-color var(--md-sys-motion-duration-fast-effects-spring)
123
+ var(--md-sys-motion-timing-function-fast-effects-spring),
124
+ color var(--md-sys-motion-duration-fast-effects-spring)
125
+ var(--md-sys-motion-timing-function-fast-effects-spring);
122
126
 
123
127
  &:only-child {
124
128
  border-radius: var(--cbg-outer, 9999px);
@@ -144,11 +148,6 @@
144
148
  &:active:not(:disabled),
145
149
  &[data-state='on'] {
146
150
  border-radius: var(--cbg-inner, 4px) !important;
147
- transition-timing-function: var(--md-sys-motion-timing-function-emphasized-decel);
148
- }
149
-
150
- &:active:not(:disabled) {
151
- transition-duration: 150ms;
152
151
  }
153
152
  }
154
153
 
@@ -245,8 +244,8 @@
245
244
 
246
245
  .text-link {
247
246
  @apply text-md-sys-color-primary hover:text-md-sys-color-secondary underline;
248
- transition: color var(--md-sys-motion-duration, 200ms)
249
- var(--md-sys-motion-timing-function, cubic-bezier(0.2, 0, 0, 1));
247
+ transition: color var(--md-sys-motion-duration-effects-spring)
248
+ var(--md-sys-motion-timing-function-effects-spring);
250
249
  }
251
250
 
252
251
  .text-link.md-sys-typescale-label-small {
@@ -270,7 +269,7 @@
270
269
  @utility state-layer {
271
270
  @apply before:pointer-events-none before:absolute before:inset-0 before:content-[''];
272
271
  &::before {
273
- transition: background-color var(--md-sys-motion-duration-fast, 150ms)
274
- var(--md-sys-motion-timing-function, cubic-bezier(0.2, 0, 0, 1));
272
+ transition: background-color var(--md-sys-motion-duration-fast-effects-spring)
273
+ var(--md-sys-motion-timing-function-fast-effects-spring);
275
274
  }
276
275
  }
@@ -1,54 +1,333 @@
1
1
  @theme {
2
- /* Expressive easing */
3
- --md-sys-motion-timing-function-fast-spatial: cubic-bezier(0.42, 1.67, 0.21, 0.9);
4
- --md-sys-motion-duration-fast-spatial: 350ms;
2
+ /* Expressive springs — generated from src/lib/animation/spring.ts, do not edit by hand.
3
+ Regenerate with `bun scripts/generate-motion-springs.ts`. Each is a `linear()` sampling of a
4
+ real spring plus its settle time. Spatial tokens overshoot; effects tokens don't. */
5
+ /* @generated:springs:start */
6
+ --md-sys-motion-timing-function-fast-spatial: linear(
7
+ 0,
8
+ 0.0373,
9
+ 0.1315,
10
+ 0.2592,
11
+ 0.4017,
12
+ 0.5444,
13
+ 0.6773,
14
+ 0.794,
15
+ 0.8908,
16
+ 0.9669,
17
+ 1.023,
18
+ 1.061,
19
+ 1.0835,
20
+ 1.0935,
21
+ 1.094,
22
+ 1.0877,
23
+ 1.0771,
24
+ 1.0642,
25
+ 1.0505,
26
+ 1.0373,
27
+ 1.0253,
28
+ 1.0151,
29
+ 1.0068,
30
+ 1.0005,
31
+ 0.996,
32
+ 0.9931,
33
+ 0.9915,
34
+ 0.991,
35
+ 0.9913,
36
+ 0.9921,
37
+ 0.9932,
38
+ 0.9945,
39
+ 0.9958,
40
+ 0.997,
41
+ 0.9981,
42
+ 0.9989,
43
+ 0.9996,
44
+ 1.0002,
45
+ 1.0005,
46
+ 1.0007,
47
+ 1
48
+ );
49
+ --md-sys-motion-duration-fast-spatial: 410ms;
5
50
  --md-sys-motion-easing-fast-spatial: var(--md-sys-motion-timing-function-fast-spatial)
6
51
  var(--md-sys-motion-duration-fast-spatial);
7
52
 
8
- --md-sys-motion-timing-function-spatial: cubic-bezier(0.38, 1.21, 0.22, 1);
9
- --md-sys-motion-duration-spatial: 500ms;
53
+ --md-sys-motion-timing-function-spatial: linear(
54
+ 0,
55
+ 0.0178,
56
+ 0.0639,
57
+ 0.1291,
58
+ 0.206,
59
+ 0.2888,
60
+ 0.373,
61
+ 0.4554,
62
+ 0.5338,
63
+ 0.6066,
64
+ 0.6728,
65
+ 0.732,
66
+ 0.7841,
67
+ 0.8294,
68
+ 0.868,
69
+ 0.9006,
70
+ 0.9276,
71
+ 0.9498,
72
+ 0.9675,
73
+ 0.9816,
74
+ 0.9924,
75
+ 1.0005,
76
+ 1.0064,
77
+ 1.0105,
78
+ 1.0131,
79
+ 1.0146,
80
+ 1.0151,
81
+ 1.015,
82
+ 1.0145,
83
+ 1.0135,
84
+ 1.0124,
85
+ 1.0112,
86
+ 1.0099,
87
+ 1.0086,
88
+ 1.0074,
89
+ 1.0063,
90
+ 1.0053,
91
+ 1.0043,
92
+ 1.0035,
93
+ 1.0028,
94
+ 1.0022,
95
+ 1.0017,
96
+ 1.0012,
97
+ 1.0009,
98
+ 1.0006,
99
+ 1.0003,
100
+ 1.0002,
101
+ 1,
102
+ 1
103
+ );
104
+ --md-sys-motion-duration-spatial: 490ms;
10
105
  --md-sys-motion-easing-spatial: var(--md-sys-motion-timing-function-spatial)
11
106
  var(--md-sys-motion-duration-spatial);
12
107
 
13
- --md-sys-motion-timing-function-slow-spatial: cubic-bezier(0.39, 1.29, 0.35, 0.98);
14
- --md-sys-motion-duration-slow-spatial: 650ms;
108
+ --md-sys-motion-timing-function-slow-spatial: linear(
109
+ 0,
110
+ 0.0095,
111
+ 0.0354,
112
+ 0.0736,
113
+ 0.121,
114
+ 0.1749,
115
+ 0.2329,
116
+ 0.2931,
117
+ 0.3539,
118
+ 0.4141,
119
+ 0.4728,
120
+ 0.5291,
121
+ 0.5825,
122
+ 0.6326,
123
+ 0.6792,
124
+ 0.7221,
125
+ 0.7613,
126
+ 0.7969,
127
+ 0.8289,
128
+ 0.8575,
129
+ 0.8828,
130
+ 0.9051,
131
+ 0.9245,
132
+ 0.9414,
133
+ 0.9559,
134
+ 0.9682,
135
+ 0.9785,
136
+ 0.9872,
137
+ 0.9943,
138
+ 1,
139
+ 1.0046,
140
+ 1.0081,
141
+ 1.0108,
142
+ 1.0127,
143
+ 1.014,
144
+ 1.0148,
145
+ 1.0151,
146
+ 1.0151,
147
+ 1.0148,
148
+ 1.0143,
149
+ 1.0137,
150
+ 1.0129,
151
+ 1.012,
152
+ 1.0111,
153
+ 1.0102,
154
+ 1.0093,
155
+ 1.0084,
156
+ 1.0075,
157
+ 1.0067,
158
+ 1.0059,
159
+ 1.0052,
160
+ 1.0045,
161
+ 1.0039,
162
+ 1.0033,
163
+ 1.0028,
164
+ 1.0024,
165
+ 1.0019,
166
+ 1.0016,
167
+ 1.0013,
168
+ 1.001,
169
+ 1.0008,
170
+ 1.0006,
171
+ 1.0004,
172
+ 1.0003,
173
+ 1.0001,
174
+ 1
175
+ );
176
+ --md-sys-motion-duration-slow-spatial: 660ms;
15
177
  --md-sys-motion-easing-slow-spatial: var(--md-sys-motion-timing-function-slow-spatial)
16
178
  var(--md-sys-motion-duration-slow-spatial);
17
179
 
18
- /* Standard easing — md.sys.motion.easing.standard, cubic-bezier(0.2, 0, 0, 1) per
19
- m3.material.io/styles/motion/easing-and-duration/tokens-specs. Same curve across all
20
- three durations; only the duration changes per tier. */
21
- --md-sys-motion-timing-function-fast: cubic-bezier(0.2, 0, 0, 1);
22
- --md-sys-motion-duration-fast: 150ms;
23
- --md-sys-motion-easing-fast: var(--md-sys-motion-timing-function-fast)
24
- var(--md-sys-motion-duration-fast);
25
-
26
- --md-sys-motion-timing-function: cubic-bezier(0.2, 0, 0, 1);
27
- --md-sys-motion-duration: 200ms;
28
- --md-sys-motion-easing: var(--md-sys-motion-timing-function) var(--md-sys-motion-duration);
180
+ --md-sys-motion-timing-function-fast-effects-spring: linear(
181
+ 0,
182
+ 0.1389,
183
+ 0.3737,
184
+ 0.5809,
185
+ 0.7331,
186
+ 0.8356,
187
+ 0.9011,
188
+ 0.9416,
189
+ 0.966,
190
+ 0.9804,
191
+ 0.9888,
192
+ 0.9936,
193
+ 0.9964,
194
+ 0.998,
195
+ 0.9989,
196
+ 0.9994,
197
+ 0.9997,
198
+ 0.9998,
199
+ 1
200
+ );
201
+ --md-sys-motion-duration-fast-effects-spring: 190ms;
202
+ --md-sys-motion-easing-fast-effects-spring: var(
203
+ --md-sys-motion-timing-function-fast-effects-spring
204
+ )
205
+ var(--md-sys-motion-duration-fast-effects-spring);
29
206
 
30
- --md-sys-motion-timing-function-slow: cubic-bezier(0.2, 0, 0, 1);
31
- --md-sys-motion-duration-slow: 300ms;
32
- --md-sys-motion-easing-slow: var(--md-sys-motion-timing-function-slow)
33
- var(--md-sys-motion-duration-slow);
207
+ --md-sys-motion-timing-function-effects-spring: linear(
208
+ 0,
209
+ 0.0657,
210
+ 0.2023,
211
+ 0.354,
212
+ 0.4947,
213
+ 0.6144,
214
+ 0.7111,
215
+ 0.7866,
216
+ 0.8442,
217
+ 0.8873,
218
+ 0.9191,
219
+ 0.9423,
220
+ 0.9591,
221
+ 0.9711,
222
+ 0.9797,
223
+ 0.9858,
224
+ 0.9901,
225
+ 0.9931,
226
+ 0.9952,
227
+ 0.9967,
228
+ 0.9977,
229
+ 0.9984,
230
+ 0.9989,
231
+ 0.9993,
232
+ 0.9995,
233
+ 0.9996,
234
+ 1
235
+ );
236
+ --md-sys-motion-duration-effects-spring: 270ms;
237
+ --md-sys-motion-easing-effects-spring: var(--md-sys-motion-timing-function-effects-spring)
238
+ var(--md-sys-motion-duration-effects-spring);
34
239
 
35
- --md-sys-motion-timing-function-emphasized: linear(
240
+ --md-sys-motion-timing-function-slow-effects-spring: linear(
36
241
  0,
37
- 0.034 6%,
38
- 0.073 9%,
39
- 0.126 11%,
40
- 0.194 13%,
41
- 0.273 15%,
42
- 0.351 16%,
43
- 0.541 18%,
44
- 0.652 20%,
45
- 0.755 24%,
46
- 0.839 30%,
47
- 0.91 39%,
48
- 0.959 53%,
49
- 0.989 72%,
242
+ 0.0349,
243
+ 0.1158,
244
+ 0.2173,
245
+ 0.3239,
246
+ 0.4265,
247
+ 0.5204,
248
+ 0.6034,
249
+ 0.675,
250
+ 0.7357,
251
+ 0.7865,
252
+ 0.8285,
253
+ 0.8629,
254
+ 0.8908,
255
+ 0.9134,
256
+ 0.9315,
257
+ 0.946,
258
+ 0.9576,
259
+ 0.9667,
260
+ 0.974,
261
+ 0.9797,
262
+ 0.9841,
263
+ 0.9877,
264
+ 0.9904,
265
+ 0.9926,
266
+ 0.9942,
267
+ 0.9955,
268
+ 0.9965,
269
+ 0.9973,
270
+ 0.9979,
271
+ 0.9984,
272
+ 0.9988,
273
+ 0.9991,
274
+ 0.9993,
275
+ 0.9994,
276
+ 0.9996,
50
277
  1
51
278
  );
52
- --md-sys-motion-timing-function-emphasized-accel: cubic-bezier(0.3, 0, 0.8, 0.15);
53
- --md-sys-motion-timing-function-emphasized-decel: cubic-bezier(0.05, 0.7, 0.1, 1);
279
+ --md-sys-motion-duration-slow-effects-spring: 370ms;
280
+ --md-sys-motion-easing-slow-effects-spring: var(
281
+ --md-sys-motion-timing-function-slow-effects-spring
282
+ )
283
+ var(--md-sys-motion-duration-slow-effects-spring);
284
+ /* @generated:springs:end */
285
+ }
286
+
287
+ /*
288
+ One utility per Expressive spring, setting duration + timing function together. Pair with a
289
+ Tailwind transition-property utility: `transition-colors md-sys-motion-fast-effects`.
290
+ They set Tailwind's own --tw-duration/--tw-ease, so they win over `transition-*` regardless of
291
+ source order.
292
+
293
+ - spatial: position, size, shape (transform, width, top, border-radius…). Overshoots slightly.
294
+ - effects: color, opacity, shadow. Critically damped, never overshoots.
295
+ - fast-*: small parts and direct feedback (handles, indicators, hover/press); default: component
296
+ containers; slow-*: large or full-screen surfaces.
297
+ */
298
+ @utility md-sys-motion-fast-spatial {
299
+ --tw-duration: var(--md-sys-motion-duration-fast-spatial);
300
+ --tw-ease: var(--md-sys-motion-timing-function-fast-spatial);
301
+ transition-duration: var(--md-sys-motion-duration-fast-spatial);
302
+ transition-timing-function: var(--md-sys-motion-timing-function-fast-spatial);
303
+ }
304
+ @utility md-sys-motion-spatial {
305
+ --tw-duration: var(--md-sys-motion-duration-spatial);
306
+ --tw-ease: var(--md-sys-motion-timing-function-spatial);
307
+ transition-duration: var(--md-sys-motion-duration-spatial);
308
+ transition-timing-function: var(--md-sys-motion-timing-function-spatial);
309
+ }
310
+ @utility md-sys-motion-slow-spatial {
311
+ --tw-duration: var(--md-sys-motion-duration-slow-spatial);
312
+ --tw-ease: var(--md-sys-motion-timing-function-slow-spatial);
313
+ transition-duration: var(--md-sys-motion-duration-slow-spatial);
314
+ transition-timing-function: var(--md-sys-motion-timing-function-slow-spatial);
315
+ }
316
+ @utility md-sys-motion-fast-effects {
317
+ --tw-duration: var(--md-sys-motion-duration-fast-effects-spring);
318
+ --tw-ease: var(--md-sys-motion-timing-function-fast-effects-spring);
319
+ transition-duration: var(--md-sys-motion-duration-fast-effects-spring);
320
+ transition-timing-function: var(--md-sys-motion-timing-function-fast-effects-spring);
321
+ }
322
+ @utility md-sys-motion-effects {
323
+ --tw-duration: var(--md-sys-motion-duration-effects-spring);
324
+ --tw-ease: var(--md-sys-motion-timing-function-effects-spring);
325
+ transition-duration: var(--md-sys-motion-duration-effects-spring);
326
+ transition-timing-function: var(--md-sys-motion-timing-function-effects-spring);
327
+ }
328
+ @utility md-sys-motion-slow-effects {
329
+ --tw-duration: var(--md-sys-motion-duration-slow-effects-spring);
330
+ --tw-ease: var(--md-sys-motion-timing-function-slow-effects-spring);
331
+ transition-duration: var(--md-sys-motion-duration-slow-effects-spring);
332
+ transition-timing-function: var(--md-sys-motion-timing-function-slow-effects-spring);
54
333
  }