@sandlada/mdc 0.1.0-nightly.14072025
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/LICENSE +21 -0
- package/LICENSES/LICENSE-APACHE-2.0.txt +202 -0
- package/README.md +43 -0
- package/build/all.d.ts +40 -0
- package/build/all.d.ts.map +1 -0
- package/build/all.js +1 -0
- package/build/class-map-DQX-4Y_I.js +11 -0
- package/build/color-CigMJnjV.js +1 -0
- package/build/component-definitions/badge.definition.d.ts +15 -0
- package/build/component-definitions/badge.definition.d.ts.map +1 -0
- package/build/component-definitions/badge.definition.js +6 -0
- package/build/component-definitions/button.definition.d.ts +1017 -0
- package/build/component-definitions/button.definition.d.ts.map +1 -0
- package/build/component-definitions/button.definition.js +6 -0
- package/build/component-definitions/card.definition.d.ts +99 -0
- package/build/component-definitions/card.definition.d.ts.map +1 -0
- package/build/component-definitions/card.definition.js +6 -0
- package/build/component-definitions/checkbox.definition.d.ts +74 -0
- package/build/component-definitions/checkbox.definition.d.ts.map +1 -0
- package/build/component-definitions/checkbox.definition.js +6 -0
- package/build/component-definitions/dialog.definition.d.ts +74 -0
- package/build/component-definitions/dialog.definition.d.ts.map +1 -0
- package/build/component-definitions/dialog.definition.js +1 -0
- package/build/component-definitions/divider.definition.d.ts +5 -0
- package/build/component-definitions/divider.definition.d.ts.map +1 -0
- package/build/component-definitions/divider.definition.js +6 -0
- package/build/component-definitions/elevation.definition.d.ts +5 -0
- package/build/component-definitions/elevation.definition.d.ts.map +1 -0
- package/build/component-definitions/elevation.definition.js +6 -0
- package/build/component-definitions/fab.definition.d.ts +643 -0
- package/build/component-definitions/fab.definition.d.ts.map +1 -0
- package/build/component-definitions/fab.definition.js +6 -0
- package/build/component-definitions/focus-ring.definition.d.ts +13 -0
- package/build/component-definitions/focus-ring.definition.d.ts.map +1 -0
- package/build/component-definitions/focus-ring.definition.js +7 -0
- package/build/component-definitions/icon-button.definition.d.ts +718 -0
- package/build/component-definitions/icon-button.definition.d.ts.map +1 -0
- package/build/component-definitions/icon-button.definition.js +6 -0
- package/build/component-definitions/icon.definition.d.ts +10 -0
- package/build/component-definitions/icon.definition.d.ts.map +1 -0
- package/build/component-definitions/icon.definition.js +6 -0
- package/build/component-definitions/progress-indicator.definition.d.ts +52 -0
- package/build/component-definitions/progress-indicator.definition.d.ts.map +1 -0
- package/build/component-definitions/progress-indicator.definition.js +1 -0
- package/build/component-definitions/radio-button.definition.d.ts +29 -0
- package/build/component-definitions/radio-button.definition.d.ts.map +1 -0
- package/build/component-definitions/radio-button.definition.js +6 -0
- package/build/component-definitions/ripple.definition.d.ts +7 -0
- package/build/component-definitions/ripple.definition.d.ts.map +1 -0
- package/build/component-definitions/ripple.definition.js +6 -0
- package/build/component-definitions/switch.definition.d.ts +84 -0
- package/build/component-definitions/switch.definition.d.ts.map +1 -0
- package/build/component-definitions/switch.definition.js +6 -0
- package/build/components/button/base-button.d.ts +74 -0
- package/build/components/button/base-button.d.ts.map +1 -0
- package/build/components/button/base-button.js +6 -0
- package/build/components/button/button.d.ts +49 -0
- package/build/components/button/button.d.ts.map +1 -0
- package/build/components/button/button.js +1 -0
- package/build/components/button/button.style.d.ts +6 -0
- package/build/components/button/button.style.d.ts.map +1 -0
- package/build/components/button/button.style.js +618 -0
- package/build/components/button/elevated-button.d.ts +11 -0
- package/build/components/button/elevated-button.d.ts.map +1 -0
- package/build/components/button/elevated-button.js +1 -0
- package/build/components/button/filled-button.d.ts +11 -0
- package/build/components/button/filled-button.d.ts.map +1 -0
- package/build/components/button/filled-button.js +1 -0
- package/build/components/button/filled-tonal-button.d.ts +11 -0
- package/build/components/button/filled-tonal-button.d.ts.map +1 -0
- package/build/components/button/filled-tonal-button.js +1 -0
- package/build/components/button/outlined-button.d.ts +11 -0
- package/build/components/button/outlined-button.d.ts.map +1 -0
- package/build/components/button/outlined-button.js +1 -0
- package/build/components/button/text-button.d.ts +10 -0
- package/build/components/button/text-button.d.ts.map +1 -0
- package/build/components/button/text-button.js +1 -0
- package/build/components/button/togglable-button.d.ts +55 -0
- package/build/components/button/togglable-button.d.ts.map +1 -0
- package/build/components/button/togglable-button.js +1 -0
- package/build/components/button/toggle-elevated-button.d.ts +11 -0
- package/build/components/button/toggle-elevated-button.d.ts.map +1 -0
- package/build/components/button/toggle-elevated-button.js +1 -0
- package/build/components/button/toggle-filled-button.d.ts +11 -0
- package/build/components/button/toggle-filled-button.d.ts.map +1 -0
- package/build/components/button/toggle-filled-button.js +1 -0
- package/build/components/button/toggle-filled-tonal-button.d.ts +11 -0
- package/build/components/button/toggle-filled-tonal-button.d.ts.map +1 -0
- package/build/components/button/toggle-filled-tonal-button.js +1 -0
- package/build/components/button/toggle-outlined-button.d.ts +11 -0
- package/build/components/button/toggle-outlined-button.d.ts.map +1 -0
- package/build/components/button/toggle-outlined-button.js +1 -0
- package/build/components/dialog/base-dialog.d.ts +42 -0
- package/build/components/dialog/base-dialog.d.ts.map +1 -0
- package/build/components/dialog/base-dialog.js +1 -0
- package/build/components/dialog/basic-dialog.d.ts +10 -0
- package/build/components/dialog/basic-dialog.d.ts.map +1 -0
- package/build/components/dialog/basic-dialog.js +1 -0
- package/build/components/dialog/dialog-action.d.ts +62 -0
- package/build/components/dialog/dialog-action.d.ts.map +1 -0
- package/build/components/dialog/dialog-action.js +1 -0
- package/build/components/dialog/dialog-animations.d.ts +48 -0
- package/build/components/dialog/dialog-animations.d.ts.map +1 -0
- package/build/components/dialog/dialog-animations.js +6 -0
- package/build/components/dialog/dialog.style.d.ts +2 -0
- package/build/components/dialog/dialog.style.d.ts.map +1 -0
- package/build/components/dialog/dialog.style.js +217 -0
- package/build/components/divider/divider.d.ts +18 -0
- package/build/components/divider/divider.d.ts.map +1 -0
- package/build/components/divider/divider.js +1 -0
- package/build/components/divider/divider.style.d.ts +2 -0
- package/build/components/divider/divider.style.d.ts.map +1 -0
- package/build/components/divider/divider.style.js +6 -0
- package/build/components/elevation/elevation.d.ts +46 -0
- package/build/components/elevation/elevation.d.ts.map +1 -0
- package/build/components/elevation/elevation.js +1 -0
- package/build/components/elevation/elevation.style.d.ts +2 -0
- package/build/components/elevation/elevation.style.d.ts.map +1 -0
- package/build/components/elevation/elevation.style.js +6 -0
- package/build/components/fab/extended-fab.d.ts +36 -0
- package/build/components/fab/extended-fab.d.ts.map +1 -0
- package/build/components/fab/extended-fab.js +1 -0
- package/build/components/fab/extended-primary-fab.d.ts +10 -0
- package/build/components/fab/extended-primary-fab.d.ts.map +1 -0
- package/build/components/fab/extended-primary-fab.js +1 -0
- package/build/components/fab/extended-secondary-fab.d.ts +10 -0
- package/build/components/fab/extended-secondary-fab.d.ts.map +1 -0
- package/build/components/fab/extended-secondary-fab.js +1 -0
- package/build/components/fab/extended-tertiary-fab.d.ts +10 -0
- package/build/components/fab/extended-tertiary-fab.d.ts.map +1 -0
- package/build/components/fab/extended-tertiary-fab.js +1 -0
- package/build/components/fab/extended-tonal-primary-fab.d.ts +10 -0
- package/build/components/fab/extended-tonal-primary-fab.d.ts.map +1 -0
- package/build/components/fab/extended-tonal-primary-fab.js +1 -0
- package/build/components/fab/extended-tonal-secondary-fab.d.ts +10 -0
- package/build/components/fab/extended-tonal-secondary-fab.d.ts.map +1 -0
- package/build/components/fab/extended-tonal-secondary-fab.js +1 -0
- package/build/components/fab/extended-tonal-tertiary-fab.d.ts +10 -0
- package/build/components/fab/extended-tonal-tertiary-fab.d.ts.map +1 -0
- package/build/components/fab/extended-tonal-tertiary-fab.js +1 -0
- package/build/components/fab/fab.d.ts +45 -0
- package/build/components/fab/fab.d.ts.map +1 -0
- package/build/components/fab/fab.js +1 -0
- package/build/components/fab/fab.style.d.ts +13 -0
- package/build/components/fab/fab.style.d.ts.map +1 -0
- package/build/components/fab/fab.style.js +6 -0
- package/build/components/fab/primary-fab.d.ts +10 -0
- package/build/components/fab/primary-fab.d.ts.map +1 -0
- package/build/components/fab/primary-fab.js +1 -0
- package/build/components/fab/secondary-fab.d.ts +10 -0
- package/build/components/fab/secondary-fab.d.ts.map +1 -0
- package/build/components/fab/secondary-fab.js +1 -0
- package/build/components/fab/tertiary-fab.d.ts +10 -0
- package/build/components/fab/tertiary-fab.d.ts.map +1 -0
- package/build/components/fab/tertiary-fab.js +1 -0
- package/build/components/fab/tonal-primary-fab.d.ts +10 -0
- package/build/components/fab/tonal-primary-fab.d.ts.map +1 -0
- package/build/components/fab/tonal-primary-fab.js +1 -0
- package/build/components/fab/tonal-secondary-fab.d.ts +10 -0
- package/build/components/fab/tonal-secondary-fab.d.ts.map +1 -0
- package/build/components/fab/tonal-secondary-fab.js +1 -0
- package/build/components/fab/tonal-tertiary-fab.d.ts +10 -0
- package/build/components/fab/tonal-tertiary-fab.d.ts.map +1 -0
- package/build/components/fab/tonal-tertiary-fab.js +1 -0
- package/build/components/focus-ring/focus-ring.d.ts +56 -0
- package/build/components/focus-ring/focus-ring.d.ts.map +1 -0
- package/build/components/focus-ring/focus-ring.js +1 -0
- package/build/components/focus-ring/focus-ring.style.d.ts +2 -0
- package/build/components/focus-ring/focus-ring.style.d.ts.map +1 -0
- package/build/components/focus-ring/focus-ring.style.js +108 -0
- package/build/components/icon/icon.d.ts +50 -0
- package/build/components/icon/icon.d.ts.map +1 -0
- package/build/components/icon/icon.js +1 -0
- package/build/components/icon/icon.style.d.ts +2 -0
- package/build/components/icon/icon.style.d.ts.map +1 -0
- package/build/components/icon/icon.style.js +6 -0
- package/build/components/icon-button/base-icon-button.d.ts +62 -0
- package/build/components/icon-button/base-icon-button.d.ts.map +1 -0
- package/build/components/icon-button/base-icon-button.js +1 -0
- package/build/components/icon-button/filled-icon-button.d.ts +10 -0
- package/build/components/icon-button/filled-icon-button.d.ts.map +1 -0
- package/build/components/icon-button/filled-icon-button.js +1 -0
- package/build/components/icon-button/filled-tonal-icon-button.d.ts +10 -0
- package/build/components/icon-button/filled-tonal-icon-button.d.ts.map +1 -0
- package/build/components/icon-button/filled-tonal-icon-button.js +1 -0
- package/build/components/icon-button/icon-button.d.ts +19 -0
- package/build/components/icon-button/icon-button.d.ts.map +1 -0
- package/build/components/icon-button/icon-button.js +1 -0
- package/build/components/icon-button/icon-button.style.d.ts +5 -0
- package/build/components/icon-button/icon-button.style.d.ts.map +1 -0
- package/build/components/icon-button/icon-button.style.js +411 -0
- package/build/components/icon-button/outlined-icon-button.d.ts +11 -0
- package/build/components/icon-button/outlined-icon-button.d.ts.map +1 -0
- package/build/components/icon-button/outlined-icon-button.js +1 -0
- package/build/components/icon-button/standard-icon-button.d.ts +10 -0
- package/build/components/icon-button/standard-icon-button.d.ts.map +1 -0
- package/build/components/icon-button/standard-icon-button.js +1 -0
- package/build/components/icon-button/togglable-icon-button.d.ts +39 -0
- package/build/components/icon-button/togglable-icon-button.d.ts.map +1 -0
- package/build/components/icon-button/togglable-icon-button.js +1 -0
- package/build/components/icon-button/toggle-filled-icon-button.d.ts +10 -0
- package/build/components/icon-button/toggle-filled-icon-button.d.ts.map +1 -0
- package/build/components/icon-button/toggle-filled-icon-button.js +1 -0
- package/build/components/icon-button/toggle-filled-tonal-icon-button.d.ts +10 -0
- package/build/components/icon-button/toggle-filled-tonal-icon-button.d.ts.map +1 -0
- package/build/components/icon-button/toggle-filled-tonal-icon-button.js +1 -0
- package/build/components/icon-button/toggle-outlined-icon-button.d.ts +11 -0
- package/build/components/icon-button/toggle-outlined-icon-button.d.ts.map +1 -0
- package/build/components/icon-button/toggle-outlined-icon-button.js +1 -0
- package/build/components/icon-button/toggle-standard-icon-button.d.ts +10 -0
- package/build/components/icon-button/toggle-standard-icon-button.d.ts.map +1 -0
- package/build/components/icon-button/toggle-standard-icon-button.js +1 -0
- package/build/components/progress-indicator/base-progress-indicator.d.ts +28 -0
- package/build/components/progress-indicator/base-progress-indicator.d.ts.map +1 -0
- package/build/components/progress-indicator/base-progress-indicator.js +1 -0
- package/build/components/progress-indicator/linear-progress-indicator.d.ts +29 -0
- package/build/components/progress-indicator/linear-progress-indicator.d.ts.map +1 -0
- package/build/components/progress-indicator/linear-progress-indicator.js +1 -0
- package/build/components/progress-indicator/progress-indicator.style.d.ts +2 -0
- package/build/components/progress-indicator/progress-indicator.style.d.ts.map +1 -0
- package/build/components/progress-indicator/progress-indicator.style.js +271 -0
- package/build/components/radio-button/radio-button-selection-controller.d.ts +81 -0
- package/build/components/radio-button/radio-button-selection-controller.d.ts.map +1 -0
- package/build/components/radio-button/radio-button-selection-controller.js +6 -0
- package/build/components/radio-button/radio-button.d.ts +50 -0
- package/build/components/radio-button/radio-button.d.ts.map +1 -0
- package/build/components/radio-button/radio-button.js +1 -0
- package/build/components/radio-button/radio-button.style.d.ts +2 -0
- package/build/components/radio-button/radio-button.style.d.ts.map +1 -0
- package/build/components/radio-button/radio-button.style.js +143 -0
- package/build/components/ripple/ripple-action.d.ts +52 -0
- package/build/components/ripple/ripple-action.d.ts.map +1 -0
- package/build/components/ripple/ripple-action.js +10 -0
- package/build/components/ripple/ripple.d.ts +32 -0
- package/build/components/ripple/ripple.d.ts.map +1 -0
- package/build/components/ripple/ripple.js +1 -0
- package/build/components/ripple/ripple.style.d.ts +2 -0
- package/build/components/ripple/ripple.style.d.ts.map +1 -0
- package/build/components/ripple/ripple.style.js +6 -0
- package/build/components/switch/switch.d.ts +45 -0
- package/build/components/switch/switch.d.ts.map +1 -0
- package/build/components/switch/switch.js +1 -0
- package/build/components/switch/switch.style.d.ts +2 -0
- package/build/components/switch/switch.style.d.ts.map +1 -0
- package/build/components/switch/switch.style.js +329 -0
- package/build/components/typography/typography.d.ts +44 -0
- package/build/components/typography/typography.d.ts.map +1 -0
- package/build/components/typography/typography.js +1 -0
- package/build/components/typography/typography.styles.d.ts +3 -0
- package/build/components/typography/typography.styles.d.ts.map +1 -0
- package/build/components/typography/typography.styles.js +6 -0
- package/build/custom-element-Dz3n6kSt.js +6 -0
- package/build/definitions.d.ts +15 -0
- package/build/definitions.d.ts.map +1 -0
- package/build/definitions.js +1 -0
- package/build/easing-5hHInU7b.js +1 -0
- package/build/elevation-dUQez_WX.js +1 -0
- package/build/lit-element-Bf8D1KRw.js +22 -0
- package/build/property-CHB_6zYv.js +6 -0
- package/build/query-DifSdHBD.js +11 -0
- package/build/shape-CrZ0CLVJ.js +1 -0
- package/build/state-B54YIR_M.js +6 -0
- package/build/state-C-haZXan.js +1 -0
- package/build/tslib.es6-CmLYFWVC.js +1 -0
- package/build/typescale-Bh1NLwSE.js +1 -0
- package/build/utils/aria/aria.d.ts +71 -0
- package/build/utils/aria/aria.d.ts.map +1 -0
- package/build/utils/aria/aria.js +6 -0
- package/build/utils/aria/delegate.d.ts +55 -0
- package/build/utils/aria/delegate.d.ts.map +1 -0
- package/build/utils/aria/delegate.js +7 -0
- package/build/utils/behaviors/constraint-validation.d.ts +134 -0
- package/build/utils/behaviors/constraint-validation.d.ts.map +1 -0
- package/build/utils/behaviors/constraint-validation.js +6 -0
- package/build/utils/behaviors/element-internals.d.ts +46 -0
- package/build/utils/behaviors/element-internals.d.ts.map +1 -0
- package/build/utils/behaviors/element-internals.js +6 -0
- package/build/utils/behaviors/mixin.d.ts +55 -0
- package/build/utils/behaviors/mixin.d.ts.map +1 -0
- package/build/utils/behaviors/mixin.js +1 -0
- package/build/utils/behaviors/validators/checkbox-validator.d.ts +36 -0
- package/build/utils/behaviors/validators/checkbox-validator.d.ts.map +1 -0
- package/build/utils/behaviors/validators/checkbox-validator.js +6 -0
- package/build/utils/behaviors/validators/radio-validator.d.ts +39 -0
- package/build/utils/behaviors/validators/radio-validator.d.ts.map +1 -0
- package/build/utils/behaviors/validators/radio-validator.js +6 -0
- package/build/utils/behaviors/validators/select-validator.d.ts +36 -0
- package/build/utils/behaviors/validators/select-validator.d.ts.map +1 -0
- package/build/utils/behaviors/validators/select-validator.js +6 -0
- package/build/utils/behaviors/validators/text-field-validator.d.ts +111 -0
- package/build/utils/behaviors/validators/text-field-validator.d.ts.map +1 -0
- package/build/utils/behaviors/validators/text-field-validator.js +6 -0
- package/build/utils/behaviors/validators/validator.d.ts +97 -0
- package/build/utils/behaviors/validators/validator.d.ts.map +1 -0
- package/build/utils/behaviors/validators/validator.js +6 -0
- package/build/utils/controller/attachable-controller.d.ts +116 -0
- package/build/utils/controller/attachable-controller.d.ts.map +1 -0
- package/build/utils/controller/attachable-controller.js +9 -0
- package/build/utils/controller/form-submitter.d.ts +71 -0
- package/build/utils/controller/form-submitter.d.ts.map +1 -0
- package/build/utils/controller/form-submitter.js +6 -0
- package/build/utils/event/dispatch-hook.d.ts +86 -0
- package/build/utils/event/dispatch-hook.d.ts.map +1 -0
- package/build/utils/event/dispatch-hook.js +6 -0
- package/build/utils/event/form-label-activation.d.ts +56 -0
- package/build/utils/event/form-label-activation.d.ts.map +1 -0
- package/build/utils/event/form-label-activation.js +6 -0
- package/build/utils/event/redispatch-event.d.ts +28 -0
- package/build/utils/event/redispatch-event.d.ts.map +1 -0
- package/build/utils/event/redispatch-event.js +6 -0
- package/build/utils/form/form-associated.d.ts +200 -0
- package/build/utils/form/form-associated.d.ts.map +1 -0
- package/build/utils/form/form-associated.js +1 -0
- package/build/utils/string/to-kebab-case.d.ts +11 -0
- package/build/utils/string/to-kebab-case.d.ts.map +1 -0
- package/build/utils/string/to-kebab-case.js +6 -0
- package/build/utils/tokens/create-logic-shape-tokens.d.ts +14 -0
- package/build/utils/tokens/create-logic-shape-tokens.d.ts.map +1 -0
- package/build/utils/tokens/create-logic-shape-tokens.js +6 -0
- package/build/utils/tokens/create-var.d.ts +14 -0
- package/build/utils/tokens/create-var.d.ts.map +1 -0
- package/build/utils/tokens/create-var.js +6 -0
- package/build/utils/tokens/create-wrapped-tokens.d.ts +24 -0
- package/build/utils/tokens/create-wrapped-tokens.d.ts.map +1 -0
- package/build/utils/tokens/create-wrapped-tokens.js +6 -0
- package/build/utils/tokens/exclude-tokens.d.ts +7 -0
- package/build/utils/tokens/exclude-tokens.d.ts.map +1 -0
- package/build/utils/tokens/exclude-tokens.js +6 -0
- package/build/utils/tokens/index.d.ts +12 -0
- package/build/utils/tokens/index.d.ts.map +1 -0
- package/build/utils/tokens/index.js +1 -0
- package/build/utils/tokens/override-component-tokens.d.ts +34 -0
- package/build/utils/tokens/override-component-tokens.d.ts.map +1 -0
- package/build/utils/tokens/override-component-tokens.js +6 -0
- package/build/utils/tokens/string-tokens.d.ts +14 -0
- package/build/utils/tokens/string-tokens.d.ts.map +1 -0
- package/build/utils/tokens/string-tokens.js +6 -0
- package/build/utils/uuid/generate-uuid.d.ts +19 -0
- package/build/utils/uuid/generate-uuid.d.ts.map +1 -0
- package/build/utils/uuid/generate-uuid.js +6 -0
- package/build/utils.d.ts +3 -0
- package/build/utils.d.ts.map +1 -0
- package/build/utils.js +1 -0
- package/package.json +74 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Button } from './button';
|
|
2
|
+
declare global {
|
|
3
|
+
interface HTMLElementTagNameMap {
|
|
4
|
+
"mdc-outlined-button": OutlinedButton;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export declare class OutlinedButton extends Button {
|
|
8
|
+
static styles: import("lit").CSSResult[];
|
|
9
|
+
protected renderOutline(): unknown;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=outlined-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outlined-button.d.ts","sourceRoot":"","sources":["../../../src/components/button/outlined-button.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAGjC,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,qBAAqB,EAAE,cAAc,CAAA;KACxC;CACJ;AAED,qBACa,cAAe,SAAQ,MAAM;IACtC,OAAgB,MAAM,4BAAuB;cAE1B,aAAa,IAAI,OAAO;CAK9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t}from"../../tslib.es6-CmLYFWVC.js";import{x as i}from"../../lit-element-Bf8D1KRw.js";import{t as o}from"../../custom-element-Dz3n6kSt.js";import{Button as e}from"./button.js";import{outlinedButtonStyles as s}from"./button.style.js";import"../../property-CHB_6zYv.js";import"../../query-DifSdHBD.js";import"../../class-map-DQX-4Y_I.js";import"../../utils/aria/delegate.js";import"../../utils/aria/aria.js";import"../../utils/behaviors/element-internals.js";import"../../utils/controller/form-submitter.js";import"../../utils/event/form-label-activation.js";import"./base-button.js";import"../../state-B54YIR_M.js";import"../elevation/elevation.js";import"../elevation/elevation.style.js";import"../../component-definitions/elevation.definition.js";import"../../color-CigMJnjV.js";import"../../elevation-dUQez_WX.js";import"../../utils/tokens/create-wrapped-tokens.js";import"../../utils/tokens/string-tokens.js";import"../focus-ring/focus-ring.js";import"../../utils/controller/attachable-controller.js";import"../focus-ring/focus-ring.style.js";import"../../easing-5hHInU7b.js";import"../../component-definitions/focus-ring.definition.js";import"../../shape-CrZ0CLVJ.js";import"../../utils/tokens/create-logic-shape-tokens.js";import"../ripple/ripple.js";import"../ripple/ripple-action.js";import"../ripple/ripple.style.js";import"../../component-definitions/ripple.definition.js";import"../../state-C-haZXan.js";import"../../component-definitions/button.definition.js";import"../../typescale-Bh1NLwSE.js";import"../../utils/tokens/override-component-tokens.js";let r=class extends e{static{this.styles=s}renderOutline(){return i`<span class="outline" aria-hidden="true"></span>`}};r=t([o("mdc-outlined-button")],r);export{r as OutlinedButton};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Button } from './button';
|
|
2
|
+
declare global {
|
|
3
|
+
interface HTMLElementTagNameMap {
|
|
4
|
+
"mdc-text-button": TextButton;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export declare class TextButton extends Button {
|
|
8
|
+
static styles: import("lit").CSSResult[];
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=text-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-button.d.ts","sourceRoot":"","sources":["../../../src/components/button/text-button.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAGjC,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,iBAAiB,EAAE,UAAU,CAAA;KAChC;CACJ;AAED,qBACa,UAAW,SAAQ,MAAM;IAClC,OAAgB,MAAM,4BAAmB;CAE5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t}from"../../tslib.es6-CmLYFWVC.js";import{t as i}from"../../custom-element-Dz3n6kSt.js";import"../../lit-element-Bf8D1KRw.js";import{Button as o}from"./button.js";import{textButtonStyles as s}from"./button.style.js";import"../../property-CHB_6zYv.js";import"../../query-DifSdHBD.js";import"../../class-map-DQX-4Y_I.js";import"../../utils/aria/delegate.js";import"../../utils/aria/aria.js";import"../../utils/behaviors/element-internals.js";import"../../utils/controller/form-submitter.js";import"../../utils/event/form-label-activation.js";import"./base-button.js";import"../../state-B54YIR_M.js";import"../elevation/elevation.js";import"../elevation/elevation.style.js";import"../../component-definitions/elevation.definition.js";import"../../color-CigMJnjV.js";import"../../elevation-dUQez_WX.js";import"../../utils/tokens/create-wrapped-tokens.js";import"../../utils/tokens/string-tokens.js";import"../focus-ring/focus-ring.js";import"../../utils/controller/attachable-controller.js";import"../focus-ring/focus-ring.style.js";import"../../easing-5hHInU7b.js";import"../../component-definitions/focus-ring.definition.js";import"../../shape-CrZ0CLVJ.js";import"../../utils/tokens/create-logic-shape-tokens.js";import"../ripple/ripple.js";import"../ripple/ripple-action.js";import"../ripple/ripple.style.js";import"../../component-definitions/ripple.definition.js";import"../../state-C-haZXan.js";import"../../component-definitions/button.definition.js";import"../../typescale-Bh1NLwSE.js";import"../../utils/tokens/override-component-tokens.js";let e=class extends o{static{this.styles=s}};e=t([i("mdc-text-button")],e);export{e as TextButton};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { createValidator, getValidityAnchor } from '../../utils/behaviors/constraint-validation';
|
|
2
|
+
import { CheckboxValidator } from '../../utils/behaviors/validators/checkbox-validator';
|
|
3
|
+
import { getFormState, getFormValue } from '../../utils/form/form-associated';
|
|
4
|
+
import { BaseButton } from './base-button';
|
|
5
|
+
declare const TogglableButton_base: import("../../utils/behaviors/mixin").MixinReturn<import("../../utils/behaviors/mixin").MixinReturn<import("../../utils/behaviors/mixin").MixinReturn<(abstract new (...args: any[]) => import("../../utils/behaviors/element-internals").WithElementInternals) & typeof BaseButton & import("../../utils/form/form-associated").FormAssociatedConstructor, import("../../utils/form/form-associated").FormAssociated>, import("../../utils/behaviors/constraint-validation").ConstraintValidation>>;
|
|
6
|
+
/**
|
|
7
|
+
* The toggle buttons are available in 4 variations:
|
|
8
|
+
* - mdc-elevated-button
|
|
9
|
+
* - mdc-filled-button
|
|
10
|
+
* - mdc-filled-tonal-button
|
|
11
|
+
* - mdc-outlined-button
|
|
12
|
+
*
|
|
13
|
+
* mdc-text-button is not supported by M3 Expressive.
|
|
14
|
+
*
|
|
15
|
+
* @version
|
|
16
|
+
* Material Design 3 - Expressive
|
|
17
|
+
*
|
|
18
|
+
* @link
|
|
19
|
+
* https://m3.material.io/components/buttons/overview
|
|
20
|
+
*/
|
|
21
|
+
export declare class TogglableButton extends TogglableButton_base {
|
|
22
|
+
static shadowRootOptions: ShadowRootInit;
|
|
23
|
+
disabled: boolean;
|
|
24
|
+
name: string;
|
|
25
|
+
value: string;
|
|
26
|
+
selected: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* When true, require the toggle-button to be selected when participating in
|
|
29
|
+
* form submission.
|
|
30
|
+
*
|
|
31
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#validation
|
|
32
|
+
*/
|
|
33
|
+
required: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* We use the <input /> element as a replacement for the button element.
|
|
36
|
+
* The state is managed by the input element.
|
|
37
|
+
*/
|
|
38
|
+
protected readonly buttonElement: HTMLInputElement | null;
|
|
39
|
+
focus(): void;
|
|
40
|
+
blur(): void;
|
|
41
|
+
constructor();
|
|
42
|
+
protected render(): import("lit-html").TemplateResult<1>;
|
|
43
|
+
protected renderButton(): import("lit-html").TemplateResult<1>;
|
|
44
|
+
protected handleClick(e: MouseEvent): void;
|
|
45
|
+
protected handleInput(_: InputEvent): void;
|
|
46
|
+
protected handleChange(event: Event): void;
|
|
47
|
+
[getFormValue](): string | null;
|
|
48
|
+
[getFormState](): string;
|
|
49
|
+
formResetCallback(): void;
|
|
50
|
+
formStateRestoreCallback(state: string): void;
|
|
51
|
+
[createValidator](): CheckboxValidator;
|
|
52
|
+
[getValidityAnchor](): HTMLInputElement | null;
|
|
53
|
+
}
|
|
54
|
+
export {};
|
|
55
|
+
//# sourceMappingURL=togglable-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"togglable-button.d.ts","sourceRoot":"","sources":["../../../src/components/button/togglable-button.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAA6B,MAAM,6CAA6C,CAAA;AAE3H,OAAO,EAAE,iBAAiB,EAAE,MAAM,qDAAqD,CAAA;AAGvF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAuB,MAAM,kCAAkC,CAAA;AAClG,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;;AAE1C;;;;;;;;;;;;;;GAcG;AACH,qBAAa,eAAgB,SAAQ,oBAAqG;IAEtI,OAAgB,iBAAiB,EAAE,cAAc,CAG/C;IAEM,QAAQ,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IAGb,KAAK,EAAE,MAAM,CAAO;IAGpB,QAAQ,EAAE,OAAO,CAAQ;IAEhC;;;;;OAKG;IAEI,QAAQ,EAAE,OAAO,CAAQ;IAEhC;;;OAGG;IAEH,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAG,gBAAgB,GAAG,IAAI,CAAA;IAE1C,KAAK;IAIL,IAAI;;cAYD,MAAM;cAwBN,YAAY;IAuB/B,SAAS,CAAC,WAAW,CAAC,CAAC,EAAE,UAAU;IAanC,SAAS,CAAC,WAAW,CAAC,CAAC,EAAE,UAAU;IAInC,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK;IAI3B,CAAC,YAAY,CAAC;IAId,CAAC,YAAY,CAAC;IAIb,iBAAiB;IAMjB,wBAAwB,CAAC,KAAK,EAAE,MAAM;IAIvC,CAAC,eAAe,CAAC;IAOjB,CAAC,iBAAiB,CAAC;CAI9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t}from"../../tslib.es6-CmLYFWVC.js";import{x as e}from"../../lit-element-Bf8D1KRw.js";import{n as i}from"../../property-CHB_6zYv.js";import{e as s}from"../../query-DifSdHBD.js";import{e as o}from"../../class-map-DQX-4Y_I.js";import{mixinDelegatesAria as r}from"../../utils/aria/delegate.js";import{mixinConstraintValidation as n,createValidator as l,getValidityAnchor as a}from"../../utils/behaviors/constraint-validation.js";import{mixinElementInternals as p}from"../../utils/behaviors/element-internals.js";import{CheckboxValidator as d}from"../../utils/behaviors/validators/checkbox-validator.js";import{isActivationClick as c,dispatchActivationClick as u}from"../../utils/event/form-label-activation.js";import{redispatchEvent as m}from"../../utils/event/redispatch-event.js";import{mixinFormAssociated as h,getFormValue as b,getFormState as f}from"../../utils/form/form-associated.js";import{BaseButton as j}from"./base-button.js";import"../../utils/aria/aria.js";import"../../utils/behaviors/validators/validator.js";import"../../state-B54YIR_M.js";import"../elevation/elevation.js";import"../../custom-element-Dz3n6kSt.js";import"../elevation/elevation.style.js";import"../../component-definitions/elevation.definition.js";import"../../color-CigMJnjV.js";import"../../elevation-dUQez_WX.js";import"../../utils/tokens/create-wrapped-tokens.js";import"../../utils/tokens/string-tokens.js";import"../focus-ring/focus-ring.js";import"../../utils/controller/attachable-controller.js";import"../focus-ring/focus-ring.style.js";import"../../easing-5hHInU7b.js";import"../../component-definitions/focus-ring.definition.js";import"../../shape-CrZ0CLVJ.js";import"../../utils/tokens/create-logic-shape-tokens.js";import"../ripple/ripple.js";import"../ripple/ripple-action.js";import"../ripple/ripple.style.js";import"../../component-definitions/ripple.definition.js";import"../../state-C-haZXan.js";class v extends(r(n(h(p(j))))){static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}focus(){this.buttonElement?.focus()}blur(){this.buttonElement?.blur()}constructor(){super(),this.value="on",this.selected=!1,this.required=!1,this.addEventListener("click",this.handleClick.bind(this))}render(){const t=o({"has-icon":this.hasIcon,"has-label":this.hasLabel,"trailing-icon":this.trailingIcon,disabled:this.disabled,[this.size]:!0,[this.shape]:!0,togglable:!0,selected:this.selected,unselected:!this.selected});return e`<div class="surface ${t}">${this.renderButton()} ${this.renderOutline?.()} ${this.renderElevation?.()} <span class="background"></span><mdc-ripple for="button" part="ripple" ?disabled="${this.disabled}"></mdc-ripple><mdc-focus-ring for="button" part="focus-ring"></mdc-focus-ring></div>`}renderButton(){return e`<input type="checkbox" role="button" id="button" class="togglable-input" .checked="${this.selected}" .disabled="${this.disabled}" .required="${this.required}" aria-disabled="${this.disabled}" aria-required="${this.required}" tabindex="0" @input="${this.handleInput}" @change="${this.handleChange}"> <span class="button">${this.renderContent()}</span>`}handleClick(t){if(this.disabled)return t.stopImmediatePropagation(),void t.preventDefault();c(t)&&this.buttonElement&&(this.focus(),u(this.buttonElement))}handleInput(t){this.selected=this.buttonElement.checked}handleChange(t){m(this,t)}[b](){return this.selected?this.value:null}[f](){return String(this.selected)}formResetCallback(){this.selected=this.hasAttribute("selected")}formStateRestoreCallback(t){this.selected="true"===t}[l](){return new d(()=>({checked:this.selected,required:this.required}))}[a](){return this.buttonElement}}t([i({type:String})],v.prototype,"value",void 0),t([i({type:Boolean,reflect:!1})],v.prototype,"selected",void 0),t([i({type:Boolean})],v.prototype,"required",void 0),t([s(".togglable-input")],v.prototype,"buttonElement",void 0);export{v as TogglableButton};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TogglableButton } from './togglable-button';
|
|
2
|
+
declare global {
|
|
3
|
+
interface HTMLElementTagNameMap {
|
|
4
|
+
"mdc-toggle-elevated-button": ToggleElevatedButton;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export declare class ToggleElevatedButton extends TogglableButton {
|
|
8
|
+
static styles: import("lit").CSSResult[];
|
|
9
|
+
protected renderElevation(): unknown;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=toggle-elevated-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-elevated-button.d.ts","sourceRoot":"","sources":["../../../src/components/button/toggle-elevated-button.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEpD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,4BAA4B,EAAE,oBAAoB,CAAA;KACrD;CACJ;AAED,qBACa,oBAAqB,SAAQ,eAAe;IACrD,OAAgB,MAAM,4BAAuB;cAE1B,eAAe,IAAI,OAAO;CAKhD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t}from"../../tslib.es6-CmLYFWVC.js";import{x as i}from"../../lit-element-Bf8D1KRw.js";import{t as o}from"../../custom-element-Dz3n6kSt.js";import{elevatedButtonStyles as e}from"./button.style.js";import{TogglableButton as s}from"./togglable-button.js";import"../../component-definitions/button.definition.js";import"../../color-CigMJnjV.js";import"../../elevation-dUQez_WX.js";import"../../shape-CrZ0CLVJ.js";import"../../state-C-haZXan.js";import"../../typescale-Bh1NLwSE.js";import"../../utils/tokens/create-logic-shape-tokens.js";import"../../utils/tokens/create-wrapped-tokens.js";import"../../utils/tokens/override-component-tokens.js";import"../../utils/tokens/string-tokens.js";import"../../property-CHB_6zYv.js";import"../../query-DifSdHBD.js";import"../../class-map-DQX-4Y_I.js";import"../../utils/aria/delegate.js";import"../../utils/aria/aria.js";import"../../utils/behaviors/constraint-validation.js";import"../../utils/behaviors/element-internals.js";import"../../utils/behaviors/validators/checkbox-validator.js";import"../../utils/behaviors/validators/validator.js";import"../../utils/event/form-label-activation.js";import"../../utils/event/redispatch-event.js";import"../../utils/form/form-associated.js";import"./base-button.js";import"../../state-B54YIR_M.js";import"../elevation/elevation.js";import"../elevation/elevation.style.js";import"../../component-definitions/elevation.definition.js";import"../focus-ring/focus-ring.js";import"../../utils/controller/attachable-controller.js";import"../focus-ring/focus-ring.style.js";import"../../easing-5hHInU7b.js";import"../../component-definitions/focus-ring.definition.js";import"../ripple/ripple.js";import"../ripple/ripple-action.js";import"../ripple/ripple.style.js";import"../../component-definitions/ripple.definition.js";let r=class extends s{static{this.styles=e}renderElevation(){return i`<mdc-elevation></mdc-elevation>`}};r=t([o("mdc-toggle-elevated-button")],r);export{r as ToggleElevatedButton};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TogglableButton } from "./togglable-button";
|
|
2
|
+
declare global {
|
|
3
|
+
interface HTMLElementTagNameMap {
|
|
4
|
+
"mdc-toggle-filled-button": ToggleFilledButton;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export declare class ToggleFilledButton extends TogglableButton {
|
|
8
|
+
static styles: import("lit").CSSResult[];
|
|
9
|
+
protected renderElevation(): unknown;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=toggle-filled-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-filled-button.d.ts","sourceRoot":"","sources":["../../../src/components/button/toggle-filled-button.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEpD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,0BAA0B,EAAE,kBAAkB,CAAA;KACjD;CACJ;AAED,qBACa,kBAAmB,SAAQ,eAAe;IACnD,OAAgB,MAAM,4BAAqB;cAExB,eAAe,IAAI,OAAO;CAKhD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t}from"../../tslib.es6-CmLYFWVC.js";import{x as i}from"../../lit-element-Bf8D1KRw.js";import{t as o}from"../../custom-element-Dz3n6kSt.js";import{filledButtonStyles as e}from"./button.style.js";import{TogglableButton as s}from"./togglable-button.js";import"../../component-definitions/button.definition.js";import"../../color-CigMJnjV.js";import"../../elevation-dUQez_WX.js";import"../../shape-CrZ0CLVJ.js";import"../../state-C-haZXan.js";import"../../typescale-Bh1NLwSE.js";import"../../utils/tokens/create-logic-shape-tokens.js";import"../../utils/tokens/create-wrapped-tokens.js";import"../../utils/tokens/override-component-tokens.js";import"../../utils/tokens/string-tokens.js";import"../../property-CHB_6zYv.js";import"../../query-DifSdHBD.js";import"../../class-map-DQX-4Y_I.js";import"../../utils/aria/delegate.js";import"../../utils/aria/aria.js";import"../../utils/behaviors/constraint-validation.js";import"../../utils/behaviors/element-internals.js";import"../../utils/behaviors/validators/checkbox-validator.js";import"../../utils/behaviors/validators/validator.js";import"../../utils/event/form-label-activation.js";import"../../utils/event/redispatch-event.js";import"../../utils/form/form-associated.js";import"./base-button.js";import"../../state-B54YIR_M.js";import"../elevation/elevation.js";import"../elevation/elevation.style.js";import"../../component-definitions/elevation.definition.js";import"../focus-ring/focus-ring.js";import"../../utils/controller/attachable-controller.js";import"../focus-ring/focus-ring.style.js";import"../../easing-5hHInU7b.js";import"../../component-definitions/focus-ring.definition.js";import"../ripple/ripple.js";import"../ripple/ripple-action.js";import"../ripple/ripple.style.js";import"../../component-definitions/ripple.definition.js";let r=class extends s{static{this.styles=e}renderElevation(){return i`<mdc-elevation></mdc-elevation>`}};r=t([o("mdc-toggle-filled-button")],r);export{r as ToggleFilledButton};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TogglableButton } from "./togglable-button";
|
|
2
|
+
declare global {
|
|
3
|
+
interface HTMLElementTagNameMap {
|
|
4
|
+
"mdc-toggle-filled-tonal-button": ToggleFilledTonalButton;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export declare class ToggleFilledTonalButton extends TogglableButton {
|
|
8
|
+
static styles: import("lit").CSSResult[];
|
|
9
|
+
protected renderElevation(): unknown;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=toggle-filled-tonal-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-filled-tonal-button.d.ts","sourceRoot":"","sources":["../../../src/components/button/toggle-filled-tonal-button.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEpD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,gCAAgC,EAAE,uBAAuB,CAAA;KAC5D;CACJ;AAED,qBACa,uBAAwB,SAAQ,eAAe;IACxD,OAAgB,MAAM,4BAA0B;cAE7B,eAAe,IAAI,OAAO;CAKhD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t}from"../../tslib.es6-CmLYFWVC.js";import{x as i}from"../../lit-element-Bf8D1KRw.js";import{t as o}from"../../custom-element-Dz3n6kSt.js";import{filledTonalButtonStyles as e}from"./button.style.js";import{TogglableButton as s}from"./togglable-button.js";import"../../component-definitions/button.definition.js";import"../../color-CigMJnjV.js";import"../../elevation-dUQez_WX.js";import"../../shape-CrZ0CLVJ.js";import"../../state-C-haZXan.js";import"../../typescale-Bh1NLwSE.js";import"../../utils/tokens/create-logic-shape-tokens.js";import"../../utils/tokens/create-wrapped-tokens.js";import"../../utils/tokens/override-component-tokens.js";import"../../utils/tokens/string-tokens.js";import"../../property-CHB_6zYv.js";import"../../query-DifSdHBD.js";import"../../class-map-DQX-4Y_I.js";import"../../utils/aria/delegate.js";import"../../utils/aria/aria.js";import"../../utils/behaviors/constraint-validation.js";import"../../utils/behaviors/element-internals.js";import"../../utils/behaviors/validators/checkbox-validator.js";import"../../utils/behaviors/validators/validator.js";import"../../utils/event/form-label-activation.js";import"../../utils/event/redispatch-event.js";import"../../utils/form/form-associated.js";import"./base-button.js";import"../../state-B54YIR_M.js";import"../elevation/elevation.js";import"../elevation/elevation.style.js";import"../../component-definitions/elevation.definition.js";import"../focus-ring/focus-ring.js";import"../../utils/controller/attachable-controller.js";import"../focus-ring/focus-ring.style.js";import"../../easing-5hHInU7b.js";import"../../component-definitions/focus-ring.definition.js";import"../ripple/ripple.js";import"../ripple/ripple-action.js";import"../ripple/ripple.style.js";import"../../component-definitions/ripple.definition.js";let r=class extends s{static{this.styles=e}renderElevation(){return i`<mdc-elevation></mdc-elevation>`}};r=t([o("mdc-toggle-filled-tonal-button")],r);export{r as ToggleFilledTonalButton};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TogglableButton } from "./togglable-button";
|
|
2
|
+
declare global {
|
|
3
|
+
interface HTMLElementTagNameMap {
|
|
4
|
+
"mdc-toggle-outlined-button": ToggleOutlinedButton;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export declare class ToggleOutlinedButton extends TogglableButton {
|
|
8
|
+
static styles: import("lit").CSSResult[];
|
|
9
|
+
protected renderOutline(): unknown;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=toggle-outlined-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-outlined-button.d.ts","sourceRoot":"","sources":["../../../src/components/button/toggle-outlined-button.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAEpD,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,4BAA4B,EAAE,oBAAoB,CAAA;KACrD;CACJ;AAED,qBACa,oBAAqB,SAAQ,eAAe;IACrD,OAAgB,MAAM,4BAAuB;cAE1B,aAAa,IAAI,OAAO;CAK9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t}from"../../tslib.es6-CmLYFWVC.js";import{x as i}from"../../lit-element-Bf8D1KRw.js";import{t as o}from"../../custom-element-Dz3n6kSt.js";import{outlinedButtonStyles as s}from"./button.style.js";import{TogglableButton as e}from"./togglable-button.js";import"../../component-definitions/button.definition.js";import"../../color-CigMJnjV.js";import"../../elevation-dUQez_WX.js";import"../../shape-CrZ0CLVJ.js";import"../../state-C-haZXan.js";import"../../typescale-Bh1NLwSE.js";import"../../utils/tokens/create-logic-shape-tokens.js";import"../../utils/tokens/create-wrapped-tokens.js";import"../../utils/tokens/override-component-tokens.js";import"../../utils/tokens/string-tokens.js";import"../../property-CHB_6zYv.js";import"../../query-DifSdHBD.js";import"../../class-map-DQX-4Y_I.js";import"../../utils/aria/delegate.js";import"../../utils/aria/aria.js";import"../../utils/behaviors/constraint-validation.js";import"../../utils/behaviors/element-internals.js";import"../../utils/behaviors/validators/checkbox-validator.js";import"../../utils/behaviors/validators/validator.js";import"../../utils/event/form-label-activation.js";import"../../utils/event/redispatch-event.js";import"../../utils/form/form-associated.js";import"./base-button.js";import"../../state-B54YIR_M.js";import"../elevation/elevation.js";import"../elevation/elevation.style.js";import"../../component-definitions/elevation.definition.js";import"../focus-ring/focus-ring.js";import"../../utils/controller/attachable-controller.js";import"../focus-ring/focus-ring.style.js";import"../../easing-5hHInU7b.js";import"../../component-definitions/focus-ring.definition.js";import"../ripple/ripple.js";import"../ripple/ripple-action.js";import"../ripple/ripple.style.js";import"../../component-definitions/ripple.definition.js";let r=class extends e{static{this.styles=s}renderOutline(){return i`<span class="outline" aria-hidden="true"></span>`}};r=t([o("mdc-toggle-outlined-button")],r);export{r as ToggleOutlinedButton};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { DialogAction } from './dialog-action';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @version
|
|
5
|
+
* Material Design 3
|
|
6
|
+
*
|
|
7
|
+
* @link
|
|
8
|
+
* https://m3.material.io/components/dialogs/specs
|
|
9
|
+
*/
|
|
10
|
+
export declare abstract class BaseDialog extends DialogAction {
|
|
11
|
+
quick: boolean;
|
|
12
|
+
returnValue: string;
|
|
13
|
+
type: 'alert' | '';
|
|
14
|
+
private readonly treewalker;
|
|
15
|
+
protected readonly dialog: HTMLDialogElement | null;
|
|
16
|
+
protected readonly scrim: HTMLDialogElement | null;
|
|
17
|
+
protected readonly container: HTMLDialogElement | null;
|
|
18
|
+
protected readonly headline: HTMLDialogElement | null;
|
|
19
|
+
protected readonly content: HTMLDialogElement | null;
|
|
20
|
+
protected readonly actions: HTMLDialogElement | null;
|
|
21
|
+
protected readonly scroller: HTMLElement | null;
|
|
22
|
+
protected readonly topAnchor: HTMLElement | null;
|
|
23
|
+
protected readonly bottomAnchor: HTMLElement | null;
|
|
24
|
+
protected readonly firstFocusTrap: HTMLElement | null;
|
|
25
|
+
private hasHeadline;
|
|
26
|
+
private hasActions;
|
|
27
|
+
private hasIcon;
|
|
28
|
+
constructor();
|
|
29
|
+
protected render(): unknown;
|
|
30
|
+
protected renderScrim(): import("lit-html").TemplateResult<1>;
|
|
31
|
+
protected renderDialog(): import("lit-html").TemplateResult<1>;
|
|
32
|
+
protected renderHeadlineLabel(): import("lit-html").TemplateResult<1>;
|
|
33
|
+
protected renderHeadlineIcon(): import("lit-html").TemplateResult<1>;
|
|
34
|
+
protected renderActions(): import("lit-html").TemplateResult<1>;
|
|
35
|
+
protected renderContent(): import("lit-html").TemplateResult<1>;
|
|
36
|
+
connectedCallback(): void;
|
|
37
|
+
disconnectedCallback(): void;
|
|
38
|
+
private handleHeadlineChange;
|
|
39
|
+
private handleActionsChange;
|
|
40
|
+
private handleIconChange;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=base-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/base-dialog.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAE9C;;;;;;;GAOG;AACH,8BAAsB,UAAW,SAAQ,YAAY;IAGjC,KAAK,EAAE,OAAO,CAAQ;IAGtB,WAAW,EAAE,MAAM,CAAK;IAGjC,IAAI,EAAE,OAAO,GAAG,EAAE,CAAK;IAE9B,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAA;IAE3B,mBAC4B,MAAM,EAAG,iBAAiB,GAAG,IAAI,CAAA;IAC7D,mBAC4B,KAAK,EAAG,iBAAiB,GAAG,IAAI,CAAA;IAC5D,mBAC4B,SAAS,EAAG,iBAAiB,GAAG,IAAI,CAAA;IAChE,mBAC4B,QAAQ,EAAG,iBAAiB,GAAG,IAAI,CAAA;IAC/D,mBAC4B,OAAO,EAAG,iBAAiB,GAAG,IAAI,CAAA;IAC9D,mBAC4B,OAAO,EAAG,iBAAiB,GAAG,IAAI,CAAA;IAC9D,mBAC4B,QAAQ,EAAG,WAAW,GAAG,IAAI,CAAA;IACzD,mBAC4B,SAAS,EAAG,WAAW,GAAG,IAAI,CAAA;IAC1D,mBAC4B,YAAY,EAAG,WAAW,GAAG,IAAI,CAAA;IAC7D,mBAC4B,cAAc,EAAG,WAAW,GAAG,IAAI,CAAA;IAI/D,OAAO,CAAC,WAAW,CAAS;IAE5B,OAAO,CAAC,UAAU,CAAS;IAE3B,OAAO,CAAC,OAAO,CAAS;;cAWL,MAAM,IAAI,OAAO;IAOpC,SAAS,CAAC,WAAW;IAMrB,SAAS,CAAC,YAAY;IAmCtB,SAAS,CAAC,mBAAmB;IAO7B,SAAS,CAAC,kBAAkB;IAO5B,SAAS,CAAC,aAAa;IAQvB,SAAS,CAAC,aAAa;IAcd,iBAAiB;IAKjB,oBAAoB;IAO7B,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,mBAAmB;IAK3B,OAAO,CAAC,gBAAgB;CAM3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e}from"../../tslib.es6-CmLYFWVC.js";import{x as t,E as i}from"../../lit-element-Bf8D1KRw.js";import{n as o}from"../../property-CHB_6zYv.js";import{r as s}from"../../state-B54YIR_M.js";import{e as n}from"../../query-DifSdHBD.js";import{e as r}from"../../class-map-DQX-4Y_I.js";import{DialogAction as a}from"./dialog-action.js";import"../../utils/aria/delegate.js";import"../../utils/aria/aria.js";import"../../utils/event/redispatch-event.js";import"./dialog-animations.js";import"../../easing-5hHInU7b.js";class l extends a{constructor(){super(),this.quick=!1,this.returnValue="",this.type="",this.hasHeadline=!1,this.hasActions=!1,this.hasIcon=!1,this.treewalker=document.createTreeWalker(this,NodeFilter.SHOW_ELEMENT)}render(){return t`${this.renderScrim()} ${this.renderDialog()}`}renderScrim(){return t`<span aria-hidden="true" class="scrim"></span>`}renderDialog(){const{ariaLabel:e}=this,o=this.open&&!(this.isAtScrollTop&&this.isAtScrollBottom),s=r({"has-headline":this.hasHeadline,"has-actions":this.hasActions,"has-icon":this.hasIcon,scrollable:o,"show-top-divider":o&&!this.isAtScrollTop,"show-bottom-divider":o&&!this.isAtScrollBottom});return t`<dialog class="${s}" aria-label="${e||i}" role="${"alert"===this.type?"alertdialog":i}" .returnValue="${this.returnValue}" @cancel="${this.handleCancel}" @click="${this.handleDialogClick}" @close="${this.handleClose}" @keydown="${this.handleKeydown}"><div class="container" @click="${this.handleContentClick}"><div class="headline">${this.renderHeadlineIcon()} ${this.renderHeadlineLabel()}<mdc-divider></mdc-divider></div>${this.renderContent()} ${this.renderActions()}</div></dialog>`}renderHeadlineLabel(){return t`<h2 id="headline" .aria-hidden="${!this.hasHeadline||i}"><slot name="headline" @slotchange="${this.handleHeadlineChange}"></slot></h2>`}renderHeadlineIcon(){return t`<div class="icon" aria-hidden="true"><slot name="icon" @slotchange="${this.handleIconChange}"></slot></div>`}renderActions(){return t`<div class="actions"><mdc-divider></mdc-divider><slot name="actions" @slotchange="${this.handleActionsChange}"></slot></div>`}renderContent(){return t`<div class="scroller"><div class="content"><div class="top anchor"></div><slot name="content"></slot><div class="bottom anchor"></div></div></div>`}connectedCallback(){super.connectedCallback(),this.isConnectedPromiseResolve()}disconnectedCallback(){super.disconnectedCallback(),this.isConnectedPromise=this.getIsConnectedPromise()}handleHeadlineChange(e){const t=e.target;this.hasHeadline=t.assignedElements().length>0}handleActionsChange(e){const t=e.target;this.hasActions=t.assignedElements().length>0}handleIconChange(e){const t=e.target;this.hasIcon=t.assignedElements().length>0}}e([o({type:Boolean})],l.prototype,"quick",void 0),e([o({type:String,attribute:!1})],l.prototype,"returnValue",void 0),e([o({type:String,attribute:!1})],l.prototype,"type",void 0),e([n("dialog")],l.prototype,"dialog",void 0),e([n(".scrim")],l.prototype,"scrim",void 0),e([n(".container")],l.prototype,"container",void 0),e([n(".headline")],l.prototype,"headline",void 0),e([n(".content")],l.prototype,"content",void 0),e([n(".actions")],l.prototype,"actions",void 0),e([n(".scroller")],l.prototype,"scroller",void 0),e([n(".top.anchor")],l.prototype,"topAnchor",void 0),e([n(".bottom.anchor")],l.prototype,"bottomAnchor",void 0),e([n(".focus-trap")],l.prototype,"firstFocusTrap",void 0),e([s()],l.prototype,"hasHeadline",void 0),e([s()],l.prototype,"hasActions",void 0),e([s()],l.prototype,"hasIcon",void 0);export{l as BaseDialog};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BaseDialog } from './base-dialog';
|
|
2
|
+
declare global {
|
|
3
|
+
interface HTMLElementTagNameMap {
|
|
4
|
+
"mdc-basic-dialog": BasicDialog;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
export declare class BasicDialog extends BaseDialog {
|
|
8
|
+
static styles: import("lit").CSSResult;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=basic-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"basic-dialog.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/basic-dialog.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAG1C,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,kBAAkB,EAAE,WAAW,CAAA;KAClC;CACJ;AAED,qBACa,WAAY,SAAQ,UAAU;IACvC,OAAgB,MAAM,0BAAmB;CAC5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t}from"../../tslib.es6-CmLYFWVC.js";import{t as s}from"../../custom-element-Dz3n6kSt.js";import"../../lit-element-Bf8D1KRw.js";import{BaseDialog as i}from"./base-dialog.js";import{basicDialogStyle as o}from"./dialog.style.js";import"../../property-CHB_6zYv.js";import"../../state-B54YIR_M.js";import"../../query-DifSdHBD.js";import"../../class-map-DQX-4Y_I.js";import"./dialog-action.js";import"../../utils/aria/delegate.js";import"../../utils/aria/aria.js";import"../../utils/event/redispatch-event.js";import"./dialog-animations.js";import"../../easing-5hHInU7b.js";import"../../color-CigMJnjV.js";import"../../component-definitions/dialog.definition.js";import"../../elevation-dUQez_WX.js";import"../../shape-CrZ0CLVJ.js";import"../../state-C-haZXan.js";import"../../typescale-Bh1NLwSE.js";import"../../utils/tokens/create-logic-shape-tokens.js";import"../../utils/tokens/create-wrapped-tokens.js";import"../../utils/tokens/string-tokens.js";let e=class extends i{static{this.styles=o}};e=t([s("mdc-basic-dialog")],e);export{e as BasicDialog};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*
|
|
6
|
+
* [Modified by Kai-Orion & Sandlada]
|
|
7
|
+
*/
|
|
8
|
+
import { LitElement } from 'lit';
|
|
9
|
+
declare const DialogAction_base: import("../../utils/behaviors/mixin").MixinReturn<typeof LitElement>;
|
|
10
|
+
export declare abstract class DialogAction extends DialogAction_base {
|
|
11
|
+
returnValue: string;
|
|
12
|
+
quick: boolean;
|
|
13
|
+
protected readonly dialog: HTMLDialogElement | null;
|
|
14
|
+
protected readonly scrim: HTMLDialogElement | null;
|
|
15
|
+
protected readonly container: HTMLDialogElement | null;
|
|
16
|
+
protected readonly headline: HTMLDialogElement | null;
|
|
17
|
+
protected readonly content: HTMLDialogElement | null;
|
|
18
|
+
protected readonly actions: HTMLDialogElement | null;
|
|
19
|
+
protected readonly scroller: HTMLElement | null;
|
|
20
|
+
protected readonly topAnchor: HTMLElement | null;
|
|
21
|
+
protected readonly bottomAnchor: HTMLElement | null;
|
|
22
|
+
protected readonly firstFocusTrap: HTMLElement | null;
|
|
23
|
+
get open(): boolean;
|
|
24
|
+
set open(value: boolean);
|
|
25
|
+
protected isAtScrollTop: boolean;
|
|
26
|
+
protected isAtScrollBottom: boolean;
|
|
27
|
+
protected isOpen: boolean;
|
|
28
|
+
protected isOpening: boolean;
|
|
29
|
+
protected isConnectedPromiseResolve: () => void;
|
|
30
|
+
protected isConnectedPromise: Promise<void>;
|
|
31
|
+
protected nextClickIsFromContent: boolean;
|
|
32
|
+
protected intersectionObserver?: IntersectionObserver;
|
|
33
|
+
protected cancelAnimations?: AbortController;
|
|
34
|
+
protected escapePressedWithoutCancel: boolean;
|
|
35
|
+
protected getIsConnectedPromise(): Promise<void>;
|
|
36
|
+
private get getCloseAnimation();
|
|
37
|
+
private get getOpenAnimation();
|
|
38
|
+
constructor();
|
|
39
|
+
protected firstUpdated(): void;
|
|
40
|
+
show(): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Closes the dialog and fires a cancelable `close` event. After a dialog's
|
|
43
|
+
* animation, a `closed` event is fired.
|
|
44
|
+
*
|
|
45
|
+
* @param returnValue A return value usually indicating which button was used
|
|
46
|
+
* to close a dialog. If a dialog is canceled by clicking the scrim or
|
|
47
|
+
* pressing Escape, it will not change the return value after closing.
|
|
48
|
+
* @return A Promise that resolves after the animation is finished and the
|
|
49
|
+
* `closed` event was fired.
|
|
50
|
+
*/
|
|
51
|
+
close(returnValue?: string): Promise<void>;
|
|
52
|
+
private animateDialog;
|
|
53
|
+
protected handleDialogClick(): void;
|
|
54
|
+
protected handleContentClick(): void;
|
|
55
|
+
protected handleSubmit(event: SubmitEvent): void;
|
|
56
|
+
protected handleCancel(event: Event): void;
|
|
57
|
+
protected handleClose(): void;
|
|
58
|
+
protected handleKeydown(event: KeyboardEvent): void;
|
|
59
|
+
private handleAnchorIntersection;
|
|
60
|
+
}
|
|
61
|
+
export {};
|
|
62
|
+
//# sourceMappingURL=dialog-action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog-action.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/dialog-action.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAY,UAAU,EAAE,MAAM,KAAK,CAAA;;AAM1C,8BAAsB,YAAa,SAAQ,iBAA8B;IAE7D,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,OAAO,CAAA;IAEtB,mBAA2B,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC3D,mBAA2B,KAAK,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC1D,mBAA2B,SAAS,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC9D,mBAA2B,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC7D,mBAA2B,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC5D,mBAA2B,OAAO,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC5D,mBAA2B,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAA;IACvD,mBAA2B,SAAS,EAAE,WAAW,GAAG,IAAI,CAAA;IACxD,mBAA2B,YAAY,EAAE,WAAW,GAAG,IAAI,CAAA;IAC3D,mBAA2B,cAAc,EAAE,WAAW,GAAG,IAAI,CAAA;IAE7D,IACW,IAAI,IAAI,OAAO,CAEzB;IACD,IAAW,IAAI,CAAC,KAAK,EAAE,OAAO,EAY7B;IAGD,SAAS,CAAC,aAAa,UAAS;IAEhC,SAAS,CAAC,gBAAgB,UAAS;IAEnC,SAAS,CAAC,MAAM,UAAQ;IACxB,SAAS,CAAC,SAAS,UAAQ;IAC3B,SAAS,CAAC,yBAAyB,EAAG,MAAM,IAAI,CAAA;IAChD,SAAS,CAAC,kBAAkB,gBAA+B;IAC3D,SAAS,CAAC,sBAAsB,UAAS;IACzC,SAAS,CAAC,oBAAoB,CAAC,EAAE,oBAAoB,CAAA;IACrD,SAAS,CAAC,gBAAgB,CAAC,EAAE,eAAe,CAAA;IAC5C,SAAS,CAAC,0BAA0B,UAAQ;IAE5C,SAAS,CAAC,qBAAqB;IAM/B,OAAO,KAAK,iBAAiB,GAE5B;IACD,OAAO,KAAK,gBAAgB,GAE3B;;cAUkB,YAAY;IAclB,IAAI;IAuCjB;;;;;;;;;OASG;IACU,KAAK,CAAC,WAAW,SAAmB;YAgCnC,aAAa;IAuD3B,SAAS,CAAC,iBAAiB;IAoB3B,SAAS,CAAC,kBAAkB;IAI5B,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,WAAW;IAYzC,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK;IAiBnC,SAAS,CAAC,WAAW;IAQrB,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,aAAa;IAe5C,OAAO,CAAC,wBAAwB;CAUnC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t}from"../../tslib.es6-CmLYFWVC.js";import{a as e}from"../../lit-element-Bf8D1KRw.js";import{n as i}from"../../property-CHB_6zYv.js";import{r as s}from"../../state-B54YIR_M.js";import{mixinDelegatesAria as n}from"../../utils/aria/delegate.js";import{redispatchEvent as o}from"../../utils/event/redispatch-event.js";import{DialogDefaultCloseAnimation as r,DialogDefaultOpenAnimation as a}from"./dialog-animations.js";import"../../utils/aria/aria.js";import"../../easing-5hHInU7b.js";class h extends(n(e)){get open(){return this.isOpen}set open(t){t!==this.isOpen&&(this.isOpen=t,t?(this.setAttribute("open",""),this.show?.()):(this.removeAttribute("open"),this.close?.()))}getIsConnectedPromise(){return new Promise(t=>{this.isConnectedPromiseResolve=t})}get getCloseAnimation(){return r}get getOpenAnimation(){return a}constructor(){super(),this.isAtScrollTop=!1,this.isAtScrollBottom=!1,this.isOpen=!1,this.isOpening=!1,this.isConnectedPromise=this.getIsConnectedPromise(),this.nextClickIsFromContent=!1,this.escapePressedWithoutCancel=!1,this.addEventListener("submit",this.handleSubmit.bind(this))}firstUpdated(){this.intersectionObserver=new IntersectionObserver(t=>{for(const e of t)this.handleAnchorIntersection(e)},{root:this.scroller}),this.intersectionObserver.observe(this.topAnchor),this.intersectionObserver.observe(this.bottomAnchor)}async show(){this.isOpening=!0,await this.isConnectedPromise,await this.updateComplete;const t=this.dialog;if(t.open||!this.isOpening)return void(this.isOpening=!1);if(!this.dispatchEvent(new Event("open",{cancelable:!0})))return this.open=!1,void(this.isOpening=!1);t.showModal(),this.open=!0,this.scroller&&(this.scroller.scrollTop=0),this.querySelector("[autofocus]")?.focus(),await this.animateDialog(this.getOpenAnimation),this.dispatchEvent(new Event("opened")),this.isOpening=!1}async close(t=this.returnValue){if(this.isOpening=!1,!this.isConnected)return void(this.open=!1);await this.updateComplete;const e=this.dialog;if(!e.open||this.isOpening)return void(this.open=!1);const i=this.returnValue;this.returnValue=t;this.dispatchEvent(new Event("close",{cancelable:!0}))?(await this.animateDialog(this.getCloseAnimation),e.close(t),this.open=!1,this.dispatchEvent(new Event("closed"))):this.returnValue=i}async animateDialog(t){if(this.cancelAnimations?.abort(),this.cancelAnimations=new AbortController,this.quick)return;const{dialog:e,scrim:i,container:s,headline:n,content:o,actions:r}=this;if(!(e&&i&&s&&n&&o&&r))return;const{container:a,dialog:h,scrim:c,headline:l,content:p,actions:d}=t,m=[[e,h??[]],[i,c??[]],[s,a??[]],[n,l??[]],[o,p??[]],[r,d??[]]],u=[];for(const[t,e]of m)for(const i of e){const e=t.animate(...i);this.cancelAnimations.signal.addEventListener("abort",()=>{e.cancel()}),u.push(e)}await Promise.all(u.map(t=>t.finished.catch(()=>{})))}handleDialogClick(){if(this.nextClickIsFromContent)return void(this.nextClickIsFromContent=!1);!this.dispatchEvent(new Event("cancel",{cancelable:!0}))||this.close()}handleContentClick(){this.nextClickIsFromContent=!0}handleSubmit(t){const e=t.target,{submitter:i}=t;"dialog"===e.getAttribute("method")&&i&&this.close(i.getAttribute("value")??this.returnValue)}handleCancel(t){if(t.target!==this.dialog)return;this.escapePressedWithoutCancel=!1;const e=o(this,t);t.preventDefault(),e||this.close()}handleClose(){this.escapePressedWithoutCancel&&(this.escapePressedWithoutCancel=!1,this.dialog?.dispatchEvent(new Event("cancel",{cancelable:!0})))}handleKeydown(t){"Escape"===t.key&&(this.escapePressedWithoutCancel=!0,setTimeout(()=>{this.escapePressedWithoutCancel=!1}))}handleAnchorIntersection(t){const{target:e,isIntersecting:i}=t;e===this.topAnchor&&(this.isAtScrollTop=i),e===this.bottomAnchor&&(this.isAtScrollBottom=i)}}t([i({type:Boolean,noAccessor:!0})],h.prototype,"open",null),t([s()],h.prototype,"isAtScrollTop",void 0),t([s()],h.prototype,"isAtScrollBottom",void 0);export{h as DialogAction};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A dialog animation's arguments. See `Element.prototype.animate`.
|
|
8
|
+
*/
|
|
9
|
+
export type DialogAnimationArgs = Parameters<Element['animate']>;
|
|
10
|
+
/**
|
|
11
|
+
* A collection of dialog animations. Each element of a dialog may have multiple
|
|
12
|
+
* animations.
|
|
13
|
+
*/
|
|
14
|
+
export interface DialogAnimation {
|
|
15
|
+
/**
|
|
16
|
+
* Animations for the dialog itself.
|
|
17
|
+
*/
|
|
18
|
+
dialog?: DialogAnimationArgs[];
|
|
19
|
+
/**
|
|
20
|
+
* Animations for the scrim backdrop.
|
|
21
|
+
*/
|
|
22
|
+
scrim?: DialogAnimationArgs[];
|
|
23
|
+
/**
|
|
24
|
+
* Animations for the container of the dialog.
|
|
25
|
+
*/
|
|
26
|
+
container?: DialogAnimationArgs[];
|
|
27
|
+
/**
|
|
28
|
+
* Animations for the headline section.
|
|
29
|
+
*/
|
|
30
|
+
headline?: DialogAnimationArgs[];
|
|
31
|
+
/**
|
|
32
|
+
* Animations for the contents section.
|
|
33
|
+
*/
|
|
34
|
+
content?: DialogAnimationArgs[];
|
|
35
|
+
/**
|
|
36
|
+
* Animations for the actions section.
|
|
37
|
+
*/
|
|
38
|
+
actions?: DialogAnimationArgs[];
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The default dialog open animation.
|
|
42
|
+
*/
|
|
43
|
+
export declare const DialogDefaultOpenAnimation: DialogAnimation;
|
|
44
|
+
/**
|
|
45
|
+
* The default dialog close animation.
|
|
46
|
+
*/
|
|
47
|
+
export declare const DialogDefaultCloseAnimation: DialogAnimation;
|
|
48
|
+
//# sourceMappingURL=dialog-animations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog-animations.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/dialog-animations.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;AAEjE;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,MAAM,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAE/B;;OAEG;IACH,KAAK,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAE9B;;OAEG;IACH,SAAS,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAElC;;OAEG;IACH,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAEjC;;OAEG;IACH,OAAO,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAChC;;OAEG;IACH,OAAO,CAAC,EAAE,mBAAmB,EAAE,CAAC;CACjC;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B,EAAE,eAoDxC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,eAoDzC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{E as a}from"../../easing-5hHInU7b.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2023 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
*/const i={dialog:[[[{transform:"translateY(-50px)"},{transform:"translateY(0)"}],{duration:500,easing:a.Emphasized}]],scrim:[[[{opacity:0},{opacity:.32}],{duration:500,easing:"linear"}]],container:[[[{opacity:0},{opacity:1}],{duration:50,easing:"linear",pseudoElement:"::before"}],[[{height:"35%"},{height:"100%"}],{duration:500,easing:a.Emphasized,pseudoElement:"::before"}]],headline:[[[{opacity:0},{opacity:0,offset:.2},{opacity:1}],{duration:250,easing:"linear",fill:"forwards"}]],content:[[[{opacity:0},{opacity:0,offset:.2},{opacity:1}],{duration:250,easing:"linear",fill:"forwards"}]],actions:[[[{opacity:0},{opacity:0,offset:.5},{opacity:1}],{duration:300,easing:"linear",fill:"forwards"}]]},e={dialog:[[[{transform:"translateY(0)"},{transform:"translateY(-50px)"}],{duration:150,easing:a.EmphasizedAccelerate}]],scrim:[[[{opacity:.32},{opacity:0}],{duration:150,easing:"linear"}]],container:[[[{height:"100%"},{height:"35%"}],{duration:150,easing:a.EmphasizedAccelerate,pseudoElement:"::before"}],[[{opacity:"1"},{opacity:"0"}],{delay:100,duration:50,easing:"linear",pseudoElement:"::before"}]],headline:[[[{opacity:1},{opacity:0}],{duration:100,easing:"linear",fill:"forwards"}]],content:[[[{opacity:1},{opacity:0}],{duration:100,easing:"linear",fill:"forwards"}]],actions:[[[{opacity:1},{opacity:0}],{duration:100,easing:"linear",fill:"forwards"}]]};export{e as DialogDefaultCloseAnimation,i as DialogDefaultOpenAnimation};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.style.d.ts","sourceRoot":"","sources":["../../../src/components/dialog/dialog.style.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,gBAAgB,yBAmN5B,CAAA"}
|