@sandlada/vue-mdc
Version:

43 lines (41 loc) • 1.15 kB
text/typescript
/**
* @license
* Copyright 2022 Google LLC
* SPDX-License-Identifier: Apache-2.0
* @link
* https://github.com/material-components/material-web/blob/main/ripple/internal/ripple.ts
*/
export const enum RippleState {
/**
* Initial state of the control, no touch in progress.
*
* Transitions:
* - on touch down: transition to `TOUCH_DELAY`.
* - on mouse down: transition to `WAITING_FOR_CLICK`.
*/
INACTIVE,
/**
* Touch down has been received, waiting to determine if it's a swipe or
* scroll.
*
* Transitions:
* - on touch up: begin press; transition to `WAITING_FOR_CLICK`.
* - on cancel: transition to `INACTIVE`.
* - after `Configuration.touchDelayMs`: begin press; transition to `HOLDING`.
*/
TOUCH_DELAY,
/**
* A touch has been deemed to be a press
*
* Transitions:
* - on up: transition to `WAITING_FOR_CLICK`.
*/
HOLDING,
/**
* The user touch has finished, transition into rest state.
*
* Transitions:
* - on click end press; transition to `INACTIVE`.
*/
WAITING_FOR_CLICK,
}