@universityofmaryland/web-model-library 1.0.1 → 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 +1 -0
- package/dist/attributes/checks.d.ts.map +1 -1
- package/dist/attributes/checks.js +317 -331
- 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 +3 -3
- package/dist/attributes/index.d.ts.map +1 -1
- package/dist/attributes/names.d.ts +3 -3
- package/dist/attributes/names.d.ts.map +1 -1
- package/dist/attributes/names.js +5 -3
- package/dist/attributes/names.js.map +1 -1
- package/dist/attributes/values.d.ts +10 -11
- package/dist/attributes/values.d.ts.map +1 -1
- package/dist/attributes/values.js +3 -2
- package/dist/attributes/values.js.map +1 -1
- package/dist/attributes.js +21 -21
- 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 +15 -16
- package/dist/slots/index.d.ts.map +1 -1
- package/dist/slots/mapping.js +3 -3
- package/dist/slots/mapping.js.map +1 -1
- package/dist/slots.d.ts +0 -4
- package/dist/slots.js +41 -40
- 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 -752
- 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 -143
- package/dist/attributes/names.mjs.map +0 -1
- package/dist/attributes/values.mjs +0 -84
- package/dist/attributes/values.mjs.map +0 -1
- package/dist/attributes.mjs +0 -22
- 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 -101
- package/dist/slots/mapping.mjs.map +0 -1
- package/dist/slots.mjs +0 -78
- 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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checks.mjs","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 mega: (props: AttributeElementProps): boolean =>\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.DATA_TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributesValues.display.mega,\n }) ||\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributesValues.display.mega,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributesValues.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: AttributesValues.display.visual,\n }) ||\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributesValues.display.visual,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributesValues.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: AttributesValues.display.simple,\n }) ||\n checkDeprecatedAttribute({\n ...props,\n attributeNameOld: AttributeNames.deprecated.type.TYPE,\n attributeNameNew: AttributeNames.display.default,\n attributeValue: AttributesValues.display.simple,\n }) ||\n isAttributeTrue({\n ...props,\n attributeName: AttributeNames.display.default,\n attributeValue: AttributesValues.display.simple,\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// 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 isVisual,\n getValue,\n};\n\nexport type {\n AttributeElementProps,\n AttributeProps,\n AttributeNullProps,\n DeprecatedAttributeProps,\n};\n"],"names":["AttributesValues"],"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;AAA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AAA,EAAA,CACpC;AAAA,EACD,gBAAgB,kBAAkB;AAAA,IAChC,aAAa,eAAe,OAAO;AAAA,IACnC,gBAAgB,eAAe,WAAW,KAAK;AAAA,EAAA,CAChD;AAAA,EACD,OAAO,kBAAkB;AAAA,IACvB,aAAa,eAAe,YAAY;AAAA,EAAA,CACzC;AAAA,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;"}
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
import AttributeNames from "./names.mjs";
|
|
2
|
-
import AttributeValues from "./values.mjs";
|
|
3
|
-
const combine = (...configs) => {
|
|
4
|
-
const handlerMap = /* @__PURE__ */ new Map();
|
|
5
|
-
configs.forEach((config) => {
|
|
6
|
-
const handlers = handlerMap.get(config.name) || [];
|
|
7
|
-
handlers.push(config.handler);
|
|
8
|
-
handlerMap.set(config.name, handlers);
|
|
9
|
-
});
|
|
10
|
-
return Array.from(handlerMap.entries()).map(([name, handlers]) => ({
|
|
11
|
-
name,
|
|
12
|
-
handler: (ref, oldValue, newValue) => {
|
|
13
|
-
handlers.forEach((handler2) => handler2(ref, oldValue, newValue));
|
|
14
|
-
}
|
|
15
|
-
}));
|
|
16
|
-
};
|
|
17
|
-
const resize = ({
|
|
18
|
-
callback,
|
|
19
|
-
name
|
|
20
|
-
}) => ({
|
|
21
|
-
name: name || AttributeNames.deprecated.state.RESIZE,
|
|
22
|
-
handler: (ref, _, newValue) => {
|
|
23
|
-
if (newValue === AttributeValues.state.TRUE) {
|
|
24
|
-
const element = ref.element;
|
|
25
|
-
const previousSize = {
|
|
26
|
-
width: element.offsetWidth,
|
|
27
|
-
height: element.offsetHeight
|
|
28
|
-
};
|
|
29
|
-
callback(ref);
|
|
30
|
-
setTimeout(() => {
|
|
31
|
-
const currentSize = {
|
|
32
|
-
width: element.offsetWidth,
|
|
33
|
-
height: element.offsetHeight
|
|
34
|
-
};
|
|
35
|
-
element.dispatchEvent(
|
|
36
|
-
new CustomEvent("component:resize", {
|
|
37
|
-
detail: {
|
|
38
|
-
tagName: element.tagName.toLowerCase(),
|
|
39
|
-
element,
|
|
40
|
-
timestamp: Date.now(),
|
|
41
|
-
previousSize,
|
|
42
|
-
currentSize,
|
|
43
|
-
source: "attribute"
|
|
44
|
-
},
|
|
45
|
-
bubbles: true,
|
|
46
|
-
composed: true
|
|
47
|
-
})
|
|
48
|
-
);
|
|
49
|
-
}, 0);
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
const stateOpen = ({
|
|
54
|
-
callback,
|
|
55
|
-
name
|
|
56
|
-
}) => ({
|
|
57
|
-
name: name || AttributeNames.deprecated.state.STATE,
|
|
58
|
-
handler: (ref, oldValue, newValue) => {
|
|
59
|
-
if (newValue === AttributeValues.state.OPENED && oldValue === AttributeValues.state.CLOSED) {
|
|
60
|
-
callback(ref);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
});
|
|
64
|
-
const stateClosed = ({
|
|
65
|
-
callback,
|
|
66
|
-
name
|
|
67
|
-
}) => ({
|
|
68
|
-
name: name || AttributeNames.deprecated.state.STATE,
|
|
69
|
-
handler: (ref, oldValue, newValue) => {
|
|
70
|
-
if (newValue === AttributeValues.state.CLOSED && oldValue === AttributeValues.state.OPENED) {
|
|
71
|
-
callback(ref);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
const visuallyClosed = ({
|
|
76
|
-
callback,
|
|
77
|
-
name
|
|
78
|
-
}) => ({
|
|
79
|
-
name: name || AttributeNames.visual.open,
|
|
80
|
-
handler: (ref, oldValue, newValue) => {
|
|
81
|
-
if (newValue === AttributeValues.state.FALSE && oldValue === AttributeValues.state.TRUE) {
|
|
82
|
-
callback(ref);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
const visuallyHide = ({
|
|
87
|
-
callback,
|
|
88
|
-
name
|
|
89
|
-
}) => ({
|
|
90
|
-
name: name || AttributeNames.layout.hidden,
|
|
91
|
-
handler: (ref, oldValue, newValue) => {
|
|
92
|
-
if (newValue === AttributeValues.state.TRUE && oldValue === AttributeValues.state.FALSE) {
|
|
93
|
-
callback(ref);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
const visuallyOpen = ({
|
|
98
|
-
callback,
|
|
99
|
-
name
|
|
100
|
-
}) => ({
|
|
101
|
-
name: name || AttributeNames.visual.open,
|
|
102
|
-
handler: (ref, oldValue, newValue) => {
|
|
103
|
-
if (newValue === AttributeValues.state.TRUE && oldValue === AttributeValues.state.FALSE) {
|
|
104
|
-
callback(ref);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
const visuallyPosition = ({
|
|
109
|
-
callback,
|
|
110
|
-
name
|
|
111
|
-
}) => ({
|
|
112
|
-
name: name || AttributeNames.layout.position,
|
|
113
|
-
handler: (ref, oldValue, newValue) => {
|
|
114
|
-
if (newValue !== oldValue) {
|
|
115
|
-
const top = newValue ? parseInt(newValue) : null;
|
|
116
|
-
if (top) {
|
|
117
|
-
callback(ref, top);
|
|
118
|
-
} else {
|
|
119
|
-
callback(ref);
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
const visuallyShow = ({
|
|
125
|
-
callback,
|
|
126
|
-
name
|
|
127
|
-
}) => ({
|
|
128
|
-
name: name || AttributeNames.layout.hidden,
|
|
129
|
-
handler: (ref, oldValue, newValue) => {
|
|
130
|
-
if (newValue === AttributeValues.state.FALSE && oldValue === AttributeValues.state.TRUE) {
|
|
131
|
-
callback(ref);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
const observe = {
|
|
136
|
-
resize,
|
|
137
|
-
stateOpen,
|
|
138
|
-
stateClosed,
|
|
139
|
-
visuallyHide,
|
|
140
|
-
visuallyOpen,
|
|
141
|
-
visuallyClosed,
|
|
142
|
-
visuallyPosition,
|
|
143
|
-
visuallyShow
|
|
144
|
-
};
|
|
145
|
-
const common = {
|
|
146
|
-
/**
|
|
147
|
-
* Resize observer for responsive components
|
|
148
|
-
*/
|
|
149
|
-
resize: (callback) => resize({ callback }),
|
|
150
|
-
/**
|
|
151
|
-
* Visual show/hide handlers for modals and overlays
|
|
152
|
-
*/
|
|
153
|
-
visualShowHide: (options) => combine(
|
|
154
|
-
...options.onShow ? [
|
|
155
|
-
visuallyShow({
|
|
156
|
-
callback: options.onShow
|
|
157
|
-
})
|
|
158
|
-
] : [],
|
|
159
|
-
...options.onHide ? [
|
|
160
|
-
visuallyHide({
|
|
161
|
-
callback: options.onHide
|
|
162
|
-
})
|
|
163
|
-
] : []
|
|
164
|
-
),
|
|
165
|
-
/**
|
|
166
|
-
* Visual open/close handlers for expandable components
|
|
167
|
-
*/
|
|
168
|
-
visualToggle: (options) => combine(
|
|
169
|
-
...options.onOpen ? [
|
|
170
|
-
visuallyOpen({
|
|
171
|
-
callback: options.onOpen
|
|
172
|
-
})
|
|
173
|
-
] : [],
|
|
174
|
-
...options.onClose ? [
|
|
175
|
-
visuallyClosed({
|
|
176
|
-
callback: options.onClose
|
|
177
|
-
})
|
|
178
|
-
] : []
|
|
179
|
-
),
|
|
180
|
-
/**
|
|
181
|
-
* Standard accordion handlers with open/close transitions
|
|
182
|
-
*/
|
|
183
|
-
accordion: () => combine(
|
|
184
|
-
resize({
|
|
185
|
-
callback: (element) => element.events?.open({ hasAnimation: false })
|
|
186
|
-
}),
|
|
187
|
-
visuallyOpen({
|
|
188
|
-
callback: (element) => element.events?.open({ hasAnimation: true })
|
|
189
|
-
}),
|
|
190
|
-
visuallyClosed({
|
|
191
|
-
callback: (element) => element.events?.close({ hasAnimation: true })
|
|
192
|
-
}),
|
|
193
|
-
// Deprecated handlers for backwards compatibility
|
|
194
|
-
stateClosed({
|
|
195
|
-
callback: (element) => element.events?.close({ hasAnimation: true })
|
|
196
|
-
}),
|
|
197
|
-
stateOpen({
|
|
198
|
-
callback: (element) => element.events?.open({ hasAnimation: true })
|
|
199
|
-
})
|
|
200
|
-
)
|
|
201
|
-
};
|
|
202
|
-
const handler = { combine, observe, common };
|
|
203
|
-
export {
|
|
204
|
-
handler as default
|
|
205
|
-
};
|
|
206
|
-
//# sourceMappingURL=handler.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"handler.mjs","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"],"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,QAAQ,eAAe,WAAW,MAAM;AAAA,EAC9C,SAAS,CAAC,KAAK,GAAG,aAAa;AAC7B,QAAI,aAAa,gBAAgB,MAAM,MAAM;AAC3C,YAAM,UAAU,IAAI;AAGpB,YAAM,eAAe;AAAA,QACnB,OAAO,QAAQ;AAAA,QACf,QAA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-1,143 +0,0 @@
|
|
|
1
|
-
const decoration = {
|
|
2
|
-
line: "data-decoration-line"
|
|
3
|
-
};
|
|
4
|
-
const display = {
|
|
5
|
-
default: "data-display"
|
|
6
|
-
};
|
|
7
|
-
const feature = {
|
|
8
|
-
animation: "data-animation",
|
|
9
|
-
lazyLoad: "data-lazy-load",
|
|
10
|
-
imageExpand: "data-image-expand"
|
|
11
|
-
};
|
|
12
|
-
const feed = {
|
|
13
|
-
type: "data-feed-type"
|
|
14
|
-
};
|
|
15
|
-
const information = {
|
|
16
|
-
admissions: "data-admissions",
|
|
17
|
-
alertUrl: "data-alert-url",
|
|
18
|
-
events: "data-events",
|
|
19
|
-
filterIds: "data-filter-group-ids",
|
|
20
|
-
removeIds: "data-remove-entry-ids",
|
|
21
|
-
gift: "data-gift",
|
|
22
|
-
news: "data-news",
|
|
23
|
-
schools: "data-schools",
|
|
24
|
-
search: "data-search",
|
|
25
|
-
searchType: "data-search-type",
|
|
26
|
-
title: "data-title",
|
|
27
|
-
token: "data-token",
|
|
28
|
-
url: "data-url"
|
|
29
|
-
};
|
|
30
|
-
const layout = {
|
|
31
|
-
alertOff: "data-alert-off",
|
|
32
|
-
alignment: "data-layout-alignment",
|
|
33
|
-
columnCount: "data-layout-column-count",
|
|
34
|
-
fixed: "data-layout-fixed",
|
|
35
|
-
height: "data-layout-height",
|
|
36
|
-
hidden: "data-layout-hidden",
|
|
37
|
-
imageScaled: "data-layout-image-scaled",
|
|
38
|
-
imagePosition: "data-layout-image-position",
|
|
39
|
-
interior: "data-layout-interior",
|
|
40
|
-
lock: "data-layout-lock",
|
|
41
|
-
position: "data-layout-position",
|
|
42
|
-
reverse: "data-layout-reverse",
|
|
43
|
-
rowCount: "data-layout-row-count",
|
|
44
|
-
spaceHorizontal: "data-layout-space-horizontal",
|
|
45
|
-
text: "data-layout-text"
|
|
46
|
-
};
|
|
47
|
-
const sharing = {
|
|
48
|
-
email: "data-email",
|
|
49
|
-
print: "data-print"
|
|
50
|
-
};
|
|
51
|
-
const social = {
|
|
52
|
-
facebook: "data-facebook",
|
|
53
|
-
twitter: "data-twitter"
|
|
54
|
-
};
|
|
55
|
-
const theme = {
|
|
56
|
-
default: "data-theme"
|
|
57
|
-
};
|
|
58
|
-
const visual = {
|
|
59
|
-
bordered: "data-visual-bordered",
|
|
60
|
-
campaign: "data-visual-campaign",
|
|
61
|
-
imageAligned: "data-visual-image-aligned",
|
|
62
|
-
icon: "data-visual-icon",
|
|
63
|
-
iconSeal: "data-visual-icon-seal",
|
|
64
|
-
hiddenDays: "data-days-to-hide",
|
|
65
|
-
open: "data-visual-open",
|
|
66
|
-
play: "data-visual-play",
|
|
67
|
-
size: "data-visual-size",
|
|
68
|
-
time: "data-visual-time",
|
|
69
|
-
transparent: "data-visual-transparent"
|
|
70
|
-
};
|
|
71
|
-
const deprecated = {
|
|
72
|
-
feature: {
|
|
73
|
-
FULLSCREEN: "option-full-screen",
|
|
74
|
-
SHOW_TIME: "show-time"
|
|
75
|
-
},
|
|
76
|
-
display: {
|
|
77
|
-
DISPLAY_SIZE: "size",
|
|
78
|
-
DISPLAY_TYPE: "display-type",
|
|
79
|
-
DISPLAY: "display"
|
|
80
|
-
},
|
|
81
|
-
feed: {
|
|
82
|
-
FEED_CATEGORIES: "categories",
|
|
83
|
-
FEED_COLUMN_COUNT: "show-count",
|
|
84
|
-
FEED_LAZY_LOAD: "lazyload",
|
|
85
|
-
FEED_NOT_ENTRIES: "not",
|
|
86
|
-
FEED_ROW_COUNT: "row-count",
|
|
87
|
-
FEED_TOKEN: "token",
|
|
88
|
-
FEED_UNION: "union"
|
|
89
|
-
},
|
|
90
|
-
option: {
|
|
91
|
-
OPTIONAL_HAS_LINE: "has-line",
|
|
92
|
-
OPTIONAL_HAS_SEPARATOR: "include-separator",
|
|
93
|
-
OPTIONAL_STICKY_FIRST: "isStickyFirst"
|
|
94
|
-
},
|
|
95
|
-
layout: {
|
|
96
|
-
DEFAULT: "layout",
|
|
97
|
-
LAYOUT_FIXED: "fixed",
|
|
98
|
-
LAYOUT_ALIGNMENT: "alignment",
|
|
99
|
-
LAYOUT_IMAGE_POSITION: "image-position",
|
|
100
|
-
LAYOUT_IMAGE_SCALED: "image-scaled",
|
|
101
|
-
LAYOUT_STICKY_TOP: "position-top"
|
|
102
|
-
},
|
|
103
|
-
state: {
|
|
104
|
-
RESIZE: "resize",
|
|
105
|
-
STATE_DEPRECATD: "state",
|
|
106
|
-
STATE: "data-state"
|
|
107
|
-
},
|
|
108
|
-
theme: {
|
|
109
|
-
THEME_DEPRECATD: "theme"
|
|
110
|
-
},
|
|
111
|
-
type: {
|
|
112
|
-
TYPE: "type",
|
|
113
|
-
DATA_TYPE: "data-type"
|
|
114
|
-
},
|
|
115
|
-
visual: {
|
|
116
|
-
VISUAL_ALIGN: "aligned",
|
|
117
|
-
VISUAL_BORDER: "border",
|
|
118
|
-
VISUAL_DAYS_TO_HIDE: "days-to-hide",
|
|
119
|
-
VISUAL_HAS_LOGO: "hasLogo",
|
|
120
|
-
VISUAL_ICON: "icon",
|
|
121
|
-
VISUAL_TRANSPARENT: "transparent",
|
|
122
|
-
VISUAL_QUOTE: "quote",
|
|
123
|
-
VISUAL_TEXT_CENTER: "text-center",
|
|
124
|
-
VISUAL_STYLE_PROPS: "styleProps"
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
const AttributeNames = {
|
|
128
|
-
decoration,
|
|
129
|
-
display,
|
|
130
|
-
feature,
|
|
131
|
-
feed,
|
|
132
|
-
information,
|
|
133
|
-
layout,
|
|
134
|
-
sharing,
|
|
135
|
-
social,
|
|
136
|
-
theme,
|
|
137
|
-
visual,
|
|
138
|
-
deprecated
|
|
139
|
-
};
|
|
140
|
-
export {
|
|
141
|
-
AttributeNames as default
|
|
142
|
-
};
|
|
143
|
-
//# sourceMappingURL=names.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"names.mjs","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 removeIds: 'data-remove-entry-ids',\n gift: 'data-gift',\n news: 'data-news',\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\nconst 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\nexport default AttributeNames;\n"],"names":[],"mappings":"AAYA,MAAM,aAAa;AAAA,EACjB,MAAM;AACR;AAEA,MAAM,UAAU;AAAA,EACd,SAAS;AACX;AAEA,MAAM,UAAU;AAAA,EACd,WAAW;AAAA,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AA,IAClB,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,YAAY;AAAA,EAAA;AAAA,EAEd,QAAQ;AAAA,IACN,mBAAmB;AAAA,IACnB,wBAAwB;AAAA,IACxB,uBAAuB;AAAA,EAAA;AAAA,EAEzB,QAAQ;AAAA,IACN,SAAS;AAAA,IACT,cAAc;AAAA,IACd,kBAAkB;AAAA,IAClB,uBAAuB;AAAA,IACvB,qBAAqB;AAAA,IACrB,mBAAmB;AAAA,EAAA;AAAA,EAErB,OAAO;AAAA,IACL,QAAQ;AAAA,IACR,iBAAiB;AAAA,IACjB,OAAO;AAAA,EAAA;AAAA,EAET,OAAO;AAAA,IACL,iBAAiB;AAAA,EAAA;AAAA,EAEnB,MAAM;AAAA,IACJ,MAAM;AAAA,IACN,WAAW;AAAA,EAAA;AAAA,EAEb,QAAQ;AAAA,IACN,cAAc;AAAA,IACd,eAAe;AAAA,IACf,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,aAAa;AAAA,IACb,oBAAoB;AAAA,IACpB,cAAc;AAAA,IACd,oBAAoB;AAAA,IACpB,oBAAoB;AAAA,EAAA;AAExB;AAEA,MAAM,iBAAiB;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
const campaign = {
|
|
2
|
-
forward: "forward"
|
|
3
|
-
};
|
|
4
|
-
const data = {
|
|
5
|
-
type: {
|
|
6
|
-
academic: "academic"
|
|
7
|
-
}
|
|
8
|
-
};
|
|
9
|
-
const display = {
|
|
10
|
-
block: "block",
|
|
11
|
-
feature: "feature",
|
|
12
|
-
featured: "featured",
|
|
13
|
-
hero: "hero",
|
|
14
|
-
image: "image",
|
|
15
|
-
list: "list",
|
|
16
|
-
minimal: "minimal",
|
|
17
|
-
overlay: "overlay",
|
|
18
|
-
promo: "promo",
|
|
19
|
-
short: "short",
|
|
20
|
-
stacked: "stacked",
|
|
21
|
-
standard: "standard",
|
|
22
|
-
statement: "statement",
|
|
23
|
-
sticky: "sticky",
|
|
24
|
-
tabular: "tabular",
|
|
25
|
-
mega: "mega",
|
|
26
|
-
visual: "visual",
|
|
27
|
-
simple: "simple"
|
|
28
|
-
};
|
|
29
|
-
const layout = {
|
|
30
|
-
center: "center",
|
|
31
|
-
defaultCentered: "default-centered",
|
|
32
|
-
defaultInteriorCentered: "default-interior-centered",
|
|
33
|
-
defaultInterior: "default-interior",
|
|
34
|
-
fixed: "fixed",
|
|
35
|
-
fullImage: "full-image",
|
|
36
|
-
full: "full",
|
|
37
|
-
large: "large",
|
|
38
|
-
small: "small",
|
|
39
|
-
left: "left",
|
|
40
|
-
right: "right",
|
|
41
|
-
stackedInterior: "stacked-interior"
|
|
42
|
-
};
|
|
43
|
-
const search = {
|
|
44
|
-
domain: "domain"
|
|
45
|
-
};
|
|
46
|
-
const size = {
|
|
47
|
-
NORMAL: "normal",
|
|
48
|
-
LARGE: "large"
|
|
49
|
-
};
|
|
50
|
-
const state = {
|
|
51
|
-
CLOSED: "closed",
|
|
52
|
-
FALSE: "false",
|
|
53
|
-
OPENED: "open",
|
|
54
|
-
TRUE: "true"
|
|
55
|
-
};
|
|
56
|
-
const theme = {
|
|
57
|
-
DARK: "dark",
|
|
58
|
-
GOLD: "gold",
|
|
59
|
-
LIGHT: "light",
|
|
60
|
-
MARYLAND: "maryland"
|
|
61
|
-
};
|
|
62
|
-
const type = {
|
|
63
|
-
OUTLINE: "outline",
|
|
64
|
-
PRIMARY: "primary",
|
|
65
|
-
SECONDARY: "secondary",
|
|
66
|
-
MEGA: "mega",
|
|
67
|
-
VISUAL: "visual",
|
|
68
|
-
SIMPLE: "simple"
|
|
69
|
-
};
|
|
70
|
-
const AttributeValues = {
|
|
71
|
-
campaign,
|
|
72
|
-
data,
|
|
73
|
-
display,
|
|
74
|
-
layout,
|
|
75
|
-
search,
|
|
76
|
-
size,
|
|
77
|
-
state,
|
|
78
|
-
theme,
|
|
79
|
-
type
|
|
80
|
-
};
|
|
81
|
-
export {
|
|
82
|
-
AttributeValues as default
|
|
83
|
-
};
|
|
84
|
-
//# sourceMappingURL=values.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"values.mjs","sources":["../../source/attributes/values.ts"],"sourcesContent":["// Values\n\nconst campaign = {\n forward: 'forward',\n};\n\nconst data = {\n type: {\n academic: 'academic',\n },\n};\n\nconst display = {\n block: 'block',\n feature: 'feature',\n featured: 'featured',\n hero: 'hero',\n image: 'image',\n list: 'list',\n minimal: 'minimal',\n overlay: 'overlay',\n promo: 'promo',\n short: 'short',\n stacked: 'stacked',\n standard: 'standard',\n statement: 'statement',\n sticky: 'sticky',\n tabular: 'tabular',\n mega: 'mega',\n visual: 'visual',\n simple: 'simple',\n};\n\nconst layout = {\n center: 'center',\n defaultCentered: 'default-centered',\n defaultInteriorCentered: 'default-interior-centered',\n defaultInterior: 'default-interior',\n fixed: 'fixed',\n fullImage: 'full-image',\n full: 'full',\n large: 'large',\n small: 'small',\n left: 'left',\n right: 'right',\n stackedInterior: 'stacked-interior',\n};\n\nconst search = {\n domain: 'domain',\n};\n\nconst size = {\n NORMAL: 'normal',\n LARGE: 'large',\n};\n\nconst state = {\n CLOSED: 'closed',\n FALSE: 'false',\n OPENED: 'open',\n TRUE: 'true',\n};\n\nconst theme = {\n DARK: 'dark',\n GOLD: 'gold',\n LIGHT: 'light',\n MARYLAND: 'maryland',\n};\n\nconst type = {\n OUTLINE: 'outline',\n PRIMARY: 'primary',\n SECONDARY: 'secondary',\n MEGA: 'mega',\n VISUAL: 'visual',\n SIMPLE: 'simple',\n};\n\nconst AttributeValues = {\n campaign,\n data,\n display,\n layout,\n search,\n size,\n state,\n theme,\n type,\n};\n\nexport default AttributeValues;\n"],"names":[],"mappings":"AAEA,MAAM,WAAW;AAAA,EACf,SAAS;AACX;AAEA,MAAM,O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default as default2 } from "./attributes/handler.mjs";
|
|
2
|
-
import { default as default3 } from "./attributes/names.mjs";
|
|
3
|
-
import { default as default4 } from "./attributes/values.mjs";
|
|
4
|
-
import { getValue, hasDecoration, hasInfo, includesFeature, includesSharing, isData, isDisplay, isInfo, isLayout, isSharing, isTheme, isVisual } from "./attributes/checks.mjs";
|
|
5
|
-
export {
|
|
6
|
-
getValue,
|
|
7
|
-
default2 as handler,
|
|
8
|
-
hasDecoration,
|
|
9
|
-
hasInfo,
|
|
10
|
-
includesFeature,
|
|
11
|
-
includesSharing,
|
|
12
|
-
isData,
|
|
13
|
-
isDisplay,
|
|
14
|
-
isInfo,
|
|
15
|
-
isLayout,
|
|
16
|
-
isSharing,
|
|
17
|
-
isTheme,
|
|
18
|
-
isVisual,
|
|
19
|
-
default3 as names,
|
|
20
|
-
default4 as values
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=attributes.mjs.map
|
package/dist/attributes.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"attributes.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/dist/index.mjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as attributes from "./attributes.mjs";
|
|
2
|
-
import * as model from "./model.mjs";
|
|
3
|
-
import * as register from "./utilities/register.mjs";
|
|
4
|
-
import { default as default2 } from "./slots.mjs";
|
|
5
|
-
import * as lifecycle from "./utilities/lifecycle.mjs";
|
|
6
|
-
export {
|
|
7
|
-
attributes as Attributes,
|
|
8
|
-
lifecycle as Lifecycle,
|
|
9
|
-
model as Model,
|
|
10
|
-
register as Register,
|
|
11
|
-
default2 as Slots
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|