@politiet/sheriff-web-components 2.0.0-rc.1 → 2.0.1
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/dist/frameworks/preact.d.ts +54 -17
- package/dist/frameworks/preact.d.ts.map +1 -1
- package/dist/frameworks/react.d.ts +20 -20
- package/dist/frameworks/react.d.ts.map +1 -1
- package/dist/react-wrappers/SDSAlertWrapper.d.ts +2 -1
- package/dist/react-wrappers/SDSAlertWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSAlertWrapper.js +1 -1
- package/dist/react-wrappers/SDSAlertWrapper.js.map +1 -1
- package/dist/react-wrappers/SDSButtonWrapper.d.ts +4 -3
- package/dist/react-wrappers/SDSButtonWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSButtonWrapper.js +1 -1
- package/dist/react-wrappers/SDSButtonWrapper.js.map +1 -1
- package/dist/react-wrappers/SDSCheckboxGroupWrapper.d.ts +2 -1
- package/dist/react-wrappers/SDSCheckboxGroupWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSCheckboxGroupWrapper.js +1 -1
- package/dist/react-wrappers/SDSCheckboxGroupWrapper.js.map +1 -1
- package/dist/react-wrappers/SDSCheckboxWrapper.d.ts +4 -3
- package/dist/react-wrappers/SDSCheckboxWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSCheckboxWrapper.js +1 -1
- package/dist/react-wrappers/SDSCheckboxWrapper.js.map +1 -1
- package/dist/react-wrappers/SDSChipWrapper.d.ts +3 -2
- package/dist/react-wrappers/SDSChipWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSChipWrapper.js +1 -1
- package/dist/react-wrappers/SDSChipWrapper.js.map +1 -1
- package/dist/react-wrappers/SDSNotificationWrapper.d.ts +2 -1
- package/dist/react-wrappers/SDSNotificationWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSNotificationWrapper.js +1 -1
- package/dist/react-wrappers/SDSNotificationWrapper.js.map +1 -1
- package/dist/react-wrappers/SDSRadioGroupWrapper.d.ts +2 -1
- package/dist/react-wrappers/SDSRadioGroupWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSRadioGroupWrapper.js +1 -1
- package/dist/react-wrappers/SDSRadioGroupWrapper.js.map +1 -1
- package/dist/react-wrappers/SDSRadioWrapper.d.ts +4 -3
- package/dist/react-wrappers/SDSRadioWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSRadioWrapper.js +1 -1
- package/dist/react-wrappers/SDSRadioWrapper.js.map +1 -1
- package/dist/react-wrappers/SDSSwitchWrapper.d.ts +4 -3
- package/dist/react-wrappers/SDSSwitchWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSSwitchWrapper.js +1 -1
- package/dist/react-wrappers/SDSSwitchWrapper.js.map +1 -1
- package/dist/react-wrappers/SDSTextAreaWrapper.d.ts +6 -5
- package/dist/react-wrappers/SDSTextAreaWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSTextAreaWrapper.js +1 -1
- package/dist/react-wrappers/SDSTextAreaWrapper.js.map +1 -1
- package/dist/react-wrappers/SDSTextFieldWrapper.d.ts +6 -6
- package/dist/react-wrappers/SDSTextFieldWrapper.d.ts.map +1 -1
- package/dist/react-wrappers/SDSTextFieldWrapper.js +1 -1
- package/dist/react-wrappers/SDSTextFieldWrapper.js.map +1 -1
- package/dist/sds-alert/sds-alert.d.ts +4 -2
- package/dist/sds-alert/sds-alert.d.ts.map +1 -1
- package/dist/sds-alert/sds-alert.js.map +1 -1
- package/dist/sds-button/sds-button.d.ts +0 -3
- package/dist/sds-button/sds-button.d.ts.map +1 -1
- package/dist/sds-button/sds-button.js.map +1 -1
- package/dist/sds-button/sds-button.styles.d.ts.map +1 -1
- package/dist/sds-button/sds-button.styles.js +4 -0
- package/dist/sds-button/sds-button.styles.js.map +1 -1
- package/dist/sds-card/sds-card.d.ts +2 -2
- package/dist/sds-card/sds-card.d.ts.map +1 -1
- package/dist/sds-card/sds-card.js +5 -8
- package/dist/sds-card/sds-card.js.map +1 -1
- package/dist/sds-card/sds-card.styles.js +2 -2
- package/dist/sds-card/sds-card.styles.js.map +1 -1
- package/dist/sds-checkbox/sds-checkbox.d.ts +0 -11
- package/dist/sds-checkbox/sds-checkbox.d.ts.map +1 -1
- package/dist/sds-checkbox/sds-checkbox.js +1 -7
- package/dist/sds-checkbox/sds-checkbox.js.map +1 -1
- package/dist/sds-checkbox-group/sds-checkbox-group.d.ts +0 -3
- package/dist/sds-checkbox-group/sds-checkbox-group.d.ts.map +1 -1
- package/dist/sds-checkbox-group/sds-checkbox-group.js.map +1 -1
- package/dist/sds-chip/sds-chip.d.ts +0 -5
- package/dist/sds-chip/sds-chip.d.ts.map +1 -1
- package/dist/sds-chip/sds-chip.js.map +1 -1
- package/dist/sds-heading/sds-heading.d.ts +3 -3
- package/dist/sds-heading/sds-heading.d.ts.map +1 -1
- package/dist/sds-heading/sds-heading.js +7 -7
- package/dist/sds-heading/sds-heading.js.map +1 -1
- package/dist/sds-heading/sds-heading.styles.d.ts.map +1 -1
- package/dist/sds-heading/sds-heading.styles.js +5 -1
- package/dist/sds-heading/sds-heading.styles.js.map +1 -1
- package/dist/sds-icon/sds-icon.styles.d.ts.map +1 -1
- package/dist/sds-icon/sds-icon.styles.js +6 -0
- package/dist/sds-icon/sds-icon.styles.js.map +1 -1
- package/dist/sds-notification/sds-notification.d.ts +4 -2
- package/dist/sds-notification/sds-notification.d.ts.map +1 -1
- package/dist/sds-notification/sds-notification.js.map +1 -1
- package/dist/sds-radio/sds-radio.d.ts +0 -7
- package/dist/sds-radio/sds-radio.d.ts.map +1 -1
- package/dist/sds-radio/sds-radio.js +5 -16
- package/dist/sds-radio/sds-radio.js.map +1 -1
- package/dist/sds-radio-group/sds-radio-group.d.ts +0 -3
- package/dist/sds-radio-group/sds-radio-group.d.ts.map +1 -1
- package/dist/sds-radio-group/sds-radio-group.js.map +1 -1
- package/dist/sds-switch/sds-switch.d.ts +0 -12
- package/dist/sds-switch/sds-switch.d.ts.map +1 -1
- package/dist/sds-switch/sds-switch.js.map +1 -1
- package/dist/sds-text/sds-text.styles.d.ts.map +1 -1
- package/dist/sds-text/sds-text.styles.js +5 -1
- package/dist/sds-text/sds-text.styles.js.map +1 -1
- package/dist/sds-textarea/sds-textarea.d.ts +0 -5
- package/dist/sds-textarea/sds-textarea.d.ts.map +1 -1
- package/dist/sds-textarea/sds-textarea.js.map +1 -1
- package/dist/sds-textfield/sds-textfield.styles.d.ts.map +1 -1
- package/dist/sds-textfield/sds-textfield.styles.js +3 -1
- package/dist/sds-textfield/sds-textfield.styles.js.map +1 -1
- package/dist/sheriff-web-components.js +43 -42
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +143 -143
- package/dist/playwright-util/screenshot.d.ts +0 -3
- package/dist/playwright-util/screenshot.d.ts.map +0 -1
- package/dist/playwright-util/screenshot.js +0 -25
- package/dist/playwright-util/screenshot.js.map +0 -1
- package/dist/react-wrappers/SDSDetailWrapper.d.ts +0 -3
- package/dist/react-wrappers/SDSDetailWrapper.d.ts.map +0 -1
- package/dist/react-wrappers/SDSDetailWrapper.js +0 -10
- package/dist/react-wrappers/SDSDetailWrapper.js.map +0 -1
- package/dist/react-wrappers/SDSLabelWrapper.d.ts +0 -3
- package/dist/react-wrappers/SDSLabelWrapper.d.ts.map +0 -1
- package/dist/react-wrappers/SDSLabelWrapper.js +0 -10
- package/dist/react-wrappers/SDSLabelWrapper.js.map +0 -1
- package/dist/react-wrappers/SDSLinkWrapper.d.ts +0 -3
- package/dist/react-wrappers/SDSLinkWrapper.d.ts.map +0 -1
- package/dist/react-wrappers/SDSLinkWrapper.js +0 -10
- package/dist/react-wrappers/SDSLinkWrapper.js.map +0 -1
- package/dist/react-wrappers/SDSNavCardWrapper.d.ts +0 -3
- package/dist/react-wrappers/SDSNavCardWrapper.d.ts.map +0 -1
- package/dist/react-wrappers/SDSNavCardWrapper.js +0 -10
- package/dist/react-wrappers/SDSNavCardWrapper.js.map +0 -1
- package/dist/react-wrappers/SDSParagraphWrapper.d.ts +0 -3
- package/dist/react-wrappers/SDSParagraphWrapper.d.ts.map +0 -1
- package/dist/react-wrappers/SDSParagraphWrapper.js +0 -10
- package/dist/react-wrappers/SDSParagraphWrapper.js.map +0 -1
- package/dist/sds-detail/sds-detail.d.ts +0 -17
- package/dist/sds-detail/sds-detail.d.ts.map +0 -1
- package/dist/sds-detail/sds-detail.js +0 -37
- package/dist/sds-detail/sds-detail.js.map +0 -1
- package/dist/sds-detail/sds-detail.styles.d.ts +0 -2
- package/dist/sds-detail/sds-detail.styles.d.ts.map +0 -1
- package/dist/sds-detail/sds-detail.styles.js +0 -25
- package/dist/sds-detail/sds-detail.styles.js.map +0 -1
- package/dist/sds-icon/sds-icon.allowed-colors.d.ts +0 -3
- package/dist/sds-icon/sds-icon.allowed-colors.d.ts.map +0 -1
- package/dist/sds-icon/sds-icon.allowed-colors.js +0 -17
- package/dist/sds-icon/sds-icon.allowed-colors.js.map +0 -1
- package/dist/sds-icon/sds-icon.allowed-names.d.ts +0 -3
- package/dist/sds-icon/sds-icon.allowed-names.d.ts.map +0 -1
- package/dist/sds-icon/sds-icon.allowed-names.js +0 -2
- package/dist/sds-icon/sds-icon.allowed-names.js.map +0 -1
- package/dist/sds-icon/sds-icon.color-types.d.ts +0 -2
- package/dist/sds-icon/sds-icon.color-types.d.ts.map +0 -1
- package/dist/sds-icon/sds-icon.color-types.js +0 -2
- package/dist/sds-icon/sds-icon.color-types.js.map +0 -1
- package/dist/sds-icon/sds-icon.icon-types.d.ts +0 -2
- package/dist/sds-icon/sds-icon.icon-types.d.ts.map +0 -1
- package/dist/sds-icon/sds-icon.icon-types.js +0 -2
- package/dist/sds-icon/sds-icon.icon-types.js.map +0 -1
- package/dist/sds-label/sds-label.d.ts +0 -19
- package/dist/sds-label/sds-label.d.ts.map +0 -1
- package/dist/sds-label/sds-label.js +0 -42
- package/dist/sds-label/sds-label.js.map +0 -1
- package/dist/sds-label/sds-label.styles.d.ts +0 -2
- package/dist/sds-label/sds-label.styles.d.ts.map +0 -1
- package/dist/sds-label/sds-label.styles.js +0 -31
- package/dist/sds-label/sds-label.styles.js.map +0 -1
- package/dist/sds-link/sds-link.d.ts +0 -22
- package/dist/sds-link/sds-link.d.ts.map +0 -1
- package/dist/sds-link/sds-link.js +0 -46
- package/dist/sds-link/sds-link.js.map +0 -1
- package/dist/sds-link/sds-link.styles.d.ts +0 -2
- package/dist/sds-link/sds-link.styles.d.ts.map +0 -1
- package/dist/sds-link/sds-link.styles.js +0 -74
- package/dist/sds-link/sds-link.styles.js.map +0 -1
- package/dist/sds-nav-card/sds-nav-card.d.ts +0 -31
- package/dist/sds-nav-card/sds-nav-card.d.ts.map +0 -1
- package/dist/sds-nav-card/sds-nav-card.js +0 -101
- package/dist/sds-nav-card/sds-nav-card.js.map +0 -1
- package/dist/sds-nav-card/sds-nav-card.styles.d.ts +0 -2
- package/dist/sds-nav-card/sds-nav-card.styles.d.ts.map +0 -1
- package/dist/sds-nav-card/sds-nav-card.styles.js +0 -150
- package/dist/sds-nav-card/sds-nav-card.styles.js.map +0 -1
- package/dist/sds-paragraph/sds-paragraph.d.ts +0 -17
- package/dist/sds-paragraph/sds-paragraph.d.ts.map +0 -1
- package/dist/sds-paragraph/sds-paragraph.js +0 -38
- package/dist/sds-paragraph/sds-paragraph.js.map +0 -1
- package/dist/sds-paragraph/sds-paragraph.styles.d.ts +0 -2
- package/dist/sds-paragraph/sds-paragraph.styles.d.ts.map +0 -1
- package/dist/sds-paragraph/sds-paragraph.styles.js +0 -37
- package/dist/sds-paragraph/sds-paragraph.styles.js.map +0 -1
- package/dist/sds-textarea/sds-textarea.spec.d.ts +0 -2
- package/dist/sds-textarea/sds-textarea.spec.d.ts.map +0 -1
- package/dist/sds-textarea/sds-textarea.spec.js +0 -178
- package/dist/sds-textarea/sds-textarea.spec.js.map +0 -1
- package/dist/utils/hmr-helper.d.ts +0 -2
- package/dist/utils/hmr-helper.d.ts.map +0 -1
- package/dist/utils/hmr-helper.js +0 -17
- package/dist/utils/hmr-helper.js.map +0 -1
- package/dist/utils/renderErrorMessage.d.ts +0 -3
- package/dist/utils/renderErrorMessage.d.ts.map +0 -1
- package/dist/utils/renderErrorMessage.js +0 -9
- package/dist/utils/renderErrorMessage.js.map +0 -1
- package/dist/utils/safe-custom-element.d.ts +0 -2
- package/dist/utils/safe-custom-element.d.ts.map +0 -1
- package/dist/utils/safe-custom-element.js +0 -9
- package/dist/utils/safe-custom-element.js.map +0 -1
- package/dist/utils/types.d.ts +0 -2
- package/dist/utils/types.d.ts.map +0 -1
- package/dist/utils/types.js +0 -2
- package/dist/utils/types.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-text.styles.js","sourceRoot":"","sources":["../../src/sds-text/sds-text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+QxB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`\n\t:host {\n\t\t--_sds-text-font-family: var(--sds-text-font-family, var(--sds-typography-font-family-roboto));\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-mobile-line-height));\n\t\t--_sds-text-color: var(--sds-text-color, var(--sds-color-accent-text-default));\n\n\t\tdisplay: block;\n\t\tbox-sizing: border-box;\n\t}\n\n\tp {\n\t\tfont-family: var(--_sds-text-font-family);\n\t\tfont-size: var(--_sds-text-font-size);\n\t\tfont-weight: var(--_sds-text-font-weight);\n\t\tline-height: var(--_sds-text-line-height);\n\t\tcolor: var(--_sds-text-color);\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tmax-width: var(--sds-typography-max-line-width);\n\t}\n\n\t/* Mobile */\n\t:host {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-mobile-line-height));\n\t}\n\n\t:host([strong]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-strong-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-strong-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-strong-mobile-line-height));\n\t}\n\n\t:host([tall]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-tall-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-tall-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-tall-mobile-line-height));\n\t}\n\n\t/* Extra small variants */\n\t:host([size='xs']) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-mobile-line-height));\n\t}\n\n\t:host([size='xs'][strong]) {\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-strong-mobile-font-weight));\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-strong-mobile-font-size));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-strong-mobile-line-height));\n\t}\n\n\t/* Small variants */\n\t:host([size='sm']) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-mobile-line-height));\n\t}\n\n\t:host([size='sm'][strong]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-strong-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-strong-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-strong-mobile-line-height));\n\t}\n\n\t:host([size='sm'][tall]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-tall-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-tall-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-tall-mobile-line-height));\n\t}\n\n\t/* Large variants */\n\t:host([size='lg']) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-mobile-line-height));\n\t}\n\n\t:host([size='lg'][strong]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-mobile-line-height));\n\t}\n\n\t:host([size='lg'][tall]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-tall-mobile-font-size));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-tall-mobile-line-height));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-tall-mobile-font-weight));\n\t}\n\n\t:host([size='lg'][strong][tall]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-tall-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-tall-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-tall-mobile-line-height));\n\t}\n\n\t/* Extra large variant */\n\t:host([size='xl']) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xl-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xl-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xl-mobile-line-height));\n\t}\n\n\t/* Tablet */\n\t@media (min-width: 640px) {\n\t\t/* Medium variants */\n\t\t:host {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-tablet-line-height));\n\t\t}\n\n\t\t:host([strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-strong-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-strong-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-strong-tablet-line-height));\n\t\t}\n\n\t\t:host([tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-tall-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-tall-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-tall-tablet-line-height));\n\t\t}\n\n\t\t/* Extra small variants */\n\t\t:host([size='xs']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-tablet-line-height));\n\t\t}\n\n\t\t:host([size='xs'][strong]) {\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-strong-tablet-font-weight));\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-strong-tablet-font-size));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-strong-tablet-line-height));\n\t\t}\n\n\t\t/* Small variants */\n\t\t:host([size='sm']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-tablet-line-height));\n\t\t}\n\n\t\t:host([size='sm'][strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-strong-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-strong-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-strong-tablet-line-height));\n\t\t}\n\n\t\t:host([size='sm'][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-tall-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-tall-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-tall-tablet-line-height));\n\t\t}\n\n\t\t/* Large variants */\n\t\t:host([size='lg']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-tablet-line-height));\n\t\t}\n\n\t\t:host([size='lg'][strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-tablet-line-height));\n\t\t}\n\n\t\t:host([size='lg'][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-tall-tablet-font-size));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-tall-tablet-line-height));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-tall-tablet-font-weight));\n\t\t}\n\n\t\t:host([size='lg'][strong][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-tall-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-tall-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-tall-tablet-line-height));\n\t\t}\n\n\t\t/* Extra large variant */\n\t\t:host([size='xl']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xl-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xl-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xl-tablet-line-height));\n\t\t}\n\t}\n\n\t/* Desktop */\n\t@media (min-width: 1024px) {\n\t\t/* Medium variants */\n\t\t:host([strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-strong-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-strong-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-strong-desktop-line-height));\n\t\t}\n\n\t\t:host([tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-tall-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-tall-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-tall-desktop-line-height));\n\t\t}\n\n\t\t/* Extra small variants */\n\t\t:host([size='xs']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-desktop-line-height));\n\t\t}\n\n\t\t:host([size='xs'][strong]) {\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-strong-desktop-font-weight));\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-strong-desktop-font-size));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-strong-desktop-line-height));\n\t\t}\n\n\t\t/* Small variants */\n\t\t:host([size='sm']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-desktop-line-height));\n\t\t}\n\n\t\t:host([size='sm'][strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-strong-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-strong-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-strong-desktop-line-height));\n\t\t}\n\n\t\t:host([size='sm'][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-tall-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-tall-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-tall-desktop-line-height));\n\t\t}\n\n\t\t/* Large variants */\n\t\t:host([size='lg']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-desktop-line-height));\n\t\t}\n\n\t\t:host([size='lg'][strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-desktop-line-height));\n\t\t}\n\n\t\t:host([size='lg'][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-tall-desktop-font-size));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-tall-desktop-line-height));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-tall-desktop-font-weight));\n\t\t}\n\n\t\t:host([size='lg'][strong][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-tall-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-tall-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-tall-desktop-line-height));\n\t\t}\n\n\t\t/* Extra large variant */\n\t\t:host([size='xl']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xl-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xl-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xl-desktop-line-height));\n\t\t}\n\t}\n`;\n"]}
|
|
1
|
+
{"version":3,"file":"sds-text.styles.js","sourceRoot":"","sources":["../../src/sds-text/sds-text.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmRxB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`\n\t:host {\n\t\t--_sds-text-font-family: var(--sds-text-font-family, var(--sds-typography-font-family-roboto));\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-mobile-line-height));\n\t\t--_sds-text-color: var(--sds-text-color, var(--sds-color-text-default, var(--sds-color-accent-text-default)));\n\n\t\tdisplay: block;\n\t\tbox-sizing: border-box;\n\t}\n\n\tp {\n\t\tfont-family: var(--_sds-text-font-family);\n\t\tfont-size: var(--_sds-text-font-size);\n\t\tfont-weight: var(--_sds-text-font-weight);\n\t\tline-height: var(--_sds-text-line-height);\n\t\tcolor: var(--_sds-text-color);\n\t\tmargin: 0;\n\t\tpadding: 0;\n\t\tmax-width: var(--sds-typography-max-line-width);\n\t}\n\n\t:host([data-palette]) {\n\t\t--_sds-text-color: var(--sds-text-color, var(--sds-color-text-default, var(--sds-color-accent-text-default)));\n\t}\n\n\t/* Mobile */\n\t:host {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-mobile-line-height));\n\t}\n\n\t:host([strong]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-strong-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-strong-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-strong-mobile-line-height));\n\t}\n\n\t:host([tall]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-tall-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-tall-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-tall-mobile-line-height));\n\t}\n\n\t/* Extra small variants */\n\t:host([size='xs']) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-mobile-line-height));\n\t}\n\n\t:host([size='xs'][strong]) {\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-strong-mobile-font-weight));\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-strong-mobile-font-size));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-strong-mobile-line-height));\n\t}\n\n\t/* Small variants */\n\t:host([size='sm']) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-mobile-line-height));\n\t}\n\n\t:host([size='sm'][strong]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-strong-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-strong-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-strong-mobile-line-height));\n\t}\n\n\t:host([size='sm'][tall]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-tall-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-tall-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-tall-mobile-line-height));\n\t}\n\n\t/* Large variants */\n\t:host([size='lg']) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-mobile-line-height));\n\t}\n\n\t:host([size='lg'][strong]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-mobile-line-height));\n\t}\n\n\t:host([size='lg'][tall]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-tall-mobile-font-size));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-tall-mobile-line-height));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-tall-mobile-font-weight));\n\t}\n\n\t:host([size='lg'][strong][tall]) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-tall-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-tall-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-tall-mobile-line-height));\n\t}\n\n\t/* Extra large variant */\n\t:host([size='xl']) {\n\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xl-mobile-font-size));\n\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xl-mobile-font-weight));\n\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xl-mobile-line-height));\n\t}\n\n\t/* Tablet */\n\t@media (min-width: 640px) {\n\t\t/* Medium variants */\n\t\t:host {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-tablet-line-height));\n\t\t}\n\n\t\t:host([strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-strong-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-strong-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-strong-tablet-line-height));\n\t\t}\n\n\t\t:host([tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-tall-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-tall-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-tall-tablet-line-height));\n\t\t}\n\n\t\t/* Extra small variants */\n\t\t:host([size='xs']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-tablet-line-height));\n\t\t}\n\n\t\t:host([size='xs'][strong]) {\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-strong-tablet-font-weight));\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-strong-tablet-font-size));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-strong-tablet-line-height));\n\t\t}\n\n\t\t/* Small variants */\n\t\t:host([size='sm']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-tablet-line-height));\n\t\t}\n\n\t\t:host([size='sm'][strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-strong-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-strong-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-strong-tablet-line-height));\n\t\t}\n\n\t\t:host([size='sm'][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-tall-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-tall-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-tall-tablet-line-height));\n\t\t}\n\n\t\t/* Large variants */\n\t\t:host([size='lg']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-tablet-line-height));\n\t\t}\n\n\t\t:host([size='lg'][strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-tablet-line-height));\n\t\t}\n\n\t\t:host([size='lg'][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-tall-tablet-font-size));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-tall-tablet-line-height));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-tall-tablet-font-weight));\n\t\t}\n\n\t\t:host([size='lg'][strong][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-tall-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-tall-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-tall-tablet-line-height));\n\t\t}\n\n\t\t/* Extra large variant */\n\t\t:host([size='xl']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xl-tablet-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xl-tablet-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xl-tablet-line-height));\n\t\t}\n\t}\n\n\t/* Desktop */\n\t@media (min-width: 1024px) {\n\t\t/* Medium variants */\n\t\t:host([strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-strong-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-strong-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-strong-desktop-line-height));\n\t\t}\n\n\t\t:host([tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-tall-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-tall-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-tall-desktop-line-height));\n\t\t}\n\n\t\t/* Extra small variants */\n\t\t:host([size='xs']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-desktop-line-height));\n\t\t}\n\n\t\t:host([size='xs'][strong]) {\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xs-strong-desktop-font-weight));\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xs-strong-desktop-font-size));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xs-strong-desktop-line-height));\n\t\t}\n\n\t\t/* Small variants */\n\t\t:host([size='sm']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-desktop-line-height));\n\t\t}\n\n\t\t:host([size='sm'][strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-strong-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-strong-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-strong-desktop-line-height));\n\t\t}\n\n\t\t:host([size='sm'][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-sm-tall-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-sm-tall-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-sm-tall-desktop-line-height));\n\t\t}\n\n\t\t/* Large variants */\n\t\t:host([size='lg']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-desktop-line-height));\n\t\t}\n\n\t\t:host([size='lg'][strong]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-desktop-line-height));\n\t\t}\n\n\t\t:host([size='lg'][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-tall-desktop-font-size));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-tall-desktop-line-height));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-tall-desktop-font-weight));\n\t\t}\n\n\t\t:host([size='lg'][strong][tall]) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-lg-strong-tall-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-lg-strong-tall-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-lg-strong-tall-desktop-line-height));\n\t\t}\n\n\t\t/* Extra large variant */\n\t\t:host([size='xl']) {\n\t\t\t--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-xl-desktop-font-size));\n\t\t\t--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-xl-desktop-font-weight));\n\t\t\t--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-xl-desktop-line-height));\n\t\t}\n\t}\n`;\n"]}
|
|
@@ -21,11 +21,6 @@ export interface SDSTextAreaProps {
|
|
|
21
21
|
maxlength?: number;
|
|
22
22
|
counter?: number;
|
|
23
23
|
size?: InputSize;
|
|
24
|
-
onInput?: (event: Event) => void;
|
|
25
|
-
onChange?: (event: Event) => void;
|
|
26
|
-
onSelect?: (event: Event) => void;
|
|
27
|
-
onFocus?: (event: Event) => void;
|
|
28
|
-
onBlur?: (event: Event) => void;
|
|
29
24
|
}
|
|
30
25
|
export declare class SDSTextArea extends LitElement {
|
|
31
26
|
static styles: import("lit").CSSResult[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-textarea.d.ts","sourceRoot":"","sources":["../../src/sds-textarea/sds-textarea.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAiB,MAAM,KAAK,CAAC;AAOhD,OAAO,sBAAsB,CAAC;AAC9B,OAAO,wBAAwB,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAErC,KAAK,SAAS,GAAG,OAAO,CAAC,SAAS,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;AACxD,MAAM,WAAW,gBAAgB;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,mBAAmB,CAAC,cAAc,CAAC,CAAC;IACnD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,S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,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAiC;AAChC;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAiC;AAChC;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAA2C;AAC1C;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAA2C;AAC1C;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAAuC;AACtC;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAuC;AAEzD;IAAvB,KAAK,CAAC,eAAe,CAAC;4CAA+B;AAtB1C,WAAW;IADvB,oBAAoB,CAAC,cAAc,CAAC;GACxB,WAAW,CA4MvB","sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { guardedCustomElement } from '../utils/guarded-custom-element';\nimport { styles } from './sds-textarea.styles';\n\nimport '../sds-icon/sds-icon';\nimport '../sds-alert/sds-alert';\nimport { SDS_SIZES } from '../types';\n\ntype InputSize = Extract<SDS_SIZES, 'lg' | 'md' | 'sm'>;\nexport interface SDSTextAreaProps {\n\tvalue?: string;\n\tname?: string;\n\tlabel?: string;\n\tplaceholder?: string;\n\t'help-text'?: string;\n\t'error-message'?: string;\n\tdisabled?: boolean;\n\treadonly?: boolean;\n\tautocomplete?: HTMLTextAreaElement['autocomplete'];\n\trequired?: boolean;\n\trows?: number;\n\tcols?: number;\n\twrap?: 'hard' | 'soft';\n\tminlength?: number;\n\tmaxlength?: number;\n\tcounter?: number;\n\tsize?: InputSize;\n\tonInput?: (event: Event) => void;\n\tonChange?: (event: Event) => void;\n\tonSelect?: (event: Event) => void;\n\tonFocus?: (event: Event) => void;\n\tonBlur?: (event: Event) => void;\n}\n\n@guardedCustomElement('sds-textarea')\nexport class SDSTextArea extends LitElement {\n\t// Styling\n\tstatic override styles = [styles];\n\n\t@property({ type: String }) value?: string;\n\t@property({ type: String, reflect: true }) name?: SDSTextAreaProps['name'];\n\t@property({ type: String, reflect: true }) label?: SDSTextAreaProps['label'];\n\t@property({ type: String, reflect: true }) placeholder?: SDSTextAreaProps['placeholder'];\n\t@property({ type: String, attribute: 'help-text', reflect: true }) helpText?: SDSTextAreaProps['help-text'];\n\t@property({ type: String, attribute: 'error-message', reflect: true }) errorMessage?: SDSTextAreaProps['error-message'];\n\t@property({ type: Boolean, reflect: true }) disabled: SDSTextAreaProps['disabled'] = false;\n\t@property({ type: Boolean, attribute: 'readonly', reflect: true }) readOnly: SDSTextAreaProps['readonly'] = false;\n\t@property({ type: String, reflect: true }) autocomplete?: SDSTextAreaProps['autocomplete'];\n\t@property({ type: Boolean, reflect: true }) required: SDSTextAreaProps['required'] = false;\n\t@property({ type: Number, reflect: true }) rows?: SDSTextAreaProps['rows'];\n\t@property({ type: Number, reflect: true }) cols?: SDSTextAreaProps['cols'];\n\t@property({ type: String, reflect: true }) wrap?: SDSTextAreaProps['wrap'];\n\t@property({ type: Number, reflect: true }) minlength?: SDSTextAreaProps['minlength'];\n\t@property({ type: Number, reflect: true }) maxlength?: SDSTextAreaProps['maxlength'];\n\t@property({ type: Number, reflect: true }) counter?: SDSTextAreaProps['counter'];\n\t@property({ type: String, reflect: true }) size: SDSTextAreaProps['size'] = 'md';\n\n\t@query('#sds-textarea') control!: HTMLTextAreaElement;\n\n\tstatic formAssociated = true;\n\tpublic readonly internals: ElementInternals;\n\n\tprivate _defaultValue: string = '';\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.internals = this.attachInternals();\n\t\tthis.attachShadow({ mode: 'open', delegatesFocus: true });\n\t}\n\n\toverride connectedCallback() {\n\t\tsuper.connectedCallback();\n\t\tthis._defaultValue = this.value ?? '';\n\t}\n\n\tprivate updateValidity() {\n\t\tif (this.control.checkValidity()) {\n\t\t\tthis.internals.setValidity({});\n\t\t} else {\n\t\t\tthis.internals.setValidity({ customError: true }, this.control.validationMessage, this.control);\n\t\t}\n\t}\n\n\tprivate hasTypedTooManyCharacters() {\n\t\tif (!this.counter) {\n\t\t\treturn false;\n\t\t}\n\t\tconst currentLength = this.value?.length || 0;\n\t\treturn currentLength > this.counter;\n\t}\n\n\tprivate renderCharacterCounter() {\n\t\tif (this.counter === undefined) return nothing;\n\n\t\tconst currentLength = this.value?.length || 0;\n\t\tif (this.hasTypedTooManyCharacters()) {\n\t\t\treturn html`<sds-alert variant=\"secondary\" data-palette=\"danger\"\n\t\t\t\t><p class=\"sds-textarea__character-counter\" slot=\"message\">Du har ${currentLength - this.counter} tegn for mye</p></sds-alert\n\t\t\t>`;\n\t\t}\n\n\t\treturn html`<p class=\"sds-textarea__character-counter\">Du har ${this.counter - currentLength} tegn igjen</p>`;\n\t}\n\n\tprivate readonly _handleInputChange = (event: Event) => {\n\t\tevent.stopImmediatePropagation();\n\t\tif (!this.disabled) {\n\t\t\tconst currentValue = (event.target as HTMLTextAreaElement).value;\n\t\t\tthis.value = currentValue;\n\t\t\tthis.internals.setFormValue(currentValue === '' ? null : currentValue);\n\t\t\tthis.updateValidity();\n\t\t\tthis.dispatchEvent(new CustomEvent(event.type, { bubbles: true, composed: true }));\n\t\t}\n\t};\n\n\tprivate readonly _handleSelect = (event: Event) => {\n\t\tevent.stopImmediatePropagation();\n\t\tif (!this.disabled) {\n\t\t\tthis.dispatchEvent(new CustomEvent('select', { bubbles: true, composed: true }));\n\t\t}\n\t};\n\n\tprivate readonly _handleFocus = (event: FocusEvent) => {\n\t\tevent.stopImmediatePropagation();\n\t\tthis.dispatchEvent(new CustomEvent('focus', { bubbles: true, composed: true }));\n\t};\n\n\tprivate readonly _handleBlur = (event: FocusEvent) => {\n\t\tevent.stopImmediatePropagation();\n\t\tthis.updateValidity();\n\t\tthis.dispatchEvent(new CustomEvent('blur', { bubbles: true, composed: true }));\n\t};\n\n\tformResetCallback() {\n\t\tthis.control.value = this._defaultValue;\n\t\tthis.internals.setFormValue(this._defaultValue === '' ? null : this._defaultValue);\n\t\tthis.value = this._defaultValue;\n\t\tthis.updateValidity();\n\t}\n\n\tselect(): void {\n\t\tif (!this.disabled) this.control.select();\n\t}\n\n\ttype(): string {\n\t\treturn 'textarea';\n\t}\n\n\toverride focus(): void {\n\t\tif (!this.disabled) this.control.focus();\n\t}\n\n\toverride blur(): void {\n\t\tif (!this.disabled) this.control.blur();\n\t}\n\n\toverride click(): void {\n\t\tif (!this.disabled) this.control.click();\n\t}\n\n\tget selectionStart(): number | null {\n\t\treturn this.control ? this.control.selectionStart : null;\n\t}\n\n\tset selectionStart(value: number | null) {\n\t\tif (this.control && value !== null) {\n\t\t\tthis.control.selectionStart = value;\n\t\t}\n\t}\n\n\tget selectionEnd(): number | null {\n\t\treturn this.control ? this.control.selectionEnd : null;\n\t}\n\tset selectionEnd(value: number | null) {\n\t\tif (this.control && value !== null) {\n\t\t\tthis.control.selectionEnd = value;\n\t\t}\n\t}\n\n\tsetSelectionRange(start: number, end: number, direction?: 'forward' | 'backward' | 'none'): void {\n\t\tif (this.control) {\n\t\t\tthis.control.setSelectionRange(start, end, direction);\n\t\t}\n\t}\n\n\tcheckValidity(): boolean {\n\t\treturn this.control.checkValidity();\n\t}\n\n\treportValidity(): boolean {\n\t\treturn this.control.reportValidity();\n\t}\n\n\tsetCustomValidity(message: string): void {\n\t\tthis.control.setCustomValidity(message);\n\t\tthis.updateValidity();\n\t}\n\n\toverride render() {\n\t\tconst textareaClasses = {\n\t\t\t'sds-textarea': true,\n\t\t\t'sds-textarea--error': Boolean(this.errorMessage || this.hasTypedTooManyCharacters()),\n\t\t};\n\n\t\treturn html`\n\t\t\t<div class=\"${classMap(textareaClasses)}\">\n\t\t\t\t${this.label || this.helpText\n\t\t\t\t\t? html`<div>\n\t\t\t\t\t\t\t${this.label ? html`<label for=\"sds-textarea\" class=\"sds-textarea__label\">${this.label}</label>` : nothing}\n\t\t\t\t\t\t\t${this.helpText ? html`<p class=\"sds-textarea__help-text\">${this.helpText}</p>` : nothing}\n\t\t\t\t\t\t</div>`\n\t\t\t\t\t: nothing}\n\t\t\t\t<div class=\"sds-textarea__input-container\">\n\t\t\t\t\t<textarea\n\t\t\t\t\t\tclass=\"sds-textarea__input\"\n\t\t\t\t\t\tid=\"sds-textarea\"\n\t\t\t\t\t\t?disabled=\"${this.disabled}\"\n\t\t\t\t\t\t?readonly=\"${this.readOnly}\"\n\t\t\t\t\t\tplaceholder=\"${ifDefined(this.placeholder)}\"\n\t\t\t\t\t\t.value=\"${this.value ?? ''}\"\n\t\t\t\t\t\t.autocomplete=\"${this.autocomplete}\"\n\t\t\t\t\t\tname=\"${ifDefined(this.name)}\"\n\t\t\t\t\t\t?required=\"${this.required}\"\n\t\t\t\t\t\trows=\"${ifDefined(this.rows)}\"\n\t\t\t\t\t\tcols=\"${ifDefined(this.cols)}\"\n\t\t\t\t\t\twrap=\"${ifDefined(this.wrap)}\"\n\t\t\t\t\t\tminlength=\"${ifDefined(this.minlength)}\"\n\t\t\t\t\t\tmaxlength=\"${ifDefined(this.maxlength)}\"\n\t\t\t\t\t\t@input=\"${this._handleInputChange}\"\n\t\t\t\t\t\t@change=\"${this._handleInputChange}\"\n\t\t\t\t\t\t@select=\"${this._handleSelect}\"\n\t\t\t\t\t\t@focus=\"${this._handleFocus}\"\n\t\t\t\t\t\t@blur=\"${this._handleBlur}\"\n\t\t\t\t\t></textarea>\n\t\t\t\t</div>\n\t\t\t\t${this.errorMessage ? html`<sds-alert variant=\"secondary\" data-palette=\"danger\"><p slot=\"message\">${this.errorMessage}</p></sds-alert>` : nothing} ${this.renderCharacterCounter()}\n\t\t\t</div>\n\t\t`;\n\t}\n}\n\ndeclare global {\n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AO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CAAgD;AACxB;IAAlE,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CAAgD;AACvE;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;iDAAiD;AAC/C;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;6CAAgD;AAChD;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAiC;AAChC;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAiC;AAChC;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAiC;AAChC;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAA2C;AAC1C;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;8CAA2C;AAC1C;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;4CAAuC;AACtC;IAA1C,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;yCAAuC;AAEzD;IAAvB,KAAK,CAAC,eAAe,CAAC;4CAA+B;AAtB1C,WAAW;IADvB,oBAAoB,CAAC,cAAc,CAAC;GACxB,WAAW,CA4MvB","sourcesContent":["import { LitElement, html, nothing } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { guardedCustomElement } from '../utils/guarded-custom-element';\nimport { styles } from './sds-textarea.styles';\n\nimport '../sds-icon/sds-icon';\nimport '../sds-alert/sds-alert';\nimport { SDS_SIZES } from '../types';\n\ntype InputSize = Extract<SDS_SIZES, 'lg' | 'md' | 'sm'>;\nexport interface SDSTextAreaProps {\n\tvalue?: string;\n\tname?: string;\n\tlabel?: string;\n\tplaceholder?: string;\n\t'help-text'?: string;\n\t'error-message'?: string;\n\tdisabled?: boolean;\n\treadonly?: boolean;\n\tautocomplete?: HTMLTextAreaElement['autocomplete'];\n\trequired?: boolean;\n\trows?: number;\n\tcols?: number;\n\twrap?: 'hard' | 'soft';\n\tminlength?: number;\n\tmaxlength?: number;\n\tcounter?: number;\n\tsize?: InputSize;\n}\n\n@guardedCustomElement('sds-textarea')\nexport class SDSTextArea extends LitElement {\n\t// Styling\n\tstatic override styles = [styles];\n\n\t@property({ type: String }) value?: string;\n\t@property({ type: String, reflect: true }) name?: SDSTextAreaProps['name'];\n\t@property({ type: String, reflect: true }) label?: SDSTextAreaProps['label'];\n\t@property({ type: String, reflect: true }) placeholder?: SDSTextAreaProps['placeholder'];\n\t@property({ type: String, attribute: 'help-text', reflect: true }) helpText?: SDSTextAreaProps['help-text'];\n\t@property({ type: String, attribute: 'error-message', reflect: true }) errorMessage?: SDSTextAreaProps['error-message'];\n\t@property({ type: Boolean, reflect: true }) disabled: SDSTextAreaProps['disabled'] = false;\n\t@property({ type: Boolean, attribute: 'readonly', reflect: true }) readOnly: SDSTextAreaProps['readonly'] = false;\n\t@property({ type: String, reflect: true }) autocomplete?: SDSTextAreaProps['autocomplete'];\n\t@property({ type: Boolean, reflect: true }) required: SDSTextAreaProps['required'] = false;\n\t@property({ type: Number, reflect: true }) rows?: SDSTextAreaProps['rows'];\n\t@property({ type: Number, reflect: true }) cols?: SDSTextAreaProps['cols'];\n\t@property({ type: String, reflect: true }) wrap?: SDSTextAreaProps['wrap'];\n\t@property({ type: Number, reflect: true }) minlength?: SDSTextAreaProps['minlength'];\n\t@property({ type: Number, reflect: true }) maxlength?: SDSTextAreaProps['maxlength'];\n\t@property({ type: Number, reflect: true }) counter?: SDSTextAreaProps['counter'];\n\t@property({ type: String, reflect: true }) size: SDSTextAreaProps['size'] = 'md';\n\n\t@query('#sds-textarea') control!: HTMLTextAreaElement;\n\n\tstatic formAssociated = true;\n\tpublic readonly internals: ElementInternals;\n\n\tprivate _defaultValue: string = '';\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis.internals = this.attachInternals();\n\t\tthis.attachShadow({ mode: 'open', delegatesFocus: true });\n\t}\n\n\toverride connectedCallback() {\n\t\tsuper.connectedCallback();\n\t\tthis._defaultValue = this.value ?? '';\n\t}\n\n\tprivate updateValidity() {\n\t\tif (this.control.checkValidity()) {\n\t\t\tthis.internals.setValidity({});\n\t\t} else {\n\t\t\tthis.internals.setValidity({ customError: true }, this.control.validationMessage, this.control);\n\t\t}\n\t}\n\n\tprivate hasTypedTooManyCharacters() {\n\t\tif (!this.counter) {\n\t\t\treturn false;\n\t\t}\n\t\tconst currentLength = this.value?.length || 0;\n\t\treturn currentLength > this.counter;\n\t}\n\n\tprivate renderCharacterCounter() {\n\t\tif (this.counter === undefined) return nothing;\n\n\t\tconst currentLength = this.value?.length || 0;\n\t\tif (this.hasTypedTooManyCharacters()) {\n\t\t\treturn html`<sds-alert variant=\"secondary\" data-palette=\"danger\"\n\t\t\t\t><p class=\"sds-textarea__character-counter\" slot=\"message\">Du har ${currentLength - this.counter} tegn for mye</p></sds-alert\n\t\t\t>`;\n\t\t}\n\n\t\treturn html`<p class=\"sds-textarea__character-counter\">Du har ${this.counter - currentLength} tegn igjen</p>`;\n\t}\n\n\tprivate readonly _handleInputChange = (event: Event) => {\n\t\tevent.stopImmediatePropagation();\n\t\tif (!this.disabled) {\n\t\t\tconst currentValue = (event.target as HTMLTextAreaElement).value;\n\t\t\tthis.value = currentValue;\n\t\t\tthis.internals.setFormValue(currentValue === '' ? null : currentValue);\n\t\t\tthis.updateValidity();\n\t\t\tthis.dispatchEvent(new CustomEvent(event.type, { bubbles: true, composed: true }));\n\t\t}\n\t};\n\n\tprivate readonly _handleSelect = (event: Event) => {\n\t\tevent.stopImmediatePropagation();\n\t\tif (!this.disabled) {\n\t\t\tthis.dispatchEvent(new CustomEvent('select', { bubbles: true, composed: true }));\n\t\t}\n\t};\n\n\tprivate readonly _handleFocus = (event: FocusEvent) => {\n\t\tevent.stopImmediatePropagation();\n\t\tthis.dispatchEvent(new CustomEvent('focus', { bubbles: true, composed: true }));\n\t};\n\n\tprivate readonly _handleBlur = (event: FocusEvent) => {\n\t\tevent.stopImmediatePropagation();\n\t\tthis.updateValidity();\n\t\tthis.dispatchEvent(new CustomEvent('blur', { bubbles: true, composed: true }));\n\t};\n\n\tformResetCallback() {\n\t\tthis.control.value = this._defaultValue;\n\t\tthis.internals.setFormValue(this._defaultValue === '' ? null : this._defaultValue);\n\t\tthis.value = this._defaultValue;\n\t\tthis.updateValidity();\n\t}\n\n\tselect(): void {\n\t\tif (!this.disabled) this.control.select();\n\t}\n\n\ttype(): string {\n\t\treturn 'textarea';\n\t}\n\n\toverride focus(): void {\n\t\tif (!this.disabled) this.control.focus();\n\t}\n\n\toverride blur(): void {\n\t\tif (!this.disabled) this.control.blur();\n\t}\n\n\toverride click(): void {\n\t\tif (!this.disabled) this.control.click();\n\t}\n\n\tget selectionStart(): number | null {\n\t\treturn this.control ? this.control.selectionStart : null;\n\t}\n\n\tset selectionStart(value: number | null) {\n\t\tif (this.control && value !== null) {\n\t\t\tthis.control.selectionStart = value;\n\t\t}\n\t}\n\n\tget selectionEnd(): number | null {\n\t\treturn this.control ? this.control.selectionEnd : null;\n\t}\n\tset selectionEnd(value: number | null) {\n\t\tif (this.control && value !== null) {\n\t\t\tthis.control.selectionEnd = value;\n\t\t}\n\t}\n\n\tsetSelectionRange(start: number, end: number, direction?: 'forward' | 'backward' | 'none'): void {\n\t\tif (this.control) {\n\t\t\tthis.control.setSelectionRange(start, end, direction);\n\t\t}\n\t}\n\n\tcheckValidity(): boolean {\n\t\treturn this.control.checkValidity();\n\t}\n\n\treportValidity(): boolean {\n\t\treturn this.control.reportValidity();\n\t}\n\n\tsetCustomValidity(message: string): void {\n\t\tthis.control.setCustomValidity(message);\n\t\tthis.updateValidity();\n\t}\n\n\toverride render() {\n\t\tconst textareaClasses = {\n\t\t\t'sds-textarea': true,\n\t\t\t'sds-textarea--error': Boolean(this.errorMessage || this.hasTypedTooManyCharacters()),\n\t\t};\n\n\t\treturn html`\n\t\t\t<div class=\"${classMap(textareaClasses)}\">\n\t\t\t\t${this.label || this.helpText\n\t\t\t\t\t? html`<div>\n\t\t\t\t\t\t\t${this.label ? html`<label for=\"sds-textarea\" class=\"sds-textarea__label\">${this.label}</label>` : nothing}\n\t\t\t\t\t\t\t${this.helpText ? html`<p class=\"sds-textarea__help-text\">${this.helpText}</p>` : nothing}\n\t\t\t\t\t\t</div>`\n\t\t\t\t\t: nothing}\n\t\t\t\t<div class=\"sds-textarea__input-container\">\n\t\t\t\t\t<textarea\n\t\t\t\t\t\tclass=\"sds-textarea__input\"\n\t\t\t\t\t\tid=\"sds-textarea\"\n\t\t\t\t\t\t?disabled=\"${this.disabled}\"\n\t\t\t\t\t\t?readonly=\"${this.readOnly}\"\n\t\t\t\t\t\tplaceholder=\"${ifDefined(this.placeholder)}\"\n\t\t\t\t\t\t.value=\"${this.value ?? ''}\"\n\t\t\t\t\t\t.autocomplete=\"${this.autocomplete}\"\n\t\t\t\t\t\tname=\"${ifDefined(this.name)}\"\n\t\t\t\t\t\t?required=\"${this.required}\"\n\t\t\t\t\t\trows=\"${ifDefined(this.rows)}\"\n\t\t\t\t\t\tcols=\"${ifDefined(this.cols)}\"\n\t\t\t\t\t\twrap=\"${ifDefined(this.wrap)}\"\n\t\t\t\t\t\tminlength=\"${ifDefined(this.minlength)}\"\n\t\t\t\t\t\tmaxlength=\"${ifDefined(this.maxlength)}\"\n\t\t\t\t\t\t@input=\"${this._handleInputChange}\"\n\t\t\t\t\t\t@change=\"${this._handleInputChange}\"\n\t\t\t\t\t\t@select=\"${this._handleSelect}\"\n\t\t\t\t\t\t@focus=\"${this._handleFocus}\"\n\t\t\t\t\t\t@blur=\"${this._handleBlur}\"\n\t\t\t\t\t></textarea>\n\t\t\t\t</div>\n\t\t\t\t${this.errorMessage ? html`<sds-alert variant=\"secondary\" data-palette=\"danger\"><p slot=\"message\">${this.errorMessage}</p></sds-alert>` : nothing} ${this.renderCharacterCounter()}\n\t\t\t</div>\n\t\t`;\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'sds-textarea': SDSTextArea;\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-textfield.styles.d.ts","sourceRoot":"","sources":["../../src/sds-textfield/sds-textfield.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"sds-textfield.styles.d.ts","sourceRoot":"","sources":["../../src/sds-textfield/sds-textfield.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBAsKlB,CAAC"}
|
|
@@ -19,6 +19,7 @@ export const styles = css `
|
|
|
19
19
|
--_sds-textfield-padding-inline: var(--sds-textfield-padding-inline, var(--sds-spacing-xs));
|
|
20
20
|
--_sds-textfield-padding-icon: var(--sds-textfield-padding-icon, calc(var(--sds-spacing-xs) + var(--sds-components-icon-md)));
|
|
21
21
|
--_sds-textfield-disabled-opacity: var(--sds-textfield-disabled-opacity, var(--sds-color-states-disabled-opacity));
|
|
22
|
+
--_sds-textfield-max-width: var(--sds-textfield-input-max-width, var(--sds-typography-max-line-width, 80ch));
|
|
22
23
|
|
|
23
24
|
--_sds-textfield-label-text-color: var(--sds-textfield-label-text-color, var(--sds-color-neutral-text-default));
|
|
24
25
|
--_sds-textfield-label-font-size: var(--sds-textfield-label-font-size, var(--sds-components-font-size-content-md));
|
|
@@ -27,7 +28,7 @@ export const styles = css `
|
|
|
27
28
|
|
|
28
29
|
--_sds-textfield-helptext-text-color: var(--sds-textfield-helptext-text-color, var(--sds-color-neutral-text-subtle));
|
|
29
30
|
--_sds-textfield-helptext-font-size: var(--sds-textfield-helptext-font-size, var(--sds-components-font-size-content-md));
|
|
30
|
-
--_sds-textfield-helptext-font-weight: var(--sds-textfield-helptext-font-weight, var(--sds-typography-font-weight-
|
|
31
|
+
--_sds-textfield-helptext-font-weight: var(--sds-textfield-helptext-font-weight, var(--sds-typography-font-weight-regular));
|
|
31
32
|
--_sds-textfield-helptext-line-height: var(--sds-textfield-helptext-line-height, var(--sds-components-line-height-squeezed-md));
|
|
32
33
|
|
|
33
34
|
--_sds-textfield-focus-color: var(--sds-textfield-focus-color, var(--sds-color-states-focus-outer));
|
|
@@ -64,6 +65,7 @@ export const styles = css `
|
|
|
64
65
|
border-radius: var(--_sds-textfield-border-radius);
|
|
65
66
|
border: var(--_sds-textfield-border-width) solid var(--_sds-textfield-border-color);
|
|
66
67
|
background: var(--_sds-textfield-background-color);
|
|
68
|
+
max-width: var(--_sds-textfield-max-width);
|
|
67
69
|
width: 100%;
|
|
68
70
|
|
|
69
71
|
&:hover {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sds-textfield.styles.js","sourceRoot":"","sources":["../../src/sds-textfield/sds-textfield.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"sds-textfield.styles.js","sourceRoot":"","sources":["../../src/sds-textfield/sds-textfield.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsKxB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport const styles = css`\n\t:host {\n\t\t--_sds-textfield-background-color: var(--sds-textfield-background-color, var(--sds-color-neutral-background-default));\n\t\t--_sds-textfield-text-color: var(--sds-textfield-text-color, var(--sds-color-neutral-text-default));\n\n\t\t--_sds-textfield-border-color: var(--sds-textfield-border-color, var(--sds-color-neutral-border-default));\n\t\t--_sds-textfield-border-width: var(--sds-textfield-border-width, var(--sds-border-sm));\n\t\t--_sds-textfield-border-radius: var(--sds-textfield-border-radius, var(--sds-radius-sm));\n\n\t\t--_sds-textfield-font-family: var(--sds-textfield-font-family, var(--sds-typography-font-family-roboto));\n\t\t--_sds-textfield-font-size: var(--sds-textfield-font-size, var(--sds-components-font-size-content-md));\n\t\t--_sds-textfield-font-weight: var(--sds-textfield-font-weight, var(--sds-typography-font-weight-regular));\n\t\t--_sds-textfield-line-height: var(--sds-textfield-line-height, var(--sds-components-line-height-squeezed-md));\n\t\t--_sds-textfield-min-height: var(--sds-textfield-height, var(--sds-components-button-md));\n\n\t\t--_sds-textfield-gap: var(--sds-textfield-gap, var(--sds-spacing-3xs));\n\t\t--_sds-textfield-padding-block: var(--sds-textfield-padding-block, 0);\n\t\t--_sds-textfield-padding-inline: var(--sds-textfield-padding-inline, var(--sds-spacing-xs));\n\t\t--_sds-textfield-padding-icon: var(--sds-textfield-padding-icon, calc(var(--sds-spacing-xs) + var(--sds-components-icon-md)));\n\t\t--_sds-textfield-disabled-opacity: var(--sds-textfield-disabled-opacity, var(--sds-color-states-disabled-opacity));\n\t\t--_sds-textfield-max-width: var(--sds-textfield-input-max-width, var(--sds-typography-max-line-width, 80ch));\n\n\t\t--_sds-textfield-label-text-color: var(--sds-textfield-label-text-color, var(--sds-color-neutral-text-default));\n\t\t--_sds-textfield-label-font-size: var(--sds-textfield-label-font-size, var(--sds-components-font-size-content-md));\n\t\t--_sds-textfield-label-font-weight: var(--sds-textfield-label-font-weight, var(--sds-typography-font-weight-medium));\n\t\t--_sds-textfield-label-line-height: var(--sds-textfield-label-line-height, var(--sds-components-line-height-squeezed-md));\n\n\t\t--_sds-textfield-helptext-text-color: var(--sds-textfield-helptext-text-color, var(--sds-color-neutral-text-subtle));\n\t\t--_sds-textfield-helptext-font-size: var(--sds-textfield-helptext-font-size, var(--sds-components-font-size-content-md));\n\t\t--_sds-textfield-helptext-font-weight: var(--sds-textfield-helptext-font-weight, var(--sds-typography-font-weight-regular));\n\t\t--_sds-textfield-helptext-line-height: var(--sds-textfield-helptext-line-height, var(--sds-components-line-height-squeezed-md));\n\n\t\t--_sds-textfield-focus-color: var(--sds-textfield-focus-color, var(--sds-color-states-focus-outer));\n\t\t--_sds-textfield-focus-inner-color: var(--sds-textfield-focus-inner-color, var(--sds-color-states-focus-inner));\n\t\t--_sds-textfield-focus-spacing: var(--sds-textfield-focus-spacing, var(--sds-color-states-focus-spacing));\n\n\t\t--_sds-textfield-icon-right: var(--sds-textfield-icon-right, var(--sds-spacing-xs));\n\t\t--_sds-textfield-icon-top: var(--sds-textfield-icon-top, var(--sds-spacing-3xs));\n\n\t\tall: unset;\n\t\tdisplay: block;\n\t\ttext-align: start;\n\t}\n\n\t.sds-textfield {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: var(--_sds-textfield-gap);\n\t\tfont-family: var(--_sds-textfield-font-family);\n\n\t\t.sds-textfield__input-container {\n\t\t\tposition: relative;\n\t\t}\n\n\t\t.sds-textfield__input {\n\t\t\tbox-sizing: border-box;\n\t\t\tcolor: var(--_sds-textfield-text-color);\n\t\t\tpadding: var(--_sds-textfield-padding-block) var(--_sds-textfield-padding-inline);\n\t\t\tline-height: var(--_sds-textfield-line-height);\n\t\t\tfont-size: var(--_sds-textfield-font-size);\n\t\t\tfont-weight: var(--_sds-textfield-font-weight);\n\t\t\tfont-family: var(--_sds-textfield-font-family);\n\t\t\tmin-height: var(--_sds-textfield-min-height);\n\t\t\tborder-radius: var(--_sds-textfield-border-radius);\n\t\t\tborder: var(--_sds-textfield-border-width) solid var(--_sds-textfield-border-color);\n\t\t\tbackground: var(--_sds-textfield-background-color);\n\t\t\tmax-width: var(--_sds-textfield-max-width);\n\t\t\twidth: 100%;\n\n\t\t\t&:hover {\n\t\t\t\t--_sds-textfield-border-color: var(--sds-textfield-border-color, var(--sds-color-neutral-border-strong));\n\t\t\t}\n\n\t\t\t&:focus-visible {\n\t\t\t\tbox-shadow: 0 0 0 var(--sds-color-states-focus-spacing) var(--_sds-textfield-focus-inner-color);\n\t\t\t\toutline: 3px solid var(--_sds-textfield-focus-color);\n\t\t\t\toutline-offset: 3px;\n\t\t\t}\n\t\t}\n\n\t\t.sds-textfield__label {\n\t\t\tcolor: var(--_sds-textfield-text-color);\n\t\t\tfont-size: var(--_sds-textfield-label-font-size);\n\t\t\tfont-weight: var(--_sds-textfield-label-font-weight);\n\t\t\tline-height: var(--_sds-textfield-label-line-height);\n\t\t}\n\n\t\t.sds-textfield__label:has(sds-icon) {\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: row;\n\t\t\talign-items: center;\n\t\t\tgap: var(--_sds-textfield-gap);\n\t\t}\n\n\t\t.sds-textfield__help-text {\n\t\t\tdisplay: block;\n\t\t\tcolor: var(--_sds-textfield-helptext-text-color);\n\t\t\tfont-size: var(--_sds-textfield-helptext-font-size);\n\t\t\tfont-weight: var(--_sds-textfield-helptext-font-weight);\n\t\t\tline-height: var(--_sds-textfield-helptext-line-height);\n\t\t\tmargin: 0;\n\t\t}\n\t}\n\n\t.sds-textfield--error {\n\t\t--_sds-textfield-border-color: var(--sds-textfield-border-color, var(--sds-color-alert-danger-border-default));\n\n\t\t& .sds-textfield__input:hover,\n\t\t& .sds-textfield__input:hover {\n\t\t\t--_sds-textfield-border-color: var(--sds-textfield-border-color, var(--sds-color-alert-danger-border-default));\n\t\t}\n\t}\n\n\t:host([readonly]) {\n\t\t--_sds-textfield-background-color: var(--sds-textfield-background-color, var(--sds-color-neutral-surface-tinted));\n\t}\n\n\t:host([disabled]) {\n\t\topacity: var(--_sds-textfield-disabled-opacity);\n\t\tpointer-events: none;\n\t}\n\n\t.sds-textfield--has-icon {\n\t\t.sds-textfield__input {\n\t\t\tpadding-right: var(--_sds-textfield-padding-icon);\n\t\t}\n\t}\n\n\t::slotted([slot='after']) {\n\t\tposition: absolute;\n\t\ttop: var(--_sds-textfield-icon-top);\n\t\tright: var(--_sds-textfield-icon-right);\n\t\tpointer-events: none;\n\t}\n\n\t:host([size='sm']) {\n\t\t--_sds-textfield-min-height: var(--sds-textfield-height, var(--sds-components-button-sm));\n\t\t--_sds-textfield-font-size: var(--sds-textfield-font-size, var(--sds-components-font-size-content-sm));\n\t\t--_sds-textfield-line-height: var(--sds-textfield-line-height, var(--sds-components-line-height-squeezed-sm));\n\t\t--_sds-textfield-label-font-size: var(--sds-textfield-label-font-size, var(--sds-components-font-size-content-sm));\n\t\t--_sds-textfield-label-line-height: var(--sds-textfield-label-line-height, var(--sds-components-line-height-squeezed-sm));\n\t\t--_sds-textfield-helptext-font-size: var(--sds-textfield-helptext-font-size, var(--sds-components-font-size-content-sm));\n\t\t--_sds-textfield-helptext-line-height: var(--sds-textfield-helptext-line-height, var(--sds-components-line-height-squeezed-sm));\n\t\t--_sds-textfield-icon-top: var(--sds-textfield-icon-top, calc((var(--_sds-textfield-min-height) - var(--sds-components-icon-sm)) / 2));\n\t\t--_sds-textfield-padding-icon: var(--sds-textfield-padding-icon, calc(var(--sds-spacing-xs) + var(--sds-components-icon-sm)));\n\n\t\t&:has(sds-icon:not([size])) {\n\t\t\t--sds-icon-size: var(--sds-textfield-icon-size, var(--sds-components-icon-sm));\n\t\t}\n\t}\n\n\t:host([size='lg']) {\n\t\t--_sds-textfield-min-height: var(--sds-textfield-height, var(--sds-components-button-lg));\n\t\t--_sds-textfield-font-size: var(--sds-textfield-font-size, var(--sds-components-font-size-content-lg));\n\t\t--_sds-textfield-line-height: var(--sds-textfield-line-height, var(--sds-components-line-height-squeezed-lg));\n\t\t--_sds-textfield-label-font-size: var(--sds-textfield-label-font-size, var(--sds-components-font-size-content-lg));\n\t\t--_sds-textfield-label-line-height: var(--sds-textfield-label-line-height, var(--sds-components-line-height-squeezed-lg));\n\t\t--_sds-textfield-helptext-font-size: var(--sds-textfield-helptext-font-size, var(--sds-components-font-size-content-lg));\n\t\t--_sds-textfield-helptext-line-height: var(--sds-textfield-helptext-line-height, var(--sds-components-line-height-squeezed-lg));\n\t\t--_sds-textfield-icon-top: var(--sds-textfield-icon-top, var(--sds-spacing-3xs));\n\t\t--_sds-textfield-padding-icon: var(--sds-textfield-padding-icon, calc(var(--sds-spacing-xs) + var(--sds-components-icon-lg)));\n\n\t\t&:has(sds-icon:not([size])) {\n\t\t\t--sds-icon-size: var(--sds-textfield-icon-size, var(--sds-components-icon-lg));\n\t\t}\n\t}\n`;\n"]}
|
|
@@ -880,8 +880,10 @@ class SDSIconLoader {
|
|
|
880
880
|
const styles$f = i$4`
|
|
881
881
|
:host {
|
|
882
882
|
--_sds-icon-size: var(--sds-icon-size, var(--sds-components-icon-md));
|
|
883
|
+
--_sds-icon-color: var(--sds-icon-color, var(--sds-color-text-subtle, var(--sds-color-neutral-text-subtle)));
|
|
883
884
|
|
|
884
885
|
display: inline-block;
|
|
886
|
+
color: var(--_sds-icon-color);
|
|
885
887
|
block-size: var(--_sds-icon-size);
|
|
886
888
|
inline-size: var(--_sds-icon-size);
|
|
887
889
|
min-inline-size: var(--_sds-icon-size);
|
|
@@ -896,6 +898,10 @@ const styles$f = i$4`
|
|
|
896
898
|
--_sds-icon-size: var(--sds-icon-size, var(--sds-components-icon-sm));
|
|
897
899
|
}
|
|
898
900
|
|
|
901
|
+
:host([data-palette]) {
|
|
902
|
+
--_sds-icon-color: var(--sds-icon-color, var(--sds-color-text-subtle, var(--sds-color-neutral-text-subtle)));
|
|
903
|
+
}
|
|
904
|
+
|
|
899
905
|
.sds-icon {
|
|
900
906
|
aspect-ratio: 1;
|
|
901
907
|
display: block;
|
|
@@ -1030,6 +1036,10 @@ const styles$e = i$4`
|
|
|
1030
1036
|
|
|
1031
1037
|
display: inline-block;
|
|
1032
1038
|
box-sizing: border-box;
|
|
1039
|
+
|
|
1040
|
+
::slotted(sds-icon) {
|
|
1041
|
+
--sds-icon-color: var(--_sds-button-text-color);
|
|
1042
|
+
}
|
|
1033
1043
|
}
|
|
1034
1044
|
|
|
1035
1045
|
.sds-button {
|
|
@@ -1417,7 +1427,7 @@ const styles$d = i$4`
|
|
|
1417
1427
|
flex: 1;
|
|
1418
1428
|
}
|
|
1419
1429
|
|
|
1420
|
-
.sds-
|
|
1430
|
+
.sds-card__content {
|
|
1421
1431
|
background-color: var(--_sds-card-background-color);
|
|
1422
1432
|
border-radius: var(--_sds-card-border-radius);
|
|
1423
1433
|
font-family: var(--_sds-card-font-family);
|
|
@@ -1484,7 +1494,7 @@ const styles$d = i$4`
|
|
|
1484
1494
|
--_sds-card-padding: var(--sds-card-padding, var(--sds-spacing-sm));
|
|
1485
1495
|
}
|
|
1486
1496
|
|
|
1487
|
-
.sds-
|
|
1497
|
+
.sds-card__content {
|
|
1488
1498
|
flex-direction: column;
|
|
1489
1499
|
align-items: start;
|
|
1490
1500
|
}
|
|
@@ -1539,15 +1549,12 @@ let SDSCard = class extends i$1 {
|
|
|
1539
1549
|
});
|
|
1540
1550
|
}
|
|
1541
1551
|
render() {
|
|
1542
|
-
|
|
1543
|
-
<
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
<slot name="text" id="content"></slot>
|
|
1547
|
-
<sds-icon name="arrow_forward-material-outlined" size="md" class="sds-card__icon"></sds-icon>
|
|
1548
|
-
</a>
|
|
1549
|
-
</article>
|
|
1552
|
+
const cardBody = x`
|
|
1553
|
+
<slot name="heading" id="heading"></slot>
|
|
1554
|
+
<slot name="text" id="content"></slot>
|
|
1555
|
+
<sds-icon name="arrow_forward-material-outlined" size="md" class="sds-card__icon"></sds-icon>
|
|
1550
1556
|
`;
|
|
1557
|
+
return x`<article class="sds-card">${this.link ? x`<a href="${this.link}" class="sds-card__content">${cardBody}</a>` : x`<div class="sds-card__content">${cardBody}</div>`}</article>`;
|
|
1551
1558
|
}
|
|
1552
1559
|
};
|
|
1553
1560
|
SDSCard.styles = [styles$d];
|
|
@@ -1822,12 +1829,6 @@ let SDSCheckbox = class extends i$1 {
|
|
|
1822
1829
|
event.stopImmediatePropagation();
|
|
1823
1830
|
this.dispatchEvent(new CustomEvent("blur", { bubbles: true, composed: true }));
|
|
1824
1831
|
};
|
|
1825
|
-
this._handleClick = (event) => {
|
|
1826
|
-
event.stopImmediatePropagation();
|
|
1827
|
-
if (event.currentTarget === event.target && !this.disabled && !this.readOnly) {
|
|
1828
|
-
this.shadowRoot?.querySelector("input")?.click();
|
|
1829
|
-
}
|
|
1830
|
-
};
|
|
1831
1832
|
this.internals = this.attachInternals();
|
|
1832
1833
|
this.attachShadow({ mode: "open", delegatesFocus: true });
|
|
1833
1834
|
}
|
|
@@ -1893,7 +1894,7 @@ let SDSCheckbox = class extends i$1 {
|
|
|
1893
1894
|
"sds-checkbox__input--error": Boolean(this.error)
|
|
1894
1895
|
};
|
|
1895
1896
|
return x`
|
|
1896
|
-
<div class="${e2(checkboxClasses)}"
|
|
1897
|
+
<div class="${e2(checkboxClasses)}">
|
|
1897
1898
|
<input
|
|
1898
1899
|
id="control"
|
|
1899
1900
|
type="checkbox"
|
|
@@ -2435,7 +2436,7 @@ SDSChip = __decorateClass$a([
|
|
|
2435
2436
|
const styles$9 = i$4`
|
|
2436
2437
|
:host {
|
|
2437
2438
|
--_sds-heading-font-family: var(--sds-heading-font-family, var(--sds-typography-font-family-roboto));
|
|
2438
|
-
--_sds-heading-text-color: var(--sds-heading-text-color, var(--sds-color-neutral-text-default));
|
|
2439
|
+
--_sds-heading-text-color: var(--sds-heading-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
|
|
2439
2440
|
--_sds-heading-max-line-width: var(--sds-heading-max-line-width, var(--sds-typography-max-line-width));
|
|
2440
2441
|
--_sds-heading-margin: var(--sds-heading-margin, 0);
|
|
2441
2442
|
--_sds-heading-padding: var(--sds-heading-padding, 0);
|
|
@@ -2448,6 +2449,10 @@ const styles$9 = i$4`
|
|
|
2448
2449
|
display: inline-block;
|
|
2449
2450
|
}
|
|
2450
2451
|
|
|
2452
|
+
:host([data-palette]) {
|
|
2453
|
+
--_sds-heading-text-color: var(--sds-heading-text-color, var(--sds-color-text-default, var(--sds-color-neutral-text-default)));
|
|
2454
|
+
}
|
|
2455
|
+
|
|
2451
2456
|
h1,
|
|
2452
2457
|
h2,
|
|
2453
2458
|
h3,
|
|
@@ -2600,13 +2605,13 @@ let SDSHeading = class extends i$1 {
|
|
|
2600
2605
|
render() {
|
|
2601
2606
|
const headingClasses = {
|
|
2602
2607
|
"sds-heading": true,
|
|
2603
|
-
"sds-heading--xl": this.
|
|
2604
|
-
"sds-heading--lg": this.
|
|
2605
|
-
"sds-heading--md": this.
|
|
2606
|
-
"sds-heading--sm": this.
|
|
2607
|
-
"sds-heading--xs": this.
|
|
2608
|
+
"sds-heading--xl": this.size === "xl",
|
|
2609
|
+
"sds-heading--lg": this.size === "l" || this.size === "lg",
|
|
2610
|
+
"sds-heading--md": this.size === "m" || this.size === "md",
|
|
2611
|
+
"sds-heading--sm": this.size === "s" || this.size === "sm",
|
|
2612
|
+
"sds-heading--xs": this.size === "xs"
|
|
2608
2613
|
};
|
|
2609
|
-
switch (this.level
|
|
2614
|
+
switch (this.level?.toLowerCase()) {
|
|
2610
2615
|
case "h1":
|
|
2611
2616
|
return x`<h1 class=${e2(headingClasses)}><slot></slot></h1>`;
|
|
2612
2617
|
case "h2":
|
|
@@ -2630,7 +2635,7 @@ __decorateClass$9([
|
|
|
2630
2635
|
], SDSHeading.prototype, "level", 2);
|
|
2631
2636
|
__decorateClass$9([
|
|
2632
2637
|
n2({ type: String, reflect: true })
|
|
2633
|
-
], SDSHeading.prototype, "
|
|
2638
|
+
], SDSHeading.prototype, "size", 2);
|
|
2634
2639
|
SDSHeading = __decorateClass$9([
|
|
2635
2640
|
guardedCustomElement("sds-heading")
|
|
2636
2641
|
], SDSHeading);
|
|
@@ -3224,13 +3229,6 @@ let SDSRadio = class extends i$1 {
|
|
|
3224
3229
|
event.stopImmediatePropagation();
|
|
3225
3230
|
this.dispatchEvent(new CustomEvent("blur", { bubbles: true, composed: true }));
|
|
3226
3231
|
};
|
|
3227
|
-
this._handleClick = (event) => {
|
|
3228
|
-
event.stopImmediatePropagation();
|
|
3229
|
-
const clickedOnUs = event.target instanceof Node && this.shadowRoot?.contains(event.target);
|
|
3230
|
-
if (clickedOnUs && !this.disabled && !this.readOnly) {
|
|
3231
|
-
this.shadowRoot?.querySelector("input")?.click();
|
|
3232
|
-
}
|
|
3233
|
-
};
|
|
3234
3232
|
this.internals = this.attachInternals();
|
|
3235
3233
|
this.attachShadow({ mode: "open", delegatesFocus: true });
|
|
3236
3234
|
}
|
|
@@ -3292,16 +3290,13 @@ let SDSRadio = class extends i$1 {
|
|
|
3292
3290
|
}
|
|
3293
3291
|
_uncheckSiblings() {
|
|
3294
3292
|
if (!this.name) return;
|
|
3295
|
-
const
|
|
3296
|
-
const radios
|
|
3297
|
-
|
|
3298
|
-
if (radio !== this) {
|
|
3293
|
+
const radios = this._getGroupRadios();
|
|
3294
|
+
for (const radio of radios) {
|
|
3295
|
+
if (radio !== this && radio.checked) {
|
|
3299
3296
|
radio.checked = false;
|
|
3300
3297
|
radio.internals.setFormValue(null);
|
|
3301
|
-
const input = radio.shadowRoot?.querySelector("#control");
|
|
3302
|
-
if (input) input.checked = false;
|
|
3303
3298
|
}
|
|
3304
|
-
}
|
|
3299
|
+
}
|
|
3305
3300
|
}
|
|
3306
3301
|
get form() {
|
|
3307
3302
|
return this.internals.form;
|
|
@@ -3350,7 +3345,7 @@ let SDSRadio = class extends i$1 {
|
|
|
3350
3345
|
"sds-radio__input--error": Boolean(this.error)
|
|
3351
3346
|
};
|
|
3352
3347
|
return x`
|
|
3353
|
-
<div class="${e2(radioClasses)}"
|
|
3348
|
+
<div class="${e2(radioClasses)}">
|
|
3354
3349
|
<input
|
|
3355
3350
|
id="control"
|
|
3356
3351
|
type="radio"
|
|
@@ -4049,7 +4044,7 @@ const styles$2 = i$4`
|
|
|
4049
4044
|
--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-mobile-font-size));
|
|
4050
4045
|
--_sds-text-font-weight: var(--sds-text-font-weight, var(--sds-typography-body-md-mobile-font-weight));
|
|
4051
4046
|
--_sds-text-line-height: var(--sds-text-line-height, var(--sds-typography-body-md-mobile-line-height));
|
|
4052
|
-
--_sds-text-color: var(--sds-text-color, var(--sds-color-accent-text-default));
|
|
4047
|
+
--_sds-text-color: var(--sds-text-color, var(--sds-color-text-default, var(--sds-color-accent-text-default)));
|
|
4053
4048
|
|
|
4054
4049
|
display: block;
|
|
4055
4050
|
box-sizing: border-box;
|
|
@@ -4066,6 +4061,10 @@ const styles$2 = i$4`
|
|
|
4066
4061
|
max-width: var(--sds-typography-max-line-width);
|
|
4067
4062
|
}
|
|
4068
4063
|
|
|
4064
|
+
:host([data-palette]) {
|
|
4065
|
+
--_sds-text-color: var(--sds-text-color, var(--sds-color-text-default, var(--sds-color-accent-text-default)));
|
|
4066
|
+
}
|
|
4067
|
+
|
|
4069
4068
|
/* Mobile */
|
|
4070
4069
|
:host {
|
|
4071
4070
|
--_sds-text-font-size: var(--sds-text-font-size, var(--sds-typography-body-md-mobile-font-size));
|
|
@@ -4369,6 +4368,7 @@ const styles$1 = i$4`
|
|
|
4369
4368
|
--_sds-textfield-padding-inline: var(--sds-textfield-padding-inline, var(--sds-spacing-xs));
|
|
4370
4369
|
--_sds-textfield-padding-icon: var(--sds-textfield-padding-icon, calc(var(--sds-spacing-xs) + var(--sds-components-icon-md)));
|
|
4371
4370
|
--_sds-textfield-disabled-opacity: var(--sds-textfield-disabled-opacity, var(--sds-color-states-disabled-opacity));
|
|
4371
|
+
--_sds-textfield-max-width: var(--sds-textfield-input-max-width, var(--sds-typography-max-line-width, 80ch));
|
|
4372
4372
|
|
|
4373
4373
|
--_sds-textfield-label-text-color: var(--sds-textfield-label-text-color, var(--sds-color-neutral-text-default));
|
|
4374
4374
|
--_sds-textfield-label-font-size: var(--sds-textfield-label-font-size, var(--sds-components-font-size-content-md));
|
|
@@ -4377,7 +4377,7 @@ const styles$1 = i$4`
|
|
|
4377
4377
|
|
|
4378
4378
|
--_sds-textfield-helptext-text-color: var(--sds-textfield-helptext-text-color, var(--sds-color-neutral-text-subtle));
|
|
4379
4379
|
--_sds-textfield-helptext-font-size: var(--sds-textfield-helptext-font-size, var(--sds-components-font-size-content-md));
|
|
4380
|
-
--_sds-textfield-helptext-font-weight: var(--sds-textfield-helptext-font-weight, var(--sds-typography-font-weight-
|
|
4380
|
+
--_sds-textfield-helptext-font-weight: var(--sds-textfield-helptext-font-weight, var(--sds-typography-font-weight-regular));
|
|
4381
4381
|
--_sds-textfield-helptext-line-height: var(--sds-textfield-helptext-line-height, var(--sds-components-line-height-squeezed-md));
|
|
4382
4382
|
|
|
4383
4383
|
--_sds-textfield-focus-color: var(--sds-textfield-focus-color, var(--sds-color-states-focus-outer));
|
|
@@ -4414,6 +4414,7 @@ const styles$1 = i$4`
|
|
|
4414
4414
|
border-radius: var(--_sds-textfield-border-radius);
|
|
4415
4415
|
border: var(--_sds-textfield-border-width) solid var(--_sds-textfield-border-color);
|
|
4416
4416
|
background: var(--_sds-textfield-background-color);
|
|
4417
|
+
max-width: var(--_sds-textfield-max-width);
|
|
4417
4418
|
width: 100%;
|
|
4418
4419
|
|
|
4419
4420
|
&:hover {
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { EventName } from '@lit/react';
|
|
1
2
|
export type SDS_COLOR_PALETTES = 'neutral' | 'primary' | 'accent' | 'secondary' | 'tertiary' | 'info' | 'success' | 'attention' | 'warning' | 'danger';
|
|
2
3
|
export type SDS_SIZES = 'xl' | 'lg' | 'md' | 'sm' | 'xs';
|
|
3
4
|
export type SDS_VARIANTS = 'primary' | 'secondary' | 'tertiary';
|
|
4
5
|
export type AutocompleteTypes = 'off' | 'on' | 'name' | 'honorific-prefix' | 'given-name' | 'additional-name' | 'family-name' | 'honorific-suffix' | 'nickname' | 'email' | 'username' | 'new-password' | 'current-password' | 'one-time-code' | 'organization-title' | 'organization' | 'street-address' | 'address-line1' | 'address-line2' | 'address-line3' | 'address-level4' | 'address-level3' | 'address-level2' | 'address-level1' | 'country' | 'country-name' | 'postal-code' | 'cc-name' | 'cc-given-name' | 'cc-additional-name' | 'cc-family-name' | 'cc-number' | 'cc-exp' | 'cc-exp-month' | 'cc-exp-year' | 'cc-csc' | 'cc-type' | 'transaction-currency' | 'transaction-amount' | 'language' | 'bday' | 'bday-day' | 'bday-month' | 'bday-year' | 'sex' | 'tel' | 'tel-country-code' | 'tel-national' | 'tel-area-code' | 'tel-local' | 'tel-extension' | 'impp' | 'url' | 'photo';
|
|
6
|
+
export type SheriffEvent = CustomEvent<null>;
|
|
7
|
+
export type SheriffEventName = EventName<SheriffEvent>;
|
|
5
8
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAC;AACvJ,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACzD,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;AAChE,MAAM,MAAM,iBAAiB,GAC1B,KAAK,GACL,IAAI,GACJ,MAAM,GACN,kBAAkB,GAClB,YAAY,GACZ,iBAAiB,GACjB,aAAa,GACb,kBAAkB,GAClB,UAAU,GACV,OAAO,GACP,UAAU,GACV,cAAc,GACd,kBAAkB,GAClB,eAAe,GACf,oBAAoB,GACpB,cAAc,GACd,gBAAgB,GAChB,eAAe,GACf,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,SAAS,GACT,cAAc,GACd,aAAa,GACb,SAAS,GACT,eAAe,GACf,oBAAoB,GACpB,gBAAgB,GAChB,WAAW,GACX,QAAQ,GACR,cAAc,GACd,aAAa,GACb,QAAQ,GACR,SAAS,GACT,sBAAsB,GACtB,oBAAoB,GACpB,UAAU,GACV,MAAM,GACN,UAAU,GACV,YAAY,GACZ,WAAW,GACX,KAAK,GACL,KAAK,GACL,kBAAkB,GAClB,cAAc,GACd,eAAe,GACf,WAAW,GACX,eAAe,GACf,MAAM,GACN,KAAK,GACL,OAAO,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAC;AACvJ,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AACzD,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;AAChE,MAAM,MAAM,iBAAiB,GAC1B,KAAK,GACL,IAAI,GACJ,MAAM,GACN,kBAAkB,GAClB,YAAY,GACZ,iBAAiB,GACjB,aAAa,GACb,kBAAkB,GAClB,UAAU,GACV,OAAO,GACP,UAAU,GACV,cAAc,GACd,kBAAkB,GAClB,eAAe,GACf,oBAAoB,GACpB,cAAc,GACd,gBAAgB,GAChB,eAAe,GACf,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,SAAS,GACT,cAAc,GACd,aAAa,GACb,SAAS,GACT,eAAe,GACf,oBAAoB,GACpB,gBAAgB,GAChB,WAAW,GACX,QAAQ,GACR,cAAc,GACd,aAAa,GACb,QAAQ,GACR,SAAS,GACT,sBAAsB,GACtB,oBAAoB,GACpB,UAAU,GACV,MAAM,GACN,UAAU,GACV,YAAY,GACZ,WAAW,GACX,KAAK,GACL,KAAK,GACL,kBAAkB,GAClB,cAAc,GACd,eAAe,GACf,WAAW,GACX,eAAe,GACf,MAAM,GACN,KAAK,GACL,OAAO,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;AAC7C,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,YAAY,CAAC,CAAC"}
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import { EventName } from '@lit/react';\n\nexport type SDS_COLOR_PALETTES = 'neutral' | 'primary' | 'accent' | 'secondary' | 'tertiary' | 'info' | 'success' | 'attention' | 'warning' | 'danger';\nexport type SDS_SIZES = 'xl' | 'lg' | 'md' | 'sm' | 'xs';\nexport type SDS_VARIANTS = 'primary' | 'secondary' | 'tertiary';\nexport type AutocompleteTypes =\n\t| 'off'\n\t| 'on'\n\t| 'name'\n\t| 'honorific-prefix'\n\t| 'given-name'\n\t| 'additional-name'\n\t| 'family-name'\n\t| 'honorific-suffix'\n\t| 'nickname'\n\t| 'email'\n\t| 'username'\n\t| 'new-password'\n\t| 'current-password'\n\t| 'one-time-code'\n\t| 'organization-title'\n\t| 'organization'\n\t| 'street-address'\n\t| 'address-line1'\n\t| 'address-line2'\n\t| 'address-line3'\n\t| 'address-level4'\n\t| 'address-level3'\n\t| 'address-level2'\n\t| 'address-level1'\n\t| 'country'\n\t| 'country-name'\n\t| 'postal-code'\n\t| 'cc-name'\n\t| 'cc-given-name'\n\t| 'cc-additional-name'\n\t| 'cc-family-name'\n\t| 'cc-number'\n\t| 'cc-exp'\n\t| 'cc-exp-month'\n\t| 'cc-exp-year'\n\t| 'cc-csc'\n\t| 'cc-type'\n\t| 'transaction-currency'\n\t| 'transaction-amount'\n\t| 'language'\n\t| 'bday'\n\t| 'bday-day'\n\t| 'bday-month'\n\t| 'bday-year'\n\t| 'sex'\n\t| 'tel'\n\t| 'tel-country-code'\n\t| 'tel-national'\n\t| 'tel-area-code'\n\t| 'tel-local'\n\t| 'tel-extension'\n\t| 'impp'\n\t| 'url'\n\t| 'photo';\n\nexport type SheriffEvent = CustomEvent<null>;\nexport type SheriffEventName = EventName<SheriffEvent>;\n"]}
|