@sandlada/mdc 0.1.0-20250907.a
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 +24 -0
- package/build/all.d.ts.map +1 -0
- package/build/all.js +1 -0
- package/build/class-map-DlMb2KKL.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 +6 -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/navigation-bar.definition.d.ts +36 -0
- package/build/component-definitions/navigation-bar.definition.d.ts.map +1 -0
- package/build/component-definitions/navigation-bar.definition.js +1 -0
- package/build/component-definitions/navigation-rail.definition.d.ts +37 -0
- package/build/component-definitions/navigation-rail.definition.d.ts.map +1 -0
- package/build/component-definitions/navigation-rail.definition.js +1 -0
- package/build/component-definitions/navigation-tab.definition.d.ts +337 -0
- package/build/component-definitions/navigation-tab.definition.d.ts.map +1 -0
- package/build/component-definitions/navigation-tab.definition.js +23 -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 +9 -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/search.definition.d.ts +47 -0
- package/build/component-definitions/search.definition.d.ts.map +1 -0
- package/build/component-definitions/search.definition.js +1 -0
- package/build/component-definitions/slider.definition.d.ts +80 -0
- package/build/component-definitions/slider.definition.d.ts.map +1 -0
- package/build/component-definitions/slider.definition.js +1 -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 +100 -0
- package/build/components/button/base-button.d.ts.map +1 -0
- package/build/components/button/base-button.js +1 -0
- package/build/components/button/button.d.ts +34 -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 +2 -0
- package/build/components/button/button.style.d.ts.map +1 -0
- package/build/components/button/button.style.js +468 -0
- package/build/components/button/toggle-button.d.ts +71 -0
- package/build/components/button/toggle-button.d.ts.map +1 -0
- package/build/components/button/toggle-button.js +1 -0
- package/build/components/button-group/base-button-group.d.ts +6 -0
- package/build/components/button-group/base-button-group.d.ts.map +1 -0
- package/build/components/button-group/base-button-group.js +1 -0
- package/build/components/button-group/connected-button-group.d.ts +8 -0
- package/build/components/button-group/connected-button-group.d.ts.map +1 -0
- package/build/components/button-group/connected-button-group.js +1 -0
- package/build/components/button-group/standard-button-group.d.ts +4 -0
- package/build/components/button-group/standard-button-group.d.ts.map +1 -0
- package/build/components/button-group/standard-button-group.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/base-extended-fab.d.ts +23 -0
- package/build/components/fab/base-extended-fab.d.ts.map +1 -0
- package/build/components/fab/base-extended-fab.js +1 -0
- package/build/components/fab/base-fab.d.ts +47 -0
- package/build/components/fab/base-fab.d.ts.map +1 -0
- package/build/components/fab/base-fab.js +1 -0
- package/build/components/fab/fab.d.ts +29 -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 +2 -0
- package/build/components/fab/fab.style.d.ts.map +1 -0
- package/build/components/fab/fab.style.js +180 -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 +69 -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/icon-button.d.ts +24 -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 +2 -0
- package/build/components/icon-button/icon-button.style.d.ts.map +1 -0
- package/build/components/icon-button/icon-button.style.js +357 -0
- package/build/components/icon-button/toggle-icon-button.d.ts +68 -0
- package/build/components/icon-button/toggle-icon-button.d.ts.map +1 -0
- package/build/components/icon-button/toggle-icon-button.js +1 -0
- package/build/components/navigation-bar/navigation-bar-animations.d.ts +21 -0
- package/build/components/navigation-bar/navigation-bar-animations.d.ts.map +1 -0
- package/build/components/navigation-bar/navigation-bar-animations.js +1 -0
- package/build/components/navigation-bar/navigation-bar.d.ts +75 -0
- package/build/components/navigation-bar/navigation-bar.d.ts.map +1 -0
- package/build/components/navigation-bar/navigation-bar.js +1 -0
- package/build/components/navigation-bar/navigation-bar.style.d.ts +2 -0
- package/build/components/navigation-bar/navigation-bar.style.d.ts.map +1 -0
- package/build/components/navigation-bar/navigation-bar.style.js +1 -0
- package/build/components/navigation-item/base-navigation-tab.d.ts +67 -0
- package/build/components/navigation-item/base-navigation-tab.d.ts.map +1 -0
- package/build/components/navigation-item/base-navigation-tab.js +1 -0
- package/build/components/navigation-item/navigation-bar-tab.d.ts +30 -0
- package/build/components/navigation-item/navigation-bar-tab.d.ts.map +1 -0
- package/build/components/navigation-item/navigation-bar-tab.js +1 -0
- package/build/components/navigation-item/navigation-rail-tab.d.ts +32 -0
- package/build/components/navigation-item/navigation-rail-tab.d.ts.map +1 -0
- package/build/components/navigation-item/navigation-rail-tab.js +1 -0
- package/build/components/navigation-item/navigation-tab-sigle-selection-controller.d.ts +37 -0
- package/build/components/navigation-item/navigation-tab-sigle-selection-controller.d.ts.map +1 -0
- package/build/components/navigation-item/navigation-tab-sigle-selection-controller.js +6 -0
- package/build/components/navigation-item/navigation-tab.d.ts +6 -0
- package/build/components/navigation-item/navigation-tab.d.ts.map +1 -0
- package/build/components/navigation-item/navigation-tab.js +1 -0
- package/build/components/navigation-item/navigation-tab.style.d.ts +3 -0
- package/build/components/navigation-item/navigation-tab.style.d.ts.map +1 -0
- package/build/components/navigation-item/navigation-tab.style.js +353 -0
- package/build/components/navigation-rail/navigation-rail-animations.d.ts +21 -0
- package/build/components/navigation-rail/navigation-rail-animations.d.ts.map +1 -0
- package/build/components/navigation-rail/navigation-rail-animations.js +1 -0
- package/build/components/navigation-rail/navigation-rail.d.ts +94 -0
- package/build/components/navigation-rail/navigation-rail.d.ts.map +1 -0
- package/build/components/navigation-rail/navigation-rail.js +1 -0
- package/build/components/navigation-rail/navigation-rail.style.d.ts +2 -0
- package/build/components/navigation-rail/navigation-rail.style.d.ts.map +1 -0
- package/build/components/navigation-rail/navigation-rail.style.js +1 -0
- package/build/components/progress-indicator/base-progress-indicator.d.ts +33 -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 +47 -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 +154 -0
- package/build/components/radio-button/radio-button.d.ts +49 -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 +62 -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 +55 -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/search/search-bar.d.ts +30 -0
- package/build/components/search/search-bar.d.ts.map +1 -0
- package/build/components/search/search-bar.js +1 -0
- package/build/components/search/search-bar.style.d.ts +2 -0
- package/build/components/search/search-bar.style.d.ts.map +1 -0
- package/build/components/search/search-bar.style.js +1 -0
- package/build/components/slider/base-slider.d.ts +58 -0
- package/build/components/slider/base-slider.d.ts.map +1 -0
- package/build/components/slider/base-slider.js +1 -0
- package/build/components/slider/slider.d.ts +3 -0
- package/build/components/slider/slider.d.ts.map +1 -0
- package/build/components/slider/slider.js +1 -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/components/wave/base-wave.d.ts +12 -0
- package/build/components/wave/base-wave.d.ts.map +1 -0
- package/build/components/wave/base-wave.js +1 -0
- package/build/components/wave/circular-wave.d.ts +37 -0
- package/build/components/wave/circular-wave.d.ts.map +1 -0
- package/build/components/wave/circular-wave.js +1 -0
- package/build/components/wave/linear-wave.d.ts +26 -0
- package/build/components/wave/linear-wave.d.ts.map +1 -0
- package/build/components/wave/linear-wave.js +1 -0
- package/build/custom-element-Dz3n6kSt.js +6 -0
- package/build/definitions.d.ts +18 -0
- package/build/definitions.d.ts.map +1 -0
- package/build/definitions.js +1 -0
- package/build/duration-CDKuKTyT.js +1 -0
- package/build/easing-5hHInU7b.js +1 -0
- package/build/elevation-dUQez_WX.js +1 -0
- package/build/lit-element-Ho-VPzO1.js +22 -0
- package/build/property-Ck1wIidx.js +6 -0
- package/build/query-DifSdHBD.js +11 -0
- package/build/query-assigned-elements-CAhlPqtD.js +6 -0
- package/build/shape-CrZ0CLVJ.js +1 -0
- package/build/state--U2hSgGK.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/connected-promise-resolve.d.ts +8 -0
- package/build/utils/behaviors/connected-promise-resolve.d.ts.map +1 -0
- package/build/utils/behaviors/connected-promise-resolve.js +1 -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/controller/selection-controller.d.ts +24 -0
- package/build/utils/controller/selection-controller.d.ts.map +1 -0
- package/build/utils/controller/selection-controller.js +1 -0
- package/build/utils/controller/single-selection-controller.d.ts +46 -0
- package/build/utils/controller/single-selection-controller.d.ts.map +1 -0
- package/build/utils/controller/single-selection-controller.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 +25 -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 @@
|
|
|
1
|
+
import{_ as t}from"../../tslib.es6-CmLYFWVC.js";import{i as e,x as n}from"../../lit-element-Ho-VPzO1.js";import{t as i}from"../../custom-element-Dz3n6kSt.js";import{n as s}from"../../property-Ck1wIidx.js";import{r as o}from"../../state--U2hSgGK.js";import{e as a}from"../../query-DifSdHBD.js";import{o as r}from"../../query-assigned-elements-CAhlPqtD.js";import{e as h}from"../../class-map-DlMb2KKL.js";import{mixinConnectedPromiseResolve as l}from"../../utils/behaviors/connected-promise-resolve.js";import"../navigation-item/navigation-bar-tab.js";import{NavigationRailDefaultOpenAnimation as p,NavigationRailDefaultCloseAnimation as d}from"./navigation-rail-animations.js";import{navigationRailStyle as c}from"./navigation-rail.style.js";import"../navigation-item/base-navigation-tab.js";import"../../utils/behaviors/element-internals.js";import"../../utils/event/form-label-activation.js";import"../navigation-item/navigation-tab-sigle-selection-controller.js";import"../navigation-item/navigation-tab.style.js";import"../../duration-CDKuKTyT.js";import"../../easing-5hHInU7b.js";import"../../component-definitions/navigation-tab.definition.js";import"../../color-CigMJnjV.js";import"../../shape-CrZ0CLVJ.js";import"../../state-C-haZXan.js";import"../../typescale-Bh1NLwSE.js";import"../../utils/controller/attachable-controller.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"../../component-definitions/navigation-rail.definition.js";let m=class extends(l(e)){constructor(){super(...arguments),this.expanded=!1,this.position="top",this.xr=!1,this.quick=!1,this.hasInactiveMenu=!1,this.hasActiveMenu=!1,this.hasFab=!1,this.hasContent=!1,this.isOpen=!1,this.isOpening=!1,this.cancelAnimations=null}static{this.styles=c}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()))}getRenderClasses(){return{expanded:this.expanded,collapsed:!this.expanded,xr:this.xr,top:"top"===this.position,middle:"middle"===this.position,"has-menu":this.hasActiveMenu||this.hasInactiveMenu,"has-inactive-menu":this.hasInactiveMenu,"has-active-menu":this.hasActiveMenu,"has-fab":this.hasFab,"has-content":this.hasContent}}render(){return n`<dialog class="${h(this.getRenderClasses())}"><span class="background" aria-hidden="true"></span><div class="container"><div class="menu-and-fab">${this.renderMenu()} ${this.renderFab()}</div>${this.renderContent()}</div></dialog>`}renderContent(){return n`<div class="content"><slot @slotchange="${this.handleContentSlotChange}"></slot></div>`}renderFab(){return n`<span class="fab"><slot name="fab" @slotchange="${this.handleFabSlotChange}"></slot></span>`}renderMenu(){return n`<span class="menu-active-icon"><slot name="menu-active-icon" @slotchange="${this.handleInactiveMenuSlotChange}"><mdc-standard-icon-button @click="${this.handleCollapsed}">${this.renderMenuActiveIcon()}</mdc-standard-icon-button></slot></span><span class="menu-inactive-icon" @slotchange="${this.handleActiveMenuSlotChange}"><slot name="menu-inactive-icon"><mdc-standard-icon-button @click="${this.handleExpanded}">${this.renderMenuInactiveIcon()}</mdc-standard-icon-button></slot></span>`}renderMenuInactiveIcon(){return n`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M120-240v-80h720v80H120Zm0-200v-80h720v80H120Zm0-200v-80h720v80H120Z"/></svg>`}renderMenuActiveIcon(){return n`<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#1f1f1f"><path d="M120-240v-80h520v80H120Zm664-40L584-480l200-200 56 56-144 144 144 144-56 56ZM120-440v-80h400v80H120Zm0-200v-80h520v80H120Z"/></svg>`}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.show(),this.open=!0,this.querySelector("[autofocus]")?.focus(),await this.animateDialog(p),this.dispatchEvent(new Event("opened")),this.isOpening=!1}async close(){if(this.isOpening=!1,!this.isConnected)return void(this.open=!1);await this.updateComplete;const t=this.dialog;if(!t.open||this.isOpening)return void(this.open=!1);!this.dispatchEvent(new Event("close",{cancelable:!0}))||(await this.animateDialog(d),t.close(),this.open=!1,this.dispatchEvent(new Event("closed")))}async animateDialog(t){if(this.cancelAnimations?.abort(),this.cancelAnimations=new AbortController,this.quick)return;const{dialog:e,container:n,content:i}=this;if(!e||!n||!i)return;const{container:s,dialog:o,content:a}=t,r=[[e,o??[]],[n,s??[]],[i,a??[]]],h=[];for(const[t,e]of r)for(const n of e){const e=t.animate(...n);this.cancelAnimations.signal.addEventListener("abort",()=>{e.cancel()}),h.push(e)}await Promise.all(h.map(t=>t.finished.catch(()=>{})))}updated(t){t.has("xr")&&this.updateSlottedChild("xr",this.xr),t.has("expanded")&&this.updateSlottedChild("direction",this.expanded?"horizonal":"vertical"),super.updated(t)}updateSlottedChild(t,e){const n=this.tabs.filter(t=>"mdc-navigation-bar-tab"!==t.nodeName);if(0!==n.length)if("xr"===t&&e)for(const e of n)e.setAttribute(t,"");else if("xr"===t)for(const e of n)e.removeAttribute(t);else for(const i of n)i.setAttribute(t,e)}handleExpanded(){this.expanded=!0}handleCollapsed(){this.expanded=!1}handleInactiveMenuSlotChange(t){this.hasInactiveMenu=t.target.assignedElements().length>0}handleActiveMenuSlotChange(t){this.hasActiveMenu=t.target.assignedElements().length>0}handleFabSlotChange(t){this.hasFab=t.target.assignedElements().length>0}handleContentSlotChange(t){this.hasContent=t.target.assignedElements().length>0}};t([s({type:Boolean})],m.prototype,"expanded",void 0),t([s({type:String})],m.prototype,"position",void 0),t([s({type:Boolean})],m.prototype,"xr",void 0),t([s({type:Boolean})],m.prototype,"quick",void 0),t([s({type:Boolean,noAccessor:!0})],m.prototype,"open",null),t([a("dialog")],m.prototype,"dialog",void 0),t([a(".container")],m.prototype,"container",void 0),t([a(".content")],m.prototype,"content",void 0),t([r()],m.prototype,"tabs",void 0),t([o()],m.prototype,"hasInactiveMenu",void 0),t([o()],m.prototype,"hasActiveMenu",void 0),t([o()],m.prototype,"hasFab",void 0),t([o()],m.prototype,"hasContent",void 0),m=t([i("mdc-navigation-rail")],m);export{m as NavigationRail};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-rail.style.d.ts","sourceRoot":"","sources":["../../../src/components/navigation-rail/navigation-rail.style.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,mBAAmB,yBAsK/B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"../../lit-element-Ho-VPzO1.js";import{NavigationRailDefinition as e}from"../../component-definitions/navigation-rail.definition.js";import"../../utils/controller/attachable-controller.js";import{createWrappedTokens as n}from"../../utils/tokens/create-wrapped-tokens.js";import{stringTokens as i}from"../../utils/tokens/string-tokens.js";import"../../color-CigMJnjV.js";import"../../shape-CrZ0CLVJ.js";import"../../utils/tokens/create-logic-shape-tokens.js";const r=a`:host{${i(n("--mdc-navigation-rail",e))}}:host{display:contents;cursor:default;-webkit-tap-highlight-color:transparent;width:fit-content;position:relative}dialog{position:relative;background:0 0;border:none;flex-direction:column;margin:inherit;max-height:inherit;max-width:inherit;min-height:inherit;min-width:inherit;height:inherit;outline:0;overflow:hidden;padding:0;box-sizing:border-box}dialog[open]{display:flex}dialog.collapsed{width:var(--_collapsed-container-width);border-start-start-radius:min(var(--_collapsed-container-shape-start-start),calc(var(--_collapsed-container-height)/ 2));border-start-end-radius:min(var(--_collapsed-container-shape-start-end),calc(var(--_collapsed-container-height)/ 2));border-end-start-radius:min(var(--_collapsed-container-shape-end-start),calc(var(--_collapsed-container-height)/ 2));border-end-end-radius:min(var(--_collapsed-container-shape-end-end),calc(var(--_collapsed-container-height)/ 2));padding-inline-start:var(--_collapsed-container-inline-leading-space);padding-inline-end:var(--_collapsed-container-inline-trailing-space);padding-block-start:var(--_collapsed-container-block-leading-space);padding-block-end:var(--_collapsed-container-block-trailing-space)}dialog.xr{height:var(--_vertical-xr-container-height);border-start-start-radius:min(var(--_vertical-xr-container-shape-start-start),calc(var(--_vertical-xr-container-height)/ 2));border-start-end-radius:min(var(--_vertical-xr-container-shape-start-end),calc(var(--_vertical-xr-container-height)/ 2));border-end-start-radius:min(var(--_vertical-xr-container-shape-end-start),calc(var(--_vertical-xr-container-height)/ 2));border-end-end-radius:min(var(--_vertical-xr-container-shape-end-end),calc(var(--_vertical-xr-container-height)/ 2));padding-inline-start:var(--_vertical-xr-container-inline-leading-space);padding-inline-end:var(--_vertical-xr-container-inline-trailing-space);padding-block-start:var(--_vertical-xr-container-block-leading-space);padding-block-end:var(--_vertical-xr-container-block-trailing-space)}dialog.expanded{min-width:var(--_expanded-container-width-minimum);border-start-start-radius:min(var(--_expanded-container-shape-start-start),calc(var(--_expanded-container-height)/ 2));border-start-end-radius:min(var(--_expanded-container-shape-start-end),calc(var(--_expanded-container-height)/ 2));border-end-start-radius:min(var(--_expanded-container-shape-end-start),calc(var(--_expanded-container-height)/ 2));border-end-end-radius:min(var(--_expanded-container-shape-end-end),calc(var(--_expanded-container-height)/ 2));padding-inline-start:var(--_expanded-container-inline-leading-space);padding-inline-end:var(--_expanded-container-inline-trailing-space);padding-block-start:var(--_expanded-container-block-leading-space);padding-block-end:var(--_expanded-container-block-trailing-space)}.container{border-radius:inherit;display:flex;flex-direction:column;flex-grow:1;overflow:hidden;position:relative;transform-origin:top;width:100%}dialog .container .menu-and-fab{display:flex;flex-direction:column}dialog.collapsed .container .menu-and-fab{align-items:center;gap:var(--_collapsed-menu-fab-between-space)}dialog.expanded .container .menu-and-fab{align-items:start;gap:var(--_expanded-menu-fab-between-space)}dialog :is(.menu-inactive-icon, .menu-active-icon){display:none}dialog:not(.has-inactive-menu).collapsed .menu-inactive-icon{display:block}dialog:not(.has-active-menu).expanded .menu-active-icon{display:block}dialog .container .content{display:flex;flex-direction:column;width:100%;box-sizing:border-box}dialog.collapsed .container .content{gap:var(--_collapsed-segments-between-space);margin-block-start:var(--_collapsed-segments-block-leading-space);margin-block-end:var(--_collapsed-segments-block-trailing-space);margin-inline-start:var(--_collapsed-segments-inline-leading-space);margin-inline-end:var(--_collapsed-segments-inline-trailig-space)}dialog.expanded .container .content{margin-block-start:var(--_collapsed-segments-block-leading-space)}.background{position:absolute;inset:0;z-index:-1}dialog.collapsed .background{background:var(--_collapsed-container-color)}dialog.xr .background{background:var(--_vertical-xr-container-color)}dialog.expanded .background{background:var(--_expanded-floating-container-color)}::backdrop{background:0 0}.end,.menu,.start{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;align-items:center}.anchor{position:absolute}.top.anchor{top:0}.bottom.anchor{bottom:0}mdc-divider{display:none;position:absolute}.show-bottom-divider .end mdc-divider,.show-top-divider .start mdc-divider{display:flex}`;export{r as navigationRailStyle};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Sandlada & Kai Orion
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
import { LitElement, type TemplateResult } from 'lit';
|
|
7
|
+
declare const BaseProgressIndicator_base: import("../../utils/behaviors/mixin").MixinReturn<typeof LitElement>;
|
|
8
|
+
/**
|
|
9
|
+
* A progress component.
|
|
10
|
+
*
|
|
11
|
+
* @version
|
|
12
|
+
* Material Design 3 - Expressive
|
|
13
|
+
*
|
|
14
|
+
* @link
|
|
15
|
+
* https://m3.material.io/components/progress-indicators/specs
|
|
16
|
+
*/
|
|
17
|
+
export declare abstract class BaseProgressIndicator extends BaseProgressIndicator_base {
|
|
18
|
+
value: number;
|
|
19
|
+
max: number;
|
|
20
|
+
indeterminate: boolean;
|
|
21
|
+
wavy: boolean;
|
|
22
|
+
protected progressElement: HTMLElement;
|
|
23
|
+
protected render(): TemplateResult<1>;
|
|
24
|
+
protected abstract renderWavy(): TemplateResult;
|
|
25
|
+
protected abstract renderLine(): TemplateResult;
|
|
26
|
+
protected getRenderClasses(): {
|
|
27
|
+
indeterminate: boolean;
|
|
28
|
+
wavy: boolean;
|
|
29
|
+
};
|
|
30
|
+
protected abstract renderIndicator(): TemplateResult;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=base-progress-indicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-progress-indicator.d.ts","sourceRoot":"","sources":["../../../src/components/progress-indicator/base-progress-indicator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAiB,KAAK,cAAc,EAAE,MAAM,KAAK,CAAA;;AAMpE;;;;;;;;GAQG;AACH,8BAAsB,qBAAsB,SAAQ,0BAA8B;IAGvE,KAAK,EAAE,MAAM,CAAI;IAGjB,GAAG,EAAE,MAAM,CAAI;IAGf,aAAa,EAAE,OAAO,CAAQ;IAG9B,IAAI,EAAE,OAAO,CAAQ;IAG5B,SAAS,CAAC,eAAe,EAAG,WAAW,CAAA;cAEpB,MAAM;IAiBzB,SAAS,CAAC,QAAQ,CAAC,UAAU,IAAI,cAAc;IAC/C,SAAS,CAAC,QAAQ,CAAC,UAAU,IAAI,cAAc;IAE/C,SAAS,CAAC,gBAAgB;;;;IAO1B,SAAS,CAAC,QAAQ,CAAC,eAAe,IAAI,cAAc;CACvD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e}from"../../tslib.es6-CmLYFWVC.js";import{i as t,E as r,x as a}from"../../lit-element-Ho-VPzO1.js";import{n as i}from"../../property-Ck1wIidx.js";import{e as s}from"../../query-DifSdHBD.js";import{e as o}from"../../class-map-DlMb2KKL.js";import{mixinDelegatesAria as m}from"../../utils/aria/delegate.js";import"../../utils/aria/aria.js";class p extends(m(t)){constructor(){super(...arguments),this.value=0,this.max=1,this.indeterminate=!1,this.wavy=!1}render(){const{ariaLabel:e}=this;return a`<div class="progress ${o(this.getRenderClasses())}" style="--_active-fraction:${this.value/this.max};--_inactive-fraction:${1-this.value/this.max}" role="progressbar" aria-label="${e||r}" aria-valuemin="0" aria-valuemax="${this.max}" aria-valuenow="${this.indeterminate?r:this.value}">${this.renderIndicator()}</div>`}getRenderClasses(){return{indeterminate:this.indeterminate,wavy:this.wavy}}}e([i({type:Number})],p.prototype,"value",void 0),e([i({type:Number})],p.prototype,"max",void 0),e([i({type:Boolean})],p.prototype,"indeterminate",void 0),e([i({type:Boolean,reflect:!0})],p.prototype,"wavy",void 0),e([s(".progress")],p.prototype,"progressElement",void 0);export{p as BaseProgressIndicator};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Sandlada & Kai Orion
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
import { type PropertyValues, type TemplateResult } from 'lit';
|
|
7
|
+
import { BaseProgressIndicator } from './base-progress-indicator';
|
|
8
|
+
declare global {
|
|
9
|
+
interface HTMLElementTagNameMap {
|
|
10
|
+
"mdc-linear-progress-indicator": LinearProgressIndicator;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* A progress component.
|
|
15
|
+
*
|
|
16
|
+
* @todo
|
|
17
|
+
* - wavy
|
|
18
|
+
*
|
|
19
|
+
* @version
|
|
20
|
+
* Material Design 3 - Expressive
|
|
21
|
+
*
|
|
22
|
+
* @link
|
|
23
|
+
* https://m3.material.io/components/progress-indicators/specs
|
|
24
|
+
*/
|
|
25
|
+
export declare class LinearProgressIndicator extends BaseProgressIndicator {
|
|
26
|
+
static styles: import("lit").CSSResult;
|
|
27
|
+
private inactiveLeftTrack;
|
|
28
|
+
private inactiveRightTrack;
|
|
29
|
+
private activeTrack;
|
|
30
|
+
protected renderIndicator(): TemplateResult;
|
|
31
|
+
protected renderWavy(): TemplateResult;
|
|
32
|
+
protected renderWaveLine(classes?: string): TemplateResult<1>;
|
|
33
|
+
protected renderLine(): TemplateResult;
|
|
34
|
+
private generateSmoothWavePath;
|
|
35
|
+
private updateWave;
|
|
36
|
+
private animations;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* value >= 90%
|
|
40
|
+
* /``\__/``\ -> ------
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
private animateProgress;
|
|
44
|
+
private getActiveWidthFrom;
|
|
45
|
+
protected firstUpdated(_changedProperties: PropertyValues): void;
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=linear-progress-indicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linear-progress-indicator.d.ts","sourceRoot":"","sources":["../../../src/components/progress-indicator/linear-progress-indicator.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAQ,KAAK,cAAc,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAA;AAEpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAA;AAGjE,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,+BAA+B,EAAE,uBAAuB,CAAA;KAC3D;CACJ;AAED;;;;;;;;;;;GAWG;AACH,qBACa,uBAAwB,SAAQ,qBAAqB;IAE9D,OAAgB,MAAM,0BAA+B;IAGrD,OAAO,CAAC,iBAAiB,CAAc;IAEvC,OAAO,CAAC,kBAAkB,CAAc;IAExC,OAAO,CAAC,WAAW,CAAc;cAEd,eAAe,IAAI,cAAc;cAOjC,UAAU,IAAI,cAAc;IAU/C,SAAS,CAAC,cAAc,CAAC,OAAO,GAAE,MAAW;cAW1B,UAAU,IAAI,cAAc;IAiB/C,OAAO,CAAC,sBAAsB;IAe9B,OAAO,CAAC,UAAU;IAwClB,OAAO,CAAC,UAAU,CAAmB;IACrC;;;;;OAKG;IACH,OAAO,CAAC,eAAe;IA+EvB,OAAO,CAAC,kBAAkB;cAIP,YAAY,CAAC,kBAAkB,EAAE,cAAc,GAAG,IAAI;CAK5E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t}from"../../tslib.es6-CmLYFWVC.js";import{x as i}from"../../lit-element-Ho-VPzO1.js";import{t as e}from"../../custom-element-Dz3n6kSt.js";import{e as s}from"../../query-DifSdHBD.js";import{BaseProgressIndicator as a}from"./base-progress-indicator.js";import{linearProgressIndicatorStyle as r}from"./progress-indicator.style.js";import"../../property-Ck1wIidx.js";import"../../class-map-DlMb2KKL.js";import"../../utils/aria/delegate.js";import"../../utils/aria/aria.js";import"../../component-definitions/progress-indicator.definition.js";import"../../color-CigMJnjV.js";import"../../shape-CrZ0CLVJ.js";import"../../utils/tokens/create-logic-shape-tokens.js";import"../../utils/tokens/create-wrapped-tokens.js";import"../../utils/tokens/string-tokens.js";let n=class extends a{constructor(){super(...arguments),this.animations=[]}static{this.styles=r}renderIndicator(){return i`<span aria-hidden="true" class="stop-indicators"></span> ${this.wavy?this.renderWavy():this.renderLine()}`}renderWavy(){return i`<div class="tracks"><span aria-hidden="true" class="inactive-track left"></span> ${this.renderWaveLine("active-track")} <span aria-hidden="true" class="inactive-track right"></span></div>`}renderWaveLine(t=""){const{pathData:e,svgHeight:s,svgViewBox:a,svgWidth:r,strokeWidth:n}=this.updateWave();return i`<svg class="wave ${t}" height="${s}px" width="${r}px" view-box="${a}" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><g class="bar-inner"><path d="${e}" stroke-width="${n}px"></path></g></svg>`}renderLine(){return i`<div class="tracks"><span aria-hidden="true" class="active-track"></span> <span aria-hidden="true" class="inactive-track"></span></div><div class="indeteminate-bar"><div class="bar primary-bar"><div class="bar-inner"></div></div><div class="bar secondary-bar"><div class="bar-inner"></div></div></div>`}generateSmoothWavePath(t,i,e,s){const a=i/2;let r=`M 0 ${a}`;for(let i=0;i<s;i++){const s=i*t;r+=` Q ${s+t/4},${a-e} ${s+t/2},${a}`,r+=` Q ${s+3*t/4},${a+e} ${s+t},${a}`}return r}updateWave(){const t=this.clientWidth,i=Math.ceil(t/32)+2,e=this.generateSmoothWavePath(32,20,8,i);return document.createElementNS("http://www.w3.org/2000/svg","path"),{pathData:e,svgWidth:t,svgHeight:20,svgViewBox:`0 0 ${t} 20`,strokeWidth:4}}animateProgress(){this.value,this.animations.forEach(t=>t.cancel());const t="999px",i=[{clipPath:`inset(0 100% 0 0 round ${t})`,offset:0},{clipPath:`inset(0 100% 0 0 round ${t})`,offset:.15},{clipPath:`inset(0 42% 0 0 round ${t})`,offset:.3},{clipPath:`inset(0 0% 0 0 round ${t})`,offset:.4},{clipPath:`inset(0 0% 0 0 round ${t})`,offset:.5799},{clipPath:`inset(0 100% 0 0 round ${t})`,offset:.58},{clipPath:`inset(0 100% 0 0 round ${t})`,offset:.73},{clipPath:`inset(0 32% 0 0 round ${t})`,offset:.9},{clipPath:`inset(0 0% 0 0 round ${t})`,offset:.999},{clipPath:`inset(0 100% 0 0 round ${t})`,offset:1}],e=[{clipPath:`inset(0 0 0 2% round ${t})`,offset:0},{clipPath:`inset(0 0 0 42% round ${t})`,offset:.15},{clipPath:`inset(0 0 0 100% round ${t})`,offset:.3},{clipPath:`inset(0 0 0 100% round ${t})`,offset:.4},{clipPath:`inset(0 0 0 100% round ${t})`,offset:.5799},{clipPath:`inset(0 0 0 2% round ${t})`,offset:.58},{clipPath:`inset(0 0 0 32% round ${t})`,offset:.73},{clipPath:`inset(0 0 0 100% round ${t})`,offset:.9},{clipPath:`inset(0 0 0 100% round ${t})`,offset:.999},{clipPath:`inset(0 0 0 0% round ${t})`,offset:1}],s={duration:1500,easing:"linear",iterations:1/0};this.animations=[this.activeTrack.animate([{clipPath:"inset(0 100% 0 0)",offset:0},{clipPath:"inset(0 60% 0 0)",offset:.15},{clipPath:"inset(0 0 0 60%)",offset:.3},{clipPath:"inset(0 0 0 100%)",offset:.4},{clipPath:"inset(0 0 0 100%)",offset:.5799},{clipPath:"inset(0 100% 0 0)",offset:.58},{clipPath:"inset(0 70% 0 0)",offset:.73},{clipPath:"inset(0 0 0 70%)",offset:.9},{clipPath:"inset(0 0 0 100%)",offset:.999},{clipPath:"inset(0 100% 0 0)",offset:1}],s),this.inactiveLeftTrack.animate(i,s),this.inactiveRightTrack.animate(e,s)]}getActiveWidthFrom(){}firstUpdated(t){super.firstUpdated(t),this.animateProgress()}};t([s(".inactive-track.left")],n.prototype,"inactiveLeftTrack",void 0),t([s(".inactive-track.right")],n.prototype,"inactiveRightTrack",void 0),t([s(".active-track")],n.prototype,"activeTrack",void 0),n=t([e("mdc-linear-progress-indicator")],n);export{n as LinearProgressIndicator};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress-indicator.style.d.ts","sourceRoot":"","sources":["../../../src/components/progress-indicator/progress-indicator.style.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,4BAA4B,yBAoJxC,CAAA"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import{r as t,a as i}from"../../lit-element-Ho-VPzO1.js";import{LinearProgressIndicatorDefinition as a}from"../../component-definitions/progress-indicator.definition.js";import{createWrappedTokens as r}from"../../utils/tokens/create-wrapped-tokens.js";import{stringTokens as e}from"../../utils/tokens/string-tokens.js";import"../../color-CigMJnjV.js";import"../../shape-CrZ0CLVJ.js";import"../../utils/tokens/create-logic-shape-tokens.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2025 Sandlada & Kai Orion
|
|
5
|
+
* SPDX-License-Identifier: MIT
|
|
6
|
+
*/const n=e(r("--mdc-linear-progress-indicator",a));t("250ms"),t("cubic-bezier(0.4, 0, 0.6, 1)"),t("2s");const o=i`
|
|
7
|
+
|
|
8
|
+
@layer mdc.linear-progress-indicator.variable {
|
|
9
|
+
:host {
|
|
10
|
+
${n};
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@layer mdc.linear-progress-indicator.base {
|
|
15
|
+
:host {
|
|
16
|
+
border-start-start-radius: var(--_track-shape-start-start);
|
|
17
|
+
border-start-end-radius: var(--_track-shape-start-end);
|
|
18
|
+
border-end-start-radius: var(--_track-shape-end-start);
|
|
19
|
+
border-end-end-radius: var(--_track-shape-end-end);
|
|
20
|
+
display: flex;
|
|
21
|
+
position: relative;
|
|
22
|
+
min-width: 80px;
|
|
23
|
+
content-visibility: auto;
|
|
24
|
+
contain: strict;
|
|
25
|
+
margin-inline-start: 4px;
|
|
26
|
+
margin-inline-end: 4px;
|
|
27
|
+
height: var(--_height);
|
|
28
|
+
|
|
29
|
+
}
|
|
30
|
+
:host([wavy]) {
|
|
31
|
+
height: 20px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.progress {
|
|
35
|
+
position: absolute;
|
|
36
|
+
inset: 0;
|
|
37
|
+
direction: ltr;
|
|
38
|
+
border-radius: inherit;
|
|
39
|
+
overflow: hidden;
|
|
40
|
+
display: flex;
|
|
41
|
+
align-items: center;
|
|
42
|
+
|
|
43
|
+
--_inset-ltr: inset(
|
|
44
|
+
0
|
|
45
|
+
calc(var(--_inactive-fraction) * 100% + (var(--_stop-indicator-size) / 2))
|
|
46
|
+
0
|
|
47
|
+
0
|
|
48
|
+
round var(--_active-indicator-shape-start-start)
|
|
49
|
+
);
|
|
50
|
+
--_inset-rtl: inset(
|
|
51
|
+
0
|
|
52
|
+
0
|
|
53
|
+
0
|
|
54
|
+
calc(var(--_active-fraction) * 100% + (var(--_stop-indicator-size) / 2))
|
|
55
|
+
round var(--_active-indicator-shape-start-start)
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
.indeterminate .stop {
|
|
59
|
+
display: none;
|
|
60
|
+
}
|
|
61
|
+
.stop-indicators:not(.indeterminate) {
|
|
62
|
+
position: absolute;
|
|
63
|
+
inset: 0px;
|
|
64
|
+
z-index: 0;
|
|
65
|
+
&::before,
|
|
66
|
+
&::after {
|
|
67
|
+
content: "";
|
|
68
|
+
display: block;
|
|
69
|
+
z-index: 1;
|
|
70
|
+
position: absolute;
|
|
71
|
+
border-start-start-radius: var(--_stop-indicator-shape-start-start);
|
|
72
|
+
border-start-end-radius: var(--_stop-indicator-shape-start-end);
|
|
73
|
+
border-end-start-radius: var(--_stop-indicator-shape-end-start);
|
|
74
|
+
border-end-end-radius: var(--_stop-indicator-shape-end-end);
|
|
75
|
+
height: var(--_stop-indicator-size);
|
|
76
|
+
width: var(--_stop-indicator-size);
|
|
77
|
+
background: var(--_stop-indicator-color);
|
|
78
|
+
}
|
|
79
|
+
&::before {
|
|
80
|
+
inset: 0px;
|
|
81
|
+
}
|
|
82
|
+
&::after {
|
|
83
|
+
inset: calc(100% - var(--_stop-indicator-size));
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.tracks {
|
|
88
|
+
.active-track,
|
|
89
|
+
.inactive-track {
|
|
90
|
+
position: absolute;
|
|
91
|
+
inset: 0px;
|
|
92
|
+
z-index: -1;
|
|
93
|
+
transition: none;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.active-track {
|
|
97
|
+
/* background: var(--_active-indicator-color); */
|
|
98
|
+
}
|
|
99
|
+
.inactive-track {
|
|
100
|
+
background: var(--_track-color);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
.active-track {
|
|
105
|
+
/* clip-path: var(--_inset-ltr); */
|
|
106
|
+
}
|
|
107
|
+
.inactive-track {
|
|
108
|
+
/* clip-path: var(--_inset-rtl); */
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.indeterminate .tracks {
|
|
113
|
+
position: absolute;
|
|
114
|
+
inset: 0px;
|
|
115
|
+
|
|
116
|
+
&>.track {
|
|
117
|
+
position: absolute;
|
|
118
|
+
inset: 0px;
|
|
119
|
+
clip-path: inset(0 calc(var(--_wave-length-start-fraction) * 100%) 0 var(--_wave-length-end-fraction));
|
|
120
|
+
/* animation: wave-animation 3s infinite linear; */
|
|
121
|
+
}
|
|
122
|
+
&>.inactive-track {
|
|
123
|
+
background: var(--_track-color);
|
|
124
|
+
position: absolute;
|
|
125
|
+
inset: 0px;
|
|
126
|
+
z-index: -1;
|
|
127
|
+
}
|
|
128
|
+
&>.inactive-track.left {
|
|
129
|
+
/* animation: wave-inactive-right-animation 10s infinite linear; */
|
|
130
|
+
}
|
|
131
|
+
&>.inactive-track.right {
|
|
132
|
+
/* display: none; */
|
|
133
|
+
/* animation: wave-inactive-right-animation 10s infinite linear; */
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.wave {
|
|
138
|
+
|
|
139
|
+
fill: none;
|
|
140
|
+
stroke: var(--_active-indicator-color);
|
|
141
|
+
stroke-linecap: round;
|
|
142
|
+
stroke-linejoin: round;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@keyframes wave-animation {
|
|
146
|
+
0% {
|
|
147
|
+
}
|
|
148
|
+
10% {
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
}
|
|
154
|
+
`;export{o as linearProgressIndicatorStyle};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Kai-Orion & Sandlada
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
import { LitElement, type PropertyValues } from 'lit';
|
|
7
|
+
import { createValidator, getValidityAnchor } from '../../utils/behaviors/constraint-validation';
|
|
8
|
+
import { RadioValidator } from '../../utils/behaviors/validators/radio-validator';
|
|
9
|
+
import { getFormState, getFormValue } from '../../utils/form/form-associated';
|
|
10
|
+
declare global {
|
|
11
|
+
interface HTMLElementTagNameMap {
|
|
12
|
+
"mdc-radio-button": RadioButton;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
declare const CHECKED: unique symbol;
|
|
16
|
+
declare const RadioButton_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 LitElement & import("../../utils/form/form-associated").FormAssociatedConstructor, import("../../utils/form/form-associated").FormAssociated>, import("../../utils/behaviors/constraint-validation").ConstraintValidation>>;
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @version
|
|
20
|
+
* Material Design 3 - Expressive
|
|
21
|
+
*
|
|
22
|
+
* @link
|
|
23
|
+
* https://m3.material.io/components/radio-button/specs
|
|
24
|
+
*/
|
|
25
|
+
export declare class RadioButton extends RadioButton_base {
|
|
26
|
+
static styles: import("lit").CSSResult;
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
name: string;
|
|
29
|
+
[CHECKED]: boolean;
|
|
30
|
+
private readonly maskId;
|
|
31
|
+
private readonly selectionController;
|
|
32
|
+
get checked(): boolean;
|
|
33
|
+
set checked(value: boolean);
|
|
34
|
+
required: boolean;
|
|
35
|
+
value: string;
|
|
36
|
+
private containerElement;
|
|
37
|
+
constructor();
|
|
38
|
+
protected willUpdate(changedProperties: PropertyValues<this>): void;
|
|
39
|
+
protected render(): unknown;
|
|
40
|
+
private handleClick;
|
|
41
|
+
[getFormValue](): string | null;
|
|
42
|
+
[getFormState](): string;
|
|
43
|
+
formResetCallback(): void;
|
|
44
|
+
formStateRestoreCallback(state: string): void;
|
|
45
|
+
[createValidator](): RadioValidator;
|
|
46
|
+
[getValidityAnchor](): HTMLElement | null;
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=radio-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-button.d.ts","sourceRoot":"","sources":["../../../src/components/radio-button/radio-button.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAkB,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAA;AAIrE,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAA6B,MAAM,6CAA6C,CAAA;AAE3H,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAA;AAGjF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAuB,MAAM,kCAAkC,CAAA;AAIlG,OAAO,CAAC,MAAM,CAAC;IACX,UAAU,qBAAqB;QAC3B,kBAAkB,EAAE,WAAW,CAAA;KAClC;CACJ;AAED,QAAA,MAAM,OAAO,eAAoB,CAAA;;AAEjC;;;;;;;GAOG;AACH,qBACa,WAAY,SAAQ,gBAAqG;IAElI,OAAgB,MAAM,0BAAmB;IAEjC,QAAQ,EAAE,OAAO,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IAEpB,CAAC,OAAO,CAAC,EAAE,OAAO,CAAQ;IAE1B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqC;IAC5D,OAAO,CAAC,QAAQ,CAAC,mBAAmB,CAAgC;IAEpE,IACW,OAAO,IAGQ,OAAO,CADhC;IACD,IAAW,OAAO,CAAC,KAAK,EAAE,OAAO,EAQhC;IAGM,QAAQ,EAAE,OAAO,CAAQ;IAGzB,KAAK,EAAE,MAAM,CAAO;IAG3B,OAAO,CAAC,gBAAgB,CAAqB;;cAY1B,UAAU,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;cAOzD,MAAM,IAAI,OAAO;YAwBtB,WAAW;IA0BjB,CAAC,YAAY,CAAC;IAId,CAAC,YAAY,CAAC;IAIb,iBAAiB;IAMjB,wBAAwB,CAAC,KAAK,EAAE,MAAM;IAIvC,CAAC,eAAe,CAAC;IAYjB,CAAC,iBAAiB,CAAC;CAG9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t}from"../../tslib.es6-CmLYFWVC.js";import{i as e,x as i}from"../../lit-element-Ho-VPzO1.js";import{t as s}from"../../custom-element-Dz3n6kSt.js";import{n as r}from"../../property-Ck1wIidx.js";import{e as o}from"../../query-DifSdHBD.js";import{e as c}from"../../class-map-DlMb2KKL.js";import{mixinDelegatesAria as l}from"../../utils/aria/delegate.js";import{mixinConstraintValidation as n,createValidator as a,getValidityAnchor as d}from"../../utils/behaviors/constraint-validation.js";import{mixinElementInternals as h,internals as m}from"../../utils/behaviors/element-internals.js";import{RadioValidator as p}from"../../utils/behaviors/validators/radio-validator.js";import{SelectionController as u}from"../../utils/controller/selection-controller.js";import{isActivationClick as k}from"../../utils/event/form-label-activation.js";import{mixinFormAssociated as f,getFormValue as v,getFormState as b}from"../../utils/form/form-associated.js";import{generateUUID as j}from"../../utils/uuid/generate-uuid.js";import{radioButtonStyle as g}from"./radio-button.style.js";import"../../utils/aria/aria.js";import"../../utils/behaviors/validators/validator.js";import"../../easing-5hHInU7b.js";import"../../component-definitions/radio-button.definition.js";import"../../color-CigMJnjV.js";import"../../state-C-haZXan.js";import"../../utils/tokens/create-wrapped-tokens.js";import"../../utils/tokens/override-component-tokens.js";import"../../utils/tokens/string-tokens.js";var y;const C=Symbol("checked");let w=class extends(l(n(f(h(e))))){static{this.styles=g}get checked(){return this[C]}set checked(t){if(t===this[C])return;const e=this[C];this[C]=t,this.requestUpdate("checked",e),this.selectionController.handleCheckedChange()}constructor(){super(),this[y]=!1,this.maskId=`maskid-${j()}`,this.selectionController=new u(this),this.required=!1,this.value="on",this.addController(this.selectionController),this[m].role="radio",this.addEventListener("click",this.handleClick.bind(this))}willUpdate(t){super.willUpdate(t),t.has("checked")&&(this[m].ariaChecked=String(this.checked))}render(){const t=c({selected:this.checked,unselected:!this.checked});return i`<div class="container ${t}" aria-hidden="true"><mdc-ripple .control="${this}" .disabled="${this.disabled}" part="ripple"></mdc-ripple><mdc-focus-ring .control="${this}" part="focus-ring"></mdc-focus-ring><svg class="icon" viewBox="0 0 20 20"><mask id="${this.maskId}"><rect width="100%" height="100%" fill="white"/><circle cx="10" cy="10" r="8" fill="black"/></mask><circle class="outer circle" cx="10" cy="10" r="10" mask="url(#${this.maskId})"/><circle class="inner circle" cx="10" cy="10" r="5"/></svg><div class="touch-target"></div></div>`}async handleClick(t){this.disabled||(await 0,t.defaultPrevented||(k(t)&&this.focus(),this.checked=!0,this.dispatchEvent(new Event("change",{bubbles:!0})),this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0}))))}[(y=C,v)](){return this.checked?this.value:null}[b](){return String(this.checked)}formResetCallback(){this.checked=this.hasAttribute("default-checked")}formStateRestoreCallback(t){this.checked="true"===t}[a](){return new p(()=>this.selectionController?this.selectionController.controls:[this])}[d](){return this.containerElement}};t([r({type:Boolean,reflect:!0,noAccessor:!0})],w.prototype,"checked",null),t([r({type:Boolean})],w.prototype,"required",void 0),t([r({type:String})],w.prototype,"value",void 0),t([o(".container")],w.prototype,"containerElement",void 0),w=t([s("mdc-radio-button")],w);export{w as RadioButton};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-button.style.d.ts","sourceRoot":"","sources":["../../../src/components/radio-button/radio-button.style.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,gBAAgB,yBAmJ5B,CAAA"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import{E as e}from"../../easing-5hHInU7b.js";import{r as o,a as t}from"../../lit-element-Ho-VPzO1.js";import{RadioButtonDefinition as i}from"../../component-definitions/radio-button.definition.js";import{createWrappedTokens as r}from"../../utils/tokens/create-wrapped-tokens.js";import{overrideComponentTokens as s}from"../../utils/tokens/override-component-tokens.js";import{stringTokens as c}from"../../utils/tokens/string-tokens.js";import"../../color-CigMJnjV.js";import"../../state-C-haZXan.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2025 Kai-Orion & Sandlada
|
|
5
|
+
* SPDX-License-Identifier: MIT
|
|
6
|
+
*/const a=c(r("--mdc-radio-button",i)),l=o(e.ExpressiveFastSpatial),n=t`
|
|
7
|
+
@layer mdc.radio-button {
|
|
8
|
+
@layer variable {
|
|
9
|
+
:host { ${a} }
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
@layer base {
|
|
13
|
+
:host {
|
|
14
|
+
display: inline-flex;
|
|
15
|
+
outline: none;
|
|
16
|
+
position: relative;
|
|
17
|
+
vertical-align: top;
|
|
18
|
+
-webkit-tap-highlight-color: transparent;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
height: var(--_icon-size);
|
|
21
|
+
width: var(--_icon-size);
|
|
22
|
+
margin: max(0px, ((48px - var(--_state-layer-size)) / 1));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:host([disabled]) {
|
|
26
|
+
cursor: default;
|
|
27
|
+
pointer-events: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
:host([touch-target='none']) {
|
|
31
|
+
margin: 0px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.container {
|
|
35
|
+
display: flex;
|
|
36
|
+
height: 100%;
|
|
37
|
+
place-content: center;
|
|
38
|
+
place-items: center;
|
|
39
|
+
width: 100%;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.touch-target {
|
|
43
|
+
height: 48px;
|
|
44
|
+
position: absolute;
|
|
45
|
+
width: 48px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.icon {
|
|
49
|
+
fill: var(--_unselected-icon-color);
|
|
50
|
+
inset: 0;
|
|
51
|
+
position: absolute;
|
|
52
|
+
}
|
|
53
|
+
.selected .icon {
|
|
54
|
+
fill: var(--_selected-icon-color);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.outer.circle {
|
|
58
|
+
transition: fill 50ms linear;
|
|
59
|
+
}
|
|
60
|
+
.inner.circle {
|
|
61
|
+
scale: 0;
|
|
62
|
+
opacity: 0;
|
|
63
|
+
transform-origin: center;
|
|
64
|
+
transition: scale 350ms ${l}, opacity 350ms ${l};
|
|
65
|
+
}
|
|
66
|
+
.selected .inner.circle {
|
|
67
|
+
scale: 1;
|
|
68
|
+
opacity: 1;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:host([disabled]) .circle {
|
|
72
|
+
animation-duration: 0s;
|
|
73
|
+
transition-duration: 0s;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:host(:hover) .icon {
|
|
77
|
+
fill: var(--_hovered-unselected-icon-color);
|
|
78
|
+
}
|
|
79
|
+
:host(:focus-within) .icon {
|
|
80
|
+
fill: var(--_focused-unselected-icon-color);
|
|
81
|
+
}
|
|
82
|
+
:host(:active) .icon {
|
|
83
|
+
fill: var(--_pressed-unselected-icon-color);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
:host([disabled]) .icon {
|
|
87
|
+
fill: var(--_disabled-unselected-icon-color);
|
|
88
|
+
opacity: var(--_disabled-unselected-icon-opacity);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:host(:hover) .selected .icon {
|
|
92
|
+
fill: var(--_hovered-selected-hover-icon-color);
|
|
93
|
+
}
|
|
94
|
+
:host(:focus-within) .selected .icon {
|
|
95
|
+
fill: var(--_focused-selected-focus-icon-color);
|
|
96
|
+
}
|
|
97
|
+
:host(:active) .selected .icon {
|
|
98
|
+
fill: var(--_pressed-selected-pressed-icon-color);
|
|
99
|
+
}
|
|
100
|
+
:host([disabled]) .selected .icon {
|
|
101
|
+
fill: var(--_disabled-selected-icon-color);
|
|
102
|
+
opacity: var(--_disabled-selected-icon-opacity);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@layer hcm {
|
|
107
|
+
@media (forced-colors: active) {
|
|
108
|
+
.icon {
|
|
109
|
+
fill: CanvasText;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
:host([disabled]) .icon {
|
|
113
|
+
fill: GrayText;
|
|
114
|
+
opacity: 1;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
@layer composite.ripple {
|
|
120
|
+
.container mdc-ripple {
|
|
121
|
+
border-radius: 50%;
|
|
122
|
+
inset: unset;
|
|
123
|
+
height: var(--_state-layer-size);
|
|
124
|
+
width: var(--_state-layer-size);
|
|
125
|
+
}
|
|
126
|
+
.container.selected mdc-ripple {
|
|
127
|
+
${o(c(s("--mdc-ripple",{"hovered-color":"var(--_hovered-selected-state-layer-color)","hovered-opacity":"var(--_hovered-selected-state-layer-opacity)","pressed-color":"var(--_pressed-selected-state-layer-color)","pressed-opacity":"var(--_pressed-selected-state-layer-opacity)"})))}
|
|
128
|
+
}
|
|
129
|
+
.container:not(.selected) mdc-ripple {
|
|
130
|
+
${o(c(s("--mdc-ripple",{"hovered-color":"var(--_hovered-unselected-state-layer-color)","hovered-opacity":"var(--_hovered-unselected-state-layer-opacity)","pressed-color":"var(--_pressed-unselected-state-layer-color)","pressed-opacity":"var(--_pressed-unselected-state-layer-opacity)"})))}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@layer composite.focus-ring {
|
|
135
|
+
.container mdc-focus-ring {
|
|
136
|
+
height: calc(var(--_icon-size) + 3px);
|
|
137
|
+
width: calc(var(--_icon-size) + 3px);
|
|
138
|
+
inset: unset;
|
|
139
|
+
border-radius: 50%;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
`;export{n as radioButtonStyle};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2022 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
* @link
|
|
6
|
+
* https://github.com/material-components/material-web/blob/main/ripple/internal/ripple.ts
|
|
7
|
+
*
|
|
8
|
+
* [Modified by Kai-Orion & Sandlada]
|
|
9
|
+
*/
|
|
10
|
+
import { ReactiveElement } from 'lit';
|
|
11
|
+
export interface IRipple extends ReactiveElement {
|
|
12
|
+
hovered: boolean;
|
|
13
|
+
focused: boolean;
|
|
14
|
+
pressed: boolean;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
disableHoverStateLayer: boolean;
|
|
17
|
+
disableFocusStateLayer: boolean;
|
|
18
|
+
disablePressStateLayer: boolean;
|
|
19
|
+
hoverStateLayerElement: HTMLElement;
|
|
20
|
+
focusStateLayerElement: HTMLElement;
|
|
21
|
+
pressStateLayerElement: HTMLElement;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Used to manage the `hovered`, `focused` and `pressed` states of ripple components.
|
|
25
|
+
*/
|
|
26
|
+
export declare class RippleAction {
|
|
27
|
+
private readonly host;
|
|
28
|
+
private state;
|
|
29
|
+
private startEvent;
|
|
30
|
+
private checkBoundsAfterContextMenu;
|
|
31
|
+
private initialSize;
|
|
32
|
+
private rippleScale;
|
|
33
|
+
private rippleSize;
|
|
34
|
+
private growAnimation;
|
|
35
|
+
constructor(host: IRipple);
|
|
36
|
+
onControlChange(prev: HTMLElement | null, next: HTMLElement | null): void;
|
|
37
|
+
/**
|
|
38
|
+
* Event handles
|
|
39
|
+
*/
|
|
40
|
+
private handlePointerenter;
|
|
41
|
+
private handlePointerleave;
|
|
42
|
+
private handlePointerup;
|
|
43
|
+
private handlePointerdown;
|
|
44
|
+
private handlePointercancel;
|
|
45
|
+
private handleClick;
|
|
46
|
+
private handleContextmenu;
|
|
47
|
+
private handleFocus;
|
|
48
|
+
private handleBlur;
|
|
49
|
+
/**
|
|
50
|
+
* Animations about
|
|
51
|
+
*/
|
|
52
|
+
private startPressAnimation;
|
|
53
|
+
private getTranslationCoordinates;
|
|
54
|
+
private getNormalizedPointerEventCoords;
|
|
55
|
+
private endPressAnimation;
|
|
56
|
+
private determineRippleSize;
|
|
57
|
+
private inBounds;
|
|
58
|
+
private isTouch;
|
|
59
|
+
private shouldReactToEvent;
|
|
60
|
+
private handleEvent;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=ripple-action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ripple-action.d.ts","sourceRoot":"","sources":["../../../src/components/ripple/ripple-action.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAY,eAAe,EAAE,MAAM,KAAK,CAAA;AA+D/C,MAAM,WAAW,OAAQ,SAAQ,eAAe;IAC5C,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,OAAO,CAAA;IACjB,sBAAsB,EAAE,OAAO,CAAA;IAC/B,sBAAsB,EAAE,OAAO,CAAA;IAC/B,sBAAsB,EAAE,OAAO,CAAA;IAC/B,sBAAsB,EAAE,WAAW,CAAA;IACnC,sBAAsB,EAAE,WAAW,CAAA;IACnC,sBAAsB,EAAE,WAAW,CAAA;CACtC;AAED;;GAEG;AACH,qBAAa,YAAY;IACrB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAC9B,OAAO,CAAC,KAAK,CAAuB;IACpC,OAAO,CAAC,UAAU,CAA4B;IAC9C,OAAO,CAAC,2BAA2B,CAAQ;IAC3C,OAAO,CAAC,WAAW,CAAI;IACvB,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,aAAa,CAAyB;gBAElC,IAAI,EAAE,OAAO;IAIlB,eAAe,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,EAAE,IAAI,EAAE,WAAW,GAAG,IAAI;IAUzE;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAM1B,OAAO,CAAC,kBAAkB;IAS1B,OAAO,CAAC,eAAe;YAcT,iBAAiB;IA4B/B,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,WAAW;IAYnB,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,UAAU;IAUlB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IA0B3B,OAAO,CAAC,yBAAyB;IAyBjC,OAAO,CAAC,+BAA+B;YASzB,iBAAiB;IA2B/B,OAAO,CAAC,mBAAmB;IAiB3B,OAAO,CAAC,QAAQ;IAKhB,OAAO,CAAC,OAAO;IAGf,OAAO,CAAC,kBAAkB;IAiB1B,OAAO,CAAC,WAAW,CAgClB;CAEJ"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{E as t}from"../../easing-5hHInU7b.js";import"../../lit-element-Ho-VPzO1.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2022 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
6
|
+
* @link
|
|
7
|
+
* https://github.com/material-components/material-web/blob/main/ripple/internal/ripple.ts
|
|
8
|
+
*
|
|
9
|
+
* [Modified by Kai-Orion & Sandlada]
|
|
10
|
+
*/const e=0,i=1,s=2,n=3,o=550,h=250,r=.2,a=10,l=75,d=.35,c="forwards",u=150,p=["click","contextmenu","pointercancel","pointerdown","pointerenter","pointerleave","pointerup","focus","blur"];class m{constructor(t){this.state=e,this.startEvent=null,this.checkBoundsAfterContextMenu=!1,this.initialSize=0,this.rippleScale="",this.rippleSize="",this.growAnimation=null,this.handleEvent=async t=>{switch(t.type){case"click":this.handleClick();break;case"contextmenu":this.handleContextmenu();break;case"pointercancel":this.handlePointercancel(t);break;case"pointerdown":await this.handlePointerdown(t);break;case"pointerenter":this.handlePointerenter(t);break;case"pointerleave":this.handlePointerleave(t);break;case"pointerup":this.handlePointerup(t);break;case"focus":this.handleFocus();break;case"blur":this.handleBlur()}},this.host=t}onControlChange(t,e){for(const i of p)t?.removeEventListener(i,this.handleEvent),e?.addEventListener(i,this.handleEvent)}handlePointerenter(t){this.shouldReactToEvent(t)&&(this.host.hovered=!0)}handlePointerleave(t){this.shouldReactToEvent(t)&&(this.host.hovered=!1,this.state!==e&&this.endPressAnimation())}handlePointerup(t){if(this.shouldReactToEvent(t)){if(this.state!==s)return this.state===i?(this.state=n,void this.startPressAnimation(this.startEvent||void 0)):void 0;this.state=n}}async handlePointerdown(t){if(this.shouldReactToEvent(t)){if(this.startEvent=t,!this.isTouch(t))return this.state=n,void this.startPressAnimation(t);this.checkBoundsAfterContextMenu&&!this.inBounds(t)||(this.checkBoundsAfterContextMenu=!1,this.state=i,await new Promise(t=>{setTimeout(t,u)}),this.state===i&&(this.state=s,this.startPressAnimation(t)))}}handlePointercancel(t){this.shouldReactToEvent(t)&&this.endPressAnimation()}handleClick(){this.host.disabled||(this.state!==n?this.state===e&&(this.startPressAnimation(),this.endPressAnimation()):this.endPressAnimation())}handleContextmenu(){this.host.disabled||(this.checkBoundsAfterContextMenu=!0,this.endPressAnimation())}handleFocus(){this.host.disabled||(this.host.focused=!0)}handleBlur(){this.host.disabled||(this.host.focused=!1,this.state!==e&&this.endPressAnimation())}startPressAnimation(e){this.host.pressed=!0,this.growAnimation?.cancel(),this.determineRippleSize();const{startPoint:i,endPoint:s}=this.getTranslationCoordinates(e),n=`${i.x}px, ${i.y}px`,h=`${s.x}px, ${s.y}px`;null!==this.host&&(this.growAnimation=this.host.pressStateLayerElement.animate({top:[0,0],left:[0,0],height:[this.rippleSize,this.rippleSize],width:[this.rippleSize,this.rippleSize],transform:[`translate(${n}) scale(1)`,`translate(${h}) scale(${this.rippleScale})`]},{duration:o,easing:t.Standard,fill:c}))}getTranslationCoordinates(t){if(null===this.host)return;const{height:e,width:i}=this.host.getBoundingClientRect(),s={x:(i-this.initialSize)/2,y:(e-this.initialSize)/2};let n={x:i/2,y:e/2};return t instanceof PointerEvent&&(n=this.getNormalizedPointerEventCoords(t)),n={x:n.x-this.initialSize/2,y:n.y-this.initialSize/2},{startPoint:n,endPoint:s}}getNormalizedPointerEventCoords(t){if(null===this.host)return;const{scrollX:e,scrollY:i}=window,{left:s,top:n}=this.host.getBoundingClientRect(),o=e+s,h=i+n,{pageX:r,pageY:a}=t;return{x:r-o,y:a-h}}async endPressAnimation(){this.state=e;const t=this.growAnimation;let i=1/0;"number"==typeof t?.currentTime?i=t.currentTime:t?.currentTime&&(i=t.currentTime.to("ms").value),i>=h?this.host.pressed=!1:(await new Promise(t=>{setTimeout(t,h-i)}),this.growAnimation===t&&(this.host.pressed=!1))}determineRippleSize(){if(null===this.host)return;const{height:t,width:e}=this.host.getBoundingClientRect(),i=Math.max(t,e),s=Math.max(d*i,l),n=Math.floor(i*r),o=Math.sqrt(e**2+t**2)+a;this.initialSize=n,this.rippleScale=""+(o+s)/this.initialSize,this.rippleSize=`${this.initialSize}px`}inBounds({x:t,y:e}){if(null===this.host)return;const{top:i,left:s,bottom:n,right:o}=this.host.getBoundingClientRect();return t>=s&&t<=o&&e>=i&&e<=n}isTouch({pointerType:t}){return"touch"===t}shouldReactToEvent(t){if(this.host.disabled||!t.isPrimary)return!1;if(this.startEvent&&this.startEvent.pointerId!==t.pointerId)return!1;if("pointerenter"===t.type||"pointerleave"===t.type)return!this.isTouch(t);const e=1===t.buttons;return this.isTouch(t)||e}}export{m as RippleAction};
|