diff --git a/.changeset/warm-lemons-think.md b/.changeset/warm-lemons-think.md new file mode 100644 index 0000000000..efb8f4114d --- /dev/null +++ b/.changeset/warm-lemons-think.md @@ -0,0 +1,5 @@ +--- +'@baloise/ds-core': minor +--- + +**styles**: add pointer-events css help classes diff --git a/docs/.storybook/blocks/css-utils/CssInteractions.tsx b/docs/.storybook/blocks/css-utils/CssInteractions.tsx index 1c88aadbd0..5e8ece94ee 100644 --- a/docs/.storybook/blocks/css-utils/CssInteractions.tsx +++ b/docs/.storybook/blocks/css-utils/CssInteractions.tsx @@ -4,3 +4,4 @@ import json from '../../../../packages/styles/docs/interaction.json' export const CssInteractionsCursor = () => export const CssInteractionsUserSelect = () => +export const CssInteractionsPointerEvents = () => diff --git a/docs/stories/utilities/interactions/pointer-events.stories.mdx b/docs/stories/utilities/interactions/pointer-events.stories.mdx new file mode 100644 index 0000000000..bad7a5d22d --- /dev/null +++ b/docs/stories/utilities/interactions/pointer-events.stories.mdx @@ -0,0 +1,53 @@ +import { Meta, Source, Canvas } from '@storybook/addon-docs' +import { + Banner, + Lead, + Code, + CssInteractionsPointerEvents, + Footer, + LinkCard, + LinkCards, +} from '../../../.storybook/blocks' + + + + + + + The pointer-events CSS property determines the conditions under which a specific graphic element can receive pointer + events, if at all. + + +## Classes + + + + + + + +`} +/> + + diff --git a/libs/nx/src/executors/build-styles/generators/interactions.ts b/libs/nx/src/executors/build-styles/generators/interactions.ts index bc42561284..9e661aab20 100644 --- a/libs/nx/src/executors/build-styles/generators/interactions.ts +++ b/libs/nx/src/executors/build-styles/generators/interactions.ts @@ -25,12 +25,21 @@ export const generateInteractions = async (options: BuildStylesExecutorSchema) = }, }) + const pointerEvents = utils.staticClass({ + property: 'pointer-events', + responsive: false, + values: { + 'pointer-events-auto': 'auto', + 'pointer-events-none': 'none', + }, + }) + return utils.save( 'interaction', options.projectRoot, utils.merge({ - docs: [userSelect.docs, cursor.docs], - rules: [userSelect.rules, cursor.rules], + docs: [userSelect.docs, cursor.docs, pointerEvents.docs], + rules: [userSelect.rules, cursor.rules, pointerEvents.rules], }), ) } diff --git a/packages/core/src/components.d.ts b/packages/core/src/components.d.ts index 0fe2f46082..08322a9e65 100644 --- a/packages/core/src/components.d.ts +++ b/packages/core/src/components.d.ts @@ -721,6 +721,10 @@ export namespace Components { * If `true`, in Angular reactive forms the control will not be set invalid */ "autoInvalidOff": boolean; + /** + * Indicates whether the value of the control can be automatically completed by the browser. + */ + "autocomplete": BalProps.BalInputAutocomplete; /** * Closes the accordion */ @@ -3340,6 +3344,10 @@ export namespace Components { * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user. */ "autocapitalize": string; + /** + * Indicates whether the value of the control can be automatically completed by the browser. + */ + "autocomplete": BalProps.BalInputAutocomplete; /** * This Boolean attribute lets you specify that a form control should have input focus when the page loads. */ @@ -5804,6 +5812,10 @@ declare namespace LocalJSX { * If `true`, in Angular reactive forms the control will not be set invalid */ "autoInvalidOff"?: boolean; + /** + * Indicates whether the value of the control can be automatically completed by the browser. + */ + "autocomplete"?: BalProps.BalInputAutocomplete; /** * Closes the datepicker popover after selection */ @@ -8422,6 +8434,10 @@ declare namespace LocalJSX { * Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user. */ "autocapitalize"?: string; + /** + * Indicates whether the value of the control can be automatically completed by the browser. + */ + "autocomplete"?: BalProps.BalInputAutocomplete; /** * This Boolean attribute lets you specify that a form control should have input focus when the page loads. */