@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,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { LitElement } from 'lit';
|
|
7
|
+
import { type WithElementInternals } from '../behaviors/element-internals';
|
|
8
|
+
import type { MixinBase, MixinReturn } from '../behaviors/mixin';
|
|
9
|
+
/**
|
|
10
|
+
* A form-associated element.
|
|
11
|
+
*
|
|
12
|
+
* IMPORTANT: Requires declares for lit-analyzer
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const base = mixinFormAssociated(mixinElementInternals(LitElement));
|
|
16
|
+
* class MyControl extends base {
|
|
17
|
+
* // Writable mixin properties for lit-html binding, needed for lit-analyzer
|
|
18
|
+
* declare disabled: boolean;
|
|
19
|
+
* declare name: string;
|
|
20
|
+
* }
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export interface FormAssociated {
|
|
24
|
+
/**
|
|
25
|
+
* The associated form element with which this element's value will submit.
|
|
26
|
+
*/
|
|
27
|
+
readonly form: HTMLFormElement | null;
|
|
28
|
+
/**
|
|
29
|
+
* The labels this element is associated with.
|
|
30
|
+
*/
|
|
31
|
+
readonly labels: NodeList;
|
|
32
|
+
/**
|
|
33
|
+
* The HTML name to use in form submission.
|
|
34
|
+
*/
|
|
35
|
+
name: string;
|
|
36
|
+
/**
|
|
37
|
+
* Whether or not the element is disabled.
|
|
38
|
+
*/
|
|
39
|
+
disabled: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Gets the current form value of a component.
|
|
42
|
+
*
|
|
43
|
+
* @return The current form value.
|
|
44
|
+
*/
|
|
45
|
+
[getFormValue](): FormValue | null;
|
|
46
|
+
/**
|
|
47
|
+
* Gets the current form state of a component. Defaults to the component's
|
|
48
|
+
* `[formValue]`.
|
|
49
|
+
*
|
|
50
|
+
* Use this when the state of an element is different from its value, such as
|
|
51
|
+
* checkboxes (internal boolean state and a user string value).
|
|
52
|
+
*
|
|
53
|
+
* @return The current form state, defaults to the form value.
|
|
54
|
+
*/
|
|
55
|
+
[getFormState](): FormValue | null;
|
|
56
|
+
/**
|
|
57
|
+
* A callback for when a form component should be disabled or enabled. This
|
|
58
|
+
* can be called in a variety of situations, such as disabled `<fieldset>`s.
|
|
59
|
+
*
|
|
60
|
+
* @param disabled Whether or not the form control should be disabled.
|
|
61
|
+
*/
|
|
62
|
+
formDisabledCallback(disabled: boolean): void;
|
|
63
|
+
/**
|
|
64
|
+
* A callback for when the form requests to reset its value. Typically, the
|
|
65
|
+
* default value that is reset is represented in the attribute of an element.
|
|
66
|
+
*
|
|
67
|
+
* This means the attribute used for the value should not update as the value
|
|
68
|
+
* changes. For example, a checkbox should not change its default `checked`
|
|
69
|
+
* attribute when selected. Ensure form values do not reflect.
|
|
70
|
+
*/
|
|
71
|
+
formResetCallback(): void;
|
|
72
|
+
/**
|
|
73
|
+
* A callback for when the form restores the state of a component. For
|
|
74
|
+
* example, when a page is reloaded or forms are autofilled.
|
|
75
|
+
*
|
|
76
|
+
* @param state The state to restore, or null to reset the form control's
|
|
77
|
+
* value.
|
|
78
|
+
* @param reason The reason state was restored, either `'restore'` or
|
|
79
|
+
* `'autocomplete'`.
|
|
80
|
+
*/
|
|
81
|
+
formStateRestoreCallback(state: FormRestoreState | null, reason: FormRestoreReason): void;
|
|
82
|
+
/**
|
|
83
|
+
* An optional callback for when the associated form changes.
|
|
84
|
+
*
|
|
85
|
+
* @param form The new associated form, or `null` if there is none.
|
|
86
|
+
*/
|
|
87
|
+
formAssociatedCallback?(form: HTMLFormElement | null): void;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* The constructor of a `FormAssociated` element.
|
|
91
|
+
*/
|
|
92
|
+
export interface FormAssociatedConstructor {
|
|
93
|
+
/**
|
|
94
|
+
* Indicates that an element is participating in form association.
|
|
95
|
+
*/
|
|
96
|
+
readonly formAssociated: true;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* A symbol property to retrieve the form value for an element.
|
|
100
|
+
*/
|
|
101
|
+
export declare const getFormValue: unique symbol;
|
|
102
|
+
/**
|
|
103
|
+
* A symbol property to retrieve the form state for an element.
|
|
104
|
+
*/
|
|
105
|
+
export declare const getFormState: unique symbol;
|
|
106
|
+
/**
|
|
107
|
+
* Mixes in form-associated behavior for a class. This allows an element to add
|
|
108
|
+
* values to `<form>` elements.
|
|
109
|
+
*
|
|
110
|
+
* Implementing classes should provide a `[formValue]` to return the current
|
|
111
|
+
* value of the element, as well as reset and restore callbacks.
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* ```ts
|
|
115
|
+
* const base = mixinFormAssociated(mixinElementInternals(LitElement));
|
|
116
|
+
*
|
|
117
|
+
* class MyControl extends base {
|
|
118
|
+
* \@property()
|
|
119
|
+
* value = '';
|
|
120
|
+
*
|
|
121
|
+
* override [getFormValue]() {
|
|
122
|
+
* return this.value;
|
|
123
|
+
* }
|
|
124
|
+
*
|
|
125
|
+
* override formResetCallback() {
|
|
126
|
+
* const defaultValue = this.getAttribute('value');
|
|
127
|
+
* this.value = defaultValue;
|
|
128
|
+
* }
|
|
129
|
+
*
|
|
130
|
+
* override formStateRestoreCallback(state: string) {
|
|
131
|
+
* this.value = state;
|
|
132
|
+
* }
|
|
133
|
+
* }
|
|
134
|
+
* ```
|
|
135
|
+
*
|
|
136
|
+
* Elements may optionally provide a `[formState]` if their values do not
|
|
137
|
+
* represent the state of the component.
|
|
138
|
+
*
|
|
139
|
+
* @example
|
|
140
|
+
* ```ts
|
|
141
|
+
* const base = mixinFormAssociated(mixinElementInternals(LitElement));
|
|
142
|
+
*
|
|
143
|
+
* class MyCheckbox extends base {
|
|
144
|
+
* \@property()
|
|
145
|
+
* value = 'on';
|
|
146
|
+
*
|
|
147
|
+
* \@property({type: Boolean})
|
|
148
|
+
* checked = false;
|
|
149
|
+
*
|
|
150
|
+
* override [getFormValue]() {
|
|
151
|
+
* return this.checked ? this.value : null;
|
|
152
|
+
* }
|
|
153
|
+
*
|
|
154
|
+
* override [getFormState]() {
|
|
155
|
+
* return String(this.checked);
|
|
156
|
+
* }
|
|
157
|
+
*
|
|
158
|
+
* override formResetCallback() {
|
|
159
|
+
* const defaultValue = this.hasAttribute('checked');
|
|
160
|
+
* this.checked = defaultValue;
|
|
161
|
+
* }
|
|
162
|
+
*
|
|
163
|
+
* override formStateRestoreCallback(state: string) {
|
|
164
|
+
* this.checked = Boolean(state);
|
|
165
|
+
* }
|
|
166
|
+
* }
|
|
167
|
+
* ```
|
|
168
|
+
*
|
|
169
|
+
* IMPORTANT: Requires declares for lit-analyzer
|
|
170
|
+
* @example
|
|
171
|
+
* ```ts
|
|
172
|
+
* const base = mixinFormAssociated(mixinElementInternals(LitElement));
|
|
173
|
+
* class MyControl extends base {
|
|
174
|
+
* // Writable mixin properties for lit-html binding, needed for lit-analyzer
|
|
175
|
+
* declare disabled: boolean;
|
|
176
|
+
* declare name: string;
|
|
177
|
+
* }
|
|
178
|
+
* ```
|
|
179
|
+
*
|
|
180
|
+
* @param base The class to mix functionality into. The base class must use
|
|
181
|
+
* `mixinElementInternals()`.
|
|
182
|
+
* @return The provided class with `FormAssociated` mixed in.
|
|
183
|
+
*/
|
|
184
|
+
export declare function mixinFormAssociated<T extends MixinBase<LitElement & WithElementInternals>>(base: T): MixinReturn<T & FormAssociatedConstructor, FormAssociated>;
|
|
185
|
+
/**
|
|
186
|
+
* A value that can be provided for form submission and state.
|
|
187
|
+
*/
|
|
188
|
+
export type FormValue = File | string | FormData;
|
|
189
|
+
/**
|
|
190
|
+
* A value to be restored for a component's form value. If a component's form
|
|
191
|
+
* state is a `FormData` object, its entry list of name and values will be
|
|
192
|
+
* provided.
|
|
193
|
+
*/
|
|
194
|
+
export type FormRestoreState = File | string | Array<[string, FormDataEntryValue]>;
|
|
195
|
+
/**
|
|
196
|
+
* The reason a form component is being restored for, either `'restore'` for
|
|
197
|
+
* browser restoration or `'autocomplete'` for restoring user values.
|
|
198
|
+
*/
|
|
199
|
+
export type FormRestoreReason = 'restore' | 'autocomplete';
|
|
200
|
+
//# sourceMappingURL=form-associated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-associated.d.ts","sourceRoot":"","sources":["../../../src/utils/form/form-associated.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAA4B,MAAM,KAAK,CAAA;AAE1D,OAAO,EAAE,KAAK,oBAAoB,EAAa,MAAM,gCAAgC,CAAA;AACrF,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAEhE;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,cAAc;IAC3B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,CAAA;IAErC;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAA;IAEzB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IAEZ;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAA;IAEjB;;;;OAIG;IACH,CAAC,YAAY,CAAC,IAAI,SAAS,GAAG,IAAI,CAAA;IAElC;;;;;;;;OAQG;IACH,CAAC,YAAY,CAAC,IAAI,SAAS,GAAG,IAAI,CAAA;IAElC;;;;;OAKG;IACH,oBAAoB,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAAA;IAE7C;;;;;;;OAOG;IACH,iBAAiB,IAAI,IAAI,CAAA;IAEzB;;;;;;;;OAQG;IACH,wBAAwB,CACpB,KAAK,EAAE,gBAAgB,GAAG,IAAI,EAC9B,MAAM,EAAE,iBAAiB,GAC1B,IAAI,CAAA;IAEP;;;;OAIG;IACH,sBAAsB,CAAC,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,GAAG,IAAI,CAAA;CAC9D;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC;;OAEG;IACH,QAAQ,CAAC,cAAc,EAAE,IAAI,CAAA;CAChC;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,eAAyB,CAAA;AAElD;;GAEG;AACH,eAAO,MAAM,YAAY,eAAyB,CAAA;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6EG;AACH,wBAAgB,mBAAmB,CAC/B,CAAC,SAAS,SAAS,CAAC,UAAU,GAAG,oBAAoB,CAAC,EACxD,IAAI,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,GAAG,yBAAyB,EAAE,cAAc,CAAC,CAqGrE;AAED;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,MAAM,GAAG,QAAQ,CAAA;AAEhD;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GACtB,IAAI,GACJ,MAAM,GACN,KAAK,CAAC,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAA;AAEzC;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,cAAc,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as t}from"../../tslib.es6-CmLYFWVC.js";import"../../lit-element-Ho-VPzO1.js";import{n as e}from"../../property-Ck1wIidx.js";import{internals as s}from"../behaviors/element-internals.js";const r=Symbol("getFormValue"),a=Symbol("getFormState");function i(i){class l extends i{static{this.formAssociated=!0}get form(){return this[s].form}get labels(){return this[s].labels}get name(){return this.getAttribute("name")??""}set name(t){this.setAttribute("name",t)}get disabled(){return this.hasAttribute("disabled")}set disabled(t){this.toggleAttribute("disabled",t)}attributeChangedCallback(t,e,s){if("name"===t||"disabled"===t){const s="disabled"===t?null!==e:e;return void this.requestUpdate(t,s)}super.attributeChangedCallback(t,e,s)}requestUpdate(t,e,i){super.requestUpdate(t,e,i),this[s].setFormValue(this[r](),this[a]())}[r](){throw new Error("Implement [getFormValue]")}[a](){return this[r]()}formDisabledCallback(t){this.disabled=t}}return t([e({noAccessor:!0})],l.prototype,"name",null),t([e({type:Boolean,noAccessor:!0})],l.prototype,"disabled",null),l}export{a as getFormState,r as getFormValue,i as mixinFormAssociated};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2024 Kai-Orion & Sandlada
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* OnPrimary -> on-primary
|
|
8
|
+
*/
|
|
9
|
+
export declare function toKebabCase<T extends string>(str: T): KebabCase<T>;
|
|
10
|
+
export type KebabCase<S extends string> = S extends `${infer T}${infer U}` ? U extends Uncapitalize<U> ? `${Lowercase<T>}${KebabCase<U>}` : `${Lowercase<T>}-${KebabCase<U>}` : S;
|
|
11
|
+
//# sourceMappingURL=to-kebab-case.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"to-kebab-case.d.ts","sourceRoot":"","sources":["../../../src/utils/string/to-kebab-case.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,GAAG,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAMlE;AAED,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,GAAG,MAAM,CAAC,EAAE,GACpE,CAAC,SAAS,YAAY,CAAC,CAAC,CAAC,GACzB,GAAG,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,GAChC,GAAG,SAAS,CAAC,CAAC,CAAC,IAAI,SAAS,CAAC,CAAC,CAAC,EAAE,GACjC,CAAC,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Kai-Orion & Sandlada
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
type LogicShapeSuffix = '-start-start' | '-start-end' | '-end-end' | '-end-start';
|
|
7
|
+
type SelectedKeys<T, K extends Array<keyof T> | 'all'> = K extends 'all' ? keyof T : K[number];
|
|
8
|
+
type GeneratedShapeTokens<T extends Record<PropertyKey, unknown>, K extends Array<keyof T> | 'all', Wrapped extends boolean> = {
|
|
9
|
+
[P in SelectedKeys<T, K> as `${Wrapped extends true ? `--_${string & P}` : string & P}${LogicShapeSuffix}`]: string;
|
|
10
|
+
};
|
|
11
|
+
export declare function createLogicShapeTokens<T extends Record<PropertyKey, string | null>, K extends Array<keyof T> | 'all'>(prefix: string, allTokens: T, shapeTokenKeys: K, wrapped?: true): GeneratedShapeTokens<T, K, true>;
|
|
12
|
+
export declare function createLogicShapeTokens<T extends Record<PropertyKey, string | null>, K extends Array<keyof T> | 'all'>(prefix: string, allTokens: T, shapeTokenKeys: K, wrapped: false): GeneratedShapeTokens<T, K, false>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=create-logic-shape-tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-logic-shape-tokens.d.ts","sourceRoot":"","sources":["../../../src/utils/tokens/create-logic-shape-tokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,KAAK,gBAAgB,GAAG,cAAc,GAAG,YAAY,GAAG,UAAU,GAAG,YAAY,CAAA;AACjF,KAAK,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC,SAAS,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAA;AAC9F,KAAK,oBAAoB,CACrB,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,EACtC,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,EAChC,OAAO,SAAS,OAAO,IACvB;KAAG,CAAC,IAAI,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,GAAG,OAAO,SAAS,IAAI,GAAG,MAAM,MAAM,GAAG,CAAC,EAAE,GAAG,MAAM,GAAG,CAAC,GAAG,gBAAgB,EAAE,GAAG,MAAM;CAAE,CAAA;AAE3H,wBAAgB,sBAAsB,CAClC,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC,EAC5C,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,EAEhC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,CAAC,EACZ,cAAc,EAAE,CAAC,EACjB,OAAO,CAAC,EAAE,IAAI,GACf,oBAAoB,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CAAA;AAEnC,wBAAgB,sBAAsB,CAClC,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC,EAC5C,CAAC,SAAS,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,KAAK,EAEhC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,CAAC,EACZ,cAAc,EAAE,CAAC,EACjB,OAAO,EAAE,KAAK,GACf,oBAAoB,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAA"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Kai-Orion & Sandlada
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
function $($,t,r,e=!0){const a="all"===r?Object.keys(t):r;return Object.entries(t).filter(([$,t])=>a.includes($)).reduce((t,[r,a])=>{const n=(e?"--_":"")+r;return{...t,[`${n}-start-start`]:`${e?`var(${$}-${r}-start-start, `:""}var(${$}-${r}, ${a})${e?")":""}`,[`${n}-start-end`]:`${e?`var(${$}-${r}-start-end, `:""}var(${$}-${r}, ${a})${e?")":""}`,[`${n}-end-end`]:`${e?`var(${$}-${r}-end-end, `:""}var(${$}-${r}, ${a})${e?")":""}`,[`${n}-end-start`]:`${e?`var(${$}-${r}-end-start, `:""}var(${$}-${r}, ${a})${e?")":""}`}},{})}export{$ as createLogicShapeTokens};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Kai-Orion & Sandlada
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Before:
|
|
8
|
+
* createVar(['--color', '--palette-red-5'], '#000')
|
|
9
|
+
*
|
|
10
|
+
* After:
|
|
11
|
+
* var(--color, var(--palette-red-5, #000))
|
|
12
|
+
*/
|
|
13
|
+
export declare function createVar(vars: string[], value: string): string;
|
|
14
|
+
//# sourceMappingURL=create-var.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-var.d.ts","sourceRoot":"","sources":["../../../src/utils/tokens/create-var.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,UAEtD"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Kai-Orion & Sandlada
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
import { CSSResult } from 'lit';
|
|
7
|
+
/**
|
|
8
|
+
* A record object used to convert a component definition into a CSS-usable one.
|
|
9
|
+
*
|
|
10
|
+
* ```
|
|
11
|
+
* {
|
|
12
|
+
* // Before:
|
|
13
|
+
* `container-color`: `red`
|
|
14
|
+
* }
|
|
15
|
+
* {
|
|
16
|
+
* // After:
|
|
17
|
+
* [`--_container-color`]: unsafeCSS(`var(--md-filled-button-container-color, red)`)
|
|
18
|
+
* }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare function createWrappedTokens<T extends Record<PropertyKey, any>>(prefix: string, tokens: T): {
|
|
22
|
+
[P in keyof T as `--_${string & P}`]: CSSResult;
|
|
23
|
+
};
|
|
24
|
+
export declare function createTokenObject<T extends Record<PropertyKey, string>>(tokens: T): void;
|
|
25
|
+
//# sourceMappingURL=create-wrapped-tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-wrapped-tokens.d.ts","sourceRoot":"","sources":["../../../src/utils/tokens/create-wrapped-tokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,SAAS,EAAa,MAAM,KAAK,CAAA;AAE1C;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,GAAG,CAAC,EAClE,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,CAAC,GACV;KAAG,CAAC,IAAI,MAAM,CAAC,IAAI,MAAM,MAAM,GAAG,CAAC,EAAE,GAAG,SAAS;CAAE,CAIrD;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,QAEjF"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{r as e}from"../../lit-element-Ho-VPzO1.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2025 Kai-Orion & Sandlada
|
|
5
|
+
* SPDX-License-Identifier: MIT
|
|
6
|
+
*/function t(t,r){return Object.entries(r).reduce((r,[n,i])=>({...r,[`--_${n}`]:e(`var(${t}-${n}, ${i})`)}),{})}function r(e){}export{r as createTokenObject,t as createWrappedTokens};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Kai-Orion & Sandlada
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
export declare function excludeTokens<T extends Record<PropertyKey, string | null>>(tokens: T, excludeTokens: Array<keyof T>): {};
|
|
7
|
+
//# sourceMappingURL=exclude-tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exclude-tokens.d.ts","sourceRoot":"","sources":["../../../src/utils/tokens/exclude-tokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC,EACtE,MAAM,EAAE,CAAC,EACT,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,MAMhC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Kai-Orion & Sandlada
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
export * from './create-logic-shape-tokens';
|
|
7
|
+
export * from './create-var';
|
|
8
|
+
export * from './create-wrapped-tokens';
|
|
9
|
+
export * from './exclude-tokens';
|
|
10
|
+
export * from './override-component-tokens';
|
|
11
|
+
export * from './string-tokens';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/tokens/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,cAAc,6BAA6B,CAAA;AAC3C,cAAc,cAAc,CAAA;AAC5B,cAAc,yBAAyB,CAAA;AACvC,cAAc,kBAAkB,CAAA;AAChC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{createLogicShapeTokens}from"./create-logic-shape-tokens.js";export{createVar}from"./create-var.js";export{createTokenObject,createWrappedTokens}from"./create-wrapped-tokens.js";export{excludeTokens}from"./exclude-tokens.js";export{overrideComponentTokens}from"./override-component-tokens.js";export{stringTokens}from"./string-tokens.js";import"../../lit-element-Ho-VPzO1.js";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Kai-Orion & Sandlada
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* A user-side function dedicated to creating component CSS variables.
|
|
8
|
+
*
|
|
9
|
+
* You must manually pass in a component type that
|
|
10
|
+
* represents the CSS variable you want to override, such as `keyof typeof RippleDefinition`.
|
|
11
|
+
*
|
|
12
|
+
* ```typescript
|
|
13
|
+
* overrideComponentTokens<keyof typeof RippleDefinition>(
|
|
14
|
+
* `--mdc-filled`,
|
|
15
|
+
* {
|
|
16
|
+
* [`hovered-color`]: `red`,
|
|
17
|
+
* [`hovered-opacity`]: `0.32`,
|
|
18
|
+
* }
|
|
19
|
+
* )
|
|
20
|
+
*
|
|
21
|
+
* // Result
|
|
22
|
+
* {
|
|
23
|
+
* `--mdc-ripple-hovered-color`: `red`,
|
|
24
|
+
* `--mdc-ripple-hovered-opacity`: `0.32`
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
* @param prefix The CSS variable prefix of the component you want to override, for example `--mdc-ripple`.
|
|
28
|
+
* @param tokens The variable name of the component you want to override.
|
|
29
|
+
* @returns A record object. Need to be converted into a CSS string using stringTokens wrapper.
|
|
30
|
+
*/
|
|
31
|
+
export declare function overrideComponentTokens<T extends PropertyKey>(prefix: string, tokens: Partial<{
|
|
32
|
+
[K in T]: string;
|
|
33
|
+
}>): {};
|
|
34
|
+
//# sourceMappingURL=override-component-tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"override-component-tokens.d.ts","sourceRoot":"","sources":["../../../src/utils/tokens/override-component-tokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,WAAW,EACzD,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,OAAO,CAAC;KAAG,CAAC,IAAI,CAAC,GAAG,MAAM;CAAE,CAAC,MAKxC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Kai-Orion & Sandlada
|
|
4
|
+
* SPDX-License-Identifier: MIT
|
|
5
|
+
*/
|
|
6
|
+
import { type CSSResult } from 'lit';
|
|
7
|
+
/**
|
|
8
|
+
* Stringify the record object and separate it with semicolons.
|
|
9
|
+
*
|
|
10
|
+
* @param tokens A record object. It is best to use the creation functions provided in `utils/tokens/*`.
|
|
11
|
+
* @returns CSS string.
|
|
12
|
+
*/
|
|
13
|
+
export declare function stringTokens(tokens: Record<string, CSSResult>): CSSResult;
|
|
14
|
+
//# sourceMappingURL=string-tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"string-tokens.d.ts","sourceRoot":"","sources":["../../../src/utils/tokens/string-tokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,KAAK,CAAA;AAE/C;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,aAE7D"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license CC BY-SA 4.0
|
|
3
|
+
* @link https://stackoverflow.com/a/8809472/
|
|
4
|
+
* @author Briguy37
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* @deprecated
|
|
8
|
+
* Please use `self.crypto.randomUUID()` instead of `generateUUID()`.
|
|
9
|
+
*
|
|
10
|
+
* Generates a unique identifier.
|
|
11
|
+
*
|
|
12
|
+
* `self.crypto.randomUUID()` is well established and works across many devices and browser versions.
|
|
13
|
+
* It’s been available across browsers since March 2022.
|
|
14
|
+
*
|
|
15
|
+
* @link
|
|
16
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID
|
|
17
|
+
*/
|
|
18
|
+
export declare function generateUUID(): string;
|
|
19
|
+
//# sourceMappingURL=generate-uuid.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-uuid.d.ts","sourceRoot":"","sources":["../../../src/utils/uuid/generate-uuid.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,WAc3B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license CC BY-SA 4.0
|
|
3
|
+
* @link https://stackoverflow.com/a/8809472/
|
|
4
|
+
* @author Briguy37
|
|
5
|
+
*/
|
|
6
|
+
function x(){var x=(new Date).getTime(),e="undefined"!=typeof performance&&performance.now&&1e3*performance.now()||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){var n=16*Math.random();return x>0?(n=(x+n)%16|0,x=Math.floor(x/16)):(n=(e+n)%16|0,e=Math.floor(e/16)),("x"===r?n:3&n|8).toString(16)})}export{x as generateUUID};
|
package/build/utils.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,cAAc,0CAA0C,CAAA;AACxD,cAAc,gBAAgB,CAAA"}
|
package/build/utils.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{AttachableController}from"./utils/controller/attachable-controller.js";export{createLogicShapeTokens}from"./utils/tokens/create-logic-shape-tokens.js";export{createVar}from"./utils/tokens/create-var.js";export{createTokenObject,createWrappedTokens}from"./utils/tokens/create-wrapped-tokens.js";export{excludeTokens}from"./utils/tokens/exclude-tokens.js";export{overrideComponentTokens}from"./utils/tokens/override-component-tokens.js";export{stringTokens}from"./utils/tokens/string-tokens.js";import"./lit-element-Ho-VPzO1.js";
|
package/package.json
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sandlada/mdc",
|
|
3
|
+
"version": "0.1.0-20250907.a",
|
|
4
|
+
"author": "Kai-Orion & Sandlada",
|
|
5
|
+
"description": "@sandlada/mdc is an open source component library that follows the Material Design 3 design specifications.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/sandlada/mdc.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/sandlada/mdc/issues"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://mdc.sandlada.com",
|
|
15
|
+
"keywords": [
|
|
16
|
+
"cross-framework",
|
|
17
|
+
"web-components",
|
|
18
|
+
"material",
|
|
19
|
+
"material-web",
|
|
20
|
+
"material-web-components",
|
|
21
|
+
"material-design",
|
|
22
|
+
"material-expressive",
|
|
23
|
+
"material-you",
|
|
24
|
+
"component-library",
|
|
25
|
+
"ui"
|
|
26
|
+
],
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
30
|
+
"type": "module",
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"lit": "^3.3.0"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
36
|
+
"@rollup/plugin-terser": "^0.4.4",
|
|
37
|
+
"@rollup/plugin-typescript": "^12.1.4",
|
|
38
|
+
"@sandlada/mdk": "^1.0.5",
|
|
39
|
+
"autoprefixer": "^10.4.21",
|
|
40
|
+
"rollup": "^4.44.2",
|
|
41
|
+
"rollup-plugin-html-literals": "^2.0.0",
|
|
42
|
+
"terser": "^5.43.1",
|
|
43
|
+
"tslib": "^2.8.1",
|
|
44
|
+
"typescript": "~5.8.3",
|
|
45
|
+
"vite": "^7.0.3"
|
|
46
|
+
},
|
|
47
|
+
"files": [
|
|
48
|
+
"build/**/*",
|
|
49
|
+
"LICENSES/**/*",
|
|
50
|
+
"LICENSE",
|
|
51
|
+
"README.md"
|
|
52
|
+
],
|
|
53
|
+
"exports": {
|
|
54
|
+
"./*": {
|
|
55
|
+
"import": "./*",
|
|
56
|
+
"default": "./*"
|
|
57
|
+
},
|
|
58
|
+
"./definitions": {
|
|
59
|
+
"import": "./build/definitions.js",
|
|
60
|
+
"types": "./build/definitions.d.ts",
|
|
61
|
+
"default": "./build/definitions.js"
|
|
62
|
+
},
|
|
63
|
+
"./utils": {
|
|
64
|
+
"import": "./build/utils.js",
|
|
65
|
+
"types": "./build/utils.d.ts",
|
|
66
|
+
"default": "./build/utils.js"
|
|
67
|
+
},
|
|
68
|
+
"./all": {
|
|
69
|
+
"import": "./build/all.js",
|
|
70
|
+
"types": "./build/all.d.ts",
|
|
71
|
+
"default": "./build/all.js"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|