@universityofmaryland/web-model-library 1.0.0 → 1.0.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/_virtual/___vite-browser-external.js +6 -7
- package/dist/_virtual/___vite-browser-external.js.map +1 -1
- package/dist/_virtual/__vite-browser-external.js +3 -2
- package/dist/_virtual/__vite-browser-external.js.map +1 -1
- package/dist/_virtual/_commonjsHelpers.js +4 -4
- package/dist/_virtual/_commonjsHelpers.js.map +1 -1
- package/dist/_virtual/index.js +7 -6
- package/dist/_virtual/index.js.map +1 -1
- package/dist/_virtual/picocolors.browser.js +3 -3
- package/dist/_virtual/picocolors.browser.js.map +1 -1
- package/dist/_virtual/postcss.js +7 -6
- package/dist/_virtual/postcss.js.map +1 -1
- package/dist/_virtual/symbols.js +3 -3
- package/dist/_virtual/symbols.js.map +1 -1
- package/dist/attributes/checks.d.ts +5 -6
- package/dist/attributes/checks.d.ts.map +1 -1
- package/dist/attributes/checks.js +338 -340
- package/dist/attributes/checks.js.map +1 -1
- package/dist/attributes/handler.d.ts +1 -2
- package/dist/attributes/handler.d.ts.map +1 -1
- package/dist/attributes/handler.js +20 -19
- package/dist/attributes/handler.js.map +1 -1
- package/dist/attributes/index.d.ts +4 -4
- package/dist/attributes/index.d.ts.map +1 -1
- package/dist/attributes/names.d.ts +4 -6
- package/dist/attributes/names.d.ts.map +1 -1
- package/dist/attributes/names.js +7 -8
- package/dist/attributes/names.js.map +1 -1
- package/dist/attributes/values.d.ts +13 -11
- package/dist/attributes/values.d.ts.map +1 -1
- package/dist/attributes/values.js +7 -3
- package/dist/attributes/values.js.map +1 -1
- package/dist/attributes.js +21 -22
- package/dist/attributes.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -12
- package/dist/index.js.map +1 -1
- package/dist/model.js +7 -7
- package/dist/model.js.map +1 -1
- package/dist/node_modules/nanoid/non-secure/index.js +3 -3
- package/dist/node_modules/nanoid/non-secure/index.js.map +1 -1
- package/dist/node_modules/picocolors/picocolors.browser.js +8 -8
- package/dist/node_modules/picocolors/picocolors.browser.js.map +1 -1
- package/dist/node_modules/postcss/lib/at-rule.js +5 -5
- package/dist/node_modules/postcss/lib/at-rule.js.map +1 -1
- package/dist/node_modules/postcss/lib/comment.js +5 -5
- package/dist/node_modules/postcss/lib/comment.js.map +1 -1
- package/dist/node_modules/postcss/lib/container.js +69 -62
- package/dist/node_modules/postcss/lib/container.js.map +1 -1
- package/dist/node_modules/postcss/lib/css-syntax-error.js +30 -19
- package/dist/node_modules/postcss/lib/css-syntax-error.js.map +1 -1
- package/dist/node_modules/postcss/lib/declaration.js +8 -8
- package/dist/node_modules/postcss/lib/declaration.js.map +1 -1
- package/dist/node_modules/postcss/lib/document.js +5 -5
- package/dist/node_modules/postcss/lib/document.js.map +1 -1
- package/dist/node_modules/postcss/lib/fromJSON.js +19 -19
- package/dist/node_modules/postcss/lib/fromJSON.js.map +1 -1
- package/dist/node_modules/postcss/lib/input.js +51 -37
- package/dist/node_modules/postcss/lib/input.js.map +1 -1
- package/dist/node_modules/postcss/lib/lazy-result.js +67 -67
- package/dist/node_modules/postcss/lib/lazy-result.js.map +1 -1
- package/dist/node_modules/postcss/lib/list.js +3 -3
- package/dist/node_modules/postcss/lib/list.js.map +1 -1
- package/dist/node_modules/postcss/lib/map-generator.js +27 -18
- package/dist/node_modules/postcss/lib/map-generator.js.map +1 -1
- package/dist/node_modules/postcss/lib/no-work-result.js +54 -51
- package/dist/node_modules/postcss/lib/no-work-result.js.map +1 -1
- package/dist/node_modules/postcss/lib/node.js +91 -38
- package/dist/node_modules/postcss/lib/node.js.map +1 -1
- package/dist/node_modules/postcss/lib/parse.js +13 -13
- package/dist/node_modules/postcss/lib/parse.js.map +1 -1
- package/dist/node_modules/postcss/lib/parser.js +21 -20
- package/dist/node_modules/postcss/lib/parser.js.map +1 -1
- package/dist/node_modules/postcss/lib/postcss.js +4 -3
- package/dist/node_modules/postcss/lib/postcss.js.map +1 -1
- package/dist/node_modules/postcss/lib/postcss2.js +43 -43
- package/dist/node_modules/postcss/lib/postcss2.js.map +1 -1
- package/dist/node_modules/postcss/lib/previous-map.js +14 -12
- package/dist/node_modules/postcss/lib/previous-map.js.map +1 -1
- package/dist/node_modules/postcss/lib/processor.js +13 -13
- package/dist/node_modules/postcss/lib/processor.js.map +1 -1
- package/dist/node_modules/postcss/lib/result.js +12 -12
- package/dist/node_modules/postcss/lib/result.js.map +1 -1
- package/dist/node_modules/postcss/lib/root.js +5 -5
- package/dist/node_modules/postcss/lib/root.js.map +1 -1
- package/dist/node_modules/postcss/lib/rule.js +13 -13
- package/dist/node_modules/postcss/lib/rule.js.map +1 -1
- package/dist/node_modules/postcss/lib/stringifier.js +3 -3
- package/dist/node_modules/postcss/lib/stringifier.js.map +1 -1
- package/dist/node_modules/postcss/lib/stringify.js +5 -5
- package/dist/node_modules/postcss/lib/stringify.js.map +1 -1
- package/dist/node_modules/postcss/lib/symbols.js +8 -8
- package/dist/node_modules/postcss/lib/symbols.js.map +1 -1
- package/dist/node_modules/postcss/lib/tokenize.js +5 -5
- package/dist/node_modules/postcss/lib/tokenize.js.map +1 -1
- package/dist/node_modules/postcss/lib/warning.js +3 -3
- package/dist/node_modules/postcss/lib/warning.js.map +1 -1
- package/dist/packages/model/node_modules/postcss-discard-duplicates/src/index.js +3 -3
- package/dist/packages/model/node_modules/postcss-discard-duplicates/src/index.js.map +1 -1
- package/dist/slots/create.js +3 -3
- package/dist/slots/create.js.map +1 -1
- package/dist/slots/element.js +3 -3
- package/dist/slots/element.js.map +1 -1
- package/dist/slots/index.d.ts +23 -16
- package/dist/slots/index.d.ts.map +1 -1
- package/dist/slots/mapping.d.ts +4 -0
- package/dist/slots/mapping.d.ts.map +1 -1
- package/dist/slots/mapping.js +8 -4
- package/dist/slots/mapping.js.map +1 -1
- package/dist/slots.d.ts +0 -4
- package/dist/slots.js +41 -36
- package/dist/slots.js.map +1 -1
- package/dist/utilities/index.d.ts +1 -1
- package/dist/utilities/index.d.ts.map +1 -1
- package/dist/utilities/lifecycle.js +4 -4
- package/dist/utilities/lifecycle.js.map +1 -1
- package/dist/utilities/register.js +6 -6
- package/dist/utilities/register.js.map +1 -1
- package/dist/utilities/styles.d.ts +1 -2
- package/dist/utilities/styles.d.ts.map +1 -1
- package/dist/utilities/styles.js +15 -10
- package/dist/utilities/styles.js.map +1 -1
- package/dist/utilities.js +10 -10
- package/dist/utilities.js.map +1 -1
- package/package.json +13 -12
- package/dist/_virtual/___vite-browser-external.mjs +0 -7
- package/dist/_virtual/___vite-browser-external.mjs.map +0 -1
- package/dist/_virtual/__vite-browser-external.mjs +0 -5
- package/dist/_virtual/__vite-browser-external.mjs.map +0 -1
- package/dist/_virtual/_commonjsHelpers.mjs +0 -37
- package/dist/_virtual/_commonjsHelpers.mjs.map +0 -1
- package/dist/_virtual/index.mjs +0 -8
- package/dist/_virtual/index.mjs.map +0 -1
- package/dist/_virtual/picocolors.browser.mjs +0 -5
- package/dist/_virtual/picocolors.browser.mjs.map +0 -1
- package/dist/_virtual/postcss.mjs +0 -8
- package/dist/_virtual/postcss.mjs.map +0 -1
- package/dist/_virtual/symbols.mjs +0 -5
- package/dist/_virtual/symbols.mjs.map +0 -1
- package/dist/attributes/checks.mjs +0 -740
- package/dist/attributes/checks.mjs.map +0 -1
- package/dist/attributes/handler.mjs +0 -206
- package/dist/attributes/handler.mjs.map +0 -1
- package/dist/attributes/names.mjs +0 -146
- package/dist/attributes/names.mjs.map +0 -1
- package/dist/attributes/values.mjs +0 -81
- package/dist/attributes/values.mjs.map +0 -1
- package/dist/attributes.mjs +0 -23
- package/dist/attributes.mjs.map +0 -1
- package/dist/index.mjs +0 -13
- package/dist/index.mjs.map +0 -1
- package/dist/model.mjs +0 -259
- package/dist/model.mjs.map +0 -1
- package/dist/node_modules/nanoid/non-secure/index.mjs +0 -31
- package/dist/node_modules/nanoid/non-secure/index.mjs.map +0 -1
- package/dist/node_modules/picocolors/picocolors.browser.mjs +0 -17
- package/dist/node_modules/picocolors/picocolors.browser.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/at-rule.mjs +0 -30
- package/dist/node_modules/postcss/lib/at-rule.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/comment.mjs +0 -21
- package/dist/node_modules/postcss/lib/comment.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/container.mjs +0 -383
- package/dist/node_modules/postcss/lib/container.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/css-syntax-error.mjs +0 -92
- package/dist/node_modules/postcss/lib/css-syntax-error.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/declaration.mjs +0 -27
- package/dist/node_modules/postcss/lib/declaration.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/document.mjs +0 -34
- package/dist/node_modules/postcss/lib/document.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/fromJSON.mjs +0 -67
- package/dist/node_modules/postcss/lib/fromJSON.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/input.mjs +0 -216
- package/dist/node_modules/postcss/lib/input.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/lazy-result.mjs +0 -467
- package/dist/node_modules/postcss/lib/lazy-result.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/list.mjs +0 -60
- package/dist/node_modules/postcss/lib/list.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/map-generator.mjs +0 -314
- package/dist/node_modules/postcss/lib/map-generator.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/no-work-result.mjs +0 -113
- package/dist/node_modules/postcss/lib/no-work-result.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/node.mjs +0 -335
- package/dist/node_modules/postcss/lib/node.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/parse.mjs +0 -30
- package/dist/node_modules/postcss/lib/parse.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/parser.mjs +0 -543
- package/dist/node_modules/postcss/lib/parser.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/postcss.mjs +0 -29
- package/dist/node_modules/postcss/lib/postcss.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/postcss2.mjs +0 -110
- package/dist/node_modules/postcss/lib/postcss2.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/previous-map.mjs +0 -123
- package/dist/node_modules/postcss/lib/previous-map.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/processor.mjs +0 -61
- package/dist/node_modules/postcss/lib/processor.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/result.mjs +0 -44
- package/dist/node_modules/postcss/lib/result.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/root.mjs +0 -58
- package/dist/node_modules/postcss/lib/root.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/rule.mjs +0 -33
- package/dist/node_modules/postcss/lib/rule.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/stringifier.mjs +0 -308
- package/dist/node_modules/postcss/lib/stringifier.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/stringify.mjs +0 -19
- package/dist/node_modules/postcss/lib/stringify.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/symbols.mjs +0 -13
- package/dist/node_modules/postcss/lib/symbols.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/tokenize.mjs +0 -219
- package/dist/node_modules/postcss/lib/tokenize.mjs.map +0 -1
- package/dist/node_modules/postcss/lib/warning.mjs +0 -40
- package/dist/node_modules/postcss/lib/warning.mjs.map +0 -1
- package/dist/packages/model/node_modules/postcss-discard-duplicates/src/index.mjs +0 -130
- package/dist/packages/model/node_modules/postcss-discard-duplicates/src/index.mjs.map +0 -1
- package/dist/slots/create.mjs +0 -50
- package/dist/slots/create.mjs.map +0 -1
- package/dist/slots/element.mjs +0 -42
- package/dist/slots/element.mjs.map +0 -1
- package/dist/slots/mapping.mjs +0 -97
- package/dist/slots/mapping.mjs.map +0 -1
- package/dist/slots.mjs +0 -74
- package/dist/slots.mjs.map +0 -1
- package/dist/utilities/lifecycle.mjs +0 -21
- package/dist/utilities/lifecycle.mjs.map +0 -1
- package/dist/utilities/register.mjs +0 -32
- package/dist/utilities/register.mjs.map +0 -1
- package/dist/utilities/styles.mjs +0 -80
- package/dist/utilities/styles.mjs.map +0 -1
- package/dist/utilities.mjs +0 -11
- package/dist/utilities.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checks.js","sources":["../../source/attributes/checks.ts"],"sourcesContent":["/**\n * Attribute Check Utilities\n *\n * Provides a comprehensive set of functions to check attribute states on HTML elements.\n * These utilities form the foundation of the component attribute system.\n *\n * ## Function Categories:\n *\n * 1. **isTheme**: Theme-related checks (dark, light, gold, maryland)\n * 2. **isVisual**: Visual state checks (aligned, bordered, transparent, etc.)\n * 3. **isDisplay**: Display mode checks (feature, list, promo, etc.)\n * 4. **isLayout**: Layout configuration checks (fixed, hidden, position)\n * 5. **isInfo**: Content type checks (admissions, events, news, etc.)\n * 6. **includesFeature**: Feature flag checks (animation, lazyLoad, etc.)\n * 7. **getValue**: Attribute value getters (url, title, styleProps)\n *\n * ## Naming Convention:\n * - `is*` functions return boolean values\n * - `includes*` functions check for feature presence\n * - `getValue*` functions return string values\n *\n * ## Deprecation Handling:\n * Many functions handle both current (data-*) and deprecated attribute names,\n * logging warnings when deprecated attributes are used.\n */\nimport * as Styles from '@universityofmaryland/web-styles-library';\nimport AttributeNames from './names';\nimport AttributesValues from './values';\n\n// Types\n/**\n * Properties for attribute checking functions\n */\ninterface AttributeElementProps {\n /** The HTML element to check attributes on */\n element: HTMLElement;\n /** Default value to return if attribute is not found */\n defaultValue?: boolean;\n}\n\ninterface AttributeProps extends AttributeElementProps {\n attributeName: string;\n attributeValue: string;\n}\n\ntype AttributeNullProps = Omit<AttributeProps, 'attributeValue'>;\n\ninterface DeprecatedAttributeProps extends AttributeElementProps {\n attributeNameOld: string;\n attributeNameNew: string;\n attributeValue: string;\n}\n\ninterface ValueGetterConfig {\n currentName: string;\n deprecatedName?: string;\n}\n\n// Core attribute check utilities\n\n/**\n * Checks if an attribute equals a specific value.\n * Returns defaultValue if attribute is not present.\n * Special handling: 'false' string always returns false.\n *\n * @internal\n */\nconst isAttributeTrue = ({\n element,\n attributeName,\n attributeValue,\n defaultValue = false,\n}: AttributeProps): boolean => {\n const value = element.getAttribute(attributeName);\n\n if (value === null) {\n return defaultValue;\n }\n\n if (value === 'false') {\n return false;\n }\n\n return value === attributeValue;\n};\n\nconst isAttributeNotNull = ({\n element,\n attributeName,\n}: AttributeNullProps): boolean => {\n const value = element.getAttribute(attributeName);\n\n if (value === 'true') return true;\n if (value === 'false') return false;\n\n return value !== null;\n};\n\nconst depcreationWarning = ({\n element,\n attributeNameOld,\n attributeNameNew,\n}: {\n element: HTMLElement;\n attributeNameOld: string;\n attributeNameNew: string;\n}) => {\n console.warn(\n `UMD Web Component: ${element.nodeName} - Attribute \"${attributeNameOld}\" is deprecated. ` +\n `Use \"${attributeNameNew}\" instead. This attribute will be removed in version 2.0.`,\n );\n};\n\nconst checkDeprecatedAttribute = (props: DeprecatedAttributeProps): boolean => {\n const {\n element,\n attributeNameOld,\n attributeNameNew,\n attributeValue,\n ...rest\n } = props;\n const isDeprecatedUsed = isAttributeTrue({\n ...rest,\n element,\n attributeName: attributeNameOld,\n attributeValue,\n });\n\n if (isDeprecatedUsed) {\n depcreationWarning(props);\n return true;\n }\n\n return false;\n};\n\nconst createAttributeCheck =\n (attributeName: string, attributeValue: string, defaultValue = false) =>\n (props: AttributeElementProps): boolean =>\n isAttributeTrue({\n ...props,\n attributeName,\n attributeValue,\n defaultValue,\n });\n\nconst createValueGetter = ({\n currentName,\n deprecatedName,\n}: ValueGetterConfig) => {\n return ({ element }: AttributeElementProps): string | null => {\n if (deprecatedName) {\n const deprecatedValue = element.getAttribute(deprecatedName);\n if (deprecatedValue !== null) {\n depcreationWarning({\n element,\n attributeNameOld: deprecatedName,\n attributeNameNew: currentName,\n });\n\n return deprecatedValue;\n }\n }\n\n const value = element.getAttribute(currentName);\n if (value !== null) {\n return value;\n }\n\n return null;\n };\n};\n\n// Value checks with null checks\nconst hasInfo = {\n gifts: (props: AttributeElementProps) =>\n isAttributeNotNull({\n ...props,\n attributeName: AttributeNames.information.gift,\n }),\n search: (props: AttributeElementProps) =>\n isAttributeNotNull({\n ...props,\n attributeName: AttributeNames.information.search,\n }),\n};\n\n// Decoration checks\nconst hasDecoration = {\n line: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.option.OPTIONAL_HAS_LINE,\n attributeNameNew: AttributeNames.decoration.line,\n attributeValue: '',\n }) ||\n isAttributeNotNull({\n ...props,\n attributeName: AttributeNames.decoration.line,\n }),\n};\n\n// Feature checks\nconst includesFeature = {\n animation: createAttributeCheck(\n AttributeNames.feature.animation,\n AttributesValues.state.TRUE,\n true,\n ),\n imageExpand: createAttributeCheck(\n AttributeNames.feature.imageExpand,\n AttributesValues.state.TRUE,\n true,\n ),\n fullScreenOption: createAttributeCheck(\n AttributeNames.deprecated.feature.FULLSCREEN,\n AttributesValues.state.TRUE,\n true,\n ),\n visualTime: createAttributeCheck(\n AttributeNames.deprecated.feature.SHOW_TIME,\n AttributesValues.state.TRUE,\n true,\n ),\n lazyLoad: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.feed.FEED_LAZY_LOAD,\n attributeNameNew: AttributeNames.feature.lazyLoad,\n attributeValue: AttributesValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.feature.lazyLoad,\n attributeValue: AttributesValues.state.TRUE,\n }),\n} as const;\n\n// Data checks\nconst isData = {\n type: {\n academic: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.feed.type,\n attributeValue: AttributesValues.data.type.academic,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.feed.type,\n attributeValue: AttributesValues.data.type.academic,\n }),\n },\n union: createAttributeCheck(\n AttributeNames.deprecated.feed.FEED_UNION,\n AttributesValues.state.FALSE,\n true,\n ),\n} as const;\n\n// Display checks\nconst isDisplay = {\n block: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY_TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributesValues.display.block,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributesValues.display.block,\n }),\n feature: createAttributeCheck(\n AttributeNames.deprecated.display.DISPLAY,\n AttributesValues.display.feature,\n ),\n featured: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributesValues.display.featured,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributesValues.display.featured,\n }),\n hero: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributesValues.display.hero,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributesValues.display.hero,\n }),\n list: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributesValues.display.list,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributesValues.display.list,\n }),\n outline: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributesValues.type.OUTLINE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributesValues.type.OUTLINE,\n }),\n overlay: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributesValues.display.overlay,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributesValues.display.overlay,\n }),\n promo: createAttributeCheck(\n AttributeNames.deprecated.display.DISPLAY,\n AttributesValues.display.promo,\n ),\n primary: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributesValues.type.PRIMARY,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributesValues.type.PRIMARY,\n }),\n secondary: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributesValues.type.SECONDARY,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributesValues.type.SECONDARY,\n }),\n short: createAttributeCheck(\n AttributeNames.display.default,\n AttributesValues.display.short,\n ),\n standardCentered: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributesValues.layout.defaultCentered,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.deprecated.type.TYPE,\n attributeValue: AttributesValues.layout.defaultCentered,\n }),\n standardInterior: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributesValues.layout.defaultInterior,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.deprecated.type.TYPE,\n attributeValue: AttributesValues.layout.defaultInterior,\n }),\n standardInteriorCentered: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributesValues.layout.defaultInteriorCentered,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.deprecated.type.TYPE,\n attributeValue: AttributesValues.layout.defaultInteriorCentered,\n }),\n statement: createAttributeCheck(\n AttributeNames.deprecated.display.DISPLAY,\n AttributesValues.display.statement,\n ),\n sticky: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributesValues.display.sticky,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributesValues.display.sticky,\n }),\n stacked: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributesValues.display.stacked,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributesValues.display.stacked,\n }),\n stackedInteriorDeprecated: createAttributeCheck(\n AttributeNames.deprecated.type.TYPE,\n AttributesValues.layout.stackedInterior,\n ),\n stackedInterior: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributesValues.layout.stackedInterior,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributesValues.layout.stackedInterior,\n }),\n tabular: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributesValues.display.tabular,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributesValues.display.tabular,\n }),\n} as const;\n\n// Information checks\nconst isInfo = {\n admissions: createAttributeCheck(\n AttributeNames.information.admissions,\n AttributesValues.state.TRUE,\n ),\n events: createAttributeCheck(\n AttributeNames.information.events,\n AttributesValues.state.TRUE,\n ),\n news: createAttributeCheck(\n AttributeNames.information.news,\n AttributesValues.state.TRUE,\n ),\n schools: createAttributeCheck(\n AttributeNames.information.schools,\n AttributesValues.state.TRUE,\n ),\n searchDomain: createAttributeCheck(\n AttributeNames.information.searchType,\n AttributesValues.search.domain,\n ),\n} as const;\n\n// Layout checks\nconst isLayout = {\n alertOff: createAttributeCheck(\n AttributeNames.layout.alertOff,\n AttributesValues.state.TRUE,\n ),\n alignmentRight: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.layout.LAYOUT_ALIGNMENT,\n attributeNameNew: AttributeNames.layout.alignment,\n attributeValue: AttributesValues.layout.right,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.alignment,\n attributeValue: AttributesValues.layout.right,\n }),\n fixed: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.layout.LAYOUT_FIXED,\n attributeNameNew: AttributeNames.layout.fixed,\n attributeValue: '',\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.fixed,\n attributeValue: AttributesValues.state.TRUE,\n }),\n fullImage: createAttributeCheck(\n AttributeNames.deprecated.type.TYPE,\n AttributesValues.layout.fullImage,\n ),\n heightSmall: (props: AttributeElementProps): boolean =>\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.height,\n attributeValue: AttributesValues.layout.small,\n }),\n hidden: createAttributeCheck(\n AttributeNames.layout.hidden,\n AttributesValues.state.TRUE,\n ),\n image: createAttributeCheck(\n AttributeNames.deprecated.type.TYPE,\n AttributesValues.display.image,\n ),\n imagePositionRight: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.layout.LAYOUT_IMAGE_POSITION,\n attributeNameNew: AttributeNames.layout.imagePosition,\n attributeValue: AttributesValues.layout.right,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.imagePosition,\n attributeValue: AttributesValues.layout.right,\n defaultValue: true,\n }),\n imagePositionLeft: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.layout.LAYOUT_IMAGE_POSITION,\n attributeNameNew: AttributeNames.layout.imagePosition,\n attributeValue: AttributesValues.layout.left,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.imagePosition,\n attributeValue: AttributesValues.layout.left,\n defaultValue: false,\n }),\n imageScaled: (props: AttributeElementProps): boolean =>\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.imageScaled,\n attributeValue: AttributesValues.state.TRUE,\n defaultValue: true,\n }),\n interior: createAttributeCheck(\n AttributeNames.layout.interior,\n AttributesValues.state.TRUE,\n ),\n lock: createAttributeCheck(\n AttributeNames.layout.lock,\n AttributesValues.state.TRUE,\n ),\n lockFull: createAttributeCheck(\n AttributeNames.layout.lock,\n AttributesValues.layout.large,\n ),\n reverse: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.layout.DEFAULT,\n attributeNameNew: AttributeNames.layout.reverse,\n attributeValue: AttributesValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.reverse,\n attributeValue: AttributesValues.state.TRUE,\n }),\n spaceHorizontalLarge: (props: AttributeElementProps): boolean =>\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.spaceHorizontal,\n attributeValue: AttributesValues.layout.large,\n }),\n textCentered: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_TEXT_CENTER,\n attributeNameNew: AttributeNames.layout.text,\n attributeValue: AttributesValues.layout.center,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.text,\n attributeValue: AttributesValues.layout.center,\n }),\n} as const;\n\n// Social checks\n\nconst isSharing = {\n email: createAttributeCheck(\n AttributeNames.sharing.email,\n AttributesValues.state.TRUE,\n ),\n print: createAttributeCheck(\n AttributeNames.sharing.print,\n AttributesValues.state.TRUE,\n ),\n} as const;\n\nconst includesSharing = {\n facebook: createAttributeCheck(\n AttributeNames.social.facebook,\n AttributesValues.state.TRUE,\n true,\n ),\n twitter: createAttributeCheck(\n AttributeNames.social.twitter,\n AttributesValues.state.TRUE,\n true,\n ),\n} as const;\n\n// Theme checks\nconst isTheme = {\n dark: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.theme.THEME_DEPRECATD,\n attributeNameNew: AttributeNames.theme.default,\n attributeValue: AttributesValues.theme.DARK,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.theme.default,\n attributeValue: AttributesValues.theme.DARK,\n }),\n gold: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.theme.THEME_DEPRECATD,\n attributeNameNew: AttributeNames.theme.default,\n attributeValue: AttributesValues.theme.GOLD,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.theme.default,\n attributeValue: AttributesValues.theme.GOLD,\n }),\n light: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.theme.THEME_DEPRECATD,\n attributeNameNew: AttributeNames.theme.default,\n attributeValue: AttributesValues.theme.LIGHT,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.theme.default,\n attributeValue: AttributesValues.theme.LIGHT,\n }),\n maryland: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.theme.THEME_DEPRECATD,\n attributeNameNew: AttributeNames.theme.default,\n attributeValue: AttributesValues.theme.MARYLAND,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.theme.default,\n attributeValue: AttributesValues.theme.MARYLAND,\n }),\n} as const;\n\n// Visual checks\nconst isVisual = {\n aligned: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_ALIGN,\n attributeNameNew: AttributeNames.visual.imageAligned,\n attributeValue: AttributesValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.imageAligned,\n attributeValue: AttributesValues.state.TRUE,\n }),\n bordered: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_BORDER,\n attributeNameNew: AttributeNames.visual.bordered,\n attributeValue: AttributesValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.bordered,\n attributeValue: AttributesValues.state.TRUE,\n }),\n campaign: createAttributeCheck(\n AttributeNames.visual.campaign,\n AttributesValues.campaign.forward,\n ),\n icon_seal: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_HAS_LOGO,\n attributeNameNew: AttributeNames.visual.iconSeal,\n attributeValue: AttributesValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.iconSeal,\n attributeValue: AttributesValues.state.TRUE,\n }),\n open: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.state.STATE_DEPRECATD,\n attributeNameNew: AttributeNames.visual.open,\n attributeValue: AttributesValues.state.OPENED,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.open,\n attributeValue: AttributesValues.state.TRUE,\n }),\n play: createAttributeCheck(\n AttributeNames.visual.play,\n AttributesValues.state.TRUE,\n ),\n quote: createAttributeCheck(\n AttributeNames.deprecated.visual.VISUAL_QUOTE,\n AttributesValues.state.TRUE,\n ),\n showIcon: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_ICON,\n attributeNameNew: AttributeNames.visual.icon,\n attributeValue: AttributesValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.icon,\n attributeValue: AttributesValues.state.TRUE,\n }),\n sizeNormal: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY_SIZE,\n attributeNameNew: AttributeNames.visual.size,\n attributeValue: AttributesValues.size.NORMAL,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.size,\n attributeValue: AttributesValues.size.NORMAL,\n }),\n showTime: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.feature.SHOW_TIME,\n attributeNameNew: AttributeNames.visual.time,\n attributeValue: AttributesValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.time,\n attributeValue: AttributesValues.state.TRUE,\n defaultValue: true,\n }),\n sizeLarge: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY_SIZE,\n attributeNameNew: AttributeNames.visual.size,\n attributeValue: AttributesValues.size.LARGE,\n }) ||\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY_SIZE,\n attributeNameNew: AttributeNames.visual.size,\n attributeValue: '',\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.size,\n attributeValue: AttributesValues.size.LARGE,\n }),\n stickyFirst: createAttributeCheck(\n AttributeNames.deprecated.option.OPTIONAL_STICKY_FIRST,\n AttributesValues.state.TRUE,\n true,\n ),\n transparent: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_TRANSPARENT,\n attributeNameNew: AttributeNames.visual.transparent,\n attributeValue: AttributesValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.transparent,\n attributeValue: AttributesValues.state.TRUE,\n }),\n} as const;\n\n// Type checks\nconst isType = {\n mega: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.type.default,\n attributeValue: AttributesValues.type.MEGA,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.type.default,\n attributeValue: AttributesValues.type.MEGA,\n }),\n visual: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.type.default,\n attributeValue: AttributesValues.type.VISUAL,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.type.default,\n attributeValue: AttributesValues.type.VISUAL,\n }),\n simple: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.type.default,\n attributeValue: AttributesValues.type.SIMPLE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.type.default,\n attributeValue: AttributesValues.type.SIMPLE,\n }),\n} as const;\n\n// Value getters\nconst getValue = {\n alertUrl: createValueGetter({\n currentName: AttributeNames.information.alertUrl,\n }),\n daysToHide: createValueGetter({\n currentName: AttributeNames.visual.hiddenDays,\n deprecatedName: AttributeNames.deprecated.visual.VISUAL_DAYS_TO_HIDE,\n }),\n feedEntryRemoveIds: createValueGetter({\n currentName: AttributeNames.information.removeIds,\n deprecatedName: AttributeNames.deprecated.feed.FEED_NOT_ENTRIES,\n }),\n feedFilterIds: createValueGetter({\n currentName: AttributeNames.information.filterIds,\n deprecatedName: AttributeNames.deprecated.feed.FEED_CATEGORIES,\n }),\n feedToken: createValueGetter({\n currentName: AttributeNames.information.token,\n deprecatedName: AttributeNames.deprecated.feed.FEED_TOKEN,\n }),\n giftUrl: createValueGetter({\n currentName: AttributeNames.information.gift,\n }),\n layoutColumnCount: createValueGetter({\n currentName: AttributeNames.layout.columnCount,\n deprecatedName: AttributeNames.deprecated.feed.FEED_COLUMN_COUNT,\n }),\n layoutLock: createValueGetter({\n currentName: AttributeNames.layout.lock,\n }),\n layoutRowCount: createValueGetter({\n currentName: AttributeNames.layout.rowCount,\n deprecatedName: AttributeNames.deprecated.feed.FEED_ROW_COUNT,\n }),\n title: createValueGetter({\n currentName: AttributeNames.information.title,\n }),\n topPosition: createValueGetter({\n currentName: AttributeNames.layout.position,\n deprecatedName: AttributeNames.deprecated.layout.LAYOUT_STICKY_TOP,\n }),\n styleProps: (props: AttributeElementProps) => {\n const cssString = createValueGetter({\n ...props,\n currentName: AttributeNames.deprecated.visual.VISUAL_STYLE_PROPS,\n });\n\n if (cssString && typeof cssString === 'string') {\n return Styles.utilities.create.jss.objectFromString(cssString);\n }\n },\n url: createValueGetter({\n currentName: AttributeNames.information.url,\n }),\n} as const;\n\n// Public API\nexport {\n hasInfo,\n hasDecoration,\n includesFeature,\n isDisplay,\n isData,\n isInfo,\n isLayout,\n isSharing,\n includesSharing,\n isTheme,\n isType,\n isVisual,\n getValue,\n};\n\nexport type {\n AttributeElementProps,\n AttributeProps,\n AttributeNullProps,\n DeprecatedAttributeProps,\n};\n"],"names":["AttributeNames","AttributesValues","Styles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;A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EAAA,CACzC;AACH;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"checks.js","sources":["../../source/attributes/checks.ts"],"sourcesContent":["/**\n * Attribute Check Utilities\n *\n * Provides a comprehensive set of functions to check attribute states on HTML elements.\n * These utilities form the foundation of the component attribute system.\n *\n * ## Function Categories:\n *\n * 1. **isTheme**: Theme-related checks (dark, light, gold, maryland)\n * 2. **isVisual**: Visual state checks (aligned, bordered, transparent, etc.)\n * 3. **isDisplay**: Display mode checks (feature, list, promo, etc.)\n * 4. **isLayout**: Layout configuration checks (fixed, hidden, position)\n * 5. **isInfo**: Content type checks (admissions, events, news, etc.)\n * 6. **includesFeature**: Feature flag checks (animation, lazyLoad, etc.)\n * 7. **getValue**: Attribute value getters (url, title, styleProps)\n *\n * ## Naming Convention:\n * - `is*` functions return boolean values\n * - `includes*` functions check for feature presence\n * - `getValue*` functions return string values\n *\n * ## Deprecation Handling:\n * Many functions handle both current (data-*) and deprecated attribute names,\n * logging warnings when deprecated attributes are used.\n */\nimport * as Styles from '@universityofmaryland/web-styles-library';\nimport { AttributeNames } from './names';\nimport { AttributeValues } from './values';\n\n// Types\n/**\n * Properties for attribute checking functions\n */\ninterface AttributeElementProps {\n /** The HTML element to check attributes on */\n element: HTMLElement;\n /** Default value to return if attribute is not found */\n defaultValue?: boolean;\n}\n\ninterface AttributeProps extends AttributeElementProps {\n attributeName: string;\n attributeValue: string;\n}\n\ntype AttributeNullProps = Omit<AttributeProps, 'attributeValue'>;\n\ninterface DeprecatedAttributeProps extends AttributeElementProps {\n attributeNameOld: string;\n attributeNameNew: string;\n attributeValue: string;\n}\n\ninterface ValueGetterConfig {\n currentName: string;\n deprecatedName?: string;\n}\n\n// Core attribute check utilities\n\n/**\n * Checks if an attribute equals a specific value.\n * Returns defaultValue if attribute is not present.\n * Special handling: 'false' string always returns false.\n *\n * @internal\n */\nconst isAttributeTrue = ({\n element,\n attributeName,\n attributeValue,\n defaultValue = false,\n}: AttributeProps): boolean => {\n const value = element.getAttribute(attributeName);\n\n if (value === null) {\n return defaultValue;\n }\n\n if (value === 'false') {\n return false;\n }\n\n return value === attributeValue;\n};\n\nconst isAttributeNotNull = ({\n element,\n attributeName,\n}: AttributeNullProps): boolean => {\n const value = element.getAttribute(attributeName);\n\n if (value === 'true') return true;\n if (value === 'false') return false;\n\n return value !== null;\n};\n\nconst depcreationWarning = ({\n element,\n attributeNameOld,\n attributeNameNew,\n}: {\n element: HTMLElement;\n attributeNameOld: string;\n attributeNameNew: string;\n}) => {\n console.warn(\n `UMD Web Component: ${element.nodeName} - Attribute \"${attributeNameOld}\" is deprecated. ` +\n `Use \"${attributeNameNew}\" instead. This attribute will be removed in version 2.0.`,\n );\n};\n\nconst checkDeprecatedAttribute = (props: DeprecatedAttributeProps): boolean => {\n const {\n element,\n attributeNameOld,\n attributeNameNew,\n attributeValue,\n ...rest\n } = props;\n const isDeprecatedUsed = isAttributeTrue({\n ...rest,\n element,\n attributeName: attributeNameOld,\n attributeValue,\n });\n\n if (isDeprecatedUsed) {\n depcreationWarning(props);\n return true;\n }\n\n return false;\n};\n\nconst createAttributeCheck =\n (attributeName: string, attributeValue: string, defaultValue = false) =>\n (props: AttributeElementProps): boolean =>\n isAttributeTrue({\n ...props,\n attributeName,\n attributeValue,\n defaultValue,\n });\n\nconst createValueGetter = ({\n currentName,\n deprecatedName,\n}: ValueGetterConfig) => {\n return ({ element }: AttributeElementProps): string | null => {\n if (deprecatedName) {\n const deprecatedValue = element.getAttribute(deprecatedName);\n if (deprecatedValue !== null) {\n depcreationWarning({\n element,\n attributeNameOld: deprecatedName,\n attributeNameNew: currentName,\n });\n\n return deprecatedValue;\n }\n }\n\n const value = element.getAttribute(currentName);\n if (value !== null) {\n return value;\n }\n\n return null;\n };\n};\n\n// Value checks with null checks\nconst hasInfo = {\n gifts: (props: AttributeElementProps) =>\n isAttributeNotNull({\n ...props,\n attributeName: AttributeNames.information.gift,\n }),\n search: (props: AttributeElementProps) =>\n isAttributeNotNull({\n ...props,\n attributeName: AttributeNames.information.search,\n }),\n};\n\n// Decoration checks\nconst hasDecoration = {\n line: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.option.OPTIONAL_HAS_LINE,\n attributeNameNew: AttributeNames.decoration.line,\n attributeValue: '',\n }) ||\n isAttributeNotNull({\n ...props,\n attributeName: AttributeNames.decoration.line,\n }),\n};\n\n// Feature checks\nconst includesFeature = {\n animation: createAttributeCheck(\n AttributeNames.feature.animation,\n AttributeValues.state.TRUE,\n true,\n ),\n imageExpand: createAttributeCheck(\n AttributeNames.feature.imageExpand,\n AttributeValues.state.TRUE,\n true,\n ),\n fullScreenOption: createAttributeCheck(\n AttributeNames.deprecated.feature.FULLSCREEN,\n AttributeValues.state.TRUE,\n true,\n ),\n visualTime: createAttributeCheck(\n AttributeNames.deprecated.feature.SHOW_TIME,\n AttributeValues.state.TRUE,\n true,\n ),\n lazyLoad: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.feed.FEED_LAZY_LOAD,\n attributeNameNew: AttributeNames.feature.lazyLoad,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.feature.lazyLoad,\n attributeValue: AttributeValues.state.TRUE,\n }),\n} as const;\n\n// Data checks\nconst isData = {\n type: {\n academic: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.feed.type,\n attributeValue: AttributeValues.data.type.academic,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.feed.type,\n attributeValue: AttributeValues.data.type.academic,\n }),\n },\n union: createAttributeCheck(\n AttributeNames.deprecated.feed.FEED_UNION,\n AttributeValues.state.FALSE,\n true,\n ),\n} as const;\n\n// Display checks\nconst isDisplay = {\n block: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY_TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.block,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.block,\n }),\n feature: createAttributeCheck(\n AttributeNames.deprecated.display.DISPLAY,\n AttributeValues.display.feature,\n ),\n featured: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.featured,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.featured,\n }),\n hero: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.hero,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.hero,\n }),\n list: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.list,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.list,\n }),\n outline: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.type.OUTLINE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.type.OUTLINE,\n }),\n overlay: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.overlay,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.overlay,\n }),\n promo: createAttributeCheck(\n AttributeNames.deprecated.display.DISPLAY,\n AttributeValues.display.promo,\n ),\n primary: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.type.PRIMARY,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.type.PRIMARY,\n }),\n secondary: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.type.SECONDARY,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.type.SECONDARY,\n }),\n short: createAttributeCheck(\n AttributeNames.display.default,\n AttributeValues.display.short,\n ),\n standardCentered: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.layout.defaultCentered,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.deprecated.type.TYPE,\n attributeValue: AttributeValues.layout.defaultCentered,\n }),\n standardInterior: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.layout.defaultInterior,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.deprecated.type.TYPE,\n attributeValue: AttributeValues.layout.defaultInterior,\n }),\n standardInteriorCentered: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.layout.defaultInteriorCentered,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.deprecated.type.TYPE,\n attributeValue: AttributeValues.layout.defaultInteriorCentered,\n }),\n statement: createAttributeCheck(\n AttributeNames.deprecated.display.DISPLAY,\n AttributeValues.display.statement,\n ),\n sticky: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.sticky,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.sticky,\n }),\n stacked: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.stacked,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.stacked,\n }),\n stackedInteriorDeprecated: createAttributeCheck(\n AttributeNames.deprecated.type.TYPE,\n AttributeValues.layout.stackedInterior,\n ),\n stackedInterior: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.layout.stackedInterior,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.layout.stackedInterior,\n }),\n tabular: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.tabular,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.tabular,\n }),\n mega: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.DATA_TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.mega,\n }) ||\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.mega,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.mega,\n }),\n visual: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.DATA_TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.visual,\n }) ||\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.visual,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.visual,\n }),\n simple: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.DATA_TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.simple,\n }) ||\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributeValues.display.simple,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributeValues.display.simple,\n }),\n} as const;\n\n// Information checks\nconst isInfo = {\n admissions: createAttributeCheck(\n AttributeNames.information.admissions,\n AttributeValues.state.TRUE,\n ),\n events: createAttributeCheck(\n AttributeNames.information.events,\n AttributeValues.state.TRUE,\n ),\n news: createAttributeCheck(\n AttributeNames.information.news,\n AttributeValues.state.TRUE,\n ),\n schools: createAttributeCheck(\n AttributeNames.information.schools,\n AttributeValues.state.TRUE,\n ),\n searchDomain: createAttributeCheck(\n AttributeNames.information.searchType,\n AttributeValues.search.domain,\n ),\n} as const;\n\n// Layout checks\nconst isLayout = {\n alertOff: createAttributeCheck(\n AttributeNames.layout.alertOff,\n AttributeValues.state.TRUE,\n ),\n alignmentRight: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.layout.LAYOUT_ALIGNMENT,\n attributeNameNew: AttributeNames.layout.alignment,\n attributeValue: AttributeValues.layout.right,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.alignment,\n attributeValue: AttributeValues.layout.right,\n }),\n fixed: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.layout.LAYOUT_FIXED,\n attributeNameNew: AttributeNames.layout.fixed,\n attributeValue: '',\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.fixed,\n attributeValue: AttributeValues.state.TRUE,\n }),\n fullImage: createAttributeCheck(\n AttributeNames.deprecated.type.TYPE,\n AttributeValues.layout.fullImage,\n ),\n heightSmall: (props: AttributeElementProps): boolean =>\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.height,\n attributeValue: AttributeValues.layout.small,\n }),\n hidden: createAttributeCheck(\n AttributeNames.layout.hidden,\n AttributeValues.state.TRUE,\n ),\n image: createAttributeCheck(\n AttributeNames.deprecated.type.TYPE,\n AttributeValues.display.image,\n ),\n imagePositionRight: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.layout.LAYOUT_IMAGE_POSITION,\n attributeNameNew: AttributeNames.layout.imagePosition,\n attributeValue: AttributeValues.layout.right,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.imagePosition,\n attributeValue: AttributeValues.layout.right,\n defaultValue: true,\n }),\n imagePositionLeft: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.layout.LAYOUT_IMAGE_POSITION,\n attributeNameNew: AttributeNames.layout.imagePosition,\n attributeValue: AttributeValues.layout.left,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.imagePosition,\n attributeValue: AttributeValues.layout.left,\n defaultValue: false,\n }),\n imageScaled: (props: AttributeElementProps): boolean =>\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.imageScaled,\n attributeValue: AttributeValues.state.TRUE,\n defaultValue: true,\n }),\n interior: createAttributeCheck(\n AttributeNames.layout.interior,\n AttributeValues.state.TRUE,\n ),\n lock: createAttributeCheck(\n AttributeNames.layout.lock,\n AttributeValues.state.TRUE,\n ),\n lockFull: createAttributeCheck(\n AttributeNames.layout.lock,\n AttributeValues.layout.large,\n ),\n reverse: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.layout.DEFAULT,\n attributeNameNew: AttributeNames.layout.reverse,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.reverse,\n attributeValue: AttributeValues.state.TRUE,\n }),\n spaceHorizontalLarge: (props: AttributeElementProps): boolean =>\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.spaceHorizontal,\n attributeValue: AttributeValues.layout.large,\n }),\n textCentered: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_TEXT_CENTER,\n attributeNameNew: AttributeNames.layout.text,\n attributeValue: AttributeValues.layout.center,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.layout.text,\n attributeValue: AttributeValues.layout.center,\n }),\n} as const;\n\n// Social checks\n\nconst isSharing = {\n email: createAttributeCheck(\n AttributeNames.sharing.email,\n AttributeValues.state.TRUE,\n ),\n print: createAttributeCheck(\n AttributeNames.sharing.print,\n AttributeValues.state.TRUE,\n ),\n} as const;\n\nconst includesSharing = {\n facebook: createAttributeCheck(\n AttributeNames.social.facebook,\n AttributeValues.state.TRUE,\n true,\n ),\n twitter: createAttributeCheck(\n AttributeNames.social.twitter,\n AttributeValues.state.TRUE,\n true,\n ),\n} as const;\n\n// Theme checks\nconst isTheme = {\n dark: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.theme.THEME_DEPRECATD,\n attributeNameNew: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.DARK,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.DARK,\n }),\n gold: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.theme.THEME_DEPRECATD,\n attributeNameNew: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.GOLD,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.GOLD,\n }),\n light: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.theme.THEME_DEPRECATD,\n attributeNameNew: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.LIGHT,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.LIGHT,\n }),\n maryland: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.theme.THEME_DEPRECATD,\n attributeNameNew: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.MARYLAND,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.theme.default,\n attributeValue: AttributeValues.theme.MARYLAND,\n }),\n} as const;\n\n// Visual checks\nconst isVisual = {\n aligned: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_ALIGN,\n attributeNameNew: AttributeNames.visual.imageAligned,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.imageAligned,\n attributeValue: AttributeValues.state.TRUE,\n }),\n bordered: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_BORDER,\n attributeNameNew: AttributeNames.visual.bordered,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.bordered,\n attributeValue: AttributeValues.state.TRUE,\n }),\n campaign: createAttributeCheck(\n AttributeNames.visual.campaign,\n AttributeValues.campaign.forward,\n ),\n icon_seal: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_HAS_LOGO,\n attributeNameNew: AttributeNames.visual.iconSeal,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.iconSeal,\n attributeValue: AttributeValues.state.TRUE,\n }),\n open: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.state.STATE_DEPRECATD,\n attributeNameNew: AttributeNames.visual.open,\n attributeValue: AttributeValues.state.OPENED,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.open,\n attributeValue: AttributeValues.state.TRUE,\n }),\n play: createAttributeCheck(\n AttributeNames.visual.play,\n AttributeValues.state.TRUE,\n ),\n quote: createAttributeCheck(\n AttributeNames.deprecated.visual.VISUAL_QUOTE,\n AttributeValues.state.TRUE,\n ),\n showIcon: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_ICON,\n attributeNameNew: AttributeNames.visual.icon,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.icon,\n attributeValue: AttributeValues.state.TRUE,\n }),\n sizeNormal: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY_SIZE,\n attributeNameNew: AttributeNames.visual.size,\n attributeValue: AttributeValues.size.NORMAL,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.size,\n attributeValue: AttributeValues.size.NORMAL,\n }),\n showTime: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.feature.SHOW_TIME,\n attributeNameNew: AttributeNames.visual.time,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.time,\n attributeValue: AttributeValues.state.TRUE,\n defaultValue: true,\n }),\n sizeLarge: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY_SIZE,\n attributeNameNew: AttributeNames.visual.size,\n attributeValue: AttributeValues.size.LARGE,\n }) ||\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.display.DISPLAY_SIZE,\n attributeNameNew: AttributeNames.visual.size,\n attributeValue: '',\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.size,\n attributeValue: AttributeValues.size.LARGE,\n }),\n stickyFirst: createAttributeCheck(\n AttributeNames.deprecated.option.OPTIONAL_STICKY_FIRST,\n AttributeValues.state.TRUE,\n true,\n ),\n transparent: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.visual.VISUAL_TRANSPARENT,\n attributeNameNew: AttributeNames.visual.transparent,\n attributeValue: AttributeValues.state.TRUE,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.visual.transparent,\n attributeValue: AttributeValues.state.TRUE,\n }),\n} as const;\n\n// Value getters\nconst getValue = {\n alertUrl: createValueGetter({\n currentName: AttributeNames.information.alertUrl,\n }),\n daysToHide: createValueGetter({\n currentName: AttributeNames.visual.hiddenDays,\n deprecatedName: AttributeNames.deprecated.visual.VISUAL_DAYS_TO_HIDE,\n }),\n feedEntryRemoveIds: createValueGetter({\n currentName: AttributeNames.information.removeIds,\n deprecatedName: AttributeNames.deprecated.feed.FEED_NOT_ENTRIES,\n }),\n feedFilterIds: createValueGetter({\n currentName: AttributeNames.information.filterIds,\n deprecatedName: AttributeNames.deprecated.feed.FEED_CATEGORIES,\n }),\n feedToken: createValueGetter({\n currentName: AttributeNames.information.token,\n deprecatedName: AttributeNames.deprecated.feed.FEED_TOKEN,\n }),\n giftUrl: createValueGetter({\n currentName: AttributeNames.information.gift,\n }),\n layoutColumnCount: createValueGetter({\n currentName: AttributeNames.layout.columnCount,\n deprecatedName: AttributeNames.deprecated.feed.FEED_COLUMN_COUNT,\n }),\n layoutLock: createValueGetter({\n currentName: AttributeNames.layout.lock,\n }),\n layoutRowCount: createValueGetter({\n currentName: AttributeNames.layout.rowCount,\n deprecatedName: AttributeNames.deprecated.feed.FEED_ROW_COUNT,\n }),\n mediaTrained: createValueGetter({\n currentName: AttributeNames.information.mediaTrained,\n }),\n title: createValueGetter({\n currentName: AttributeNames.information.title,\n }),\n topPosition: createValueGetter({\n currentName: AttributeNames.layout.position,\n deprecatedName: AttributeNames.deprecated.layout.LAYOUT_STICKY_TOP,\n }),\n styleProps: (props: AttributeElementProps) => {\n const cssString = createValueGetter({\n ...props,\n currentName: AttributeNames.deprecated.visual.VISUAL_STYLE_PROPS,\n });\n\n if (cssString && typeof cssString === 'string') {\n return Styles.utilities.create.jss.objectFromString(cssString);\n }\n },\n url: createValueGetter({\n currentName: AttributeNames.information.url,\n }),\n} as const;\n\n// Public API\nexport {\n hasInfo,\n hasDecoration,\n includesFeature,\n isDisplay,\n isData,\n isInfo,\n isLayout,\n isSharing,\n includesSharing,\n isTheme,\n isVisual,\n getValue,\n};\n\nexport type {\n AttributeElementProps,\n AttributeProps,\n AttributeNullProps,\n DeprecatedAttributeProps,\n};\n"],"names":[],"mappings":";;;AAmEA,MAAM,kBAAkB,CAAC;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AACjB,MAA+B;AAC7B,QAAM,QAAQ,QAAQ,aAAa,aAAa;AAEhD,MAAI,UAAU,MAAM;AAClB,WAAO;AAAA,EACT;AAEA,MAAI,UAAU,SAAS;AACrB,WAAO;AAAA,EACT;AAEA,SAAO,UAAU;AACnB;AAEA,MAAM,qBAAqB,CAAC;AAAA,EAC1B;AAAA,EACA;AACF,MAAmC;AACjC,QAAM,QAAQ,QAAQ,aAAa,aAAa;AAEhD,MAAI,UAAU,OAAQ,QAAO;AAC7B,MAAI,UAAU,QAAS,QAAO;AAE9B,SAAO,UAAU;AACnB;AAEA,MAAM,qBAAqB,CAAC;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AACF,MAIM;AACJ,UAAQ;AAAA,IACN,sBAAsB,QAAQ,QAAQ,iBAAiB,gBAAgB,yBAC7D,gBAAgB;AAAA,EAAA;AAE9B;AAEA,MAAM,2BAA2B,CAAC,UAA6C;AAC7E,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,IACD;AACJ,QAAM,mBAAmB,gBAAgB;AAAA,IACvC,GAAG;AAAA,IACH;AAAA,IACA,eAAe;AAAA,IACf;AAAA,EAAA,CACD;AAED,MAAI,kBAAkB;AACpB,uBAAmB,KAAK;AACxB,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAEA,MAAM,uBACJ,CAAC,eAAuB,gBAAwB,eAAe,UAC/D,CAAC,UACC,gBAAgB;AAAA,EACd,GAAG;AAAA,EACH;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEL,MAAM,oBAAoB,CAAC;AAAA,EACzB;AAAA,EACA;AACF,MAAyB;AACv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,EACD,aAAa,kBAAkB;AAAA,IAC7B,aAAa,eAAe,OAAO;AAAA,IACnC,gBAAgB,eAAe,WAAW,OAAO;AAAA,EAAA,CAClD;AAAA,EACD,YAAY,CAAC,UAAiC;AAC5C,UAAM,YAAY,kBAAkB;AAAA,MAClC,GAAG;AAAA,MACH,aAAa,eAAe,WAAW,OAAO;AAAA,IAAA,CAC/C;AAED,QAAI,aAAa,OAAO,cAAc,UAAU;AAC9C,aAAO,OAAO,UAAU,OAAO,IAAI,iBAAiB,SAAS;AAAA,IAC/D;AAAA,EACF;AAAA,EACA,KAAK,kBAAkB;AAAA,IACrB,aAAa,eAAe,YAAY;AAAA,EAAA,CACzC;AACH;"}
|
|
@@ -23,7 +23,7 @@ export declare const CommonAttributeHandlers: {
|
|
|
23
23
|
}) => AttributeHandlerConfig[];
|
|
24
24
|
accordion: () => AttributeHandlerConfig[];
|
|
25
25
|
};
|
|
26
|
-
declare const
|
|
26
|
+
export declare const handler: {
|
|
27
27
|
combine: (...configs: AttributeHandlerConfig[]) => AttributeHandlerConfig[];
|
|
28
28
|
observe: {
|
|
29
29
|
resize: ({ callback, name, }: AttributeHandlerProps) => AttributeHandlerConfig;
|
|
@@ -48,5 +48,4 @@ declare const _default: {
|
|
|
48
48
|
accordion: () => AttributeHandlerConfig[];
|
|
49
49
|
};
|
|
50
50
|
};
|
|
51
|
-
export default _default;
|
|
52
51
|
//# sourceMappingURL=handler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../source/attributes/handler.ts"],"names":[],"mappings":"AAmCA,MAAM,WAAW,mBAAmB;IAElC,OAAO,EAAE,WAAW,CAAC;IAErB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;CACnC;AAKD,MAAM,MAAM,iBAAiB,GAAG,CAAC,GAAG,EAAE,mBAAmB,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;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
-
|
|
3
|
-
const values = require("./values.js");
|
|
1
|
+
import { AttributeNames } from "./names.js";
|
|
2
|
+
import { AttributeValues } from "./values.js";
|
|
4
3
|
const combine = (...configs) => {
|
|
5
4
|
const handlerMap = /* @__PURE__ */ new Map();
|
|
6
5
|
configs.forEach((config) => {
|
|
@@ -19,9 +18,9 @@ const resize = ({
|
|
|
19
18
|
callback,
|
|
20
19
|
name
|
|
21
20
|
}) => ({
|
|
22
|
-
name: name ||
|
|
21
|
+
name: name || AttributeNames.deprecated.state.RESIZE,
|
|
23
22
|
handler: (ref, _, newValue) => {
|
|
24
|
-
if (newValue ===
|
|
23
|
+
if (newValue === AttributeValues.state.TRUE) {
|
|
25
24
|
const element = ref.element;
|
|
26
25
|
const previousSize = {
|
|
27
26
|
width: element.offsetWidth,
|
|
@@ -55,9 +54,9 @@ const stateOpen = ({
|
|
|
55
54
|
callback,
|
|
56
55
|
name
|
|
57
56
|
}) => ({
|
|
58
|
-
name: name ||
|
|
57
|
+
name: name || AttributeNames.deprecated.state.STATE,
|
|
59
58
|
handler: (ref, oldValue, newValue) => {
|
|
60
|
-
if (newValue ===
|
|
59
|
+
if (newValue === AttributeValues.state.OPENED && oldValue === AttributeValues.state.CLOSED) {
|
|
61
60
|
callback(ref);
|
|
62
61
|
}
|
|
63
62
|
}
|
|
@@ -66,9 +65,9 @@ const stateClosed = ({
|
|
|
66
65
|
callback,
|
|
67
66
|
name
|
|
68
67
|
}) => ({
|
|
69
|
-
name: name ||
|
|
68
|
+
name: name || AttributeNames.deprecated.state.STATE,
|
|
70
69
|
handler: (ref, oldValue, newValue) => {
|
|
71
|
-
if (newValue ===
|
|
70
|
+
if (newValue === AttributeValues.state.CLOSED && oldValue === AttributeValues.state.OPENED) {
|
|
72
71
|
callback(ref);
|
|
73
72
|
}
|
|
74
73
|
}
|
|
@@ -77,9 +76,9 @@ const visuallyClosed = ({
|
|
|
77
76
|
callback,
|
|
78
77
|
name
|
|
79
78
|
}) => ({
|
|
80
|
-
name: name ||
|
|
79
|
+
name: name || AttributeNames.visual.open,
|
|
81
80
|
handler: (ref, oldValue, newValue) => {
|
|
82
|
-
if (newValue ===
|
|
81
|
+
if (newValue === AttributeValues.state.FALSE && oldValue === AttributeValues.state.TRUE) {
|
|
83
82
|
callback(ref);
|
|
84
83
|
}
|
|
85
84
|
}
|
|
@@ -88,9 +87,9 @@ const visuallyHide = ({
|
|
|
88
87
|
callback,
|
|
89
88
|
name
|
|
90
89
|
}) => ({
|
|
91
|
-
name: name ||
|
|
90
|
+
name: name || AttributeNames.layout.hidden,
|
|
92
91
|
handler: (ref, oldValue, newValue) => {
|
|
93
|
-
if (newValue ===
|
|
92
|
+
if (newValue === AttributeValues.state.TRUE && oldValue === AttributeValues.state.FALSE) {
|
|
94
93
|
callback(ref);
|
|
95
94
|
}
|
|
96
95
|
}
|
|
@@ -99,9 +98,9 @@ const visuallyOpen = ({
|
|
|
99
98
|
callback,
|
|
100
99
|
name
|
|
101
100
|
}) => ({
|
|
102
|
-
name: name ||
|
|
101
|
+
name: name || AttributeNames.visual.open,
|
|
103
102
|
handler: (ref, oldValue, newValue) => {
|
|
104
|
-
if (newValue ===
|
|
103
|
+
if (newValue === AttributeValues.state.TRUE && oldValue === AttributeValues.state.FALSE) {
|
|
105
104
|
callback(ref);
|
|
106
105
|
}
|
|
107
106
|
}
|
|
@@ -110,7 +109,7 @@ const visuallyPosition = ({
|
|
|
110
109
|
callback,
|
|
111
110
|
name
|
|
112
111
|
}) => ({
|
|
113
|
-
name: name ||
|
|
112
|
+
name: name || AttributeNames.layout.position,
|
|
114
113
|
handler: (ref, oldValue, newValue) => {
|
|
115
114
|
if (newValue !== oldValue) {
|
|
116
115
|
const top = newValue ? parseInt(newValue) : null;
|
|
@@ -126,9 +125,9 @@ const visuallyShow = ({
|
|
|
126
125
|
callback,
|
|
127
126
|
name
|
|
128
127
|
}) => ({
|
|
129
|
-
name: name ||
|
|
128
|
+
name: name || AttributeNames.layout.hidden,
|
|
130
129
|
handler: (ref, oldValue, newValue) => {
|
|
131
|
-
if (newValue ===
|
|
130
|
+
if (newValue === AttributeValues.state.FALSE && oldValue === AttributeValues.state.TRUE) {
|
|
132
131
|
callback(ref);
|
|
133
132
|
}
|
|
134
133
|
}
|
|
@@ -201,5 +200,7 @@ const common = {
|
|
|
201
200
|
)
|
|
202
201
|
};
|
|
203
202
|
const handler = { combine, observe, common };
|
|
204
|
-
|
|
203
|
+
export {
|
|
204
|
+
handler
|
|
205
|
+
};
|
|
205
206
|
//# sourceMappingURL=handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.js","sources":["../../source/attributes/handler.ts"],"sourcesContent":["import AttributeNames from './names';\nimport AttributeValues from './values';\n\n/**\n * Attribute Handler System\n *\n * Provides reactive attribute observation for web components.\n * Handlers watch for specific attribute changes and execute callbacks.\n *\n * ## Handler Types:\n *\n * 1. **State Transitions**: Watch for specific value changes\n * - e.g., state changing from \"closed\" to \"open\"\n *\n * 2. **Boolean Triggers**: Watch for true/false changes\n * - e.g., resize=\"true\" triggers recalculation\n *\n * 3. **Value Changes**: Watch for any value change\n * - e.g., data-layout-position updates\n *\n * ## Usage Example:\n * ```typescript\n * const attributes = Attributes.handler.combine(\n * Attributes.handler.observe.resize({\n * callback: (element) => element.events?.recalculate()\n * }),\n * Attributes.handler.observe.visuallyOpen({\n * callback: (element) => element.events?.open({ hasAnimation: true })\n * })\n * );\n * ```\n */\n/**\n * Reference to an element with optional event handlers\n */\nexport interface AttributeElementRef {\n /** The HTML element being observed */\n element: HTMLElement;\n /** Optional event handlers attached to the element */\n events?: Record<string, Function>;\n}\n\n/**\n * Callback function type for attribute handlers\n */\nexport type AttributeCallback = (arg: AttributeElementRef, arg2?: any) => void;\n\n/**\n * Configuration for an attribute handler\n */\nexport interface AttributeHandlerConfig {\n /** The attribute name to observe */\n name: string;\n /** Handler function called when the attribute changes */\n handler: (\n ref: AttributeElementRef,\n oldValue: string | null,\n newValue: string | null,\n ) => void;\n}\n\n/**\n * Properties for creating attribute handlers\n */\nexport interface AttributeHandlerProps {\n /** Callback function to execute when attribute changes */\n callback: AttributeCallback;\n /** Optional attribute name override */\n name?: string;\n}\n\n/**\n * Combines multiple attribute handlers for the same attribute name.\n * When multiple handlers target the same attribute, they execute in sequence.\n *\n * @param configs - Array of attribute handler configurations\n * @returns Combined handler configurations\n *\n * @example\n * ```typescript\n * const handlers = combine(\n * handler1, // First to execute\n * handler2 // Second to execute\n * );\n * ```\n */\nconst combine = (\n ...configs: AttributeHandlerConfig[]\n): AttributeHandlerConfig[] => {\n const handlerMap = new Map<\n string,\n ((\n ref: AttributeElementRef,\n oldValue: string | null,\n newValue: string | null,\n ) => void)[]\n >();\n\n configs.forEach((config) => {\n const handlers = handlerMap.get(config.name) || [];\n handlers.push(config.handler);\n handlerMap.set(config.name, handlers);\n });\n\n return Array.from(handlerMap.entries()).map(([name, handlers]) => ({\n name,\n handler: (\n ref: AttributeElementRef,\n oldValue: string | null,\n newValue: string | null,\n ) => {\n handlers.forEach((handler) => handler(ref, oldValue, newValue));\n },\n }));\n};\n\n/**\n * Observes the 'resize' attribute.\n * Triggers callback when resize=\"true\" and dispatches component:resize event.\n * Commonly used to recalculate component dimensions.\n */\nconst resize = ({\n callback,\n name,\n}: AttributeHandlerProps): AttributeHandlerConfig => ({\n name: name || AttributeNames.deprecated.state.RESIZE,\n handler: (ref, _, newValue) => {\n if (newValue === AttributeValues.state.TRUE) {\n const element = ref.element;\n\n // Capture dimensions before resize\n const previousSize = {\n width: element.offsetWidth,\n height: element.offsetHeight,\n };\n\n // Execute resize callback\n callback(ref);\n\n // Dispatch resize event after callback with updated dimensions\n setTimeout(() => {\n const currentSize = {\n width: element.offsetWidth,\n height: element.offsetHeight,\n };\n\n element.dispatchEvent(\n new CustomEvent('component:resize', {\n detail: {\n tagName: element.tagName.toLowerCase(),\n element,\n timestamp: Date.now(),\n previousSize,\n currentSize,\n source: 'attribute',\n },\n bubbles: true,\n composed: true,\n }),\n );\n }, 0);\n }\n },\n});\n\n/**\n * @deprecated Use visuallyOpen instead\n * Observes 'state' attribute transition from \"closed\" to \"open\".\n */\nconst stateOpen = ({\n callback,\n name,\n}: AttributeHandlerProps): AttributeHandlerConfig => ({\n name: name || AttributeNames.deprecated.state.STATE,\n handler: (ref, oldValue, newValue) => {\n if (\n newValue === AttributeValues.state.OPENED &&\n oldValue === AttributeValues.state.CLOSED\n ) {\n callback(ref);\n }\n },\n});\n\n/**\n * @deprecated Use visuallyClosed instead\n * Observes 'state' attribute transition from \"open\" to \"closed\".\n */\nconst stateClosed = ({\n callback,\n name,\n}: AttributeHandlerProps): AttributeHandlerConfig => ({\n name: name || AttributeNames.deprecated.state.STATE,\n handler: (ref, oldValue, newValue) => {\n if (\n newValue === AttributeValues.state.CLOSED &&\n oldValue === AttributeValues.state.OPENED\n ) {\n callback(ref);\n }\n },\n});\n\n/**\n * Observes 'data-visual-open' attribute.\n * Triggers callback when changing from \"true\" to \"false\".\n * Used for closing animations and transitions.\n */\nconst visuallyClosed = ({\n callback,\n name,\n}: AttributeHandlerProps): AttributeHandlerConfig => ({\n name: name || AttributeNames.visual.open,\n handler: (ref, oldValue, newValue) => {\n if (\n newValue === AttributeValues.state.FALSE &&\n oldValue === AttributeValues.state.TRUE\n ) {\n callback(ref);\n }\n },\n});\n\nconst visuallyHide = ({\n callback,\n name,\n}: AttributeHandlerProps): AttributeHandlerConfig => ({\n name: name || AttributeNames.layout.hidden,\n handler: (ref, oldValue, newValue) => {\n if (\n newValue === AttributeValues.state.TRUE &&\n oldValue === AttributeValues.state.FALSE\n ) {\n callback(ref);\n }\n },\n});\n\nconst visuallyOpen = ({\n callback,\n name,\n}: AttributeHandlerProps): AttributeHandlerConfig => ({\n name: name || AttributeNames.visual.open,\n handler: (ref, oldValue, newValue) => {\n if (\n newValue === AttributeValues.state.TRUE &&\n oldValue === AttributeValues.state.FALSE\n ) {\n callback(ref);\n }\n },\n});\n\nconst visuallyPosition = ({\n callback,\n name,\n}: AttributeHandlerProps): AttributeHandlerConfig => ({\n name: name || AttributeNames.layout.position,\n handler: (ref, oldValue, newValue) => {\n if (newValue !== oldValue) {\n const top = newValue ? parseInt(newValue) : null;\n if (top) {\n callback(ref, top);\n } else {\n callback(ref);\n }\n }\n },\n});\n\nconst visuallyShow = ({\n callback,\n name,\n}: AttributeHandlerProps): AttributeHandlerConfig => ({\n name: name || AttributeNames.layout.hidden,\n handler: (ref, oldValue, newValue) => {\n if (\n newValue === AttributeValues.state.FALSE &&\n oldValue === AttributeValues.state.TRUE\n ) {\n callback(ref);\n }\n },\n});\n\nconst observe = {\n resize,\n stateOpen,\n stateClosed,\n visuallyHide,\n visuallyOpen,\n visuallyClosed,\n visuallyPosition,\n visuallyShow,\n};\n\n/**\n * Common attribute handler combinations for standard component behaviors.\n * These pre-configured handlers simplify component implementation.\n */\nconst common = {\n /**\n * Resize observer for responsive components\n */\n resize: (callback: (element: AttributeElementRef) => void) =>\n resize({ callback }),\n\n /**\n * Visual show/hide handlers for modals and overlays\n */\n visualShowHide: (options: {\n onShow?: (element: AttributeElementRef) => void;\n onHide?: (element: AttributeElementRef) => void;\n }) =>\n combine(\n ...(options.onShow\n ? [\n visuallyShow({\n callback: options.onShow,\n }),\n ]\n : []),\n ...(options.onHide\n ? [\n visuallyHide({\n callback: options.onHide,\n }),\n ]\n : []),\n ),\n\n /**\n * Visual open/close handlers for expandable components\n */\n visualToggle: (options: {\n onOpen?: (element: AttributeElementRef) => void;\n onClose?: (element: AttributeElementRef) => void;\n }) =>\n combine(\n ...(options.onOpen\n ? [\n visuallyOpen({\n callback: options.onOpen,\n }),\n ]\n : []),\n ...(options.onClose\n ? [\n visuallyClosed({\n callback: options.onClose,\n }),\n ]\n : []),\n ),\n\n /**\n * Standard accordion handlers with open/close transitions\n */\n accordion: () =>\n combine(\n resize({\n callback: (element) => element.events?.open({ hasAnimation: false }),\n }),\n visuallyOpen({\n callback: (element) => element.events?.open({ hasAnimation: true }),\n }),\n visuallyClosed({\n callback: (element) => element.events?.close({ hasAnimation: true }),\n }),\n // Deprecated handlers for backwards compatibility\n stateClosed({\n callback: (element) => element.events?.close({ hasAnimation: true }),\n }),\n stateOpen({\n callback: (element) => element.events?.open({ hasAnimation: true }),\n }),\n ),\n};\n\n/**\n * @deprecated Use Attributes.handler.common instead\n */\nexport const CommonAttributeHandlers = common;\n\nexport default { combine, observe, common };\n// Types are now exported directly, not through namespace\n"],"names":["handler","AttributeNames","AttributeValues"],"mappings":";;;AAsFA,MAAM,UAAU,IACX,YAC0B;AAC7B,QAAM,iCAAiB,IAAA;AASvB,UAAQ,QAAQ,CAAC,WAAW;AAC1B,UAAM,WAAW,WAAW,IAAI,OAAO,IAAI,KAAK,CAAA;AAChD,aAAS,KAAK,OAAO,OAAO;AAC5B,eAAW,IAAI,OAAO,MAAM,QAAQ;AAAA,EACtC,CAAC;AAED,SAAO,MAAM,KAAK,WAAW,QAAA,CAAS,EAAE,IAAI,CAAC,CAAC,MAAM,QAAQ,OAAO;AAAA,IACjE;AAAA,IACA,SAAS,CACP,KACA,UACA,aACG;AACH,eAAS,QAAQ,CAACA,aAAYA,SAAQ,KAAK,UAAU,QAAQ,CAAC;AAAA,IAChE;AAAA,EAAA,EACA;AACJ;AAOA,MAAM,SAAS,CAAC;AAAA,EACd;AAAA,EACA;AACF,OAAsD;AAAA,EACpD,MAAM,QAAQC,MAAe,WAAW,MAAM;AAAA,EAC9C,SAAS,CAAC,KAAK,GAAG,aAAa;AAC7B,QAAI,aAAaC,OAAgB,MAAM,MAAM;AAC3C,YAAM,UAAU,IAAI;AAGpB,YAAM,eAAe;AAAA,QACnB,OAAO,QAAQ;AAAA,QACf,QAAQ,QAAQ;AAAA,MAAA;AAIlB,eAAS,GAAG;AAGZ,iBAAW,MAAM;AACf,cAAM,cAAc;AAAA,UAClB,OAAO,QAAQ;AAAA,UACf,QAAQ,QAAQ;AAAA,QAAA;AAGlB,gBAAQ;AAAA,UACN,IAAI,YAAY,oBAAoB;AAAA,YAClC,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,aAAa;AAAA,QACX,UAAU,QAAQ;AAAA,MAAA,CACnB;AAAA,IAAA,IAEH,CAAA;AAAA,EAAC;AAAA;AAAA;AAAA;AAAA,EAMT,cAAc,CAAC,YAIb;AAAA,IACE,GAAI,QAAQ,SACR;AAAA,MACE,aAAa;AAAA,QACX,UAAU,QAAQ;AAAA,MAAA,CACnB;AAAA,IAAA,IAEH,CAAA;AAAA,IACJ,GAAI,QAAQ,UACR;AAAA,MACE,eAAe;AAAA,QACb,UAAU,QAAQ;AAAA,MAAA,CACnB;AAAA,IAAA,IAEH,CAAA;AAAA,EAAC;AAAA;AAAA;AAAA;AAAA,EAMT,WAAW,MACT;AAAA,IACE,OAAO;AAAA,MACL,UAAU,CAAC,YAAY,QAAQ,QAAQ,KAAK,EAAE,cAAc,MAAA,CAAO;AAAA,IAAA,CACpE;AAAA,IACD,aAAa;AAAA,MACX,UAAU,CAAC,YAAY,QAAQ,QAAQ,KAAK,EAAE,cAAc,KAAA,CAAM;AAAA,IAAA,CACnE;AAAA,IACD,eAAe;AAAA,MACb,UAAU,CAAC,YAAY,QAAQ,QAAQ,MAAM,EAAE,cAAc,KAAA,CAAM;AAAA,IAAA,CACpE;AAAA;AAAA,IAED,YAAY;AAAA,MACV,UAAU,CAAC,YAAY,QAAQ,QAAQ,MAAM,EAAE,cAAc,KAAA,CAAM;AAAA,IAAA,CACpE;AAAA,IACD,UAAU;AAAA,MACR,UAAU,CAAC,YAAY,QAAQ,QAAQ,KAAK,EAAE,cAAc,KAAA,CAAM;AAAA,IAAA,CACnE;AAAA,EAAA;AAEP;AAOA,MAAA,UAAe,EAAE,SAAS,SAAS,OAAA;;"}
|
|
1
|
+
{"version":3,"file":"handler.js","sources":["../../source/attributes/handler.ts"],"sourcesContent":["import { AttributeNames } from './names';\nimport { AttributeValues } from './values';\n\n/**\n * Attribute Handler System\n *\n * Provides reactive attribute observation for web components.\n * Handlers watch for specific attribute changes and execute callbacks.\n *\n * ## Handler Types:\n *\n * 1. **State Transitions**: Watch for specific value changes\n * - e.g., state changing from \"closed\" to \"open\"\n *\n * 2. **Boolean Triggers**: Watch for true/false changes\n * - e.g., resize=\"true\" triggers recalculation\n *\n * 3. **Value Changes**: Watch for any value change\n * - e.g., data-layout-position updates\n *\n * ## Usage Example:\n * ```typescript\n * const attributes = Attributes.handler.combine(\n * Attributes.handler.observe.resize({\n * callback: (element) => element.events?.recalculate()\n * }),\n * Attributes.handler.observe.visuallyOpen({\n * callback: (element) => element.events?.open({ hasAnimation: true })\n * })\n * );\n * ```\n */\n/**\n * Reference to an element with optional event handlers\n */\nexport interface AttributeElementRef {\n /** The HTML element being observed */\n element: HTMLElement;\n /** Optional event handlers attached to the element */\n events?: Record<string, Function>;\n}\n\n/**\n * Callback function type for attribute handlers\n */\nexport type AttributeCallback = (arg: AttributeElementRef, arg2?: any) => void;\n\n/**\n * Configuration for an attribute handler\n */\nexport interface AttributeHandlerConfig {\n /** The attribute name to observe */\n name: string;\n /** Handler function called when the attribute changes */\n handler: (\n ref: AttributeElementRef,\n oldValue: string | null,\n newValue: string | null,\n ) => void;\n}\n\n/**\n * Properties for creating attribute handlers\n */\nexport interface AttributeHandlerProps {\n /** Callback function to execute when attribute changes */\n callback: AttributeCallback;\n /** Optional attribute name override */\n name?: string;\n}\n\n/**\n * Combines multiple attribute handlers for the same attribute name.\n * When multiple handlers target the same attribute, they execute in sequence.\n *\n * @param configs - Array of attribute handler configurations\n * @returns Combined handler configurations\n *\n * @example\n * ```typescript\n * const handlers = combine(\n * handler1, // First to execute\n * handler2 // Second to execute\n * );\n * ```\n */\nconst combine = (\n ...configs: AttributeHandlerConfig[]\n): AttributeHandlerConfig[] => {\n const handlerMap = new Map<\n string,\n ((\n ref: AttributeElementRef,\n oldValue: string | null,\n newValue: string | null,\n ) => void)[]\n >();\n\n configs.forEach((config) => {\n const handlers = handlerMap.get(config.name) || [];\n handlers.push(config.handler);\n handlerMap.set(config.name, handlers);\n });\n\n return Array.from(handlerMap.entries()).map(([name, handlers]) => ({\n name,\n handler: (\n ref: AttributeElementRef,\n oldValue: string | null,\n newValue: string | null,\n ) => {\n handlers.forEach((handler) => handler(ref, oldValue, newValue));\n },\n }));\n};\n\n/**\n * Observes the 'resize' attribute.\n * Triggers callback when resize=\"true\" and dispatches component:resize event.\n * Commonly used to recalculate component dimensions.\n */\nconst resize = ({\n callback,\n name,\n}: AttributeHandlerProps): AttributeHandlerConfig => ({\n name: name || AttributeNames.deprecated.state.RESIZE,\n handler: (ref, _, newValue) => {\n if (newValue === AttributeValues.state.TRUE) {\n const element = ref.element;\n\n // Capture dimensions before resize\n const previousSize = {\n width: element.offsetWidth,\n height: element.offsetHeight,\n };\n\n // Execute resize callback\n callback(ref);\n\n // Dispatch resize event after callback with updated dimensions\n setTimeout(() => {\n const currentSize = {\n width: element.offsetWidth,\n height: element.offsetHeight,\n };\n\n element.dispatchEvent(\n new CustomEvent('component:resize', {\n detail: {\n tagName: element.tagName.toLowerCase(),\n element,\n timestamp: Date.now(),\n previousSize,\n currentSize,\n source: 'attribute',\n },\n bubbles: true,\n composed: true,\n }),\n );\n }, 0);\n }\n },\n});\n\n/**\n * @deprecated Use visuallyOpen instead\n * Observes 'state' attribute transition from \"closed\" to \"open\".\n */\nconst stateOpen = ({\n callback,\n name,\n}: AttributeHandlerProps): AttributeHandlerConfig => ({\n name: name || AttributeNames.deprecated.state.STATE,\n handler: (ref, oldValue, newValue) => {\n if (\n newValue === AttributeValues.state.OPENED &&\n oldValue === AttributeValues.state.CLOSED\n ) {\n callback(ref);\n }\n },\n});\n\n/**\n * @deprecated Use visuallyClosed instead\n * Observes 'state' attribute transition from \"open\" to \"closed\".\n */\nconst stateClosed = ({\n callback,\n name,\n}: AttributeHandlerProps): AttributeHandlerConfig => ({\n name: name || AttributeNames.deprecated.state.STATE,\n handler: (ref, oldValue, newValue) => {\n if (\n newValue === AttributeValues.state.CLOSED &&\n oldValue === AttributeValues.state.OPENED\n ) {\n callback(ref);\n }\n },\n});\n\n/**\n * Observes 'data-visual-open' attribute.\n * Triggers callback when changing from \"true\" to \"false\".\n * Used for closing animations and transitions.\n */\nconst visuallyClosed = ({\n callback,\n name,\n}: AttributeHandlerProps): AttributeHandlerConfig => ({\n name: name || AttributeNames.visual.open,\n handler: (ref, oldValue, newValue) => {\n if (\n newValue === AttributeValues.state.FALSE &&\n oldValue === AttributeValues.state.TRUE\n ) {\n callback(ref);\n }\n },\n});\n\nconst visuallyHide = ({\n callback,\n name,\n}: AttributeHandlerProps): AttributeHandlerConfig => ({\n name: name || AttributeNames.layout.hidden,\n handler: (ref, oldValue, newValue) => {\n if (\n newValue === AttributeValues.state.TRUE &&\n oldValue === AttributeValues.state.FALSE\n ) {\n callback(ref);\n }\n },\n});\n\nconst visuallyOpen = ({\n callback,\n name,\n}: AttributeHandlerProps): AttributeHandlerConfig => ({\n name: name || AttributeNames.visual.open,\n handler: (ref, oldValue, newValue) => {\n if (\n newValue === AttributeValues.state.TRUE &&\n oldValue === AttributeValues.state.FALSE\n ) {\n callback(ref);\n }\n },\n});\n\nconst visuallyPosition = ({\n callback,\n name,\n}: AttributeHandlerProps): AttributeHandlerConfig => ({\n name: name || AttributeNames.layout.position,\n handler: (ref, oldValue, newValue) => {\n if (newValue !== oldValue) {\n const top = newValue ? parseInt(newValue) : null;\n if (top) {\n callback(ref, top);\n } else {\n callback(ref);\n }\n }\n },\n});\n\nconst visuallyShow = ({\n callback,\n name,\n}: AttributeHandlerProps): AttributeHandlerConfig => ({\n name: name || AttributeNames.layout.hidden,\n handler: (ref, oldValue, newValue) => {\n if (\n newValue === AttributeValues.state.FALSE &&\n oldValue === AttributeValues.state.TRUE\n ) {\n callback(ref);\n }\n },\n});\n\nconst observe = {\n resize,\n stateOpen,\n stateClosed,\n visuallyHide,\n visuallyOpen,\n visuallyClosed,\n visuallyPosition,\n visuallyShow,\n};\n\n/**\n * Common attribute handler combinations for standard component behaviors.\n * These pre-configured handlers simplify component implementation.\n */\nconst common = {\n /**\n * Resize observer for responsive components\n */\n resize: (callback: (element: AttributeElementRef) => void) =>\n resize({ callback }),\n\n /**\n * Visual show/hide handlers for modals and overlays\n */\n visualShowHide: (options: {\n onShow?: (element: AttributeElementRef) => void;\n onHide?: (element: AttributeElementRef) => void;\n }) =>\n combine(\n ...(options.onShow\n ? [\n visuallyShow({\n callback: options.onShow,\n }),\n ]\n : []),\n ...(options.onHide\n ? [\n visuallyHide({\n callback: options.onHide,\n }),\n ]\n : []),\n ),\n\n /**\n * Visual open/close handlers for expandable components\n */\n visualToggle: (options: {\n onOpen?: (element: AttributeElementRef) => void;\n onClose?: (element: AttributeElementRef) => void;\n }) =>\n combine(\n ...(options.onOpen\n ? [\n visuallyOpen({\n callback: options.onOpen,\n }),\n ]\n : []),\n ...(options.onClose\n ? [\n visuallyClosed({\n callback: options.onClose,\n }),\n ]\n : []),\n ),\n\n /**\n * Standard accordion handlers with open/close transitions\n */\n accordion: () =>\n combine(\n resize({\n callback: (element) => element.events?.open({ hasAnimation: false }),\n }),\n visuallyOpen({\n callback: (element) => element.events?.open({ hasAnimation: true }),\n }),\n visuallyClosed({\n callback: (element) => element.events?.close({ hasAnimation: true }),\n }),\n // Deprecated handlers for backwards compatibility\n stateClosed({\n callback: (element) => element.events?.close({ hasAnimation: true }),\n }),\n stateOpen({\n callback: (element) => element.events?.open({ hasAnimation: true }),\n }),\n ),\n};\n\n/**\n * @deprecated Use Attributes.handler.common instead\n */\nexport const CommonAttributeHandlers = common;\n\nexport const handler = { combine, observe, common };\n"],"names":["handler"],"mappings":";;AAsFA,MAAM,UAAU,IACX,YAC0B;AAC7B,QAAM,iCAAiB,IAAA;AASvB,UAAQ,QAAQ,CAAC,WAAW;AAC1B,UAAM,WAAW,WAAW,IAAI,OAAO,IAAI,KAAK,CAAA;AAChD,aAAS,KAAK,OAAO,OAAO;AAC5B,eAAW,IAAI,OAAO,MAAM,QAAQ;AAAA,EACtC,CAAC;AAED,SAAO,MAAM,KAAK,WAAW,QAAA,CAAS,EAAE,IAAI,CAAC,CAA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Ac,KAAA,CAAM;AAAA,IAAA,CACnE;AAAA,IACD,eAAe;AAAA,MACb,UAAU,CAAC,YAAY,QAAQ,QAAQ,MAAM,EAAE,cAAc,KAAA,CAAM;AAAA,IAAA,CACpE;AAAA;AAAA,IAED,YAAY;AAAA,MACV,UAAU,CAAC,YAAY,QAAQ,QAAQ,MAAM,EAAE,cAAc,KAAA,CAAM;AAAA,IAAA,CACpE;AAAA,IACD,UAAU;AAAA,MACR,UAAU,CAAC,YAAY,QAAQ,QAAQ,KAAK,EAAE,cAAc,KAAA,CAAM;AAAA,IAAA,CACnE;AAAA,EAAA;AAEP;AAOO,MAAM,UAAU,EAAE,SAAS,SAAS,OAAA;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export { hasInfo, hasDecoration, includesFeature, isDisplay, isData, isInfo, isLayout, isSharing, includesSharing, isTheme,
|
|
1
|
+
import { handler } from './handler';
|
|
2
|
+
import { AttributeNames as names } from './names';
|
|
3
|
+
import { AttributeValues as values } from './values';
|
|
4
|
+
export { hasInfo, hasDecoration, includesFeature, isDisplay, isData, isInfo, isLayout, isSharing, includesSharing, isTheme, isVisual, getValue, type AttributeElementProps, } from './checks';
|
|
5
5
|
export { handler, names, values };
|
|
6
6
|
export type { AttributeElementRef, AttributeCallback, AttributeHandlerConfig, AttributeHandlerProps, } from './handler';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/attributes/index.ts"],"names":[],"mappings":"AAkCA,OAAO,OAAO,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/attributes/index.ts"],"names":[],"mappings":"AAkCA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAErD,OAAO,EACL,OAAO,EACP,aAAa,EACb,eAAe,EACf,SAAS,EACT,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAS,EACT,eAAe,EACf,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,KAAK,qBAAqB,GAC3B,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;AAClC,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,WAAW,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const AttributeNames: {
|
|
1
|
+
export declare const AttributeNames: {
|
|
2
2
|
readonly decoration: {
|
|
3
3
|
line: string;
|
|
4
4
|
};
|
|
@@ -18,9 +18,10 @@ declare const AttributeNames: {
|
|
|
18
18
|
alertUrl: string;
|
|
19
19
|
events: string;
|
|
20
20
|
filterIds: string;
|
|
21
|
-
removeIds: string;
|
|
22
21
|
gift: string;
|
|
22
|
+
mediaTrained: string;
|
|
23
23
|
news: string;
|
|
24
|
+
removeIds: string;
|
|
24
25
|
schools: string;
|
|
25
26
|
search: string;
|
|
26
27
|
searchType: string;
|
|
@@ -56,9 +57,6 @@ declare const AttributeNames: {
|
|
|
56
57
|
readonly theme: {
|
|
57
58
|
default: string;
|
|
58
59
|
};
|
|
59
|
-
readonly type: {
|
|
60
|
-
default: string;
|
|
61
|
-
};
|
|
62
60
|
readonly visual: {
|
|
63
61
|
bordered: string;
|
|
64
62
|
campaign: string;
|
|
@@ -114,6 +112,7 @@ declare const AttributeNames: {
|
|
|
114
112
|
};
|
|
115
113
|
type: {
|
|
116
114
|
TYPE: string;
|
|
115
|
+
DATA_TYPE: string;
|
|
117
116
|
};
|
|
118
117
|
visual: {
|
|
119
118
|
VISUAL_ALIGN: string;
|
|
@@ -128,5 +127,4 @@ declare const AttributeNames: {
|
|
|
128
127
|
};
|
|
129
128
|
};
|
|
130
129
|
};
|
|
131
|
-
export default AttributeNames;
|
|
132
130
|
//# sourceMappingURL=names.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"names.d.ts","sourceRoot":"","sources":["../../source/attributes/names.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"names.d.ts","sourceRoot":"","sources":["../../source/attributes/names.ts"],"names":[],"mappings":"AAwJA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYjB,CAAC"}
|
package/dist/attributes/names.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
const decoration = {
|
|
3
2
|
line: "data-decoration-line"
|
|
4
3
|
};
|
|
@@ -18,9 +17,10 @@ const information = {
|
|
|
18
17
|
alertUrl: "data-alert-url",
|
|
19
18
|
events: "data-events",
|
|
20
19
|
filterIds: "data-filter-group-ids",
|
|
21
|
-
removeIds: "data-remove-entry-ids",
|
|
22
20
|
gift: "data-gift",
|
|
21
|
+
mediaTrained: "data-media-trained",
|
|
23
22
|
news: "data-news",
|
|
23
|
+
removeIds: "data-remove-entry-ids",
|
|
24
24
|
schools: "data-schools",
|
|
25
25
|
search: "data-search",
|
|
26
26
|
searchType: "data-search-type",
|
|
@@ -56,9 +56,6 @@ const social = {
|
|
|
56
56
|
const theme = {
|
|
57
57
|
default: "data-theme"
|
|
58
58
|
};
|
|
59
|
-
const type = {
|
|
60
|
-
default: "data-type"
|
|
61
|
-
};
|
|
62
59
|
const visual = {
|
|
63
60
|
bordered: "data-visual-bordered",
|
|
64
61
|
campaign: "data-visual-campaign",
|
|
@@ -113,7 +110,8 @@ const deprecated = {
|
|
|
113
110
|
THEME_DEPRECATD: "theme"
|
|
114
111
|
},
|
|
115
112
|
type: {
|
|
116
|
-
TYPE: "type"
|
|
113
|
+
TYPE: "type",
|
|
114
|
+
DATA_TYPE: "data-type"
|
|
117
115
|
},
|
|
118
116
|
visual: {
|
|
119
117
|
VISUAL_ALIGN: "aligned",
|
|
@@ -137,9 +135,10 @@ const AttributeNames = {
|
|
|
137
135
|
sharing,
|
|
138
136
|
social,
|
|
139
137
|
theme,
|
|
140
|
-
type,
|
|
141
138
|
visual,
|
|
142
139
|
deprecated
|
|
143
140
|
};
|
|
144
|
-
|
|
141
|
+
export {
|
|
142
|
+
AttributeNames
|
|
143
|
+
};
|
|
145
144
|
//# sourceMappingURL=names.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"names.js","sources":["../../source/attributes/names.ts"],"sourcesContent":["/**\n * Attribute name constants organized by category.\n *\n * Single-value attributes use a 'default' property for consistency:\n * - display.default = 'data-display'\n * - theme.default = 'data-theme'\n *\n * Multi-value attributes use descriptive property names:\n * - visual.size = 'data-visual-size'\n * - layout.HIDDEN = 'data-layout-hidden'\n */\n\nconst decoration = {\n line: 'data-decoration-line',\n};\n\nconst display = {\n default: 'data-display',\n};\n\nconst feature = {\n animation: 'data-animation',\n lazyLoad: 'data-lazy-load',\n imageExpand: 'data-image-expand',\n};\n\nconst feed = {\n type: 'data-feed-type',\n};\n\nconst information = {\n admissions: 'data-admissions',\n alertUrl: 'data-alert-url',\n events: 'data-events',\n filterIds: 'data-filter-group-ids',\n
|
|
1
|
+
{"version":3,"file":"names.js","sources":["../../source/attributes/names.ts"],"sourcesContent":["/**\n * Attribute name constants organized by category.\n *\n * Single-value attributes use a 'default' property for consistency:\n * - display.default = 'data-display'\n * - theme.default = 'data-theme'\n *\n * Multi-value attributes use descriptive property names:\n * - visual.size = 'data-visual-size'\n * - layout.HIDDEN = 'data-layout-hidden'\n */\n\nconst decoration = {\n line: 'data-decoration-line',\n};\n\nconst display = {\n default: 'data-display',\n};\n\nconst feature = {\n animation: 'data-animation',\n lazyLoad: 'data-lazy-load',\n imageExpand: 'data-image-expand',\n};\n\nconst feed = {\n type: 'data-feed-type',\n};\n\nconst information = {\n admissions: 'data-admissions',\n alertUrl: 'data-alert-url',\n events: 'data-events',\n filterIds: 'data-filter-group-ids',\n gift: 'data-gift',\n mediaTrained: 'data-media-trained',\n news: 'data-news',\n removeIds: 'data-remove-entry-ids',\n schools: 'data-schools',\n search: 'data-search',\n searchType: 'data-search-type',\n title: 'data-title',\n token: 'data-token',\n url: 'data-url',\n};\n\nconst layout = {\n alertOff: 'data-alert-off',\n alignment: 'data-layout-alignment',\n columnCount: 'data-layout-column-count',\n fixed: 'data-layout-fixed',\n height: 'data-layout-height',\n hidden: 'data-layout-hidden',\n imageScaled: 'data-layout-image-scaled',\n imagePosition: 'data-layout-image-position',\n interior: 'data-layout-interior',\n lock: 'data-layout-lock',\n position: 'data-layout-position',\n reverse: 'data-layout-reverse',\n rowCount: 'data-layout-row-count',\n spaceHorizontal: 'data-layout-space-horizontal',\n text: 'data-layout-text',\n};\n\nconst sharing = {\n email: 'data-email',\n print: 'data-print',\n};\n\nconst social = {\n facebook: 'data-facebook',\n twitter: 'data-twitter',\n};\n\nconst theme = {\n default: 'data-theme',\n};\n\nconst visual = {\n bordered: 'data-visual-bordered',\n campaign: 'data-visual-campaign',\n imageAligned: 'data-visual-image-aligned',\n icon: 'data-visual-icon',\n iconSeal: 'data-visual-icon-seal',\n hiddenDays: 'data-days-to-hide',\n open: 'data-visual-open',\n play: 'data-visual-play',\n size: 'data-visual-size',\n time: 'data-visual-time',\n transparent: 'data-visual-transparent',\n};\n\n// Deprecated\n\nconst deprecated = {\n feature: {\n FULLSCREEN: 'option-full-screen',\n SHOW_TIME: 'show-time',\n },\n display: {\n DISPLAY_SIZE: 'size',\n DISPLAY_TYPE: 'display-type',\n DISPLAY: 'display',\n },\n feed: {\n FEED_CATEGORIES: 'categories',\n FEED_COLUMN_COUNT: 'show-count',\n FEED_LAZY_LOAD: 'lazyload',\n FEED_NOT_ENTRIES: 'not',\n FEED_ROW_COUNT: 'row-count',\n FEED_TOKEN: 'token',\n FEED_UNION: 'union',\n },\n option: {\n OPTIONAL_HAS_LINE: 'has-line',\n OPTIONAL_HAS_SEPARATOR: 'include-separator',\n OPTIONAL_STICKY_FIRST: 'isStickyFirst',\n },\n layout: {\n DEFAULT: 'layout',\n LAYOUT_FIXED: 'fixed',\n LAYOUT_ALIGNMENT: 'alignment',\n LAYOUT_IMAGE_POSITION: 'image-position',\n LAYOUT_IMAGE_SCALED: 'image-scaled',\n LAYOUT_STICKY_TOP: 'position-top',\n },\n state: {\n RESIZE: 'resize',\n STATE_DEPRECATD: 'state',\n STATE: 'data-state',\n },\n theme: {\n THEME_DEPRECATD: 'theme',\n },\n type: {\n TYPE: 'type',\n DATA_TYPE: 'data-type',\n },\n visual: {\n VISUAL_ALIGN: 'aligned',\n VISUAL_BORDER: 'border',\n VISUAL_DAYS_TO_HIDE: 'days-to-hide',\n VISUAL_HAS_LOGO: 'hasLogo',\n VISUAL_ICON: 'icon',\n VISUAL_TRANSPARENT: 'transparent',\n VISUAL_QUOTE: 'quote',\n VISUAL_TEXT_CENTER: 'text-center',\n VISUAL_STYLE_PROPS: 'styleProps',\n },\n};\n\nexport const AttributeNames = {\n decoration,\n display,\n feature,\n feed,\n information,\n layout,\n sharing,\n social,\n theme,\n visual,\n deprecated,\n} as const;\n"],"names":[],"mappings":"AAYA,MAAM,aAAa;AAAA,EACjB,MAAM;AACR;AAEA,MAAM,UAAU;AAAA,EACd,SAAS;AACX;AAEA,MAAM,UAAU;AAAA,EACd,WAAW;AAAA,EACX,UAAU;AAAA,EACV,aAAa;AACf;AAEA,MAAM,OAAO;AAAA,EACX,MAAM;AACR;AAEA,MAAM,cAAc;AAAA,EAClB,YAAY;AAAA,EACZ,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,MAAM;AAAA,EACN,cAAc;AAAA,EACd,MAAM;A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