@rededor/cura 1.6.1-alpha.9 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/assets/icons/iconset-default-list.ts +1 -1
- package/dist/assets/assets/icons/iconset-default-tmp.svg +4 -0
- package/dist/assets/assets/icons/iconset-default.svg +1 -1
- package/dist/cjs/{app-globals-28c6f5c4.js → app-globals-6d5b51b6.js} +2 -2
- package/dist/cjs/{app-globals-28c6f5c4.js.map → app-globals-6d5b51b6.js.map} +1 -1
- package/dist/cjs/{cura-accordion_18.cjs.entry.js → cura-accordion_20.cjs.entry.js} +147 -7
- package/dist/cjs/cura-accordion_20.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-display.cjs.entry.js +1 -1
- package/dist/cjs/cura-icons-view.cjs.entry.js +1 -1
- package/dist/cjs/cura-icons-view.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-modal.cjs.entry.js +3 -3
- package/dist/cjs/cura-modal.cjs.entry.js.map +1 -1
- package/dist/cjs/cura-tabs-button.cjs.entry.js +106 -0
- package/dist/cjs/cura-tabs-button.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-tabs-transparent.cjs.entry.js +105 -0
- package/dist/cjs/cura-tabs-transparent.cjs.entry.js.map +1 -0
- package/dist/cjs/cura-tabs.definitions-b8955ad4.js +12 -0
- package/dist/cjs/cura-tabs.definitions-b8955ad4.js.map +1 -0
- package/dist/cjs/{cura-theme-module-f1e4a309.js → cura-theme-module-09bb63a4.js} +32 -1
- package/dist/cjs/cura-theme-module-09bb63a4.js.map +1 -0
- package/dist/cjs/cura.cjs.js +3 -3
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/api/theme-presets/theme-perinatal-temporary.js +32 -0
- package/dist/collection/api/theme-presets/theme-perinatal-temporary.js.map +1 -0
- package/dist/collection/api/theme-presets/theme-presets.js +2 -0
- package/dist/collection/api/theme-presets/theme-presets.js.map +1 -1
- package/dist/collection/assets/icons/iconset-default-list.js +1 -1
- package/dist/collection/assets/icons/iconset-default-list.js.map +1 -1
- package/dist/collection/assets/icons/iconset-default-tmp.svg +4 -0
- package/dist/collection/assets/icons/iconset-default.svg +1 -1
- package/dist/collection/assets-raw/icons/default/vaccine.svg +3 -0
- package/dist/collection/collection-manifest.json +4 -0
- package/dist/collection/components/cura-modal/cura-modal.css +1 -1
- package/dist/collection/components/cura-modal/cura-modal.js +2 -2
- package/dist/collection/components/cura-modal/cura-modal.js.map +1 -1
- package/dist/collection/components/forms/cura-input-text/cura-input-text.js +1 -1
- package/dist/collection/components/forms/cura-select/cura-select.css +1 -1
- package/dist/collection/components/forms/cura-select/cura-select.js +22 -3
- package/dist/collection/components/forms/cura-select/cura-select.js.map +1 -1
- package/dist/collection/components/forms/cura-select/cura-select.stories.js +12 -0
- package/dist/collection/components/forms/cura-select/cura-select.stories.js.map +1 -1
- package/dist/collection/components/tabs/cura-tabs/cura-tabs.css +170 -0
- package/dist/collection/components/tabs/cura-tabs/cura-tabs.js +263 -0
- package/dist/collection/components/tabs/cura-tabs/cura-tabs.js.map +1 -0
- package/dist/collection/components/tabs/cura-tabs/cura-tabs.stories.js +89 -0
- package/dist/collection/components/tabs/cura-tabs/cura-tabs.stories.js.map +1 -0
- package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.css +176 -0
- package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.js +259 -0
- package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.js.map +1 -0
- package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.stories.js +96 -0
- package/dist/collection/components/tabs/cura-tabs-button/cura-tabs-button.stories.js.map +1 -0
- package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.css +25 -0
- package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.js +133 -0
- package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.js.map +1 -0
- package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.stories.js +65 -0
- package/dist/collection/components/tabs/cura-tabs-group/cura-tabs-group.stories.js.map +1 -0
- package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.css +168 -0
- package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.js +258 -0
- package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.js.map +1 -0
- package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.stories.js +89 -0
- package/dist/collection/components/tabs/cura-tabs-transparent/cura-tabs-transparent.stories.js.map +1 -0
- package/dist/collection/components/tabs/cura-tabs.definitions.js +7 -0
- package/dist/collection/components/tabs/cura-tabs.definitions.js.map +1 -0
- package/dist/collection/components/text/cura-display/cura-display.js +1 -1
- package/dist/collection/components/text/cura-heading/cura-heading.js +1 -1
- package/dist/collection/components/text/cura-paragraph/cura-paragraph.js +1 -1
- package/dist/components/cura-display.js +1 -1
- package/dist/components/cura-heading2.js +1 -1
- package/dist/components/cura-icons-view.js +1 -1
- package/dist/components/cura-icons-view.js.map +1 -1
- package/dist/components/cura-modal.js +3 -3
- package/dist/components/cura-modal.js.map +1 -1
- package/dist/components/cura-paragraph2.js +1 -1
- package/dist/components/cura-select2.js +6 -4
- package/dist/components/cura-select2.js.map +1 -1
- package/dist/components/cura-tabs-button.d.ts +11 -0
- package/dist/components/cura-tabs-button.js +150 -0
- package/dist/components/cura-tabs-button.js.map +1 -0
- package/dist/components/cura-tabs-group.d.ts +11 -0
- package/dist/components/cura-tabs-group.js +64 -0
- package/dist/components/cura-tabs-group.js.map +1 -0
- package/dist/components/cura-tabs-transparent.d.ts +11 -0
- package/dist/components/cura-tabs-transparent.js +143 -0
- package/dist/components/cura-tabs-transparent.js.map +1 -0
- package/dist/components/cura-tabs.d.ts +11 -0
- package/dist/components/cura-tabs.definitions.js +10 -0
- package/dist/components/cura-tabs.definitions.js.map +1 -0
- package/dist/components/cura-tabs.js +148 -0
- package/dist/components/cura-tabs.js.map +1 -0
- package/dist/components/index.js +39 -0
- package/dist/components/index.js.map +1 -1
- package/dist/cura/cura.esm.js +1 -1
- package/dist/cura/cura.esm.js.map +1 -1
- package/dist/cura/index.esm.js +1 -1
- package/dist/cura/p-1ef21ae9.entry.js +2 -0
- package/dist/cura/p-1ef21ae9.entry.js.map +1 -0
- package/dist/cura/p-53c18ed4.js +2 -0
- package/dist/cura/p-53c18ed4.js.map +1 -0
- package/dist/cura/p-5c6f9593.entry.js +2 -0
- package/dist/cura/p-5c6f9593.entry.js.map +1 -0
- package/dist/cura/{p-0c25333f.js → p-6cbd49dd.js} +2 -2
- package/dist/cura/{p-0c25333f.js.map → p-6cbd49dd.js.map} +1 -1
- package/dist/cura/p-7e2d1229.entry.js +2 -0
- package/dist/cura/p-7e2d1229.entry.js.map +1 -0
- package/dist/cura/{p-ac01bec2.entry.js → p-8aade007.entry.js} +2 -2
- package/dist/cura/p-9f460031.js +2 -0
- package/dist/cura/p-9f460031.js.map +1 -0
- package/dist/cura/p-b4ee956b.entry.js +2 -0
- package/dist/cura/p-b4ee956b.entry.js.map +1 -0
- package/dist/cura/p-b6ff8ac1.entry.js +2 -0
- package/dist/cura/p-b6ff8ac1.entry.js.map +1 -0
- package/dist/esm/{app-globals-ca1945d1.js → app-globals-c2abb41c.js} +2 -2
- package/dist/esm/{app-globals-ca1945d1.js.map → app-globals-c2abb41c.js.map} +1 -1
- package/dist/esm/{cura-accordion_18.entry.js → cura-accordion_20.entry.js} +146 -8
- package/dist/esm/cura-accordion_20.entry.js.map +1 -0
- package/dist/esm/cura-display.entry.js +1 -1
- package/dist/esm/cura-icons-view.entry.js +1 -1
- package/dist/esm/cura-icons-view.entry.js.map +1 -1
- package/dist/esm/cura-modal.entry.js +3 -3
- package/dist/esm/cura-modal.entry.js.map +1 -1
- package/dist/esm/cura-tabs-button.entry.js +102 -0
- package/dist/esm/cura-tabs-button.entry.js.map +1 -0
- package/dist/esm/cura-tabs-transparent.entry.js +101 -0
- package/dist/esm/cura-tabs-transparent.entry.js.map +1 -0
- package/dist/esm/cura-tabs.definitions-a017126e.js +10 -0
- package/dist/esm/cura-tabs.definitions-a017126e.js.map +1 -0
- package/dist/esm/{cura-theme-module-0fa5ee0b.js → cura-theme-module-bf286f68.js} +32 -1
- package/dist/esm/cura-theme-module-bf286f68.js.map +1 -0
- package/dist/esm/cura.js +3 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/types/api/theme-presets/theme-perinatal-temporary.d.ts +43 -0
- package/dist/types/api/theme-presets/theme-presets.d.ts +43 -0
- package/dist/types/components/forms/cura-select/cura-select.d.ts +6 -0
- package/dist/types/components/forms/cura-select/cura-select.stories.d.ts +11 -0
- package/dist/types/components/tabs/cura-tabs/cura-tabs.d.ts +30 -0
- package/dist/types/components/tabs/cura-tabs/cura-tabs.stories.d.ts +99 -0
- package/dist/types/components/tabs/cura-tabs-button/cura-tabs-button.d.ts +29 -0
- package/dist/types/components/tabs/cura-tabs-button/cura-tabs-button.stories.d.ts +99 -0
- package/dist/types/components/tabs/cura-tabs-group/cura-tabs-group.d.ts +18 -0
- package/dist/types/components/tabs/cura-tabs-group/cura-tabs-group.stories.d.ts +57 -0
- package/dist/types/components/tabs/cura-tabs-transparent/cura-tabs-transparent.d.ts +29 -0
- package/dist/types/components/tabs/cura-tabs-transparent/cura-tabs-transparent.stories.d.ts +99 -0
- package/dist/types/components/tabs/cura-tabs.definitions.d.ts +6 -0
- package/dist/types/components.d.ts +172 -0
- package/package.json +2 -2
- package/dist/cjs/cura-accordion_18.cjs.entry.js.map +0 -1
- package/dist/cjs/cura-theme-module-f1e4a309.js.map +0 -1
- package/dist/cura/p-07817634.entry.js +0 -2
- package/dist/cura/p-07817634.entry.js.map +0 -1
- package/dist/cura/p-9fce5ec5.entry.js +0 -2
- package/dist/cura/p-9fce5ec5.entry.js.map +0 -1
- package/dist/cura/p-b5d8a26b.entry.js +0 -2
- package/dist/cura/p-b5d8a26b.entry.js.map +0 -1
- package/dist/cura/p-bf8e2037.js +0 -2
- package/dist/cura/p-bf8e2037.js.map +0 -1
- package/dist/esm/cura-accordion_18.entry.js.map +0 -1
- package/dist/esm/cura-theme-module-0fa5ee0b.js.map +0 -1
- /package/dist/cura/{p-ac01bec2.entry.js.map → p-8aade007.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cura-select.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-select/cura-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAgB,eAAe,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAQtH,MAAM,OAAO,UAAU;;QAiJrB;;WAEG;QACH,WAAM,GAAG,EAAE,CAAC;QAEZ;;WAEG;QACH,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;QAkI7B;;;WAGG;QACH,oBAAe,GAAG,CAAC,SAA2B,EAAE,EAAE;YAChD,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAC3B,IAAI,QAAQ,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;oBACnC,IAAI,QAAQ,CAAC,aAAa,KAAK,UAAU;wBAAE,IAAI,CAAC,oBAAoB,EAAE,CAAC;gBACzE,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;QACF;;WAEG;QACH,mBAAc,GAAG,CAAC,KAAY,EAAE,EAAE;YAChC,MAAM,cAAc,GAAG,KAAK,CAAC,MAAqB,CAAC;YACnD,IAAI,CAAC,uBAAuB,EAAE,CAAC;YAC/B,cAAc,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAClD,CAAC,CAAC;QAuCF,wBAAmB,GAAG,CAAC,KAAoB,EAAE,EAAE;;YAC7C,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;YAEhC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AAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;oBAClI,8DAAa,CACF;gBACZ,IAAI,CAAC,MAAM,IAAI,CACd,4DACE,KAAK,EAAE;wBACL,IAAI,EAAE,IAAI;wBACV,IAAI,EAAE,IAAI,CAAC,MAAM;qBAClB;oBAED,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB,CACP,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, Prop, State, h, Event, EventEmitter, AttachInternals, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cura-select',\n styleUrl: 'cura-select.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CuraSelect {\n /**\n * The label text for the select component.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) label: string = '';\n\n /**\n * Placeholder text for the input field.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) placeholder: string = '';\n\n /**\n * Current value of the select component.\n * Reflects as an attribute in the DOM and is mutable.\n */\n @Prop({ reflect: true, mutable: true }) value: string = '';\n\n /**\n * Display mode of the select component.\n * Can be 'default' or 'transparent'.\n */\n @Prop({ reflect: true }) mode: 'default' | 'transparent' = 'default';\n\n /**\n * Size of the select component.\n * Can be 'small', 'medium', or 'large'.\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n @Prop() iconName?: string;\n\n /**\n * Status of the select component.\n * Can be 'success', 'error', or 'default'.\n */\n @Prop({ reflect: true, mutable: true }) status: 'success' | 'error' | 'default' = 'default';\n\n /**\n * Whether the select component is disabled.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * Whether the select component is required.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) required: boolean = false;\n\n /**\n * Enable / Disable search at options by term.\n * Default: false\n */\n @Prop({ reflect: true }) searchBehavior: boolean = false;\n\n /**\n * The search will be sensitive to accents.\n * Default: true\n */\n @Prop({ reflect: true }) caseSensitive: boolean = true;\n\n /**\n * Internal state: Whether the input is hovered.\n * Default: false\n */\n @State() isHovered: boolean = false;\n\n /**\n * Internal state: Whether the input is focused.\n * Default: false\n */\n @State() isFocused: boolean = false;\n\n /**\n * Internal state: Whether the dropdown menu is open.\n * Default: false\n */\n @State() isOpen: boolean = false;\n\n /**\n * Internal state: Collection of options for the select component.\n */\n @State() options: NodeListOf<HTMLCuraSelectOptionElement>;\n\n @State() activeIndex = -1;\n\n @Watch('activeIndex')\n updateOptionHighlights(newActiveINdex: number) {\n this.options.forEach((option, index) => ((option as any).active = index === newActiveINdex));\n }\n\n @State() textInput = '';\n\n @Watch('textInput')\n /**\n * Filters the options based on the current input value.\n */\n filterOptions(newText) {\n this.searchTermInput.emit(newText);\n\n if (!this.isOpen || !this.searchBehavior) {\n return;\n }\n\n const removeAccents = (str: string) => {\n return str.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '');\n };\n\n let searchTerm = newText;\n if (!this.caseSensitive) {\n searchTerm = removeAccents(searchTerm).toLocaleLowerCase();\n }\n\n this.options.forEach(option => {\n let optionValue = option.textContent || '';\n if (!this.caseSensitive) {\n optionValue = removeAccents(optionValue?.toLowerCase());\n }\n const isVisible = optionValue.includes(searchTerm);\n option.style.display = isVisible ? 'block' : 'none';\n });\n }\n\n /**\n * Reference to the host element of the component.\n */\n @Element() host: HTMLElement;\n\n /**\n * Event emitted when an option is selected.\n */\n @Event() selected: EventEmitter;\n\n /**\n * Event emitted when an option is searched.\n */\n @Event() searchTermInput: EventEmitter;\n\n /**\n * MutationObserver to watch changes in the component.\n */\n mutationObserver: MutationObserver;\n\n /**\n * Styles to be applied to the component.\n */\n styles = {};\n\n /**\n * Theme object containing font and color information.\n */\n theme = window.CuraAPI.theme;\n\n @AttachInternals() internals: ElementInternals;\n\n /**\n * Callback for form association.\n */\n formAssociatedCallback(form: { ariaLabel: string }) {\n form.ariaLabel = this.label;\n }\n\n /**\n * Callback to restore the switch state from the form.\n */\n formStateRestoreCallback(state: { value: string }) {\n this.textInput = state.value;\n this.updateSelectedOption();\n }\n\n /**\n * Callback to reset the switch state when the form is reset.\n */\n formResetCallback() {\n this.textInput = '';\n this.clearSelectedAttributes();\n this.internals.setFormValue('');\n this.internals.setValidity({});\n }\n\n /**\n * Callback to update the switch's disabled state when the form's disabled state changes.\n */\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Lifecycle method called before the component is rendered.\n * Initializes the options for the select component.\n */\n componentWillLoad() {\n this.initializeOptions();\n }\n /**\n * Lifecycle method called after the component is rendered.\n * Initializes select-related functionality.\n */\n componentDidLoad() {\n this.setupMutationObserver();\n this.addOutsideClickListener();\n }\n /**\n * Lifecycle method called when the component is connected to the DOM.\n * Applies styles based on the theme.\n */\n connectedCallback() {\n this.applyStyles();\n }\n /**\n * Lifecycle method called when the component is disconnected from the DOM.\n * Disconnects the MutationObserver if it exists.\n */\n disconnectedCallback() {\n this.mutationObserver?.disconnect();\n this.removeOutsideClickListener();\n }\n\n initializeOptions() {\n this.options = this.host.querySelectorAll<HTMLCuraSelectOptionElement>('cura-select-option');\n this.options.forEach(option => {\n option.setAttribute('size', this.size);\n\n const isSelected = this.value === option.value;\n option.setAttribute('selected', JSON.stringify(isSelected));\n\n if (isSelected) {\n this.value = option.value;\n this.internals.setFormValue(option.value);\n }\n });\n\n this.textInput = Array.from(this.options).find(option => option.value === this.value)?.textContent || this.textInput;\n }\n /**\n * Applies styles to the component based on the theme.\n */\n applyStyles() {\n const { fonts, colors } = this.theme;\n const fontWeights = fonts.getWeights();\n\n this.styles = {\n ...this.styles,\n '--font-weight-medium': fontWeights.medium,\n '--font-weight-bold': fontWeights.bold,\n '--font-weight-regular': fontWeights.regular,\n '--font-color': fonts.getColor(),\n '--font-family': fonts.getFamily(),\n '--font-size': fonts.getSize(),\n };\n\n const colorKeys = [\n 'primary-base',\n 'neutral-purewhite',\n 'neutral-white',\n 'neutral-black',\n 'neutral-medium',\n 'neutral-light',\n 'neutral-base',\n 'neutral-dark',\n 'success-dark',\n 'success-darker',\n 'success-lighter',\n 'error-lighter',\n 'error-dark',\n 'error-darker',\n 'error-base',\n 'info-base',\n ];\n\n colorKeys.forEach(key => {\n this.styles[`--${key}`] = colors.getColor(key);\n });\n }\n /**\n * Sets up a MutationObserver to watch for changes in the component.\n */\n setupMutationObserver() {\n this.mutationObserver = new MutationObserver(this.handleMutations);\n this.mutationObserver.observe(this.host, { attributes: true, subtree: true, attributeFilter: ['selected', 'value'] });\n }\n /**\n * Handles mutations observed by the MutationObserver.\n * Updates the selected option or filters options based on the mutation type.\n */\n handleMutations = (mutations: MutationRecord[]) => {\n mutations.forEach(mutation => {\n if (mutation.type === 'attributes') {\n if (mutation.attributeName === 'selected') this.updateSelectedOption();\n }\n });\n };\n /**\n * Handles the selection of an option.\n */\n onOptiselected = (event: Event) => {\n const selectedOption = event.target as HTMLElement;\n this.clearSelectedAttributes();\n selectedOption.setAttribute('selected', 'true');\n };\n\n @Watch('value')\n handleValueChange(newValue: string) {\n this.clearSelectedAttributes();\n\n const selectedOption = this.host.querySelector(`cura-select-option[value=\"${newValue}\"]`);\n\n if (!selectedOption) {\n return;\n }\n\n selectedOption.setAttribute('selected', 'true');\n }\n\n updateSelectedOption() {\n const selectedOptionElement = this.host.querySelector<HTMLCuraSelectOptionElement>('cura-select-option[selected]');\n\n if (!selectedOptionElement) {\n return;\n }\n\n this.value = selectedOptionElement.value;\n this.internals.setFormValue(this.value);\n\n if (this.textInput !== selectedOptionElement.textContent) {\n this.textInput = selectedOptionElement.textContent;\n this.isOpen = false;\n this.selected.emit(selectedOptionElement.value);\n }\n }\n\n /**\n * Clears the 'selected' attribute from all options.\n */\n clearSelectedAttributes() {\n this.options.forEach(option => option.removeAttribute('selected'));\n }\n\n handleKeyNavigation = (event: KeyboardEvent) => {\n const { code: keyCode } = event;\n\n if (!this.isOpen && keyCode === 'ArrowDown') {\n this.isOpen = true;\n this.activeIndex = 0;\n\n return;\n }\n\n if (keyCode === 'ArrowDown') {\n event.preventDefault();\n this.updateActiveIndex(1);\n }\n\n if (keyCode === 'ArrowUp') {\n event.preventDefault();\n this.updateActiveIndex(-1);\n }\n\n if (keyCode === 'Enter' || keyCode === 'Space') {\n this.options[this.activeIndex]?.click();\n }\n\n if (keyCode === 'Escape') {\n this.isOpen = false;\n }\n };\n\n updateActiveIndex(direction: number) {\n if (this.options.length === 0) return;\n this.activeIndex = (this.activeIndex + direction + this.options.length) % this.options.length;\n }\n\n handleInputChange = (e: Event) => {\n this.textInput = (e.target as HTMLInputElement).value;\n this.isOpen = this.textInput.length > 0;\n this.internals.setFormValue(this.textInput);\n };\n\n getClasses() {\n return {\n wrapper: true,\n label: !!this.label,\n disabled: this.disabled,\n transparent: this.mode === 'transparent',\n [this.size.toLowerCase()]: true,\n [this.status.toLowerCase()]: true,\n };\n }\n\n /**\n * Determines the color based on the item type and component state.\n */\n getColor(item: 'label' | 'text' | 'icon') {\n if (this.disabled) return 'neutral-medium';\n\n const isStatusDefault = this.status === 'default';\n const isHoveredOrFocused = this.isFocused || this.isHovered;\n\n if (item === 'label') {\n if (!isStatusDefault || isHoveredOrFocused) return 'neutral-black';\n return 'neutral-dark';\n }\n\n if (isHoveredOrFocused && isStatusDefault) return 'neutral-black';\n if (this.status === 'success') return 'success-dark';\n if (this.status === 'error') return 'error-dark';\n\n return 'neutral-dark';\n }\n\n /**\n * Renders the icon based on the component's status.\n */\n renderIcon() {\n if (this.status === 'default' && !this.iconName) return null;\n const icon = { default: this.iconName, success: 'checkCircle', error: 'alertCircle' }[this.status];\n return <cura-icon class=\"feedback-icon\" name={icon} iconset=\"default\" size={this.size === 'large' ? 20 : 16} color={this.getColor('icon')} style={this.styles} />;\n }\n\n handleClick = (event: MouseEvent) => {\n if (this.disabled) return event.preventDefault();\n const target = event.target as HTMLElement;\n\n if (target.tagName === 'CURA-SELECT-OPTION') return this.onOptiselected(event);\n this.isOpen = !this.isOpen;\n };\n\n handleClickOutside = (event: MouseEvent) => {\n const clickedOutside = !this.host.contains(event.target as Node);\n if (clickedOutside) {\n this.isOpen = false;\n }\n };\n\n private addOutsideClickListener() {\n document.addEventListener('click', this.handleClickOutside);\n }\n\n private removeOutsideClickListener() {\n document.removeEventListener('click', this.handleClickOutside);\n }\n\n render() {\n return (\n <Host style={this.styles}\n role=\"combobox\"\n aria-label={this.label}\n aria-required={String(this.required)}\n aria-disabled={String(this.disabled)}\n aria-invalid={String(this.status === 'error')}>\n <div class={this.getClasses()} onMouseEnter={() => (this.isHovered = true)} onMouseLeave={() => (this.isHovered = false)} onClick={this.handleClick}>\n {this.label && (\n <cura-label class=\"label\" weight=\"bold\" size={this.size === 'large' ? 'small' : 'xsmall'} color={this.getColor('label')}>\n {this.label} {this.required && <span class=\"required\">* </span>}\n </cura-label>\n )}\n\n <div\n class={{\n 'cura-input-field': true,\n 'open': this.isOpen,\n }}\n >\n {this.renderIcon()}\n <input\n type=\"text\"\n autocomplete=\"off\"\n onFocus={() => (this.isFocused = true)}\n onBlur={() => (this.isFocused = false)}\n onKeyDown={this.handleKeyNavigation}\n aria-required={String(this.required)}\n aria-disabled={String(this.disabled)}\n aria-invalid={String(this.status === 'error')}\n onInput={this.handleInputChange}\n style={this.styles}\n placeholder={this.placeholder}\n disabled={this.disabled}\n required={this.required}\n value={this.textInput}\n readonly={this.searchBehavior ? null : true}\n />\n <button class=\"up-down-button\">\n <cura-icon name={this.isOpen ? 'up' : 'down'} class=\"up-down-icon\" color={this.disabled ? 'neutral-dark' : 'primary-base'} size={16} iconset=\"default\" />\n </button>\n </div>\n <cura-label class=\"helper-text\" size=\"xsmall\" color={this.getColor('text')} weight={this.mode === 'transparent' ? 'bold' : 'regular'}>\n <slot></slot>\n </cura-label>\n {this.isOpen && (\n <div\n class={{\n menu: true,\n open: this.isOpen,\n }}\n >\n <slot name=\"option\"></slot>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"cura-select.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-select/cura-select.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAgB,eAAe,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAQtH,MAAM,OAAO,UAAU;;QAwJrB;;WAEG;QACH,WAAM,GAAG,EAAE,CAAC;QAEZ;;WAEG;QACH,UAAK,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC;QAkI7B;;;WAGG;QACH,oBAAe,GAAG,CAAC,SAA2B,EAAE,EAAE;YAChD,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;gBAC3B,IAAI,QAAQ,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;oBACnC,IAAI,QAAQ,CAAC,aAAa,KAAK,UAAU;wBAAE,IAAI,CAAC,oBAAoB,EAAE,CAAC;gBACzE,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;QACF;;WAEG;QACH,mBAAc,GAAG,CAAC,KAAY,EAAE,EAAE;YAChC,MAAM,cAAc,GAAG,KAAK,CAAC,MAAqB,CAAC;YACnD,IAAI,CAAC,uBAAuB,EAAE,CAAC;YAC/B,cAAc,CAAC,YAAY,CAAC,UAAU,EAAE,MAAM,CAAC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CAAC,CAAC,cAAc,EAAE,IAAI,EAAE,EAAE,EAAE,OAAO,EAAC,SAAS,GAAG,CAClJ,CACL;gBACN,mEAAY,KAAK,EAAC,aAAa,EAAC,IAAI,EAAC,QAAQ,EAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS;oBAClI,8DAAa,CACF;gBACZ,IAAI,CAAC,MAAM,IAAI,CACd,4DACE,KAAK,EAAE;wBACL,IAAI,EAAE,IAAI;wBACV,IAAI,EAAE,IAAI,CAAC,MAAM;qBAClB,EACD,KAAK,EAAE,EAAE,cAAc,EAAE,IAAI,CAAC,SAAS,EAAE;oBAEzC,6DAAM,IAAI,EAAC,QAAQ,GAAQ,CACvB,CACP,CACG,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, Prop, State, h, Event, EventEmitter, AttachInternals, Watch } from '@stencil/core';\n\n@Component({\n tag: 'cura-select',\n styleUrl: 'cura-select.scss',\n shadow: true,\n formAssociated: true,\n})\nexport class CuraSelect {\n /**\n * The label text for the select component.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) label: string = '';\n\n /**\n * Placeholder text for the input field.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) placeholder: string = '';\n\n /**\n * Current value of the select component.\n * Reflects as an attribute in the DOM and is mutable.\n */\n @Prop({ reflect: true, mutable: true }) value: string = '';\n\n /**\n * Display mode of the select component.\n * Can be 'default' or 'transparent'.\n */\n @Prop({ reflect: true }) mode: 'default' | 'transparent' = 'default';\n\n /**\n * Size of the select component.\n * Can be 'small', 'medium', or 'large'.\n */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n @Prop() iconName?: string;\n\n /**\n * Status of the select component.\n * Can be 'success', 'error', or 'default'.\n */\n @Prop({ reflect: true, mutable: true }) status: 'success' | 'error' | 'default' = 'default';\n\n /**\n * Whether the select component is disabled.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) disabled: boolean = false;\n\n /**\n * Whether the select component is required.\n * Reflects as an attribute in the DOM.\n */\n @Prop({ reflect: true }) required: boolean = false;\n\n /**\n * Enable / Disable search at options by term.\n * Default: false\n */\n @Prop({ reflect: true }) searchBehavior: boolean = false;\n\n /**\n * The search will be sensitive to accents.\n * Default: true\n */\n @Prop({ reflect: true }) caseSensitive: boolean = true;\n\n /**\n * CSS max-height property for dropdown item.\n * Can also be used by css property --max-height.\n * Default: 285px\n */\n @Prop({ reflect: true }) maxHeight: string = '285px';\n\n /**\n * Internal state: Whether the input is hovered.\n * Default: false\n */\n @State() isHovered: boolean = false;\n\n /**\n * Internal state: Whether the input is focused.\n * Default: false\n */\n @State() isFocused: boolean = false;\n\n /**\n * Internal state: Whether the dropdown menu is open.\n * Default: false\n */\n @State() isOpen: boolean = false;\n\n /**\n * Internal state: Collection of options for the select component.\n */\n @State() options: NodeListOf<HTMLCuraSelectOptionElement>;\n\n @State() activeIndex = -1;\n\n @Watch('activeIndex')\n updateOptionHighlights(newActiveINdex: number) {\n this.options.forEach((option, index) => ((option as any).active = index === newActiveINdex));\n }\n\n @State() textInput = '';\n\n @Watch('textInput')\n /**\n * Filters the options based on the current input value.\n */\n filterOptions(newText) {\n this.searchTermInput.emit(newText);\n\n if (!this.isOpen || !this.searchBehavior) {\n return;\n }\n\n const removeAccents = (str: string) => {\n return str.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '');\n };\n\n let searchTerm = newText;\n if (!this.caseSensitive) {\n searchTerm = removeAccents(searchTerm).toLocaleLowerCase();\n }\n\n this.options.forEach(option => {\n let optionValue = option.textContent || '';\n if (!this.caseSensitive) {\n optionValue = removeAccents(optionValue?.toLowerCase());\n }\n const isVisible = optionValue.includes(searchTerm);\n option.style.display = isVisible ? 'block' : 'none';\n });\n }\n\n /**\n * Reference to the host element of the component.\n */\n @Element() host: HTMLElement;\n\n /**\n * Event emitted when an option is selected.\n */\n @Event() selected: EventEmitter;\n\n /**\n * Event emitted when an option is searched.\n */\n @Event() searchTermInput: EventEmitter;\n\n /**\n * MutationObserver to watch changes in the component.\n */\n mutationObserver: MutationObserver;\n\n /**\n * Styles to be applied to the component.\n */\n styles = {};\n\n /**\n * Theme object containing font and color information.\n */\n theme = window.CuraAPI.theme;\n\n @AttachInternals() internals: ElementInternals;\n\n /**\n * Callback for form association.\n */\n formAssociatedCallback(form: { ariaLabel: string }) {\n form.ariaLabel = this.label;\n }\n\n /**\n * Callback to restore the switch state from the form.\n */\n formStateRestoreCallback(state: { value: string }) {\n this.textInput = state.value;\n this.updateSelectedOption();\n }\n\n /**\n * Callback to reset the switch state when the form is reset.\n */\n formResetCallback() {\n this.textInput = '';\n this.clearSelectedAttributes();\n this.internals.setFormValue('');\n this.internals.setValidity({});\n }\n\n /**\n * Callback to update the switch's disabled state when the form's disabled state changes.\n */\n formDisabledCallback(disabled: boolean) {\n this.disabled = disabled;\n }\n\n /**\n * Lifecycle method called before the component is rendered.\n * Initializes the options for the select component.\n */\n componentWillLoad() {\n this.initializeOptions();\n }\n /**\n * Lifecycle method called after the component is rendered.\n * Initializes select-related functionality.\n */\n componentDidLoad() {\n this.setupMutationObserver();\n this.addOutsideClickListener();\n }\n /**\n * Lifecycle method called when the component is connected to the DOM.\n * Applies styles based on the theme.\n */\n connectedCallback() {\n this.applyStyles();\n }\n /**\n * Lifecycle method called when the component is disconnected from the DOM.\n * Disconnects the MutationObserver if it exists.\n */\n disconnectedCallback() {\n this.mutationObserver?.disconnect();\n this.removeOutsideClickListener();\n }\n\n initializeOptions() {\n this.options = this.host.querySelectorAll<HTMLCuraSelectOptionElement>('cura-select-option');\n this.options.forEach(option => {\n option.setAttribute('size', this.size);\n\n const isSelected = this.value === option.value;\n option.setAttribute('selected', JSON.stringify(isSelected));\n\n if (isSelected) {\n this.value = option.value;\n this.internals.setFormValue(option.value);\n }\n });\n\n this.textInput = Array.from(this.options).find(option => option.value === this.value)?.textContent || this.textInput;\n }\n /**\n * Applies styles to the component based on the theme.\n */\n applyStyles() {\n const { fonts, colors } = this.theme;\n const fontWeights = fonts.getWeights();\n\n this.styles = {\n ...this.styles,\n '--font-weight-medium': fontWeights.medium,\n '--font-weight-bold': fontWeights.bold,\n '--font-weight-regular': fontWeights.regular,\n '--font-color': fonts.getColor(),\n '--font-family': fonts.getFamily(),\n '--font-size': fonts.getSize(),\n };\n\n const colorKeys = [\n 'primary-base',\n 'neutral-purewhite',\n 'neutral-white',\n 'neutral-black',\n 'neutral-medium',\n 'neutral-light',\n 'neutral-base',\n 'neutral-dark',\n 'success-dark',\n 'success-darker',\n 'success-lighter',\n 'error-lighter',\n 'error-dark',\n 'error-darker',\n 'error-base',\n 'info-base',\n ];\n\n colorKeys.forEach(key => {\n this.styles[`--${key}`] = colors.getColor(key);\n });\n }\n /**\n * Sets up a MutationObserver to watch for changes in the component.\n */\n setupMutationObserver() {\n this.mutationObserver = new MutationObserver(this.handleMutations);\n this.mutationObserver.observe(this.host, { attributes: true, subtree: true, attributeFilter: ['selected', 'value'] });\n }\n /**\n * Handles mutations observed by the MutationObserver.\n * Updates the selected option or filters options based on the mutation type.\n */\n handleMutations = (mutations: MutationRecord[]) => {\n mutations.forEach(mutation => {\n if (mutation.type === 'attributes') {\n if (mutation.attributeName === 'selected') this.updateSelectedOption();\n }\n });\n };\n /**\n * Handles the selection of an option.\n */\n onOptiselected = (event: Event) => {\n const selectedOption = event.target as HTMLElement;\n this.clearSelectedAttributes();\n selectedOption.setAttribute('selected', 'true');\n };\n\n @Watch('value')\n handleValueChange(newValue: string) {\n this.clearSelectedAttributes();\n\n const selectedOption = this.host.querySelector(`cura-select-option[value=\"${newValue}\"]`);\n\n if (!selectedOption) {\n return;\n }\n\n selectedOption.setAttribute('selected', 'true');\n }\n\n updateSelectedOption() {\n const selectedOptionElement = this.host.querySelector<HTMLCuraSelectOptionElement>('cura-select-option[selected]');\n\n if (!selectedOptionElement) {\n return;\n }\n\n this.value = selectedOptionElement.value;\n this.internals.setFormValue(this.value);\n\n if (this.textInput !== selectedOptionElement.textContent) {\n this.textInput = selectedOptionElement.textContent;\n this.isOpen = false;\n this.selected.emit(selectedOptionElement.value);\n }\n }\n\n /**\n * Clears the 'selected' attribute from all options.\n */\n clearSelectedAttributes() {\n this.options.forEach(option => option.removeAttribute('selected'));\n }\n\n handleKeyNavigation = (event: KeyboardEvent) => {\n const { code: keyCode } = event;\n\n if (!this.isOpen && keyCode === 'ArrowDown') {\n this.isOpen = true;\n this.activeIndex = 0;\n\n return;\n }\n\n if (keyCode === 'ArrowDown') {\n event.preventDefault();\n this.updateActiveIndex(1);\n }\n\n if (keyCode === 'ArrowUp') {\n event.preventDefault();\n this.updateActiveIndex(-1);\n }\n\n if (keyCode === 'Enter' || keyCode === 'Space') {\n this.options[this.activeIndex]?.click();\n }\n\n if (keyCode === 'Escape') {\n this.isOpen = false;\n }\n };\n\n updateActiveIndex(direction: number) {\n if (this.options.length === 0) return;\n this.activeIndex = (this.activeIndex + direction + this.options.length) % this.options.length;\n }\n\n handleInputChange = (e: Event) => {\n this.textInput = (e.target as HTMLInputElement).value;\n this.isOpen = this.textInput.length > 0;\n this.internals.setFormValue(this.textInput);\n };\n\n getClasses() {\n return {\n wrapper: true,\n label: !!this.label,\n disabled: this.disabled,\n transparent: this.mode === 'transparent',\n [this.size.toLowerCase()]: true,\n [this.status.toLowerCase()]: true,\n };\n }\n\n /**\n * Determines the color based on the item type and component state.\n */\n getColor(item: 'label' | 'text' | 'icon') {\n if (this.disabled) return 'neutral-medium';\n\n const isStatusDefault = this.status === 'default';\n const isHoveredOrFocused = this.isFocused || this.isHovered;\n\n if (item === 'label') {\n if (!isStatusDefault || isHoveredOrFocused) return 'neutral-black';\n return 'neutral-dark';\n }\n\n if (isHoveredOrFocused && isStatusDefault) return 'neutral-black';\n if (this.status === 'success') return 'success-dark';\n if (this.status === 'error') return 'error-dark';\n\n return 'neutral-dark';\n }\n\n /**\n * Renders the icon based on the component's status.\n */\n renderIcon() {\n if (this.status === 'default' && !this.iconName) return null;\n const icon = { default: this.iconName, success: 'checkCircle', error: 'alertCircle' }[this.status];\n return <cura-icon class=\"feedback-icon\" name={icon} iconset=\"default\" size={this.size === 'large' ? 20 : 16} color={this.getColor('icon')} style={this.styles} />;\n }\n\n handleClick = (event: MouseEvent) => {\n if (this.disabled) return event.preventDefault();\n const target = event.target as HTMLElement;\n\n if (target.tagName === 'CURA-SELECT-OPTION') return this.onOptiselected(event);\n this.isOpen = !this.isOpen;\n };\n\n handleClickOutside = (event: MouseEvent) => {\n const clickedOutside = !this.host.contains(event.target as Node);\n if (clickedOutside) {\n this.isOpen = false;\n }\n };\n\n private addOutsideClickListener() {\n document.addEventListener('click', this.handleClickOutside);\n }\n\n private removeOutsideClickListener() {\n document.removeEventListener('click', this.handleClickOutside);\n }\n\n render() {\n return (\n <Host style={this.styles}\n role=\"combobox\"\n aria-label={this.label}\n aria-required={String(this.required)}\n aria-disabled={String(this.disabled)}\n aria-invalid={String(this.status === 'error')}>\n <div class={this.getClasses()} onMouseEnter={() => (this.isHovered = true)} onMouseLeave={() => (this.isHovered = false)} onClick={this.handleClick}>\n {this.label && (\n <cura-label class=\"label\" weight=\"bold\" size={this.size === 'large' ? 'small' : 'xsmall'} color={this.getColor('label')}>\n {this.label} {this.required && <span class=\"required\">* </span>}\n </cura-label>\n )}\n\n <div\n class={{\n 'cura-input-field': true,\n 'open': this.isOpen,\n }}\n >\n {this.renderIcon()}\n <input\n type=\"text\"\n autocomplete=\"off\"\n onFocus={() => (this.isFocused = true)}\n onBlur={() => (this.isFocused = false)}\n onKeyDown={this.handleKeyNavigation}\n aria-required={String(this.required)}\n aria-disabled={String(this.disabled)}\n aria-invalid={String(this.status === 'error')}\n onInput={this.handleInputChange}\n style={this.styles}\n placeholder={this.placeholder}\n disabled={this.disabled}\n required={this.required}\n value={this.textInput}\n readonly={this.searchBehavior ? null : true}\n />\n <button class=\"up-down-button\">\n <cura-icon name={this.isOpen ? 'up' : 'down'} class=\"up-down-icon\" color={this.disabled ? 'neutral-dark' : 'primary-base'} size={16} iconset=\"default\" />\n </button>\n </div>\n <cura-label class=\"helper-text\" size=\"xsmall\" color={this.getColor('text')} weight={this.mode === 'transparent' ? 'bold' : 'regular'}>\n <slot></slot>\n </cura-label>\n {this.isOpen && (\n <div\n class={{\n menu: true,\n open: this.isOpen,\n }}\n style={{ '--max-height': this.maxHeight }}\n >\n <slot name=\"option\"></slot>\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -34,6 +34,9 @@ const renderCuraSelect = args => {
|
|
|
34
34
|
: ''}${args.searchBehavior
|
|
35
35
|
? `
|
|
36
36
|
search-behavior="${args.searchBehavior}"`
|
|
37
|
+
: ''}${args.maxHeight
|
|
38
|
+
? `
|
|
39
|
+
max-height="${args.maxHeight}"`
|
|
37
40
|
: ''}${`
|
|
38
41
|
accent-sensitive="${args.caseSensitive}"`}>
|
|
39
42
|
${args.helperText}
|
|
@@ -172,6 +175,14 @@ export default {
|
|
|
172
175
|
defaultValue: { summary: '[]' },
|
|
173
176
|
},
|
|
174
177
|
},
|
|
178
|
+
maxHeight: {
|
|
179
|
+
control: 'text',
|
|
180
|
+
description: 'Altura máxima para o menu.',
|
|
181
|
+
table: {
|
|
182
|
+
category: 'Properties',
|
|
183
|
+
defaultValue: { summary: '285px' },
|
|
184
|
+
}
|
|
185
|
+
},
|
|
175
186
|
},
|
|
176
187
|
};
|
|
177
188
|
export const CuraSelect = {
|
|
@@ -195,6 +206,7 @@ export const CuraSelect = {
|
|
|
195
206
|
searchBehavior: false,
|
|
196
207
|
helperText: 'Texto de ajuda',
|
|
197
208
|
caseSensitive: true,
|
|
209
|
+
maxHeight: "285px",
|
|
198
210
|
},
|
|
199
211
|
};
|
|
200
212
|
//# sourceMappingURL=cura-select.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cura-select.stories.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-select/cura-select.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,4CAA4C,CAAC;AAEnE,MAAM,gBAAgB,GAAG,IAAI,CAAC,EAAE;IAC9B,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,8BAA8B,MAAM,CAAC,KAAK,KAAK,MAAM,CAAC,KAAK,uBAAuB,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAE9I,MAAM,KAAK,GAAG,eACZ,IAAI,CAAC,KAAK;QACR,CAAC,CAAC;WACG,IAAI,CAAC,KAAK,GAAG;QAClB,CAAC,CAAC,EACN,GACE,IAAI,CAAC,WAAW;QACd,CAAC,CAAC;iBACS,IAAI,CAAC,WAAW,GAAG;QAC9B,CAAC,CAAC,EACN,GACE,IAAI,CAAC,YAAY;QACf,CAAC,CAAC;mBACW,IAAI,CAAC,YAAY,GAAG;QACjC,CAAC,CAAC,EACN,GACE,IAAI,CAAC,KAAK;QACR,CAAC,CAAC;WACG,IAAI,CAAC,KAAK,GAAG;QAClB,CAAC,CAAC,EACN,GACE,IAAI,CAAC,IAAI;QACP,CAAC,CAAC;UACE,IAAI,CAAC,IAAI,GAAG;QAChB,CAAC,CAAC,EACN,GACE,IAAI,CAAC,IAAI;QACP,CAAC,CAAC;UACE,IAAI,CAAC,IAAI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AAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE;QACJ,OAAO,EAAE;YACP,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;YAChC,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE;YAClC,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE;YAClC,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;YAChC,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;SACjC;QACD,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,cAAc;QAC3B,YAAY,EAAE,EAAE;QAChB,KAAK,EAAE,EAAE;QACT,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,cAAc,EAAE,KAAK;QACrB,UAAU,EAAE,gBAAgB;QAC5B,aAAa,EAAE,IAAI;KACpB;CACF,CAAC","sourcesContent":["import iconNames from '../../../assets/icons/iconset-default-list';\n\nconst renderCuraSelect = args => {\n const optionsMarkup = args.options.map(option => `<cura-select-option value=\"${option.value}\">${option.label}</cura-select-option>`).join('');\n\n const block = `<cura-select${\n args.label\n ? `\n label=\"${args.label}\"`\n : ''\n }${\n args.placeholder\n ? `\n placeholder=\"${args.placeholder}\"`\n : ''\n }${\n args.defaultValue\n ? `\n default-value=\"${args.defaultValue}\"`\n : ''\n }${\n args.value\n ? `\n value=\"${args.value}\"`\n : ''\n }${\n args.mode\n ? `\n mode=\"${args.mode}\"`\n : ''\n }${\n args.size\n ? `\n size=\"${args.size}\"`\n : ''\n }${\n args.status\n ? `\n status=\"${args.status}\"`\n : ''\n }${\n args.iconName\n ? `\n icon-name=\"${args.iconName}\"`\n : ''\n }${\n args.disabled\n ? `\n disabled`\n : ''\n }${\n args.required\n ? `\n required`\n : ''\n }${\n args.searchBehavior\n ? `\n search-behavior=\"${args.searchBehavior}\"`\n : ''\n }${`\n accent-sensitive=\"${args.caseSensitive}\"`}>\n ${args.helperText}\n ${optionsMarkup}\n</cura-select>`;\n\n return `<div style=\"height: 200px; padding: 20px;\">${block}</div>`;\n};\n\nexport default {\n title: 'Componentes/Forms/Select',\n component: 'cura-select',\n tags: ['autodocs'],\n render: args => renderCuraSelect(args),\n argTypes: {\n label: {\n control: 'text',\n description: 'Texto do rótulo para o componente select.',\n table: {\n category: 'Propriedades',\n defaultValue: { summary: '' },\n },\n },\n placeholder: {\n control: 'text',\n description: 'Texto de espaço reservado para o campo de entrada.',\n table: {\n category: 'Propriedades',\n defaultValue: { summary: '' },\n },\n },\n defaultValue: {\n control: 'text',\n description: 'Valor padrão para o componente select.',\n table: {\n category: 'Propriedades',\n defaultValue: { summary: '' },\n },\n },\n value: {\n control: 'text',\n description: 'Valor atual do componente select. Ao inicar a busca o mesmo se refere ao option relacionado',\n table: {\n category: 'Propriedades',\n defaultValue: { summary: '' },\n },\n },\n iconName: {\n control: { type: 'select' },\n options: ['', ...iconNames],\n description: 'Nome do ícone de feedback. Usado em conjunto com a prop <strong>mode=default</strong>',\n required: false,\n table: {\n category: 'Icons',\n defaultValue: { summary: '' },\n },\n },\n mode: {\n control: { type: 'inline-radio' },\n options: ['default', 'transparent'],\n description: \"Modo de exibição do componente select. Pode ser 'default' ou 'transparent'.\",\n table: {\n category: 'Propriedades',\n defaultValue: { summary: 'default' },\n },\n },\n size: {\n control: { type: 'inline-radio' },\n options: ['small', 'medium', 'large'],\n description: \"Tamanho do componente select. Pode ser 'small', 'medium' ou 'large'.\",\n table: {\n category: 'Propriedades',\n defaultValue: { summary: 'medium' },\n },\n },\n status: {\n control: { type: 'inline-radio' },\n options: ['default', 'success', 'error'],\n description: \"Status do componente select. Pode ser 'success', 'error' ou 'default'.\",\n table: {\n category: 'Propriedades',\n defaultValue: { summary: 'default' },\n },\n },\n caseSensitive: {\n control: 'boolean',\n description: 'Indica se deve considerar acentos e careacteres especiais na busca',\n table: {\n category: 'Propriedades',\n defaultValue: { summary: 'true' },\n },\n },\n disabled: {\n control: 'boolean',\n description: 'Indica se o componente select está desabilitado.',\n table: {\n category: 'states',\n defaultValue: { summary: 'false' },\n },\n },\n required: {\n control: 'boolean',\n description: 'Indica se o componente select é obrigatório.',\n table: {\n category: 'states',\n defaultValue: { summary: 'false' },\n },\n },\n searchBehavior: {\n control: 'boolean',\n description: 'Habilita o modo de digitação e busca nas opções a partir do termo.',\n table: {\n category: 'states',\n defaultValue: { summary: 'false' },\n },\n },\n helperText: {\n name: 'content',\n control: 'text',\n description: 'Define o texto de ajuda do input, renderizado dentro do slot num elemento <cura-label>. Aceita tags HTML.',\n table: {\n category: 'Slots',\n defaultValue: { summary: '' },\n },\n },\n selected: {\n description: 'Emite um evento via Listener quando um valor é selecionado. { value: string , selected: boolean }',\n table: {\n category: 'Evento',\n defaultValue: { summary: '' },\n },\n },\n options: {\n control: 'array',\n description: 'Lista de opções definido pela aplicação para cura-select-option.',\n table: {\n category: 'aplication',\n defaultValue: { summary: '[]' },\n },\n },\n },\n};\n\nexport const CuraSelect = {\n args: {\n options: [\n { value: '1', label: 'Opção 1' },\n { value: '2', label: 'Escolha 2' },\n { value: '3', label: 'Exemplo 3' },\n { value: '4', label: 'Opcão 4' },\n { value: '5', label: 'Opcao 5' },\n ],\n label: 'Escolha uma opção',\n placeholder: 'Selecione...',\n defaultValue: '',\n value: '',\n mode: 'default',\n size: 'medium',\n status: 'default',\n disabled: false,\n required: false,\n searchBehavior: false,\n helperText: 'Texto de ajuda',\n caseSensitive: true,\n },\n};\n"]}
|
|
1
|
+
{"version":3,"file":"cura-select.stories.js","sourceRoot":"","sources":["../../../../src/components/forms/cura-select/cura-select.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,4CAA4C,CAAC;AAEnE,MAAM,gBAAgB,GAAG,IAAI,CAAC,EAAE;IAC9B,M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AE,WAAW,EAAE;YAClC,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;YAChC,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;SACjC;QACD,KAAK,EAAE,mBAAmB;QAC1B,WAAW,EAAE,cAAc;QAC3B,YAAY,EAAE,EAAE;QAChB,KAAK,EAAE,EAAE;QACT,IAAI,EAAE,SAAS;QACf,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,SAAS;QACjB,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,KAAK;QACf,cAAc,EAAE,KAAK;QACrB,UAAU,EAAE,gBAAgB;QAC5B,aAAa,EAAE,IAAI;QACnB,SAAS,EAAE,OAAO;KACnB;CACF,CAAC","sourcesContent":["import iconNames from '../../../assets/icons/iconset-default-list';\n\nconst renderCuraSelect = args => {\n const optionsMarkup = args.options.map(option => `<cura-select-option value=\"${option.value}\">${option.label}</cura-select-option>`).join('');\n\n const block = `<cura-select${\n args.label\n ? `\n label=\"${args.label}\"`\n : ''\n }${\n args.placeholder\n ? `\n placeholder=\"${args.placeholder}\"`\n : ''\n }${\n args.defaultValue\n ? `\n default-value=\"${args.defaultValue}\"`\n : ''\n }${\n args.value\n ? `\n value=\"${args.value}\"`\n : ''\n }${\n args.mode\n ? `\n mode=\"${args.mode}\"`\n : ''\n }${\n args.size\n ? `\n size=\"${args.size}\"`\n : ''\n }${\n args.status\n ? `\n status=\"${args.status}\"`\n : ''\n }${\n args.iconName\n ? `\n icon-name=\"${args.iconName}\"`\n : ''\n }${\n args.disabled\n ? `\n disabled`\n : ''\n }${\n args.required\n ? `\n required`\n : ''\n }${\n args.searchBehavior\n ? `\n search-behavior=\"${args.searchBehavior}\"`\n : ''\n }${\n args.maxHeight\n ? `\n max-height=\"${args.maxHeight}\"`\n : ''\n }${`\n accent-sensitive=\"${args.caseSensitive}\"`}>\n ${args.helperText}\n ${optionsMarkup}\n</cura-select>`;\n\n return `<div style=\"height: 200px; padding: 20px;\">${block}</div>`;\n};\n\nexport default {\n title: 'Componentes/Forms/Select',\n component: 'cura-select',\n tags: ['autodocs'],\n render: args => renderCuraSelect(args),\n argTypes: {\n label: {\n control: 'text',\n description: 'Texto do rótulo para o componente select.',\n table: {\n category: 'Propriedades',\n defaultValue: { summary: '' },\n },\n },\n placeholder: {\n control: 'text',\n description: 'Texto de espaço reservado para o campo de entrada.',\n table: {\n category: 'Propriedades',\n defaultValue: { summary: '' },\n },\n },\n defaultValue: {\n control: 'text',\n description: 'Valor padrão para o componente select.',\n table: {\n category: 'Propriedades',\n defaultValue: { summary: '' },\n },\n },\n value: {\n control: 'text',\n description: 'Valor atual do componente select. Ao inicar a busca o mesmo se refere ao option relacionado',\n table: {\n category: 'Propriedades',\n defaultValue: { summary: '' },\n },\n },\n iconName: {\n control: { type: 'select' },\n options: ['', ...iconNames],\n description: 'Nome do ícone de feedback. Usado em conjunto com a prop <strong>mode=default</strong>',\n required: false,\n table: {\n category: 'Icons',\n defaultValue: { summary: '' },\n },\n },\n mode: {\n control: { type: 'inline-radio' },\n options: ['default', 'transparent'],\n description: \"Modo de exibição do componente select. Pode ser 'default' ou 'transparent'.\",\n table: {\n category: 'Propriedades',\n defaultValue: { summary: 'default' },\n },\n },\n size: {\n control: { type: 'inline-radio' },\n options: ['small', 'medium', 'large'],\n description: \"Tamanho do componente select. Pode ser 'small', 'medium' ou 'large'.\",\n table: {\n category: 'Propriedades',\n defaultValue: { summary: 'medium' },\n },\n },\n status: {\n control: { type: 'inline-radio' },\n options: ['default', 'success', 'error'],\n description: \"Status do componente select. Pode ser 'success', 'error' ou 'default'.\",\n table: {\n category: 'Propriedades',\n defaultValue: { summary: 'default' },\n },\n },\n caseSensitive: {\n control: 'boolean',\n description: 'Indica se deve considerar acentos e careacteres especiais na busca',\n table: {\n category: 'Propriedades',\n defaultValue: { summary: 'true' },\n },\n },\n disabled: {\n control: 'boolean',\n description: 'Indica se o componente select está desabilitado.',\n table: {\n category: 'states',\n defaultValue: { summary: 'false' },\n },\n },\n required: {\n control: 'boolean',\n description: 'Indica se o componente select é obrigatório.',\n table: {\n category: 'states',\n defaultValue: { summary: 'false' },\n },\n },\n searchBehavior: {\n control: 'boolean',\n description: 'Habilita o modo de digitação e busca nas opções a partir do termo.',\n table: {\n category: 'states',\n defaultValue: { summary: 'false' },\n },\n },\n helperText: {\n name: 'content',\n control: 'text',\n description: 'Define o texto de ajuda do input, renderizado dentro do slot num elemento <cura-label>. Aceita tags HTML.',\n table: {\n category: 'Slots',\n defaultValue: { summary: '' },\n },\n },\n selected: {\n description: 'Emite um evento via Listener quando um valor é selecionado. { value: string , selected: boolean }',\n table: {\n category: 'Evento',\n defaultValue: { summary: '' },\n },\n },\n options: {\n control: 'array',\n description: 'Lista de opções definido pela aplicação para cura-select-option.',\n table: {\n category: 'aplication',\n defaultValue: { summary: '[]' },\n },\n },\n maxHeight: {\n control: 'text',\n description: 'Altura máxima para o menu.',\n table: {\n category: 'Properties',\n defaultValue: { summary: '285px' },\n }\n },\n },\n};\n\nexport const CuraSelect = {\n args: {\n options: [\n { value: '1', label: 'Opção 1' },\n { value: '2', label: 'Escolha 2' },\n { value: '3', label: 'Exemplo 3' },\n { value: '4', label: 'Opcão 4' },\n { value: '5', label: 'Opcao 5' },\n ],\n label: 'Escolha uma opção',\n placeholder: 'Selecione...',\n defaultValue: '',\n value: '',\n mode: 'default',\n size: 'medium',\n status: 'default',\n disabled: false,\n required: false,\n searchBehavior: false,\n helperText: 'Texto de ajuda',\n caseSensitive: true,\n maxHeight: \"285px\",\n },\n};\n"]}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global Spacing Definitions.
|
|
3
|
+
* Required CSS Properties from Cura:
|
|
4
|
+
* --cura-spacing-base
|
|
5
|
+
*/
|
|
6
|
+
/* None: 0px */
|
|
7
|
+
/* Tiny default: 4px */
|
|
8
|
+
/* Mini default: 8px */
|
|
9
|
+
/* XXXS default: 12px */
|
|
10
|
+
/* XXS default: 16px */
|
|
11
|
+
/* XS default: 20px */
|
|
12
|
+
/* S default: 20px */
|
|
13
|
+
/* M default: 32px */
|
|
14
|
+
/* L default: 40px */
|
|
15
|
+
/* XL default: 48px */
|
|
16
|
+
/* XXL default: 64px */
|
|
17
|
+
/* XXXL default: 72px */
|
|
18
|
+
/* Huge default: 96px */
|
|
19
|
+
/**
|
|
20
|
+
* Global Button Definitions.
|
|
21
|
+
* Required CSS Properties:
|
|
22
|
+
* --font-size
|
|
23
|
+
* --base-spacing
|
|
24
|
+
* --font-family
|
|
25
|
+
* --font-weight-medium
|
|
26
|
+
* --text-align
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* Spacing sass vars
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* Global Spacing Definitions.
|
|
33
|
+
* Required CSS Properties from Cura:
|
|
34
|
+
* --cura-spacing-base
|
|
35
|
+
*/
|
|
36
|
+
/* None: 0px */
|
|
37
|
+
/* Tiny default: 4px */
|
|
38
|
+
/* Mini default: 8px */
|
|
39
|
+
/* XXXS default: 12px */
|
|
40
|
+
/* XXS default: 16px */
|
|
41
|
+
/* XS default: 20px */
|
|
42
|
+
/* S default: 20px */
|
|
43
|
+
/* M default: 32px */
|
|
44
|
+
/* L default: 40px */
|
|
45
|
+
/* XL default: 48px */
|
|
46
|
+
/* XXL default: 64px */
|
|
47
|
+
/* XXXL default: 72px */
|
|
48
|
+
/* Huge default: 96px */
|
|
49
|
+
/**
|
|
50
|
+
* Buttons Host element definitions.
|
|
51
|
+
* Use: @include button-host() { ... }
|
|
52
|
+
*/
|
|
53
|
+
/**
|
|
54
|
+
* Buttons base definitions.
|
|
55
|
+
* Use: @include button-element() { ... }
|
|
56
|
+
*/
|
|
57
|
+
/**
|
|
58
|
+
* Button sizes definitions.
|
|
59
|
+
* Use: @include button-sizes() { ... }
|
|
60
|
+
*/
|
|
61
|
+
/**
|
|
62
|
+
* Button container definitions.
|
|
63
|
+
* Use: @include button-container() { ... }
|
|
64
|
+
*/
|
|
65
|
+
/**
|
|
66
|
+
* Button label definitions.
|
|
67
|
+
* Use: @include button-label() { ... }
|
|
68
|
+
*/
|
|
69
|
+
/**
|
|
70
|
+
* Button shadow definitions.
|
|
71
|
+
* Use: @include button-label() { ... }
|
|
72
|
+
*/
|
|
73
|
+
/**
|
|
74
|
+
* Button disabled state definitions
|
|
75
|
+
* Use: @include button-disabled() { ... }
|
|
76
|
+
*/
|
|
77
|
+
/**
|
|
78
|
+
* Button selected state definitions
|
|
79
|
+
* Use: @include button-selected() { ... }
|
|
80
|
+
*/
|
|
81
|
+
/**
|
|
82
|
+
* Button loading state definitions
|
|
83
|
+
* Use: @include button-loading() { ... }
|
|
84
|
+
*/
|
|
85
|
+
/**
|
|
86
|
+
* Button icon definitions
|
|
87
|
+
* Use: @include button-icon() { ... }
|
|
88
|
+
*/
|
|
89
|
+
/**
|
|
90
|
+
* Button icon only behavior definitions
|
|
91
|
+
* Use: @include button-icon-only-behavior() { ... }
|
|
92
|
+
*/
|
|
93
|
+
:host button,
|
|
94
|
+
:host a {
|
|
95
|
+
outline: none;
|
|
96
|
+
box-shadow: none;
|
|
97
|
+
box-sizing: border-box;
|
|
98
|
+
display: flex;
|
|
99
|
+
width: 100%;
|
|
100
|
+
align-items: center;
|
|
101
|
+
justify-content: center;
|
|
102
|
+
text-decoration: none !important;
|
|
103
|
+
font-size: var(--font-size);
|
|
104
|
+
cursor: pointer;
|
|
105
|
+
transition: background-color 0.07s linear, box-shadow 0.07s linear, border-color 0.07s linear;
|
|
106
|
+
border-radius: var(--border-radius);
|
|
107
|
+
position: relative;
|
|
108
|
+
background-color: transparent;
|
|
109
|
+
box-sizing: border-box;
|
|
110
|
+
border: none;
|
|
111
|
+
min-width: 120px;
|
|
112
|
+
width: fit-content;
|
|
113
|
+
display: flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
justify-content: center;
|
|
116
|
+
border-radius: 4px 4px 0 0;
|
|
117
|
+
}
|
|
118
|
+
:host button:focus,
|
|
119
|
+
:host a:focus {
|
|
120
|
+
outline: 2px solid #6EA8FF;
|
|
121
|
+
}
|
|
122
|
+
:host button.border-bottom,
|
|
123
|
+
:host a.border-bottom {
|
|
124
|
+
border-bottom: 1px solid var(--border-bottom-color);
|
|
125
|
+
}
|
|
126
|
+
:host button:not(.disabled, .selected):hover,
|
|
127
|
+
:host a:not(.disabled, .selected):hover {
|
|
128
|
+
background-color: var(--background-color-hover);
|
|
129
|
+
}
|
|
130
|
+
:host button:not(.disabled, .selected):hover.light,
|
|
131
|
+
:host a:not(.disabled, .selected):hover.light {
|
|
132
|
+
border-bottom-color: var(--primary-dark);
|
|
133
|
+
}
|
|
134
|
+
:host button:not(.disabled, .selected):hover.dark,
|
|
135
|
+
:host a:not(.disabled, .selected):hover.dark {
|
|
136
|
+
border-bottom-color: var(--neutral-purewhite);
|
|
137
|
+
}
|
|
138
|
+
:host button.small,
|
|
139
|
+
:host a.small {
|
|
140
|
+
padding: calc(var(--cura-spacing-base) * 2px) calc(var(--cura-spacing-base) * 2px);
|
|
141
|
+
}
|
|
142
|
+
:host button.medium,
|
|
143
|
+
:host a.medium {
|
|
144
|
+
padding: calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 3px);
|
|
145
|
+
}
|
|
146
|
+
:host button.large,
|
|
147
|
+
:host a.large {
|
|
148
|
+
padding: calc(var(--cura-spacing-base) * 3px) calc(var(--cura-spacing-base) * 4px);
|
|
149
|
+
}
|
|
150
|
+
:host button:focus,
|
|
151
|
+
:host a:focus {
|
|
152
|
+
border: 2px solid var(--primary-light);
|
|
153
|
+
}
|
|
154
|
+
:host button cura-icon,
|
|
155
|
+
:host a cura-icon {
|
|
156
|
+
margin-right: calc(var(--cura-spacing-base) * 2px);
|
|
157
|
+
}
|
|
158
|
+
:host button.selected,
|
|
159
|
+
:host a.selected {
|
|
160
|
+
cursor: pointer;
|
|
161
|
+
background-color: var(--background-color-selected);
|
|
162
|
+
}
|
|
163
|
+
:host button.selected.disabled,
|
|
164
|
+
:host a.selected.disabled {
|
|
165
|
+
background-color: var(--background-disabled-selected);
|
|
166
|
+
}
|
|
167
|
+
:host button.disabled,
|
|
168
|
+
:host a.disabled {
|
|
169
|
+
cursor: not-allowed;
|
|
170
|
+
}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { h, Host } from "@stencil/core";
|
|
2
|
+
import { labelSizes } from "../cura-tabs.definitions";
|
|
3
|
+
export class CuraTabs {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.name = undefined;
|
|
6
|
+
this.iconName = undefined;
|
|
7
|
+
this.selected = false;
|
|
8
|
+
this.disabled = false;
|
|
9
|
+
this.borderBottom = true;
|
|
10
|
+
this.size = 'large';
|
|
11
|
+
this.colorMode = 'light';
|
|
12
|
+
this.hovered = false;
|
|
13
|
+
this.styles = {};
|
|
14
|
+
}
|
|
15
|
+
setColors() {
|
|
16
|
+
const colors = [
|
|
17
|
+
{ name: '--background-color-selected', theme: this.colorMode === 'light' ? 'primary-base' : 'primary-lighter' },
|
|
18
|
+
{ name: '--background-color-hover', theme: this.colorMode === 'light' ? 'primary-lighter' : null },
|
|
19
|
+
{
|
|
20
|
+
name: '--background-disabled-selected',
|
|
21
|
+
theme: this.colorMode === 'light' ? 'neutral-pale' : 'neutral-black',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: '--border-bottom-color',
|
|
25
|
+
theme: this.colorMode === 'light' ? 'neutral-base' : 'primary',
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
colors.forEach(c => {
|
|
29
|
+
if (c.theme)
|
|
30
|
+
this.styles[c.name] = window.CuraAPI.theme.colors.getColor(c.theme);
|
|
31
|
+
});
|
|
32
|
+
this.styles = Object.assign({}, this.styles);
|
|
33
|
+
}
|
|
34
|
+
computeContentColor() {
|
|
35
|
+
if (this.disabled)
|
|
36
|
+
return 'neutral-dark';
|
|
37
|
+
if (this.colorMode === 'dark') {
|
|
38
|
+
if (this.hovered && !this.selected) {
|
|
39
|
+
return 'neutral-purewhite';
|
|
40
|
+
}
|
|
41
|
+
return this.selected ? 'neutral-black' : 'primary-lighter';
|
|
42
|
+
}
|
|
43
|
+
return this.selected ? 'neutral-purewhite' : 'primary-dark';
|
|
44
|
+
}
|
|
45
|
+
updateDynamicStyles() {
|
|
46
|
+
if (this.colorMode === 'dark' && this.hovered && !this.selected) {
|
|
47
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--border-bottom-color': window.CuraAPI.theme.colors.getColor('neutral-purewhite') });
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
getIcon() {
|
|
51
|
+
if (!this.iconName)
|
|
52
|
+
return '';
|
|
53
|
+
const iconSize = this.size === 'large' ? 20 : 16;
|
|
54
|
+
const iconColor = this.computeContentColor();
|
|
55
|
+
return h("cura-icon", { name: this.iconName, size: iconSize, color: iconColor });
|
|
56
|
+
}
|
|
57
|
+
getClasses() {
|
|
58
|
+
return {
|
|
59
|
+
[this.size]: true,
|
|
60
|
+
[this.colorMode]: true,
|
|
61
|
+
'selected': this.selected,
|
|
62
|
+
'disabled': this.disabled,
|
|
63
|
+
'border-bottom': this.borderBottom,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
connectedCallback() {
|
|
67
|
+
this.styles = Object.assign(Object.assign({}, this.styles), { '--primary-dark': window.CuraAPI.theme.colors.getColor('primary-dark'), '--neutral-purewhite': window.CuraAPI.theme.colors.getColor('neutral-purewhite'), '--base-spacing': window.CuraAPI.theme.spacing.getSpacing() });
|
|
68
|
+
this.setColors();
|
|
69
|
+
}
|
|
70
|
+
handleMouseEnter() {
|
|
71
|
+
if (this.disabled)
|
|
72
|
+
return;
|
|
73
|
+
this.hovered = true;
|
|
74
|
+
}
|
|
75
|
+
handleMouseLeave() {
|
|
76
|
+
this.hovered = false;
|
|
77
|
+
}
|
|
78
|
+
handleClick(e) {
|
|
79
|
+
if (this.disabled) {
|
|
80
|
+
e.preventDefault();
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
this.selected = !this.selected;
|
|
84
|
+
this.tabSelect.emit({ name: this.name });
|
|
85
|
+
}
|
|
86
|
+
render() {
|
|
87
|
+
const labelSize = labelSizes[this.size] || labelSizes['default'];
|
|
88
|
+
const labelColor = this.computeContentColor();
|
|
89
|
+
this.updateDynamicStyles();
|
|
90
|
+
return (h(Host, { key: '3966968b73a9a51ec26f3206cdb09fbfcb3d3daf', role: "button", "aria-pressed": this.selected, "aria-disabled": this.disabled }, h("button", { key: '00cc6382c635a05c52fd74b3e02e968c2d94cacb', class: this.getClasses(), style: this.styles, onClick: e => this.handleClick(e), disabled: this.disabled, onMouseEnter: this.handleMouseEnter.bind(this), onMouseLeave: this.handleMouseLeave.bind(this) }, this.getIcon(), h("cura-label", { key: 'e193500f156c10cf0442e6f504e19d552c19f849', size: labelSize, color: labelColor, lineHeight: "0", marginBlock: "0" }, h("slot", { key: '8a0ac7c4b2ff4990093d13b4110e370616cf39f4' })))));
|
|
91
|
+
}
|
|
92
|
+
static get is() { return "cura-tabs"; }
|
|
93
|
+
static get encapsulation() { return "shadow"; }
|
|
94
|
+
static get originalStyleUrls() {
|
|
95
|
+
return {
|
|
96
|
+
"$": ["cura-tabs.scss"]
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
static get styleUrls() {
|
|
100
|
+
return {
|
|
101
|
+
"$": ["cura-tabs.css"]
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
static get properties() {
|
|
105
|
+
return {
|
|
106
|
+
"name": {
|
|
107
|
+
"type": "string",
|
|
108
|
+
"mutable": false,
|
|
109
|
+
"complexType": {
|
|
110
|
+
"original": "string",
|
|
111
|
+
"resolved": "string",
|
|
112
|
+
"references": {}
|
|
113
|
+
},
|
|
114
|
+
"required": false,
|
|
115
|
+
"optional": false,
|
|
116
|
+
"docs": {
|
|
117
|
+
"tags": [],
|
|
118
|
+
"text": ""
|
|
119
|
+
},
|
|
120
|
+
"attribute": "name",
|
|
121
|
+
"reflect": true
|
|
122
|
+
},
|
|
123
|
+
"iconName": {
|
|
124
|
+
"type": "string",
|
|
125
|
+
"mutable": false,
|
|
126
|
+
"complexType": {
|
|
127
|
+
"original": "string",
|
|
128
|
+
"resolved": "string",
|
|
129
|
+
"references": {}
|
|
130
|
+
},
|
|
131
|
+
"required": false,
|
|
132
|
+
"optional": false,
|
|
133
|
+
"docs": {
|
|
134
|
+
"tags": [],
|
|
135
|
+
"text": ""
|
|
136
|
+
},
|
|
137
|
+
"attribute": "icon-name",
|
|
138
|
+
"reflect": true
|
|
139
|
+
},
|
|
140
|
+
"selected": {
|
|
141
|
+
"type": "boolean",
|
|
142
|
+
"mutable": true,
|
|
143
|
+
"complexType": {
|
|
144
|
+
"original": "boolean",
|
|
145
|
+
"resolved": "boolean",
|
|
146
|
+
"references": {}
|
|
147
|
+
},
|
|
148
|
+
"required": false,
|
|
149
|
+
"optional": false,
|
|
150
|
+
"docs": {
|
|
151
|
+
"tags": [],
|
|
152
|
+
"text": ""
|
|
153
|
+
},
|
|
154
|
+
"attribute": "selected",
|
|
155
|
+
"reflect": true,
|
|
156
|
+
"defaultValue": "false"
|
|
157
|
+
},
|
|
158
|
+
"disabled": {
|
|
159
|
+
"type": "boolean",
|
|
160
|
+
"mutable": true,
|
|
161
|
+
"complexType": {
|
|
162
|
+
"original": "boolean",
|
|
163
|
+
"resolved": "boolean",
|
|
164
|
+
"references": {}
|
|
165
|
+
},
|
|
166
|
+
"required": false,
|
|
167
|
+
"optional": false,
|
|
168
|
+
"docs": {
|
|
169
|
+
"tags": [],
|
|
170
|
+
"text": ""
|
|
171
|
+
},
|
|
172
|
+
"attribute": "disabled",
|
|
173
|
+
"reflect": true,
|
|
174
|
+
"defaultValue": "false"
|
|
175
|
+
},
|
|
176
|
+
"borderBottom": {
|
|
177
|
+
"type": "boolean",
|
|
178
|
+
"mutable": true,
|
|
179
|
+
"complexType": {
|
|
180
|
+
"original": "boolean",
|
|
181
|
+
"resolved": "boolean",
|
|
182
|
+
"references": {}
|
|
183
|
+
},
|
|
184
|
+
"required": false,
|
|
185
|
+
"optional": false,
|
|
186
|
+
"docs": {
|
|
187
|
+
"tags": [],
|
|
188
|
+
"text": ""
|
|
189
|
+
},
|
|
190
|
+
"attribute": "border-bottom",
|
|
191
|
+
"reflect": true,
|
|
192
|
+
"defaultValue": "true"
|
|
193
|
+
},
|
|
194
|
+
"size": {
|
|
195
|
+
"type": "string",
|
|
196
|
+
"mutable": false,
|
|
197
|
+
"complexType": {
|
|
198
|
+
"original": "'small' | 'medium' | 'large'",
|
|
199
|
+
"resolved": "\"large\" | \"medium\" | \"small\"",
|
|
200
|
+
"references": {}
|
|
201
|
+
},
|
|
202
|
+
"required": false,
|
|
203
|
+
"optional": false,
|
|
204
|
+
"docs": {
|
|
205
|
+
"tags": [],
|
|
206
|
+
"text": ""
|
|
207
|
+
},
|
|
208
|
+
"attribute": "size",
|
|
209
|
+
"reflect": true,
|
|
210
|
+
"defaultValue": "'large'"
|
|
211
|
+
},
|
|
212
|
+
"colorMode": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"mutable": true,
|
|
215
|
+
"complexType": {
|
|
216
|
+
"original": "'dark' | 'light'",
|
|
217
|
+
"resolved": "\"dark\" | \"light\"",
|
|
218
|
+
"references": {}
|
|
219
|
+
},
|
|
220
|
+
"required": false,
|
|
221
|
+
"optional": false,
|
|
222
|
+
"docs": {
|
|
223
|
+
"tags": [],
|
|
224
|
+
"text": ""
|
|
225
|
+
},
|
|
226
|
+
"attribute": "color-mode",
|
|
227
|
+
"reflect": true,
|
|
228
|
+
"defaultValue": "'light'"
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
static get states() {
|
|
233
|
+
return {
|
|
234
|
+
"hovered": {},
|
|
235
|
+
"styles": {}
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
static get events() {
|
|
239
|
+
return [{
|
|
240
|
+
"method": "tabSelect",
|
|
241
|
+
"name": "tabSelect",
|
|
242
|
+
"bubbles": true,
|
|
243
|
+
"cancelable": true,
|
|
244
|
+
"composed": true,
|
|
245
|
+
"docs": {
|
|
246
|
+
"tags": [],
|
|
247
|
+
"text": ""
|
|
248
|
+
},
|
|
249
|
+
"complexType": {
|
|
250
|
+
"original": "{ name: string }",
|
|
251
|
+
"resolved": "{ name: string; }",
|
|
252
|
+
"references": {}
|
|
253
|
+
}
|
|
254
|
+
}];
|
|
255
|
+
}
|
|
256
|
+
static get watchers() {
|
|
257
|
+
return [{
|
|
258
|
+
"propName": "colorMode",
|
|
259
|
+
"methodName": "setColors"
|
|
260
|
+
}];
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
//# sourceMappingURL=cura-tabs.js.map
|