@roadtrip/components 3.26.0 → 3.27.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/cjs/loader.cjs.js +1 -1
- package/dist/cjs/road-checkbox.cjs.entry.js +3 -2
- package/dist/cjs/road-checkbox.cjs.entry.js.map +1 -1
- package/dist/cjs/road-navbar-item.cjs.entry.js +12 -1
- package/dist/cjs/road-navbar-item.cjs.entry.js.map +1 -1
- package/dist/cjs/road-progress-indicator-horizontal.cjs.entry.js +1 -1
- package/dist/cjs/road-progress-indicator-horizontal.cjs.entry.js.map +1 -1
- package/dist/cjs/road-radio.cjs.entry.js +3 -2
- package/dist/cjs/road-radio.cjs.entry.js.map +1 -1
- package/dist/cjs/road-select-filter.cjs.entry.js +5 -0
- package/dist/cjs/road-select-filter.cjs.entry.js.map +1 -1
- package/dist/cjs/road-tab-button.cjs.entry.js +1 -1
- package/dist/cjs/road-tab-button.cjs.entry.js.map +1 -1
- package/dist/cjs/road-textarea.cjs.entry.js +1 -1
- package/dist/cjs/road-textarea.cjs.entry.js.map +1 -1
- package/dist/cjs/roadtrip.cjs.js +1 -1
- package/dist/collection/components/checkbox/checkbox.css +7 -2
- package/dist/collection/components/checkbox/checkbox.js +19 -1
- package/dist/collection/components/checkbox/checkbox.js.map +1 -1
- package/dist/collection/components/checkbox/checkbox.stories.js +5 -0
- package/dist/collection/components/navbar-item/navbar-item.js +15 -1
- package/dist/collection/components/navbar-item/navbar-item.js.map +1 -1
- package/dist/collection/components/progress-indicator-horizontal/progress-indicator-horizontal.css +24 -5
- package/dist/collection/components/progress-indicator-horizontal/progress-indicator-horizontal.js +6 -6
- package/dist/collection/components/progress-indicator-horizontal/progress-indicator-horizontal.js.map +1 -1
- package/dist/collection/components/progress-indicator-horizontal/progress-indicator-horizontal.stories.js +3 -3
- package/dist/collection/components/radio/radio.css +5 -0
- package/dist/collection/components/radio/radio.js +19 -1
- package/dist/collection/components/radio/radio.js.map +1 -1
- package/dist/collection/components/radio/radio.stories.js +5 -0
- package/dist/collection/components/select-filter/select-filter.js +5 -0
- package/dist/collection/components/select-filter/select-filter.js.map +1 -1
- package/dist/collection/components/tab-button/tab-button.js +1 -1
- package/dist/collection/components/tab-button/tab-button.js.map +1 -1
- package/dist/collection/components/textarea/textarea.css +2 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/road-checkbox.entry.js +3 -2
- package/dist/esm/road-checkbox.entry.js.map +1 -1
- package/dist/esm/road-navbar-item.entry.js +12 -1
- package/dist/esm/road-navbar-item.entry.js.map +1 -1
- package/dist/esm/road-progress-indicator-horizontal.entry.js +1 -1
- package/dist/esm/road-progress-indicator-horizontal.entry.js.map +1 -1
- package/dist/esm/road-radio.entry.js +3 -2
- package/dist/esm/road-radio.entry.js.map +1 -1
- package/dist/esm/road-select-filter.entry.js +5 -0
- package/dist/esm/road-select-filter.entry.js.map +1 -1
- package/dist/esm/road-tab-button.entry.js +1 -1
- package/dist/esm/road-tab-button.entry.js.map +1 -1
- package/dist/esm/road-textarea.entry.js +1 -1
- package/dist/esm/road-textarea.entry.js.map +1 -1
- package/dist/esm/roadtrip.js +1 -1
- package/dist/html.html-data.json +17 -0
- package/dist/roadtrip/p-40ee0f8a.entry.js +2 -0
- package/dist/roadtrip/p-40ee0f8a.entry.js.map +1 -0
- package/dist/roadtrip/{p-48fad2ec.entry.js → p-430e6759.entry.js} +2 -2
- package/dist/roadtrip/{p-48fad2ec.entry.js.map → p-430e6759.entry.js.map} +1 -1
- package/dist/roadtrip/p-708f262a.entry.js +2 -0
- package/dist/roadtrip/p-708f262a.entry.js.map +1 -0
- package/dist/roadtrip/{p-9ff79904.entry.js → p-73a21ee9.entry.js} +2 -2
- package/dist/roadtrip/p-73a21ee9.entry.js.map +1 -0
- package/dist/roadtrip/p-ac7b2425.entry.js +2 -0
- package/dist/roadtrip/p-ac7b2425.entry.js.map +1 -0
- package/dist/roadtrip/p-b2c38586.entry.js +2 -0
- package/dist/roadtrip/p-b2c38586.entry.js.map +1 -0
- package/dist/roadtrip/{p-21b1569a.entry.js → p-c09f4088.entry.js} +2 -2
- package/dist/roadtrip/{p-21b1569a.entry.js.map → p-c09f4088.entry.js.map} +1 -1
- package/dist/roadtrip/roadtrip.esm.js +1 -1
- package/dist/roadtrip/roadtrip.esm.js.map +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +4 -0
- package/dist/types/components/navbar-item/navbar-item.d.ts +4 -0
- package/dist/types/components/progress-indicator-horizontal/progress-indicator-horizontal.d.ts +3 -3
- package/dist/types/components/radio/radio.d.ts +4 -0
- package/dist/types/components.d.ts +22 -6
- package/hydrate/index.js +29 -9
- package/package.json +1 -1
- package/dist/roadtrip/p-254ba3c4.entry.js +0 -2
- package/dist/roadtrip/p-254ba3c4.entry.js.map +0 -1
- package/dist/roadtrip/p-76ccfc61.entry.js +0 -2
- package/dist/roadtrip/p-76ccfc61.entry.js.map +0 -1
- package/dist/roadtrip/p-98cd42c5.entry.js +0 -2
- package/dist/roadtrip/p-98cd42c5.entry.js.map +0 -1
- package/dist/roadtrip/p-9ff79904.entry.js.map +0 -1
- package/dist/roadtrip/p-e9f24444.entry.js +0 -2
- package/dist/roadtrip/p-e9f24444.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.js","sourceRoot":"","sources":["../../../src/components/radio/radio.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACtG,OAAO,wBAAwB,CAAC;AAOhC,MAAM,OAAO,KAAK;;IAER,eAAU,GAAqC,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"radio.js","sourceRoot":"","sources":["../../../src/components/radio/radio.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF;AAED,IAAI,QAAQ,GAAG,CAAC,CAAC","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, Prop, State, h, Listen } from '@stencil/core';\nimport './../../utils/polyfill';\n\n@Component({\n tag: 'road-radio',\n styleUrl: 'radio.css',\n scoped: true,\n})\nexport class Radio {\n\n private radioGroup: HTMLRoadRadioGroupElement | null = null;\n\n @Element() el!: HTMLRoadRadioElement;\n\n /**\n * The id of radio\n */\n @Prop() radioId: string = `road-radio-${radioIds++}`;\n\n /**\n * If `true`, the radio is selected.\n */\n @State() checked: boolean = false;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.radioId;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required: boolean = false;\n\n /**\n * If `true`, the user cannot interact with the radio.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Value the form will get\n */\n @Prop() value?: any | null;\n\n /**\n * Label for the field\n */\n @Prop() label: string = `${this.radioId}-label`;\n\n /**\n * Secondary Label for the field\n */\n @Prop() secondaryLabel?: string;\n\n /**\n * If `true`, the label and the radio are inverse and spaced\n */\n @Prop() inverse: boolean = false;\n\n /**\n * Error message for the field\n */\n @Prop() error?: boolean;\n\n /**\n * Helper message for the field\n */\n @Prop() helper?: string;\n\n /**\n * Inline multiple radio\n */\n @Prop() inline: boolean = true;\n\n /**\n * Emitted when the radio button has focus.\n */\n @Event() roadfocus!: EventEmitter<void>;\n /** @internal */\n @Event() roadFocus!: EventEmitter<void>;\n\n /**\n * Emitted when the radio button loses focus.\n */\n @Event() roadblur!: EventEmitter<void>;\n /** @internal */\n @Event() roadBlur!: EventEmitter<void>;\n\n connectedCallback() {\n if (this.value === undefined) {\n this.value = this.radioId;\n }\n const radioGroup = this.radioGroup = this.el.closest('road-radio-group');\n if (radioGroup) {\n this.updateState();\n }\n }\n\n disconnectedCallback() {\n const radioGroup = this.radioGroup;\n if (radioGroup) {\n this.radioGroup = null;\n }\n }\n\n @Listen('roadChange', {target: 'window'})\n @Listen('roadchange', {target: 'window'})\n onRoadChangedChanged() {\n this.updateState();\n }\n\n private updateState = () => {\n if (this.radioGroup) {\n this.checked = this.radioGroup.value === this.value;\n }\n };\n\n private onFocus = () => {\n this.roadfocus.emit();\n this.roadFocus.emit();\n };\n\n private onBlur = () => {\n this.roadblur.emit();\n this.roadBlur.emit();\n };\n\n render() {\n const labelId = this.radioId + '-label';\n const inverseClass = this.inverse && 'form-radio-inverse';\n const isInvalidClass = this.error ? 'is-invalid' : '';\n const inlineClass = this.inline ? 'form-radio-inline' : '';\n\n return (\n <Host class={`form-radio ${inlineClass}`}>\n <input\n class={`form-radio-input ${isInvalidClass}`}\n type=\"radio\"\n id={this.radioId}\n name={this.name}\n required={this.required}\n disabled={this.disabled}\n aria-disabled={this.disabled ? 'true' : null}\n checked={this.checked}\n aria-checked={`${this.checked}`}\n aria-labelledby={labelId}\n value={this.value}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n />\n <label class={`form-radio-label ${inverseClass}`} id={labelId} htmlFor={this.radioId}>{this.label} <span class=\"form-radio-label-span\">{this.secondaryLabel}</span></label>\n </Host>\n );\n }\n}\n\nlet radioIds = 0;\n"]}
|
|
@@ -32,6 +32,7 @@ export const Playground = (args) => html`
|
|
|
32
32
|
disabled="${ifDefined(args.disabled)}"
|
|
33
33
|
required="${ifDefined(args.required)}"
|
|
34
34
|
label="${ifDefined(args.label)}"
|
|
35
|
+
secondary-label="${ifDefined(args['secondary-label'])}"
|
|
35
36
|
inverse="${ifDefined(args.inverse)}"
|
|
36
37
|
inline="${ifDefined(args.inline)}"
|
|
37
38
|
value="${ifDefined(args.value)}"
|
|
@@ -45,6 +46,7 @@ Playground.args = {
|
|
|
45
46
|
inverse: null,
|
|
46
47
|
inline: undefined,
|
|
47
48
|
label: 'Label',
|
|
49
|
+
'secondary-label': undefined,
|
|
48
50
|
value: 'on',
|
|
49
51
|
asterisk: null,
|
|
50
52
|
};
|
|
@@ -70,6 +72,9 @@ Playground.argTypes = {
|
|
|
70
72
|
label: {
|
|
71
73
|
control: 'text',
|
|
72
74
|
},
|
|
75
|
+
'secondary-label': {
|
|
76
|
+
control: 'text',
|
|
77
|
+
},
|
|
73
78
|
asterisk: {
|
|
74
79
|
control: 'boolean',
|
|
75
80
|
},
|
|
@@ -79,6 +79,11 @@ export class SelectFilter {
|
|
|
79
79
|
this.onClick(activeOption.item.value, activeOption.item.label);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
+
else if (event.key === 'Escape') {
|
|
83
|
+
event.preventDefault();
|
|
84
|
+
this.isOpen = false;
|
|
85
|
+
this.isActive = false;
|
|
86
|
+
}
|
|
82
87
|
}
|
|
83
88
|
}
|
|
84
89
|
get filteredOptions() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select-filter.js","sourceRoot":"","sources":["../../../src/components/select-filter/select-filter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAgB,MAAM,eAAe,CAAC;AACtG,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B;;GAEG;AAOH,MAAM,OAAO,YAAY;;
|
|
1
|
+
{"version":3,"file":"select-filter.js","sourceRoot":"","sources":["../../../src/components/select-filter/select-filter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, Listen, Prop, State, h, Event, EventEmitter } from '@stencil/core';\nimport Fuse from 'fuse.js';\n\n/**\n * @slot - Input element for the widget, it should be a road-input element.\n */\n\n@Component({\n tag: 'road-select-filter',\n styleUrl: 'select-filter.css',\n scoped: true,\n})\nexport class SelectFilter {\n\n @Element() el!: HTMLRoadSelectFilterElement;\n\n @State() isOpen: boolean = false;\n\n @State() currentValue: string = '';\n\n @State() activeIndex: number = -1;\n\n /**\n * List of options of the select\n */\n @Prop() options: Array<{\n value: string | number;\n label: string;\n }> = [];\n\n /**\n * Options to pass to the fuse.js instance.\n * See https://fusejs.io/api/options.html for valid options\n */\n @Prop() parameters: any = {\n keys: [\"value\", \"label\"],\n threshold: 0.3,\n ignoreLocation: true,\n };\n\n /**\n * If `true`, add class Active\n */\n @Prop() isActive: boolean = false;\n\n /**\n * If `false`, the user can submit custom value\n */\n @Prop() onlySelect: boolean = true;\n\n @Listen('roadFocus')\n @Listen('roadfocus')\n handleFocus() {\n this.isOpen = true;\n this.isActive = true;\n }\n\n @Listen('roadBlur')\n @Listen('roadblur')\n handleBlur() {\n this.isActive = false;\n }\n\n @Listen('roadChange')\n @Listen('roadchange')\n handleChange(event: CustomEvent) {\n this.currentValue = event.detail.value.toLowerCase();\n }\n\n @Listen('click', { target: 'document' })\n onClickOutside(event: MouseEvent) {\n if (this.isOpen && !this.el.contains(event.target as Node)) {\n this.isOpen = false;\n this.isActive = false;\n const value = (this.el.querySelector('road-input') as HTMLRoadInputElement).value;\n if (this.onlySelect && !this.options.some(option => option['label'] === value)) {\n (this.el.querySelector('road-input') as HTMLRoadInputElement).value = '';\n }\n }\n }\n\n @Listen('keydown', { target: 'window' })\n handleKeydown(event: KeyboardEvent) {\n if (this.isOpen) {\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n this.activeIndex = (this.activeIndex + 1) % this.filteredOptions.length;\n } else if (event.key === 'ArrowUp') {\n event.preventDefault();\n this.activeIndex = (this.activeIndex - 1 + this.filteredOptions.length) % this.filteredOptions.length;\n } else if (event.key === 'Enter') {\n event.preventDefault();\n const activeOption = this.filteredOptions[this.activeIndex];\n if (activeOption) {\n this.onClick(activeOption.item.value, activeOption.item.label);\n }\n } else if (event.key === 'Escape') {\n event.preventDefault();\n this.isOpen = false;\n this.isActive = false;\n }\n }\n}\n\n\n get filteredOptions() {\n const fuseSearch = new Fuse(this.options, this.parameters);\n return this.currentValue === '' ? this.options.map((doc, idx) => ({ item: doc, score: 1, refIndex: idx })) : fuseSearch.search(this.currentValue);\n }\n\n @Event() roadselected!: EventEmitter<{\n value: string | undefined | null,\n label: string\n }>;\n\n @Event() roadSelected!: EventEmitter<{\n value: string | undefined | null,\n label: string\n }>;\n\n private onClick = (value: string | number, label: string) => {\n (this.el.querySelector('road-input') as HTMLRoadInputElement).value = label;\n if (document.getElementsByClassName('phone-number-label-icon').length > 0) {\n (this.el.querySelector('road-icon') as HTMLRoadIconElement).name = 'flag-' + label;\n }\n this.isOpen = false;\n this.roadselected.emit({\n value: value.toString(),\n label: label,\n });\n this.roadSelected.emit({\n value: value.toString(),\n label: label,\n });\n this.activeIndex = -1;\n };\n\n private handleOptionMouseOver = (index: number) => {\n this.activeIndex = index;\n };\n\n private handleOptionClick = (value: string | number, label: string) => {\n this.onClick(value, label);\n };\n\n private handleMouseLeave = () => {\n this.activeIndex = -1;\n };\n\n render() {\n const options = this.filteredOptions;\n const isActive = this.isActive ? 'true' : 'false';\n const notActive = this.isActive ? '' : 'not-active';\n\n return (\n <Host is-active={isActive}>\n <slot />\n {this.isOpen &&\n <ul \n class={`${notActive} select-filter-list`} \n role=\"listbox\"\n onMouseLeave={this.handleMouseLeave}\n >\n {options.map((option, idx) => (\n <li\n class={`select-filter-item ${this.activeIndex === idx ? 'active' : ''}`}\n role=\"option\"\n aria-selected={this.activeIndex === idx ? 'true' : 'false'}\n onClick={() => this.handleOptionClick(option.item.value, option.item.label.replace(/(<([^>]+)>)/gi, \"\"))}\n onMouseOver={() => this.handleOptionMouseOver(idx)}\n innerHTML={option.item.label}\n tabindex={this.activeIndex === idx ? 0 : -1}\n >\n </li>\n ))}\n </ul>}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -65,7 +65,7 @@ export class TabButton {
|
|
|
65
65
|
rel,
|
|
66
66
|
target,
|
|
67
67
|
};
|
|
68
|
-
return (h(Host, { onClick: this.onClick, onKeyup: this.onKeyUp, role: "tab", tabindex: tabIndex, "aria-selected": selected ? 'true' :
|
|
68
|
+
return (h(Host, { onClick: this.onClick, onKeyup: this.onKeyUp, role: "tab", tabindex: tabIndex, "aria-selected": selected ? 'true' : 'false', id: tab !== undefined ? `tab-button-${tab}` : null, class: {
|
|
69
69
|
'tab-selected': selected,
|
|
70
70
|
'tab-has-label': hasLabel,
|
|
71
71
|
'tab-has-icon': hasIcon,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-button.js","sourceRoot":"","sources":["../../../src/components/tab-button/tab-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAgB,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAE/F;;;;GAIG;AAOH,MAAM,OAAO,SAAS;;IAqGZ,YAAO,GAAG,CAAC,EAAiB,EAAE,EAAE;MACtC,IAAI,EAAE,CAAC,GAAG,KAAK,OAAO,IAAI,EAAE,CAAC,GAAG,KAAK,GAAG,EAAE;QACxC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;OACpB;IACH,CAAC,CAAC;IAEM,YAAO,GAAG,CAAC,EAAS,EAAE,EAAE;MAC9B,IAAI,CAAC,SAAS,CAAC,EAAE,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Event, EventEmitter, Host, Listen, Prop, h } from '@stencil/core';\n\n/**\n * @slot - Content of the tab-button, it should be road-icon and road-label elements.\n *\n * @part native - The native HTML anchor element that wraps all child elements.\n */\n\n@Component({\n tag: 'road-tab-button',\n styleUrl: 'tab-button.css',\n shadow: true,\n})\nexport class TabButton {\n\n @Element() el!: HTMLRoadTabButtonElement;\n\n /**\n * This attribute instructs browsers to download a URL instead of navigating to\n * it, so the user will be prompted to save it as a local file. If the attribute\n * has a value, it is used as the pre-filled file name in the Save prompt\n * (the user can still change the file name if they want).\n */\n @Prop() download: string | undefined;\n\n /**\n * Contains a URL or a URL fragment that the hyperlink points to.\n * If this property is set, an anchor tag will be rendered.\n */\n @Prop() href: string | undefined;\n\n /**\n * Specifies the relationship of the target object to the link object.\n * The value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).\n */\n @Prop() rel: string | undefined;\n\n /**\n * Set the layout of the text and icon in the tab bar.\n * It defaults to `'icon-start'`.\n */\n @Prop() layout?: 'icon-start' | 'icon-top' = 'icon-start';\n\n /**\n * The selected tab component\n */\n @Prop({ mutable: true }) selected = false;\n\n /**\n * A tab id must be provided for each `road-tab`. It's used internally to reference\n */\n @Prop() tab?: string;\n\n /**\n * Specifies where to display the linked URL.\n * Only applies when an `href` is provided.\n * Special keywords: `\"_blank\"`, `\"_self\"`, `\"_parent\"`, `\"_top\"`.\n */\n @Prop() target: string | undefined;\n\n /**\n * Emitted when the tab bar is clicked\n * @internal\n */\n @Event() roadtabbuttonclick!: EventEmitter;\n /** @internal */\n @Event() roadTabButtonClick!: EventEmitter;\n\n @Listen('roadTabBarChanged', { target: 'window' })\n @Listen('roadTabbarchanged', { target: 'window' })\n onTabBarChanged(ev: CustomEvent) {\n const dispatchedFrom = ev.target as HTMLElement;\n const parent = this.el.parentElement as EventTarget;\n\n if ((ev.composedPath && ev.composedPath().includes(parent)) || (dispatchedFrom && dispatchedFrom.contains(this.el))) {\n this.selected = this.tab === ev.detail.tab;\n }\n }\n\n private selectTab(ev: Event | KeyboardEvent) {\n if (this.tab !== undefined) {\n this.roadtabbuttonclick.emit({\n tab: this.tab,\n href: this.href,\n selected: this.selected,\n });\n this.roadTabButtonClick.emit({\n tab: this.tab,\n href: this.href,\n selected: this.selected,\n });\n\n ev.preventDefault();\n }\n }\n\n private get hasLabel() {\n return !!this.el.querySelector('road-label');\n }\n\n private get hasIcon() {\n return !!this.el.querySelector('road-icon');\n }\n\n private get tabIndex() {\n const hasTabIndex = this.el.hasAttribute('tabindex');\n\n if (hasTabIndex) {\n return this.el.getAttribute('tabindex');\n }\n\n return 0;\n }\n\n private onKeyUp = (ev: KeyboardEvent) => {\n if (ev.key === 'Enter' || ev.key === ' ') {\n this.selectTab(ev);\n }\n };\n\n private onClick = (ev: Event) => {\n this.selectTab(ev);\n };\n\n render() {\n const { hasIcon, hasLabel, tabIndex, href, rel, target, layout, selected, tab } = this;\n const attrs = {\n download: this.download,\n href,\n rel,\n target,\n };\n\n return (\n <Host\n onClick={this.onClick}\n onKeyup={this.onKeyUp}\n role=\"tab\"\n tabindex={tabIndex}\n aria-selected={selected ? 'true' : 'false'}\n id={tab !== undefined ? `tab-button-${tab}` : null}\n class={{\n 'tab-selected': selected,\n 'tab-has-label': hasLabel,\n 'tab-has-icon': hasIcon,\n 'tab-has-label-only': hasLabel && !hasIcon,\n 'tab-has-icon-only': hasIcon && !hasLabel,\n [`tab-layout-${layout}`]: true,\n }}\n >\n <a {...attrs} tabIndex={-1} class=\"button-native\" part=\"native\">\n <span class=\"button-inner\">\n <slot/>\n </span>\n </a>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -146,10 +146,12 @@
|
|
|
146
146
|
:host(.input-xl) .form-control.has-value ~ .form-label,
|
|
147
147
|
:host(.input-xl) .form-control[type="date"] ~ .form-label,
|
|
148
148
|
:host(.input-xl) .form-control[type="time"] ~ .form-label {
|
|
149
|
+
width: 100vw;
|
|
149
150
|
transform: scale(0.75) translateY(-0.625rem);
|
|
150
151
|
}
|
|
151
152
|
|
|
152
153
|
:host(.input-xl) .form-control:placeholder-shown ~ .form-label {
|
|
154
|
+
width: 100vw;
|
|
153
155
|
transform: scale(0.75) translateY(-0.625rem);
|
|
154
156
|
}
|
|
155
157
|
|
package/dist/esm/loader.js
CHANGED
|
@@ -3,7 +3,7 @@ export { s as setNonce } from './index-52302079.js';
|
|
|
3
3
|
|
|
4
4
|
const defineCustomElements = (win, options) => {
|
|
5
5
|
if (typeof window === 'undefined') return undefined;
|
|
6
|
-
return bootstrapLazy(JSON.parse("[[\"road-badge_14\",[[2,\"road-counter\",{\"inputId\":[1,\"input-id\"],\"min\":[2],\"max\":[2],\"step\":[1],\"value\":[2],\"size\":[1],\"dustbin\":[4],\"readonly\":[4],\"leftIconClasses\":[32],\"rightIconClasses\":[32],\"isDustbinVisible\":[32]},null,{\"value\":[\"onValueChange\"]}],[1,\"road-item\",{\"titleItem\":[1,\"title-item\"],\"text\":[1],\"button\":[4],\"detail\":[4],\"active\":[4],\"detailIcon\":[1,\"detail-icon\"],\"disabled\":[4],\"download\":[1],\"href\":[1],\"rel\":[1],\"lines\":[1],\"layout\":[1],\"target\":[1],\"type\":[1],\"multipleInputs\":[32]}],[1,\"road-badge\",{\"color\":[1],\"bubble\":[4]}],[1,\"road-list\",{\"lines\":[1]}],[1,\"road-toolbar\",{\"color\":[1]}],[1,\"road-drawer\",{\"isOpen\":[1028,\"is-open\"],\"position\":[1],\"drawerWidth\":[2,\"drawer-width\"],\"hasInverseHeader\":[4,\"has-inverse-header\"],\"hasBackIcon\":[4,\"has-back-icon\"],\"backText\":[1,\"back-text\"],\"drawerTitle\":[1,\"drawer-title\"],\"ariaLabel\":[1,\"aria-label\"],\"ariaLabelBack\":[1,\"aria-label-back\"],\"ariaLabelClose\":[1,\"aria-label-close\"],\"hasCloseIcon\":[4,\"has-close-icon\"],\"open\":[64],\"close\":[64],\"back\":[64]},[[4,\"keyup\",\"onEscape\"]],{\"isOpen\":[\"handleOpen\"]}],[1,\"road-col\"],[1,\"road-grid\"],[1,\"road-row\"],[6,\"road-input\",{\"inputId\":[1,\"input-id\"],\"autocapitalize\":[1],\"autocomplete\":[1],\"autocorrect\":[1],\"autofocus\":[4],\"disabled\":[4],\"enterkeyhint\":[1],\"inputmode\":[1],\"max\":[1],\"maxlength\":[2],\"min\":[1],\"minlength\":[2],\"name\":[1],\"pattern\":[1],\"placeholder\":[1],\"readonly\":[4],\"required\":[4],\"spellcheck\":[4],\"step\":[1],\"size\":[2],\"sizes\":[1],\"type\":[1],\"value\":[1032],\"label\":[1],\"error\":[1],\"helper\":[1],\"debounce\":[2]},null,{\"debounce\":[\"debounceChanged\"],\"value\":[\"valueChanged\"]}],[1,\"road-button\",{\"color\":[1],\"size\":[513],\"buttonType\":[1,\"button-type\"],\"iconOnly\":[516,\"icon-only\"],\"disabled\":[516],\"expand\":[516],\"download\":[1],\"href\":[1],\"rel\":[1],\"target\":[1],\"outline\":[4]}],[1,\"road-input-group\"],[1,\"road-label\"],[1,\"road-icon\",{\"color\":[1],\"ariaLabel\":[1537,\"aria-label\"],\"ariaHidden\":[513,\"aria-hidden\"],\"name\":[1],\"src\":[1],\"icon\":[8],\"size\":[1],\"rotate\":[1],\"lazy\":[4],\"sanitize\":[4],\"svgContent\":[32],\"isVisible\":[32]},null,{\"name\":[\"loadIcon\"],\"src\":[\"loadIcon\"],\"icon\":[\"loadIcon\"]}]]],[\"road-duration\",[[1,\"road-duration\",{\"isOpen\":[1028,\"is-open\"],\"header\":[1],\"min\":[2],\"max\":[2],\"step\":[2],\"open\":[64],\"close\":[64]},[[0,\"roadcardclick\",\"handleClick\"]]]]],[\"road-phone-number-input\",[[2,\"road-phone-number-input\",{\"disabled\":[4],\"countryData\":[16],\"language\":[1],\"codeLabel\":[1,\"code-label\"],\"phoneLabel\":[1,\"phone-label\"],\"phoneValue\":[1,\"phone-value\"],\"countryCode\":[1,\"country-code\"],\"errorMessage\":[1,\"error-message\"],\"required\":[4],\"selectedCountry\":[32],\"selectedCountryCode\":[32],\"phoneNumber\":[32],\"countryOptions\":[32],\"returnObject\":[32]},null,{\"errorMessage\":[\"updateMessagePosition\"]}]]],[\"road-content-card\",[[1,\"road-content-card\",{\"insetImage\":[4,\"inset-image\"]}]]],[\"road-plate-number\",[[2,\"road-plate-number\",{\"country\":[1],\"disabled\":[4],\"placeholder\":[1],\"readonly\":[4],\"value\":[1032],\"motorbike\":[4]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-profil-dropdown\",[[1,\"road-profil-dropdown\",{\"isOpen\":[1028,\"is-open\"]},[[4,\"click\",\"handleDocumentClick\"]]]]],[\"road-rating\",[[1,\"road-rating\",{\"size\":[513],\"rate\":[2],\"showreviews\":[4],\"readonly\":[4],\"reviews\":[2],\"reviewsText\":[1,\"reviews-text\"],\"url\":[1]}]]],[\"road-accordion\",[[1,\"road-accordion\",{\"isOpen\":[1028,\"is-open\"],\"isLight\":[4,\"is-light\"],\"isLightSeparator\":[4,\"is-light-separator\"],\"isSmall\":[4,\"is-small\"]}]]],[\"road-banner\",[[1,\"road-banner\",{\"isOpen\":[1028,\"is-open\"],\"label\":[1],\"link\":[1],\"url\":[1],\"close\":[64]}]]],[\"road-carousel\",[[1,\"road-carousel\",{\"options\":[8],\"pager\":[4],\"arrows\":[4],\"update\":[64],\"updateAutoHeight\":[64],\"slideTo\":[64],\"slideNext\":[64],\"slidePrev\":[64],\"getActiveIndex\":[64],\"getPreviousIndex\":[64],\"length\":[64],\"isEnd\":[64],\"isBeginning\":[64],\"startAutoplay\":[64],\"stopAutoplay\":[64],\"lockSwipeToNext\":[64],\"lockSwipeToPrev\":[64],\"lockSwipes\":[64],\"getSwiper\":[64]},null,{\"options\":[\"optionsChanged\"]}]]],[\"road-checkbox\",[[6,\"road-checkbox\",{\"checkboxId\":[1,\"checkbox-id\"],\"name\":[1],\"required\":[4],\"checked\":[1028],\"indeterminate\":[4],\"disabled\":[4],\"value\":[1],\"label\":[1],\"inverse\":[4],\"error\":[1],\"helper\":[1]},null,{\"checked\":[\"checkedChanged\"]}]]],[\"road-chip\",[[1,\"road-chip\",{\"color\":[1],\"outline\":[4],\"size\":[1],\"hasCloseIcon\":[4,\"has-close-icon\"]}]]],[\"road-collapse\",[[1,\"road-collapse\",{\"isOpen\":[1028,\"is-open\"],\"showMore\":[1,\"show-more\"],\"showLess\":[1,\"show-less\"],\"centered\":[4]}]]],[\"road-dialog\",[[1,\"road-dialog\",{\"isOpen\":[1028,\"is-open\"],\"hasCloseIcon\":[4,\"has-close-icon\"],\"color\":[1],\"icon\":[1],\"label\":[1],\"description\":[1],\"open\":[64],\"close\":[64]},[[4,\"keyup\",\"onEscape\"]]]]],[\"road-dropdown\",[[1,\"road-dropdown\",{\"isOpen\":[1028,\"is-open\"],\"isLight\":[4,\"is-light\"],\"isMedium\":[4,\"is-medium\"],\"position\":[513],\"direction\":[513]},[[4,\"click\",\"handleDocumentClick\"]]]]],[\"road-modal\",[[1,\"road-modal\",{\"maxWidth\":[2,\"max-width\"],\"isOpen\":[1028,\"is-open\"],\"hasInverseHeader\":[4,\"has-inverse-header\"],\"modalTitle\":[1,\"modal-title\"],\"hasCloseIcon\":[4,\"has-close-icon\"],\"open\":[64],\"close\":[64]},[[4,\"keyup\",\"onEscape\"]]]]],[\"road-range\",[[6,\"road-range\",{\"rangeId\":[1,\"range-id\"],\"value\":[1032],\"min\":[1],\"max\":[1],\"step\":[1],\"showValue\":[4,\"show-value\"],\"showTick\":[4,\"show-tick\"],\"showLabels\":[4,\"show-labels\"],\"disabled\":[4]},[[2,\"focus\",\"handleFocus\"],[2,\"blur\",\"handleBlur\"]],{\"value\":[\"valueChanged\"]}]]],[\"road-toast\",[[1,\"road-toast\",{\"isOpen\":[1028,\"is-open\"],\"color\":[1],\"label\":[1],\"timeout\":[2],\"open\":[64],\"close\":[64]},null,{\"isOpen\":[\"isOpenChanged\"]}]]],[\"road-alert\",[[1,\"road-alert\",{\"color\":[1],\"label\":[1],\"button\":[1],\"link\":[1],\"url\":[1]}]]],[\"road-area-code\",[[2,\"road-area-code\",{\"selectId\":[1,\"select-id\"],\"options\":[16],\"autofocus\":[4],\"disabled\":[4],\"name\":[1],\"required\":[4],\"size\":[2],\"sizes\":[1],\"label\":[1],\"error\":[1],\"value\":[1025],\"triggerRender\":[1026,\"trigger-render\"],\"selectedValue\":[32]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-asset\",[[1,\"road-asset\",{\"ariaLabel\":[1537,\"aria-label\"],\"ariaHidden\":[513,\"aria-hidden\"],\"name\":[1],\"src\":[1],\"asset\":[8],\"lazy\":[4],\"sanitize\":[4],\"assetSvgContent\":[32],\"isVisible\":[32]},null,{\"name\":[\"loadAsset\"],\"src\":[\"loadAsset\"],\"asset\":[\"loadAsset\"]}]]],[\"road-autocomplete\",[[6,\"road-autocomplete\",{\"options\":[16],\"visible\":[32]},[[0,\"roadFocus\",\"handleFocus\"],[0,\"roadfocus\",\"handleFocus\"],[4,\"click\",\"onClickOutside\"]]]]],[\"road-button-floating\",[[1,\"road-button-floating\",{\"position\":[513],\"href\":[1],\"rel\":[1],\"target\":[1]},[[9,\"scroll\",\"onScroll\"]]]]],[\"road-carousel-item\",[[4,\"road-carousel-item\"]]],[\"road-flap\",[[1,\"road-flap\",{\"color\":[1],\"filled\":[4],\"size\":[513]}]]],[\"road-global-navigation\",[[1,\"road-global-navigation\",{\"selectedTab\":[1,\"selected-tab\"]},[[0,\"roadNavbarItemClick\",\"onNavbarChanged\"],[0,\"roadnavbaritemclick\",\"onNavbarChanged\"]],{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-illustration\",[[1,\"road-illustration\",{\"ariaLabel\":[1537,\"aria-label\"],\"ariaHidden\":[513,\"aria-hidden\"],\"name\":[1],\"src\":[1],\"illustration\":[8],\"size\":[1],\"rotate\":[1],\"lazy\":[4],\"sanitize\":[4],\"illustrationSvgContent\":[32],\"isVisible\":[32]},null,{\"name\":[\"loadIllustration\"],\"src\":[\"loadIllustration\"],\"illustration\":[\"loadIllustration\"]}]]],[\"road-navbar\",[[1,\"road-navbar\",{\"selectedTab\":[1,\"selected-tab\"]},[[0,\"roadNavbarItemClick\",\"onNavbarChanged\"],[0,\"roadnavbaritemclick\",\"onNavbarChanged\"]],{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-navbar-item\",[[1,\"road-navbar-item\",{\"disabled\":[4],\"download\":[1],\"href\":[1],\"rel\":[1],\"selected\":[1028],\"tab\":[1],\"target\":[1]},[[8,\"roadNavbarChanged\",\"onNavbarChanged\"],[8,\"roadnavbarchanged\",\"onNavbarChanged\"]]]]],[\"road-progress\",[[1,\"road-progress\",{\"value\":[2],\"numbersteps\":[1],\"label\":[1],\"showstep\":[4],\"animation\":[4],\"light\":[4],\"fullwidth\":[4],\"color\":[1]}]]],[\"road-progress-indicator-horizontal\",[[1,\"road-progress-indicator-horizontal\",{\"color\":[513],\"numberStep\":[2,\"number-step\"],\"stateFirstStep\":[1,\"state-first-step\"],\"stateSecondStep\":[1,\"state-second-step\"],\"stateThirdStep\":[1,\"state-third-step\"],\"urlStep1\":[1,\"url-step-1\"],\"urlStep2\":[1,\"url-step-2\"],\"urlStep3\":[1,\"url-step-3\"]}]]],[\"road-progress-indicator-vertical\",[[1,\"road-progress-indicator-vertical\"]]],[\"road-progress-indicator-vertical-item\",[[4,\"road-progress-indicator-vertical-item\"]]],[\"road-progress-tracker\",[[1,\"road-progress-tracker\"]]],[\"road-progress-tracker-item\",[[4,\"road-progress-tracker-item\"]]],[\"road-radio\",[[2,\"road-radio\",{\"radioId\":[1,\"radio-id\"],\"name\":[1],\"required\":[4],\"disabled\":[4],\"value\":[8],\"label\":[1],\"inverse\":[4],\"error\":[4],\"helper\":[1],\"inline\":[4],\"checked\":[32]},[[8,\"roadChange\",\"onRoadChangedChanged\"],[8,\"roadchange\",\"onRoadChangedChanged\"]]]]],[\"road-radio-group\",[[6,\"road-radio-group\",{\"radioGroupId\":[1,\"radio-group-id\"],\"allowEmptySelection\":[4,\"allow-empty-selection\"],\"name\":[1],\"value\":[1032],\"label\":[1],\"asterisk\":[4],\"ariaLabel\":[513,\"aria-label\"],\"error\":[1025],\"helper\":[1]},null,{\"value\":[\"valueChanged\"],\"error\":[\"errorChanged\"]}]]],[\"road-segmented-button\",[[1,\"road-segmented-button\",{\"size\":[1],\"selected\":[1028],\"tab\":[1]},[[8,\"roadSegmentedButtonBarChanged\",\"onButtonBarChanged\"],[8,\"roadSegmentedButtonbarchanged\",\"onButtonBarChanged\"]]]]],[\"road-segmented-button-bar\",[[1,\"road-segmented-button-bar\",{\"selectedTab\":[1,\"selected-tab\"]},null,{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-segmented-buttons\",[[1,\"road-segmented-buttons\",{\"selectedTab\":[32],\"select\":[64],\"getTab\":[64],\"getSelected\":[64]}]]],[\"road-select\",[[2,\"road-select\",{\"selectId\":[1,\"select-id\"],\"options\":[16],\"autofocus\":[4],\"disabled\":[4],\"name\":[1],\"required\":[4],\"size\":[2],\"sizes\":[1],\"label\":[1],\"error\":[1],\"value\":[1032]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-select-filter\",[[6,\"road-select-filter\",{\"options\":[16],\"parameters\":[8],\"isActive\":[4,\"is-active\"],\"onlySelect\":[4,\"only-select\"],\"isOpen\":[32],\"currentValue\":[32],\"activeIndex\":[32]},[[0,\"roadFocus\",\"handleFocus\"],[0,\"roadfocus\",\"handleFocus\"],[0,\"roadBlur\",\"handleBlur\"],[0,\"roadblur\",\"handleBlur\"],[0,\"roadChange\",\"handleChange\"],[0,\"roadchange\",\"handleChange\"],[4,\"click\",\"onClickOutside\"],[8,\"keydown\",\"handleKeydown\"]]]]],[\"road-skeleton\",[[1,\"road-skeleton\"]]],[\"road-spinner\",[[1,\"road-spinner\",{\"size\":[513],\"color\":[513]}]]],[\"road-switch\",[[2,\"road-switch\",{\"switchId\":[1,\"switch-id\"],\"name\":[1],\"checked\":[1028],\"disabled\":[4],\"label\":[1],\"color\":[1],\"hasLeftLabel\":[4,\"has-left-label\"],\"isSpaced\":[4,\"is-spaced\"],\"value\":[1],\"on\":[1],\"off\":[1]},null,{\"checked\":[\"checkedChanged\"]}]]],[\"road-tab\",[[1,\"road-tab\",{\"active\":[1028],\"tab\":[1],\"setActive\":[64]},[[8,\"roadtabbarchanged\",\"onTabBarChanged\"]]]]],[\"road-tab-bar\",[[1,\"road-tab-bar\",{\"secondary\":[4],\"expand\":[4],\"center\":[4],\"selectedTab\":[1537,\"selected-tab\"]},[[0,\"roadTabButtonClick\",\"onTabButtonClick\"]],{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-tab-button\",[[1,\"road-tab-button\",{\"download\":[1],\"href\":[1],\"rel\":[1],\"layout\":[1],\"selected\":[1028],\"tab\":[1],\"target\":[1]},[[8,\"roadTabBarChanged\",\"onTabBarChanged\"],[8,\"roadTabbarchanged\",\"onTabBarChanged\"]]]]],[\"road-table\",[[6,\"road-table\"]]],[\"road-tabs\",[[1,\"road-tabs\",{\"selectedTab\":[32],\"select\":[64],\"getTab\":[64],\"getSelected\":[64]}]]],[\"road-tag\",[[1,\"road-tag\",{\"color\":[1],\"contrast\":[4]}]]],[\"road-text\",[[1,\"road-text\",{\"color\":[1]}]]],[\"road-textarea\",[[2,\"road-textarea\",{\"textareaId\":[1,\"textarea-id\"],\"autocapitalize\":[1],\"autofocus\":[4],\"disabled\":[4],\"inputmode\":[1],\"enterkeyhint\":[1],\"maxlength\":[2],\"minlength\":[2],\"name\":[1],\"placeholder\":[1],\"sizes\":[1],\"readonly\":[4],\"required\":[4],\"spellcheck\":[4],\"resize\":[4],\"cols\":[2],\"rows\":[2],\"wrap\":[1],\"value\":[1025],\"label\":[1],\"error\":[1],\"helper\":[1]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-toggle\",[[2,\"road-toggle\",{\"toggleId\":[1,\"toggle-id\"],\"name\":[1],\"checked\":[1028],\"disabled\":[4],\"label\":[1],\"hasLeftLabel\":[4,\"has-left-label\"],\"isSpaced\":[4,\"is-spaced\"],\"value\":[1],\"on\":[1],\"off\":[1]},null,{\"checked\":[\"checkedChanged\"]}]]],[\"road-toolbar-title\",[[1,\"road-toolbar-title\"]]],[\"road-toolbar-title-page\",[[1,\"road-toolbar-title-page\"]]],[\"road-tooltip\",[[1,\"road-tooltip\",{\"tooltipId\":[1,\"tooltip-id\"],\"content\":[1],\"position\":[1],\"contentAlign\":[1,\"content-align\"],\"isOpen\":[1028,\"is-open\"],\"trigger\":[1],\"open\":[64],\"close\":[64]}]]],[\"road-avatar\",[[1,\"road-avatar\",{\"size\":[513]}]]],[\"road-card\",[[1,\"road-card\",{\"elevation\":[1],\"button\":[4],\"value\":[1],\"type\":[1],\"download\":[1],\"href\":[1],\"rel\":[1],\"target\":[1]}]]],[\"road-img\",[[1,\"road-img\",{\"alt\":[1],\"src\":[1],\"loadSrc\":[32],\"loadError\":[32]},null,{\"src\":[\"srcChanged\"]}]]]]"), options);
|
|
6
|
+
return bootstrapLazy(JSON.parse("[[\"road-badge_14\",[[2,\"road-counter\",{\"inputId\":[1,\"input-id\"],\"min\":[2],\"max\":[2],\"step\":[1],\"value\":[2],\"size\":[1],\"dustbin\":[4],\"readonly\":[4],\"leftIconClasses\":[32],\"rightIconClasses\":[32],\"isDustbinVisible\":[32]},null,{\"value\":[\"onValueChange\"]}],[1,\"road-item\",{\"titleItem\":[1,\"title-item\"],\"text\":[1],\"button\":[4],\"detail\":[4],\"active\":[4],\"detailIcon\":[1,\"detail-icon\"],\"disabled\":[4],\"download\":[1],\"href\":[1],\"rel\":[1],\"lines\":[1],\"layout\":[1],\"target\":[1],\"type\":[1],\"multipleInputs\":[32]}],[1,\"road-badge\",{\"color\":[1],\"bubble\":[4]}],[1,\"road-list\",{\"lines\":[1]}],[1,\"road-toolbar\",{\"color\":[1]}],[1,\"road-drawer\",{\"isOpen\":[1028,\"is-open\"],\"position\":[1],\"drawerWidth\":[2,\"drawer-width\"],\"hasInverseHeader\":[4,\"has-inverse-header\"],\"hasBackIcon\":[4,\"has-back-icon\"],\"backText\":[1,\"back-text\"],\"drawerTitle\":[1,\"drawer-title\"],\"ariaLabel\":[1,\"aria-label\"],\"ariaLabelBack\":[1,\"aria-label-back\"],\"ariaLabelClose\":[1,\"aria-label-close\"],\"hasCloseIcon\":[4,\"has-close-icon\"],\"open\":[64],\"close\":[64],\"back\":[64]},[[4,\"keyup\",\"onEscape\"]],{\"isOpen\":[\"handleOpen\"]}],[1,\"road-col\"],[1,\"road-grid\"],[1,\"road-row\"],[6,\"road-input\",{\"inputId\":[1,\"input-id\"],\"autocapitalize\":[1],\"autocomplete\":[1],\"autocorrect\":[1],\"autofocus\":[4],\"disabled\":[4],\"enterkeyhint\":[1],\"inputmode\":[1],\"max\":[1],\"maxlength\":[2],\"min\":[1],\"minlength\":[2],\"name\":[1],\"pattern\":[1],\"placeholder\":[1],\"readonly\":[4],\"required\":[4],\"spellcheck\":[4],\"step\":[1],\"size\":[2],\"sizes\":[1],\"type\":[1],\"value\":[1032],\"label\":[1],\"error\":[1],\"helper\":[1],\"debounce\":[2]},null,{\"debounce\":[\"debounceChanged\"],\"value\":[\"valueChanged\"]}],[1,\"road-button\",{\"color\":[1],\"size\":[513],\"buttonType\":[1,\"button-type\"],\"iconOnly\":[516,\"icon-only\"],\"disabled\":[516],\"expand\":[516],\"download\":[1],\"href\":[1],\"rel\":[1],\"target\":[1],\"outline\":[4]}],[1,\"road-input-group\"],[1,\"road-label\"],[1,\"road-icon\",{\"color\":[1],\"ariaLabel\":[1537,\"aria-label\"],\"ariaHidden\":[513,\"aria-hidden\"],\"name\":[1],\"src\":[1],\"icon\":[8],\"size\":[1],\"rotate\":[1],\"lazy\":[4],\"sanitize\":[4],\"svgContent\":[32],\"isVisible\":[32]},null,{\"name\":[\"loadIcon\"],\"src\":[\"loadIcon\"],\"icon\":[\"loadIcon\"]}]]],[\"road-duration\",[[1,\"road-duration\",{\"isOpen\":[1028,\"is-open\"],\"header\":[1],\"min\":[2],\"max\":[2],\"step\":[2],\"open\":[64],\"close\":[64]},[[0,\"roadcardclick\",\"handleClick\"]]]]],[\"road-phone-number-input\",[[2,\"road-phone-number-input\",{\"disabled\":[4],\"countryData\":[16],\"language\":[1],\"codeLabel\":[1,\"code-label\"],\"phoneLabel\":[1,\"phone-label\"],\"phoneValue\":[1,\"phone-value\"],\"countryCode\":[1,\"country-code\"],\"errorMessage\":[1,\"error-message\"],\"required\":[4],\"selectedCountry\":[32],\"selectedCountryCode\":[32],\"phoneNumber\":[32],\"countryOptions\":[32],\"returnObject\":[32]},null,{\"errorMessage\":[\"updateMessagePosition\"]}]]],[\"road-content-card\",[[1,\"road-content-card\",{\"insetImage\":[4,\"inset-image\"]}]]],[\"road-plate-number\",[[2,\"road-plate-number\",{\"country\":[1],\"disabled\":[4],\"placeholder\":[1],\"readonly\":[4],\"value\":[1032],\"motorbike\":[4]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-profil-dropdown\",[[1,\"road-profil-dropdown\",{\"isOpen\":[1028,\"is-open\"]},[[4,\"click\",\"handleDocumentClick\"]]]]],[\"road-rating\",[[1,\"road-rating\",{\"size\":[513],\"rate\":[2],\"showreviews\":[4],\"readonly\":[4],\"reviews\":[2],\"reviewsText\":[1,\"reviews-text\"],\"url\":[1]}]]],[\"road-accordion\",[[1,\"road-accordion\",{\"isOpen\":[1028,\"is-open\"],\"isLight\":[4,\"is-light\"],\"isLightSeparator\":[4,\"is-light-separator\"],\"isSmall\":[4,\"is-small\"]}]]],[\"road-banner\",[[1,\"road-banner\",{\"isOpen\":[1028,\"is-open\"],\"label\":[1],\"link\":[1],\"url\":[1],\"close\":[64]}]]],[\"road-carousel\",[[1,\"road-carousel\",{\"options\":[8],\"pager\":[4],\"arrows\":[4],\"update\":[64],\"updateAutoHeight\":[64],\"slideTo\":[64],\"slideNext\":[64],\"slidePrev\":[64],\"getActiveIndex\":[64],\"getPreviousIndex\":[64],\"length\":[64],\"isEnd\":[64],\"isBeginning\":[64],\"startAutoplay\":[64],\"stopAutoplay\":[64],\"lockSwipeToNext\":[64],\"lockSwipeToPrev\":[64],\"lockSwipes\":[64],\"getSwiper\":[64]},null,{\"options\":[\"optionsChanged\"]}]]],[\"road-checkbox\",[[6,\"road-checkbox\",{\"checkboxId\":[1,\"checkbox-id\"],\"name\":[1],\"required\":[4],\"checked\":[1028],\"indeterminate\":[4],\"disabled\":[4],\"value\":[1],\"label\":[1],\"secondaryLabel\":[1,\"secondary-label\"],\"inverse\":[4],\"error\":[1],\"helper\":[1]},null,{\"checked\":[\"checkedChanged\"]}]]],[\"road-chip\",[[1,\"road-chip\",{\"color\":[1],\"outline\":[4],\"size\":[1],\"hasCloseIcon\":[4,\"has-close-icon\"]}]]],[\"road-collapse\",[[1,\"road-collapse\",{\"isOpen\":[1028,\"is-open\"],\"showMore\":[1,\"show-more\"],\"showLess\":[1,\"show-less\"],\"centered\":[4]}]]],[\"road-dialog\",[[1,\"road-dialog\",{\"isOpen\":[1028,\"is-open\"],\"hasCloseIcon\":[4,\"has-close-icon\"],\"color\":[1],\"icon\":[1],\"label\":[1],\"description\":[1],\"open\":[64],\"close\":[64]},[[4,\"keyup\",\"onEscape\"]]]]],[\"road-dropdown\",[[1,\"road-dropdown\",{\"isOpen\":[1028,\"is-open\"],\"isLight\":[4,\"is-light\"],\"isMedium\":[4,\"is-medium\"],\"position\":[513],\"direction\":[513]},[[4,\"click\",\"handleDocumentClick\"]]]]],[\"road-modal\",[[1,\"road-modal\",{\"maxWidth\":[2,\"max-width\"],\"isOpen\":[1028,\"is-open\"],\"hasInverseHeader\":[4,\"has-inverse-header\"],\"modalTitle\":[1,\"modal-title\"],\"hasCloseIcon\":[4,\"has-close-icon\"],\"open\":[64],\"close\":[64]},[[4,\"keyup\",\"onEscape\"]]]]],[\"road-range\",[[6,\"road-range\",{\"rangeId\":[1,\"range-id\"],\"value\":[1032],\"min\":[1],\"max\":[1],\"step\":[1],\"showValue\":[4,\"show-value\"],\"showTick\":[4,\"show-tick\"],\"showLabels\":[4,\"show-labels\"],\"disabled\":[4]},[[2,\"focus\",\"handleFocus\"],[2,\"blur\",\"handleBlur\"]],{\"value\":[\"valueChanged\"]}]]],[\"road-toast\",[[1,\"road-toast\",{\"isOpen\":[1028,\"is-open\"],\"color\":[1],\"label\":[1],\"timeout\":[2],\"open\":[64],\"close\":[64]},null,{\"isOpen\":[\"isOpenChanged\"]}]]],[\"road-alert\",[[1,\"road-alert\",{\"color\":[1],\"label\":[1],\"button\":[1],\"link\":[1],\"url\":[1]}]]],[\"road-area-code\",[[2,\"road-area-code\",{\"selectId\":[1,\"select-id\"],\"options\":[16],\"autofocus\":[4],\"disabled\":[4],\"name\":[1],\"required\":[4],\"size\":[2],\"sizes\":[1],\"label\":[1],\"error\":[1],\"value\":[1025],\"triggerRender\":[1026,\"trigger-render\"],\"selectedValue\":[32]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-asset\",[[1,\"road-asset\",{\"ariaLabel\":[1537,\"aria-label\"],\"ariaHidden\":[513,\"aria-hidden\"],\"name\":[1],\"src\":[1],\"asset\":[8],\"lazy\":[4],\"sanitize\":[4],\"assetSvgContent\":[32],\"isVisible\":[32]},null,{\"name\":[\"loadAsset\"],\"src\":[\"loadAsset\"],\"asset\":[\"loadAsset\"]}]]],[\"road-autocomplete\",[[6,\"road-autocomplete\",{\"options\":[16],\"visible\":[32]},[[0,\"roadFocus\",\"handleFocus\"],[0,\"roadfocus\",\"handleFocus\"],[4,\"click\",\"onClickOutside\"]]]]],[\"road-button-floating\",[[1,\"road-button-floating\",{\"position\":[513],\"href\":[1],\"rel\":[1],\"target\":[1]},[[9,\"scroll\",\"onScroll\"]]]]],[\"road-carousel-item\",[[4,\"road-carousel-item\"]]],[\"road-flap\",[[1,\"road-flap\",{\"color\":[1],\"filled\":[4],\"size\":[513]}]]],[\"road-global-navigation\",[[1,\"road-global-navigation\",{\"selectedTab\":[1,\"selected-tab\"]},[[0,\"roadNavbarItemClick\",\"onNavbarChanged\"],[0,\"roadnavbaritemclick\",\"onNavbarChanged\"]],{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-illustration\",[[1,\"road-illustration\",{\"ariaLabel\":[1537,\"aria-label\"],\"ariaHidden\":[513,\"aria-hidden\"],\"name\":[1],\"src\":[1],\"illustration\":[8],\"size\":[1],\"rotate\":[1],\"lazy\":[4],\"sanitize\":[4],\"illustrationSvgContent\":[32],\"isVisible\":[32]},null,{\"name\":[\"loadIllustration\"],\"src\":[\"loadIllustration\"],\"illustration\":[\"loadIllustration\"]}]]],[\"road-navbar\",[[1,\"road-navbar\",{\"selectedTab\":[1,\"selected-tab\"]},[[0,\"roadNavbarItemClick\",\"onNavbarChanged\"],[0,\"roadnavbaritemclick\",\"onNavbarChanged\"]],{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-navbar-item\",[[1,\"road-navbar-item\",{\"disabled\":[4],\"download\":[1],\"href\":[1],\"rel\":[1],\"selected\":[1028],\"tab\":[1],\"target\":[1]},[[8,\"roadNavbarChanged\",\"onNavbarChanged\"],[8,\"roadnavbarchanged\",\"onNavbarChanged\"]],{\"selected\":[\"handleSelectedChange\"]}]]],[\"road-progress\",[[1,\"road-progress\",{\"value\":[2],\"numbersteps\":[1],\"label\":[1],\"showstep\":[4],\"animation\":[4],\"light\":[4],\"fullwidth\":[4],\"color\":[1]}]]],[\"road-progress-indicator-horizontal\",[[1,\"road-progress-indicator-horizontal\",{\"color\":[513],\"numberStep\":[2,\"number-step\"],\"stateFirstStep\":[1,\"state-first-step\"],\"stateSecondStep\":[1,\"state-second-step\"],\"stateThirdStep\":[1,\"state-third-step\"],\"urlStep1\":[1,\"url-step-1\"],\"urlStep2\":[1,\"url-step-2\"],\"urlStep3\":[1,\"url-step-3\"]}]]],[\"road-progress-indicator-vertical\",[[1,\"road-progress-indicator-vertical\"]]],[\"road-progress-indicator-vertical-item\",[[4,\"road-progress-indicator-vertical-item\"]]],[\"road-progress-tracker\",[[1,\"road-progress-tracker\"]]],[\"road-progress-tracker-item\",[[4,\"road-progress-tracker-item\"]]],[\"road-radio\",[[2,\"road-radio\",{\"radioId\":[1,\"radio-id\"],\"name\":[1],\"required\":[4],\"disabled\":[4],\"value\":[8],\"label\":[1],\"secondaryLabel\":[1,\"secondary-label\"],\"inverse\":[4],\"error\":[4],\"helper\":[1],\"inline\":[4],\"checked\":[32]},[[8,\"roadChange\",\"onRoadChangedChanged\"],[8,\"roadchange\",\"onRoadChangedChanged\"]]]]],[\"road-radio-group\",[[6,\"road-radio-group\",{\"radioGroupId\":[1,\"radio-group-id\"],\"allowEmptySelection\":[4,\"allow-empty-selection\"],\"name\":[1],\"value\":[1032],\"label\":[1],\"asterisk\":[4],\"ariaLabel\":[513,\"aria-label\"],\"error\":[1025],\"helper\":[1]},null,{\"value\":[\"valueChanged\"],\"error\":[\"errorChanged\"]}]]],[\"road-segmented-button\",[[1,\"road-segmented-button\",{\"size\":[1],\"selected\":[1028],\"tab\":[1]},[[8,\"roadSegmentedButtonBarChanged\",\"onButtonBarChanged\"],[8,\"roadSegmentedButtonbarchanged\",\"onButtonBarChanged\"]]]]],[\"road-segmented-button-bar\",[[1,\"road-segmented-button-bar\",{\"selectedTab\":[1,\"selected-tab\"]},null,{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-segmented-buttons\",[[1,\"road-segmented-buttons\",{\"selectedTab\":[32],\"select\":[64],\"getTab\":[64],\"getSelected\":[64]}]]],[\"road-select\",[[2,\"road-select\",{\"selectId\":[1,\"select-id\"],\"options\":[16],\"autofocus\":[4],\"disabled\":[4],\"name\":[1],\"required\":[4],\"size\":[2],\"sizes\":[1],\"label\":[1],\"error\":[1],\"value\":[1032]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-select-filter\",[[6,\"road-select-filter\",{\"options\":[16],\"parameters\":[8],\"isActive\":[4,\"is-active\"],\"onlySelect\":[4,\"only-select\"],\"isOpen\":[32],\"currentValue\":[32],\"activeIndex\":[32]},[[0,\"roadFocus\",\"handleFocus\"],[0,\"roadfocus\",\"handleFocus\"],[0,\"roadBlur\",\"handleBlur\"],[0,\"roadblur\",\"handleBlur\"],[0,\"roadChange\",\"handleChange\"],[0,\"roadchange\",\"handleChange\"],[4,\"click\",\"onClickOutside\"],[8,\"keydown\",\"handleKeydown\"]]]]],[\"road-skeleton\",[[1,\"road-skeleton\"]]],[\"road-spinner\",[[1,\"road-spinner\",{\"size\":[513],\"color\":[513]}]]],[\"road-switch\",[[2,\"road-switch\",{\"switchId\":[1,\"switch-id\"],\"name\":[1],\"checked\":[1028],\"disabled\":[4],\"label\":[1],\"color\":[1],\"hasLeftLabel\":[4,\"has-left-label\"],\"isSpaced\":[4,\"is-spaced\"],\"value\":[1],\"on\":[1],\"off\":[1]},null,{\"checked\":[\"checkedChanged\"]}]]],[\"road-tab\",[[1,\"road-tab\",{\"active\":[1028],\"tab\":[1],\"setActive\":[64]},[[8,\"roadtabbarchanged\",\"onTabBarChanged\"]]]]],[\"road-tab-bar\",[[1,\"road-tab-bar\",{\"secondary\":[4],\"expand\":[4],\"center\":[4],\"selectedTab\":[1537,\"selected-tab\"]},[[0,\"roadTabButtonClick\",\"onTabButtonClick\"]],{\"selectedTab\":[\"selectedTabChanged\"]}]]],[\"road-tab-button\",[[1,\"road-tab-button\",{\"download\":[1],\"href\":[1],\"rel\":[1],\"layout\":[1],\"selected\":[1028],\"tab\":[1],\"target\":[1]},[[8,\"roadTabBarChanged\",\"onTabBarChanged\"],[8,\"roadTabbarchanged\",\"onTabBarChanged\"]]]]],[\"road-table\",[[6,\"road-table\"]]],[\"road-tabs\",[[1,\"road-tabs\",{\"selectedTab\":[32],\"select\":[64],\"getTab\":[64],\"getSelected\":[64]}]]],[\"road-tag\",[[1,\"road-tag\",{\"color\":[1],\"contrast\":[4]}]]],[\"road-text\",[[1,\"road-text\",{\"color\":[1]}]]],[\"road-textarea\",[[2,\"road-textarea\",{\"textareaId\":[1,\"textarea-id\"],\"autocapitalize\":[1],\"autofocus\":[4],\"disabled\":[4],\"inputmode\":[1],\"enterkeyhint\":[1],\"maxlength\":[2],\"minlength\":[2],\"name\":[1],\"placeholder\":[1],\"sizes\":[1],\"readonly\":[4],\"required\":[4],\"spellcheck\":[4],\"resize\":[4],\"cols\":[2],\"rows\":[2],\"wrap\":[1],\"value\":[1025],\"label\":[1],\"error\":[1],\"helper\":[1]},null,{\"value\":[\"valueChanged\"]}]]],[\"road-toggle\",[[2,\"road-toggle\",{\"toggleId\":[1,\"toggle-id\"],\"name\":[1],\"checked\":[1028],\"disabled\":[4],\"label\":[1],\"hasLeftLabel\":[4,\"has-left-label\"],\"isSpaced\":[4,\"is-spaced\"],\"value\":[1],\"on\":[1],\"off\":[1]},null,{\"checked\":[\"checkedChanged\"]}]]],[\"road-toolbar-title\",[[1,\"road-toolbar-title\"]]],[\"road-toolbar-title-page\",[[1,\"road-toolbar-title-page\"]]],[\"road-tooltip\",[[1,\"road-tooltip\",{\"tooltipId\":[1,\"tooltip-id\"],\"content\":[1],\"position\":[1],\"contentAlign\":[1,\"content-align\"],\"isOpen\":[1028,\"is-open\"],\"trigger\":[1],\"open\":[64],\"close\":[64]}]]],[\"road-avatar\",[[1,\"road-avatar\",{\"size\":[513]}]]],[\"road-card\",[[1,\"road-card\",{\"elevation\":[1],\"button\":[4],\"value\":[1],\"type\":[1],\"download\":[1],\"href\":[1],\"rel\":[1],\"target\":[1]}]]],[\"road-img\",[[1,\"road-img\",{\"alt\":[1],\"src\":[1],\"loadSrc\":[32],\"loadError\":[32]},null,{\"src\":[\"srcChanged\"]}]]]]"), options);
|
|
7
7
|
};
|
|
8
8
|
|
|
9
9
|
export { defineCustomElements };
|
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host } from './index-5
|
|
|
2
2
|
import { c as checkWide, b as navigationAddLess } from './index-f1358629.js';
|
|
3
3
|
import './polyfill-dc7c89b2.js';
|
|
4
4
|
|
|
5
|
-
const checkboxCss = ".sc-road-checkbox-h{position:relative;display:block;margin-bottom:1.5rem;font-family:var(--road-font, sans-serif);font-size:var(--road-font-size-16);line-height:1.5;color:var(--road-on-surface)}.form-check-input.sc-road-checkbox{position:absolute;z-index:-1;opacity:0}.form-check-label.sc-road-checkbox{position:relative;display:inline-flex;margin:0;cursor:pointer;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.form-check-label.sc-road-checkbox::before{box-sizing:border-box;display:block;flex-shrink:0;width:1.25rem;height:1.25rem;margin:0 0.75rem 0 0;content:\"\";background:var(--road-surface);border:1px solid var(--road-input-outline);border-radius:0.25rem;transition:border 0.2s ease-in-out, background 0.2s ease-in-out}.form-check-icon.sc-road-checkbox{position:absolute;top:0;left:0;box-sizing:border-box;display:block;width:1.25rem;height:1.25rem;color:var(--road-primary-contrast);opacity:0;transition:opacity 0.2s ease-in-out}@media (hover: hover){.form-check-input.sc-road-checkbox:not(:disabled)~.form-check-label.sc-road-checkbox:hover::before{border-color:var(--road-input-surface-variant)}.form-check-input.sc-road-checkbox:not(:disabled):checked~.form-check-label.sc-road-checkbox:hover::before,.form-check-input.sc-road-checkbox:not(:disabled):indeterminate~.form-check-label.sc-road-checkbox:hover::before{background:var(--road-input-surface-variant)}}.form-check-input.sc-road-checkbox:checked~.form-check-label.sc-road-checkbox .form-check-icon.sc-road-checkbox,.form-check-input.sc-road-checkbox:indeterminate~.form-check-label.sc-road-checkbox .form-check-icon.sc-road-checkbox{opacity:1}.form-check-input.sc-road-checkbox:checked~.form-check-label.sc-road-checkbox::before,.form-check-input.sc-road-checkbox:indeterminate~.form-check-label.sc-road-checkbox::before{background:var(--road-input-surface);border-color:var(--road-input-surface)}.form-check-input.focus-visible.sc-road-checkbox~.form-check-label.sc-road-checkbox::before{box-shadow:0 0 0 0.125rem var(--road-grey-000), 0 0 0 0.1875rem var(--road-primary-700)}.form-check-input.focus-visible.sc-road-checkbox:checked~.form-check-label.sc-road-checkbox::before,.form-check-input.focus-visible.sc-road-checkbox:indeterminate~.form-check-label.sc-road-checkbox::before{background:var(--road-input-surface-variant);border-color:var(--road-input-surface-variant)}.form-check-input.sc-road-checkbox:disabled~.form-check-label.sc-road-checkbox,.form-check-input[readonly].sc-road-checkbox~.form-check-label.sc-road-checkbox{cursor:not-allowed}.form-check-input.sc-road-checkbox:disabled~.form-check-label.sc-road-checkbox::before,.form-check-input[readonly].sc-road-checkbox~.form-check-label.sc-road-checkbox::before{background:var(--road-surface-disabled);border:none}.form-check-input.sc-road-checkbox:disabled~.form-check-label.sc-road-checkbox .form-check-icon.sc-road-checkbox,.form-check-input[readonly].sc-road-checkbox~.form-check-label.sc-road-checkbox .form-check-icon.sc-road-checkbox{fill:var(--road-on-surface-disabled)}.invalid-feedback.sc-road-checkbox{display:none;flex:0 0 100%;width:100%;margin-top:0.5rem;font-size:var(--road-font-size-12);color:var(--road-danger-default)}.form-check-input.is-invalid.sc-road-checkbox~.form-check-label.sc-road-checkbox::before,.was-validated.sc-road-checkbox .form-check-input.sc-road-checkbox:invalid~.form-check-label.sc-road-checkbox::before{border-color:var(--road-danger-outline)}.form-check-input.is-invalid.sc-road-checkbox~.invalid-feedback.sc-road-checkbox,.was-validated.sc-road-checkbox .form-check-input.sc-road-checkbox:invalid~.invalid-feedback.sc-road-checkbox{display:block}.form-checkbox-inverse.sc-road-checkbox{display:flex;flex-direction:row-reverse;justify-content:space-between}.form-checkbox-inverse.sc-road-checkbox::before{margin:0 0 0 1rem}.form-checkbox-inverse.sc-road-checkbox .form-check-icon.sc-road-checkbox{right:0;left:auto}.helper.sc-road-checkbox{margin-top:0.5rem;font-size:
|
|
5
|
+
const checkboxCss = ".sc-road-checkbox-h{position:relative;display:block;margin-bottom:1.5rem;font-family:var(--road-font, sans-serif);font-size:var(--road-font-size-16);line-height:1.5;color:var(--road-on-surface)}.form-check-input.sc-road-checkbox{position:absolute;z-index:-1;opacity:0}.form-check-label.sc-road-checkbox{position:relative;display:inline-flex;margin:0;cursor:pointer;-webkit-tap-highlight-color:rgba(0, 0, 0, 0)}.form-check-label.sc-road-checkbox::before{box-sizing:border-box;display:block;flex-shrink:0;width:1.25rem;height:1.25rem;margin:0 0.75rem 0 0;content:\"\";background:var(--road-surface);border:1px solid var(--road-input-outline);border-radius:0.25rem;transition:border 0.2s ease-in-out, background 0.2s ease-in-out}.form-check-label-span.sc-road-checkbox{color:var(--road-on-surface-weak)}.form-check-icon.sc-road-checkbox{position:absolute;top:0;left:0;box-sizing:border-box;display:block;width:1.25rem;height:1.25rem;color:var(--road-primary-contrast);opacity:0;transition:opacity 0.2s ease-in-out}@media (hover: hover){.form-check-input.sc-road-checkbox:not(:disabled)~.form-check-label.sc-road-checkbox:hover::before{border-color:var(--road-input-surface-variant)}.form-check-input.sc-road-checkbox:not(:disabled):checked~.form-check-label.sc-road-checkbox:hover::before,.form-check-input.sc-road-checkbox:not(:disabled):indeterminate~.form-check-label.sc-road-checkbox:hover::before{background:var(--road-input-surface-variant)}}.form-check-input.sc-road-checkbox:checked~.form-check-label.sc-road-checkbox .form-check-icon.sc-road-checkbox,.form-check-input.sc-road-checkbox:indeterminate~.form-check-label.sc-road-checkbox .form-check-icon.sc-road-checkbox{opacity:1}.form-check-input.sc-road-checkbox:checked~.form-check-label.sc-road-checkbox::before,.form-check-input.sc-road-checkbox:indeterminate~.form-check-label.sc-road-checkbox::before{background:var(--road-input-surface);border-color:var(--road-input-surface)}.form-check-input.focus-visible.sc-road-checkbox~.form-check-label.sc-road-checkbox::before{box-shadow:0 0 0 0.125rem var(--road-grey-000), 0 0 0 0.1875rem var(--road-primary-700)}.form-check-input.focus-visible.sc-road-checkbox:checked~.form-check-label.sc-road-checkbox::before,.form-check-input.focus-visible.sc-road-checkbox:indeterminate~.form-check-label.sc-road-checkbox::before{background:var(--road-input-surface-variant);border-color:var(--road-input-surface-variant)}.form-check-input.sc-road-checkbox:disabled~.form-check-label.sc-road-checkbox,.form-check-input[readonly].sc-road-checkbox~.form-check-label.sc-road-checkbox{cursor:not-allowed}.form-check-input.sc-road-checkbox:disabled~.form-check-label.sc-road-checkbox::before,.form-check-input[readonly].sc-road-checkbox~.form-check-label.sc-road-checkbox::before{background:var(--road-surface-disabled);border:none}.form-check-input.sc-road-checkbox:disabled~.form-check-label.sc-road-checkbox .form-check-icon.sc-road-checkbox,.form-check-input[readonly].sc-road-checkbox~.form-check-label.sc-road-checkbox .form-check-icon.sc-road-checkbox{fill:var(--road-on-surface-disabled)}.invalid-feedback.sc-road-checkbox{display:none;flex:0 0 100%;width:100%;margin-top:0.5rem;font-size:var(--road-font-size-12);color:var(--road-danger-default)}.form-check-input.is-invalid.sc-road-checkbox~.form-check-label.sc-road-checkbox::before,.was-validated.sc-road-checkbox .form-check-input.sc-road-checkbox:invalid~.form-check-label.sc-road-checkbox::before{border-color:var(--road-danger-outline)}.form-check-input.is-invalid.sc-road-checkbox~.invalid-feedback.sc-road-checkbox,.was-validated.sc-road-checkbox .form-check-input.sc-road-checkbox:invalid~.invalid-feedback.sc-road-checkbox{display:block}.form-checkbox-inverse.sc-road-checkbox{display:flex;flex-direction:row-reverse;justify-content:space-between}.form-checkbox-inverse.sc-road-checkbox::before{margin:0 0 0 1rem}.form-checkbox-inverse.sc-road-checkbox .form-check-icon.sc-road-checkbox{right:0;left:auto}.helper.sc-road-checkbox{margin-top:0.5rem;margin-left:2rem;font-size:var(--road-font-size-14);color:var(--road-on-surface-weak)}";
|
|
6
6
|
|
|
7
7
|
const Checkbox = class {
|
|
8
8
|
constructor(hostRef) {
|
|
@@ -33,6 +33,7 @@ const Checkbox = class {
|
|
|
33
33
|
this.disabled = false;
|
|
34
34
|
this.value = 'on';
|
|
35
35
|
this.label = `${this.checkboxId}-label`;
|
|
36
|
+
this.secondaryLabel = undefined;
|
|
36
37
|
this.inverse = false;
|
|
37
38
|
this.error = undefined;
|
|
38
39
|
this.helper = undefined;
|
|
@@ -51,7 +52,7 @@ const Checkbox = class {
|
|
|
51
52
|
const labelId = this.checkboxId + '-label';
|
|
52
53
|
const inverseClass = this.inverse && 'form-checkbox-inverse';
|
|
53
54
|
const isInvalidClass = this.error !== undefined && !this.checked && this.error !== '' ? 'is-invalid' : '';
|
|
54
|
-
return (h(Host, null, h("input", { class: `form-check-input ${isInvalidClass}`, type: "checkbox", id: this.checkboxId, name: this.name, required: this.required, disabled: this.disabled, indeterminate: this.indeterminate, checked: this.checked, value: this.value, "aria-checked": `${this.checked}`, "aria-disabled": this.disabled ? 'true' : null, "aria-labelledby": labelId, onClick: this.onClick, onFocus: this.onFocus, onBlur: this.onBlur }), h("label", { class: `form-check-label ${inverseClass}`, id: labelId, htmlFor: this.checkboxId }, h("div", null, this.label, h("slot", null)), this.checked && !this.indeterminate && h("road-icon", { class: "form-check-icon", icon: checkWide }), this.indeterminate && h("road-icon", { class: "form-check-icon", icon: navigationAddLess })), this.error && this.error !== '' && h("p", { class: "invalid-feedback" }, this.error), this.helper && this.helper !== '' && h("p", { class: "helper" }, this.helper)));
|
|
55
|
+
return (h(Host, null, h("input", { class: `form-check-input ${isInvalidClass}`, type: "checkbox", id: this.checkboxId, name: this.name, required: this.required, disabled: this.disabled, indeterminate: this.indeterminate, checked: this.checked, value: this.value, "aria-checked": `${this.checked}`, "aria-disabled": this.disabled ? 'true' : null, "aria-labelledby": labelId, onClick: this.onClick, onFocus: this.onFocus, onBlur: this.onBlur }), h("label", { class: `form-check-label ${inverseClass}`, id: labelId, htmlFor: this.checkboxId }, h("div", null, this.label, " ", h("span", { class: "form-check-label-span" }, this.secondaryLabel), h("slot", null)), this.checked && !this.indeterminate && h("road-icon", { class: "form-check-icon", icon: checkWide }), this.indeterminate && h("road-icon", { class: "form-check-icon", icon: navigationAddLess })), this.error && this.error !== '' && h("p", { class: "invalid-feedback" }, this.error), this.helper && this.helper !== '' && h("p", { class: "helper" }, this.helper)));
|
|
55
56
|
}
|
|
56
57
|
static get watchers() { return {
|
|
57
58
|
"checked":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AAGH,IAAI,WAAW,GAAG,CAAC,CAAC;;;;;","names":[],"sources":["src/components/checkbox/checkbox.css?tag=road-checkbox&encapsulation=scoped","src/components/checkbox/checkbox.tsx"],"sourcesContent":["/*\n * Checkbox\n *\n * For accessibility, we provide a style for focus only on Tab,\n * for that add the javascript polyfill for focus-visible\n * (https://github.com/WICG/focus-visible).\n *\n * Index\n * - Checkbox\n * - Label\n * - Error\n * - Helper\n * - Position\n */\n\n\n/* CHECKBOX\n -------------------- */\n\n:host {\n position: relative;\n display: block;\n margin-bottom: 1.5rem;\n font-family: var(--road-font, sans-serif);\n font-size: var(--road-font-size-16);\n line-height: 1.5;\n color: var(--road-on-surface);\n}\n\n/**\n * Hide input\n */\n\n.form-check-input {\n position: absolute;\n z-index: -1;\n opacity: 0;\n}\n\n/* LABEL\n -------------------- */\n\n.form-check-label {\n position: relative;\n display: inline-flex;\n margin: 0;\n cursor: pointer;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.form-check-label::before {\n box-sizing: border-box;\n display: block;\n flex-shrink: 0;\n width: 1.25rem;\n height: 1.25rem;\n margin: 0 0.75rem 0 0;\n content: \"\";\n background: var(--road-surface);\n border: 1px solid var(--road-input-outline);\n border-radius: 0.25rem;\n transition: border 0.2s ease-in-out, background 0.2s ease-in-out;\n}\n\n.form-check-icon {\n position: absolute;\n top: 0;\n left: 0;\n box-sizing: border-box;\n display: block;\n width: 1.25rem;\n height: 1.25rem;\n color: var(--road-primary-contrast);\n opacity: 0;\n transition: opacity 0.2s ease-in-out;\n}\n\n/**\n * Hover state\n */\n\n@media (hover: hover) {\n\n .form-check-input:not(:disabled) ~ .form-check-label:hover::before {\n border-color: var(--road-input-surface-variant);\n }\n\n .form-check-input:not(:disabled):checked ~ .form-check-label:hover::before,\n .form-check-input:not(:disabled):indeterminate ~ .form-check-label:hover::before {\n background: var(--road-input-surface-variant);\n }\n}\n\n/**\n * Checked state\n */\n\n.form-check-input:checked ~ .form-check-label .form-check-icon,\n.form-check-input:indeterminate ~ .form-check-label .form-check-icon {\n opacity: 1;\n}\n\n.form-check-input:checked ~ .form-check-label::before,\n.form-check-input:indeterminate ~ .form-check-label::before {\n background: var(--road-input-surface);\n border-color: var(--road-input-surface);\n}\n\n/**\n * Focus on Tab\n */\n\n.form-check-input.focus-visible ~ .form-check-label::before {\n box-shadow: 0 0 0 0.125rem var(--road-grey-000), 0 0 0 0.1875rem var(--road-primary-700);\n}\n\n.form-check-input.focus-visible:checked ~ .form-check-label::before,\n.form-check-input.focus-visible:indeterminate ~ .form-check-label::before {\n background: var(--road-input-surface-variant);\n border-color: var(--road-input-surface-variant);\n}\n\n/**\n * Disabled state\n */\n\n.form-check-input:disabled ~ .form-check-label,\n.form-check-input[readonly] ~ .form-check-label {\n cursor: not-allowed;\n}\n\n.form-check-input:disabled ~ .form-check-label::before,\n.form-check-input[readonly] ~ .form-check-label::before {\n background: var(--road-surface-disabled);\n border: none;\n}\n\n.form-check-input:disabled ~ .form-check-label .form-check-icon,\n.form-check-input[readonly] ~ .form-check-label .form-check-icon {\n fill: var(--road-on-surface-disabled);\n}\n\n/* ERROR\n -------------------- */\n\n.invalid-feedback {\n display: none;\n flex: 0 0 100%;\n width: 100%;\n margin-top: 0.5rem;\n font-size: var(--road-font-size-12);\n color: var(--road-danger-default);\n}\n\n.form-check-input.is-invalid ~ .form-check-label::before,\n.was-validated .form-check-input:invalid ~ .form-check-label::before {\n border-color: var(--road-danger-outline);\n}\n\n.form-check-input.is-invalid ~ .invalid-feedback,\n.was-validated .form-check-input:invalid ~ .invalid-feedback {\n display: block;\n}\n\n/* POSITION\n -------------------- */\n\n.form-checkbox-inverse {\n display: flex;\n flex-direction: row-reverse;\n justify-content: space-between;\n}\n\n.form-checkbox-inverse::before {\n margin: 0 0 0 1rem;\n}\n\n.form-checkbox-inverse .form-check-icon {\n right: 0;\n left: auto;\n}\n\n/* HELPER\n -------------------- */\n\n.helper {\n margin-top: 0.5rem;\n font-size: 0.75rem;\n color: var(--road-grey-500);\n}\n","import { Component, Event, EventEmitter, Host, Prop, Watch, h } from '@stencil/core';\nimport { checkWide, navigationAddLess } from '../../../icons';\n\nimport './../../utils/polyfill';\n\n/**\n * @slot - Adding additional elements next to the label (e.g. number of items in filters).\n */\n\n@Component({\n tag: 'road-checkbox',\n styleUrl: 'checkbox.css',\n scoped: true,\n})\nexport class Checkbox {\n\n /**\n * The id of checkbox\n */\n @Prop() checkboxId: string = `road-checkbox-${checkboxIds++}`;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.checkboxId;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required: boolean = false;\n\n /**\n * If `true`, the checkbox is checked.\n */\n @Prop({ mutable: true }) checked = false;\n\n /**\n * If `true`, the checkbox will visually appear as indeterminate.\n */\n @Prop() indeterminate: boolean = false;\n\n /**\n * If `true`, the user cannot interact with the checkbox.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Value the form will get\n */\n @Prop() value: string = 'on';\n\n /**\n * Label for the field\n */\n @Prop() label: string = `${this.checkboxId}-label`;\n\n /**\n * If `true`, the label and the checkbox are inverse and spaced\n */\n @Prop() inverse: boolean = false;\n\n /**\n * Error message for the field\n */\n @Prop() error?: string;\n\n /**\n * Helper message for the field\n */\n @Prop() helper?: string;\n\n /**\n * Emitted when the checked property has changed.\n */\n @Event() roadchange!: EventEmitter<{\n checked: boolean,\n value: string | undefined | null\n }>;\n /** @internal */\n @Event() roadChange!: EventEmitter<{\n checked: boolean,\n value: string | undefined | null\n }>;\n\n /**\n * Emitted when the checkbox has focus.\n */\n @Event() roadfocus!: EventEmitter<void>;\n /** @internal */\n @Event() roadFocus!: EventEmitter<void>;\n\n /**\n * Emitted when the checkbox loses focus.\n */\n @Event() roadblur!: EventEmitter<void>;\n /** @internal */\n @Event() roadBlur!: EventEmitter<void>;\n\n @Watch('checked')\n checkedChanged(isChecked: boolean) {\n this.roadchange.emit({\n checked: isChecked,\n value: this.value,\n });\n this.roadChange.emit({\n checked: isChecked,\n value: this.value,\n });\n }\n\n private onClick = () => {\n this.checked = !this.checked;\n this.indeterminate = false;\n };\n\n private onFocus = () => {\n this.roadfocus.emit();\n this.roadFocus.emit();\n };\n\n private onBlur = () => {\n this.roadblur.emit();\n this.roadBlur.emit();\n };\n\n render() {\n const labelId = this.checkboxId + '-label';\n const inverseClass = this.inverse && 'form-checkbox-inverse';\n const isInvalidClass = this.error !== undefined && !this.checked && this.error !== '' ? 'is-invalid' : '';\n\n return (\n <Host>\n <input\n class={`form-check-input ${isInvalidClass}`}\n type=\"checkbox\"\n id={this.checkboxId}\n name={this.name}\n required={this.required}\n disabled={this.disabled}\n indeterminate={this.indeterminate}\n checked={this.checked}\n value={this.value}\n aria-checked={`${this.checked}`}\n aria-disabled={this.disabled ? 'true' : null}\n aria-labelledby={labelId}\n onClick={this.onClick}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n />\n <label class={`form-check-label ${inverseClass}`} id={labelId} htmlFor={this.checkboxId}>\n <div>\n {this.label}<slot/>\n </div>\n {this.checked && !this.indeterminate && <road-icon class=\"form-check-icon\" icon={checkWide}></road-icon>}\n {this.indeterminate && <road-icon class=\"form-check-icon\" icon={navigationAddLess}></road-icon>}\n </label>\n {this.error && this.error !== '' && <p class=\"invalid-feedback\">{this.error}</p>}\n {this.helper && this.helper !== '' && <p class=\"helper\">{this.helper}</p>}\n </Host>\n );\n }\n}\n\nlet checkboxIds = 0;\n"],"version":3}
|
|
1
|
+
{"file":"road-checkbox.entry.js","mappings":";;;;AAAA,MAAM,WAAW,GAAG,ggIAAggI;;MCcvgI,QAAQ;;;;;;;;;IAqGX,YAAO,GAAG;MAChB,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;MAC7B,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;KAC5B,CAAC;IAEM,YAAO,GAAG;MAChB,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;MACtB,IAAI,CA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O,EACrB,KAAK,EAAE,IAAI,CAAC,KAAK,kBACH,GAAG,IAAI,CAAC,OAAO,EAAE,mBAChB,IAAI,CAAC,QAAQ,GAAG,MAAM,GAAG,IAAI,qBAC3B,OAAO,EACxB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,MAAM,EAAE,IAAI,CAAC,MAAM,GACnB,EACF,aAAO,KAAK,EAAE,oBAAoB,YAAY,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,UAAU,IACrF,eACG,IAAI,CAAC,KAAK,OAAE,YAAM,KAAK,EAAC,uBAAuB,IAAE,IAAI,CAAC,cAAc,CAAQ,EAAA,eAAO,CAChF,EACL,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,iBAAW,KAAK,EAAC,iBAAiB,EAAC,IAAI,EAAE,SAAS,GAAc,EACvG,IAAI,CAAC,aAAa,IAAI,iBAAW,KAAK,EAAC,iBAAiB,EAAC,IAAI,EAAE,iBAAiB,GAAc,CACzF,EACP,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,KAAK,EAAE,IAAI,SAAG,KAAK,EAAC,kBAAkB,IAAE,IAAI,CAAC,KAAK,CAAK,EAC/E,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,KAAK,EAAE,IAAI,SAAG,KAAK,EAAC,QAAQ,IAAE,IAAI,CAAC,MAAM,CAAK,CACpE,EACP;GACH;;;;;AAGH,IAAI,WAAW,GAAG,CAAC,CAAC;;;;;","names":[],"sources":["src/components/checkbox/checkbox.css?tag=road-checkbox&encapsulation=scoped","src/components/checkbox/checkbox.tsx"],"sourcesContent":["/*\n * Checkbox\n *\n * For accessibility, we provide a style for focus only on Tab,\n * for that add the javascript polyfill for focus-visible\n * (https://github.com/WICG/focus-visible).\n *\n * Index\n * - Checkbox\n * - Label\n * - Error\n * - Helper\n * - Position\n */\n\n\n/* CHECKBOX\n -------------------- */\n\n:host {\n position: relative;\n display: block;\n margin-bottom: 1.5rem;\n font-family: var(--road-font, sans-serif);\n font-size: var(--road-font-size-16);\n line-height: 1.5;\n color: var(--road-on-surface);\n}\n\n/**\n * Hide input\n */\n\n.form-check-input {\n position: absolute;\n z-index: -1;\n opacity: 0;\n}\n\n/* LABEL\n -------------------- */\n\n.form-check-label {\n position: relative;\n display: inline-flex;\n margin: 0;\n cursor: pointer;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.form-check-label::before {\n box-sizing: border-box;\n display: block;\n flex-shrink: 0;\n width: 1.25rem;\n height: 1.25rem;\n margin: 0 0.75rem 0 0;\n content: \"\";\n background: var(--road-surface);\n border: 1px solid var(--road-input-outline);\n border-radius: 0.25rem;\n transition: border 0.2s ease-in-out, background 0.2s ease-in-out;\n}\n\n.form-check-label-span {\n color: var(--road-on-surface-weak);\n}\n\n.form-check-icon {\n position: absolute;\n top: 0;\n left: 0;\n box-sizing: border-box;\n display: block;\n width: 1.25rem;\n height: 1.25rem;\n color: var(--road-primary-contrast);\n opacity: 0;\n transition: opacity 0.2s ease-in-out;\n}\n\n/**\n * Hover state\n */\n\n@media (hover: hover) {\n\n .form-check-input:not(:disabled) ~ .form-check-label:hover::before {\n border-color: var(--road-input-surface-variant);\n }\n\n .form-check-input:not(:disabled):checked ~ .form-check-label:hover::before,\n .form-check-input:not(:disabled):indeterminate ~ .form-check-label:hover::before {\n background: var(--road-input-surface-variant);\n }\n}\n\n/**\n * Checked state\n */\n\n.form-check-input:checked ~ .form-check-label .form-check-icon,\n.form-check-input:indeterminate ~ .form-check-label .form-check-icon {\n opacity: 1;\n}\n\n.form-check-input:checked ~ .form-check-label::before,\n.form-check-input:indeterminate ~ .form-check-label::before {\n background: var(--road-input-surface);\n border-color: var(--road-input-surface);\n}\n\n/**\n * Focus on Tab\n */\n\n.form-check-input.focus-visible ~ .form-check-label::before {\n box-shadow: 0 0 0 0.125rem var(--road-grey-000), 0 0 0 0.1875rem var(--road-primary-700);\n}\n\n.form-check-input.focus-visible:checked ~ .form-check-label::before,\n.form-check-input.focus-visible:indeterminate ~ .form-check-label::before {\n background: var(--road-input-surface-variant);\n border-color: var(--road-input-surface-variant);\n}\n\n/**\n * Disabled state\n */\n\n.form-check-input:disabled ~ .form-check-label,\n.form-check-input[readonly] ~ .form-check-label {\n cursor: not-allowed;\n}\n\n.form-check-input:disabled ~ .form-check-label::before,\n.form-check-input[readonly] ~ .form-check-label::before {\n background: var(--road-surface-disabled);\n border: none;\n}\n\n.form-check-input:disabled ~ .form-check-label .form-check-icon,\n.form-check-input[readonly] ~ .form-check-label .form-check-icon {\n fill: var(--road-on-surface-disabled);\n}\n\n/* ERROR\n -------------------- */\n\n.invalid-feedback {\n display: none;\n flex: 0 0 100%;\n width: 100%;\n margin-top: 0.5rem;\n font-size: var(--road-font-size-12);\n color: var(--road-danger-default);\n}\n\n.form-check-input.is-invalid ~ .form-check-label::before,\n.was-validated .form-check-input:invalid ~ .form-check-label::before {\n border-color: var(--road-danger-outline);\n}\n\n.form-check-input.is-invalid ~ .invalid-feedback,\n.was-validated .form-check-input:invalid ~ .invalid-feedback {\n display: block;\n}\n\n/* POSITION\n -------------------- */\n\n.form-checkbox-inverse {\n display: flex;\n flex-direction: row-reverse;\n justify-content: space-between;\n}\n\n.form-checkbox-inverse::before {\n margin: 0 0 0 1rem;\n}\n\n.form-checkbox-inverse .form-check-icon {\n right: 0;\n left: auto;\n}\n\n/* HELPER\n -------------------- */\n\n.helper {\n margin-top: 0.5rem;\n margin-left: 2rem;\n font-size: var(--road-font-size-14);\n color: var(--road-on-surface-weak);\n}\n","import { Component, Event, EventEmitter, Host, Prop, Watch, h } from '@stencil/core';\nimport { checkWide, navigationAddLess } from '../../../icons';\n\nimport './../../utils/polyfill';\n\n/**\n * @slot - Adding additional elements next to the label (e.g. number of items in filters).\n */\n\n@Component({\n tag: 'road-checkbox',\n styleUrl: 'checkbox.css',\n scoped: true,\n})\nexport class Checkbox {\n\n /**\n * The id of checkbox\n */\n @Prop() checkboxId: string = `road-checkbox-${checkboxIds++}`;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.checkboxId;\n\n /**\n * If `true`, the user must fill in a value before submitting a form.\n */\n @Prop() required: boolean = false;\n\n /**\n * If `true`, the checkbox is checked.\n */\n @Prop({ mutable: true }) checked = false;\n\n /**\n * If `true`, the checkbox will visually appear as indeterminate.\n */\n @Prop() indeterminate: boolean = false;\n\n /**\n * If `true`, the user cannot interact with the checkbox.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Value the form will get\n */\n @Prop() value: string = 'on';\n\n /**\n * Label for the field\n */\n @Prop() label: string = `${this.checkboxId}-label`;\n\n /**\n * Secondary Label for the field\n */\n @Prop() secondaryLabel?: string;\n\n /**\n * If `true`, the label and the checkbox are inverse and spaced\n */\n @Prop() inverse: boolean = false;\n\n /**\n * Error message for the field\n */\n @Prop() error?: string;\n\n /**\n * Helper message for the field\n */\n @Prop() helper?: string;\n\n /**\n * Emitted when the checked property has changed.\n */\n @Event() roadchange!: EventEmitter<{\n checked: boolean,\n value: string | undefined | null\n }>;\n /** @internal */\n @Event() roadChange!: EventEmitter<{\n checked: boolean,\n value: string | undefined | null\n }>;\n\n /**\n * Emitted when the checkbox has focus.\n */\n @Event() roadfocus!: EventEmitter<void>;\n /** @internal */\n @Event() roadFocus!: EventEmitter<void>;\n\n /**\n * Emitted when the checkbox loses focus.\n */\n @Event() roadblur!: EventEmitter<void>;\n /** @internal */\n @Event() roadBlur!: EventEmitter<void>;\n\n @Watch('checked')\n checkedChanged(isChecked: boolean) {\n this.roadchange.emit({\n checked: isChecked,\n value: this.value,\n });\n this.roadChange.emit({\n checked: isChecked,\n value: this.value,\n });\n }\n\n private onClick = () => {\n this.checked = !this.checked;\n this.indeterminate = false;\n };\n\n private onFocus = () => {\n this.roadfocus.emit();\n this.roadFocus.emit();\n };\n\n private onBlur = () => {\n this.roadblur.emit();\n this.roadBlur.emit();\n };\n\n render() {\n const labelId = this.checkboxId + '-label';\n const inverseClass = this.inverse && 'form-checkbox-inverse';\n const isInvalidClass = this.error !== undefined && !this.checked && this.error !== '' ? 'is-invalid' : '';\n\n return (\n <Host>\n <input\n class={`form-check-input ${isInvalidClass}`}\n type=\"checkbox\"\n id={this.checkboxId}\n name={this.name}\n required={this.required}\n disabled={this.disabled}\n indeterminate={this.indeterminate}\n checked={this.checked}\n value={this.value}\n aria-checked={`${this.checked}`}\n aria-disabled={this.disabled ? 'true' : null}\n aria-labelledby={labelId}\n onClick={this.onClick}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n />\n <label class={`form-check-label ${inverseClass}`} id={labelId} htmlFor={this.checkboxId}>\n <div>\n {this.label} <span class=\"form-check-label-span\">{this.secondaryLabel}</span><slot/>\n </div>\n {this.checked && !this.indeterminate && <road-icon class=\"form-check-icon\" icon={checkWide}></road-icon>}\n {this.indeterminate && <road-icon class=\"form-check-icon\" icon={navigationAddLess}></road-icon>}\n </label>\n {this.error && this.error !== '' && <p class=\"invalid-feedback\">{this.error}</p>}\n {this.helper && this.helper !== '' && <p class=\"helper\">{this.helper}</p>}\n </Host>\n );\n }\n}\n\nlet checkboxIds = 0;\n"],"version":3}
|
|
@@ -26,6 +26,14 @@ const NavbarItem = class {
|
|
|
26
26
|
onNavbarChanged(ev) {
|
|
27
27
|
this.selected = this.tab === ev.detail.tab;
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Watch for changes to `selected` and move focus to this element if `selected` is true.
|
|
31
|
+
*/
|
|
32
|
+
handleSelectedChange(newValue) {
|
|
33
|
+
if (newValue) {
|
|
34
|
+
this.el.focus();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
29
37
|
selectTab(ev) {
|
|
30
38
|
if (this.tab !== undefined) {
|
|
31
39
|
if (!this.disabled) {
|
|
@@ -53,13 +61,16 @@ const NavbarItem = class {
|
|
|
53
61
|
rel,
|
|
54
62
|
target,
|
|
55
63
|
};
|
|
56
|
-
return (h(Host, { onClick: this.onClick, onKeyup: this.onKeyUp, role: "
|
|
64
|
+
return (h(Host, { onClick: this.onClick, onKeyup: this.onKeyUp, role: "menuitem", tabindex: "0", "aria-selected": selected ? 'true' : null, id: tab !== undefined ? `navbar-item-${tab}` : null, disabled: disabled, class: {
|
|
57
65
|
'navbar-item': true,
|
|
58
66
|
'tab-selected': selected,
|
|
59
67
|
'tab-disabled': disabled,
|
|
60
68
|
} }, h("a", Object.assign({}, attrs, { tabIndex: -1, class: "button-native", part: "native" }), h("span", { class: "button-inner" }, h("slot", null)))));
|
|
61
69
|
}
|
|
62
70
|
get el() { return getElement(this); }
|
|
71
|
+
static get watchers() { return {
|
|
72
|
+
"selected": ["handleSelectedChange"]
|
|
73
|
+
}; }
|
|
63
74
|
};
|
|
64
75
|
NavbarItem.style = navbarItemCss;
|
|
65
76
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"road-navbar-item.entry.js","mappings":";;AAAA,MAAM,aAAa,GAAG,kiGAAkiG;;MCa3iG,UAAU;;;;;IAiFb,YAAO,GAAG,CAAC,EAAiB;MAClC,IAAI,EAAE,CAAC,GAAG,KAAK,OAAO,IAAI,EAAE,CAAC,GAAG,KAAK,GAAG,EAAE;QACxC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;OACpB;KACF,CAAC;IAEM,YAAO,GAAG,CAAC,EAAS;MAC1B,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;KACpB,CAAC;oBAlFiB,KAAK;;;;oBAyBY,KAAK;;;;EAyBzC,eAAe,CAAC,EAAe;IAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC;GAC5C;EAEO,SAAS,CAAC,EAAyB;IACzC,IAAI,IAAI,CAAC,GAAG,KAAK,SAAS,EAAE;MAC1B,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;QAClB,IAAI,CAAC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ar-item/navbar-item.css?tag=road-navbar-item&encapsulation=shadow","src/components/navbar-item/navbar-item.tsx"],"sourcesContent":["/*\n * Navbar item\n *\n * Index\n * - Native\n * - Inner\n * - Icon\n * - Badge\n */\n\n\n:host {\n position: relative;\n box-sizing: border-box;\n display: flex;\n flex: 1;\n flex-basis: 0;\n flex-direction: column;\n flex-grow: 1;\n align-items: center;\n justify-content: center;\n text-align: center;\n white-space: nowrap;\n}\n\n@media (min-width: 1200px) {\n\n :host {\n flex-grow: inherit;\n width: 100%;\n padding: 0.5rem;\n }\n\n}\n\n/**\n * Disabled\n */\n\n:host(.tab-disabled),\n:host(.tab-disabled) road-tooltip,\n:host(.tab-disabled) road-tooltip road-icon,\n:host(.tab-disabled) ::slotted(road-icon) {\n color: var(--road-on-surface-disabled);\n cursor: not-allowed;\n fill: var(--road-on-surface-disabled);\n}\n\n/**\n * Selected state\n */\n\n:host(.tab-selected),\n:host(.tab-selected) road-tooltip road-icon,\n:host(.tab-selected) ::slotted(road-icon) {\n color: var(--road-on-button-tertiary);\n fill: var(--road-on-button-tertiary);\n}\n\n:host(.tab-selected)::after {\n position: absolute;\n bottom: -12px;\n left: 0;\n display: block;\n width: 100%;\n height: 4px;\n color: var(--road-on-button-tertiary);\n content: \"\";\n background-color: var(--road-on-button-tertiary);\n}\n\n@media (min-width: 1200px) {\n\n :host(.tab-selected)::after {\n bottom: auto;\n left: 0;\n width: 4px;\n height: 100%;\n }\n\n}\n\n\n/**\n * Focus on Tab state\n */\n\n:host(.focus-visible) ::slotted(road-icon),\n:host(.focus-visible) ::slotted(road-icon)::after,\n:host(.focus-visible) ::slotted(road-label),\n:host(.focus-visible) ::slotted(road-label)::after,\n:host(:hover) ::slotted(road-icon),\n:host(:hover) ::slotted(road-icon)::after,\n:host(:hover) ::slotted(road-label),\n:host(:hover) ::slotted(road-label)::after {\n color: var(--road-on-button-tertiary);\n}\n\n:host(.tab-disabled.focus-visible) ::slotted(road-icon),\n:host(.tab-disabled.focus-visible) ::slotted(road-label),\n:host(.tab-disabled:hover) ::slotted(road-icon),\n:host(.tab-disabled:hover) ::slotted(road-label) {\n color: var(--road-on-surface-disabled);\n cursor: not-allowed;\n fill: var(--road-on-surface-disabled);\n}\n\n\n/* NATIVE\n -------------------- */\n\n.button-native {\n position: relative;\n box-sizing: border-box;\n display: flex;\n flex-direction: inherit;\n align-items: inherit;\n justify-content: inherit;\n width: 100%;\n height: 100%;\n margin: 0;\n overflow: visible;\n font-family: inherit;\n font-size: inherit;\n font-style: inherit;\n font-weight: inherit;\n color: inherit;\n text-align: inherit;\n text-decoration: none;\n text-indent: inherit;\n text-overflow: inherit;\n text-transform: inherit;\n letter-spacing: inherit;\n white-space: inherit;\n cursor: pointer;\n background: transparent;\n border-color: initial;\n border-style: initial;\n border-width: 0;\n border-radius: inherit;\n border-image: initial;\n outline: 0;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n:host(.tab-disabled) .button-native {\n cursor: not-allowed;\n}\n\n/* INNER\n -------------------- */\n\n.button-inner {\n position: relative;\n z-index: 1;\n display: flex;\n flex-flow: inherit;\n align-items: inherit;\n justify-content: inherit;\n width: 100%;\n height: 100%;\n}\n\n/* ICON\n -------------------- */\n\n::slotted(road-icon) {\n display: block;\n width: 2rem;\n height: 2rem;\n margin-right: auto;\n margin-bottom: 0.25rem;\n margin-left: auto;\n fill: currentColor;\n}\n\n/* TOOLTIP\n -------------------- */\n\n@media (min-width: 1200px) {\n\n :host ::slotted(road-tooltip) {\n width: 100%;\n }\n\n}\n\n/* LABEL\n -------------------- */\n\n::slotted(road-label) {\n position: relative;\n box-sizing: border-box;\n display: flex;\n flex: 1;\n flex-direction: column;\n font-size: var(--road-label-small);\n font-weight: 700;\n text-align: center;\n white-space: nowrap;\n}\n\n@media (min-width: 1200px) {\n\n ::slotted(road-label) {\n display: block;\n }\n}\n\n/* BADGE\n -------------------- */\n\n::slotted(road-badge) {\n position: absolute;\n top: 4px;\n left: calc(50% + 0.375rem);\n z-index: 1;\n box-sizing: border-box;\n height: auto;\n font-size: var(--road-font-size-10);\n font-weight: 400;\n}\n","import { Component, Host, h, Element, Prop, Event, EventEmitter, Listen } from '@stencil/core';\n\n/**\n * @slot - Content of the item, it should be road-icon and road-label elements.\n *\n * @part native - The native HTML anchor element that wraps all child elements.\n */\n\n@Component({\n tag: 'road-navbar-item',\n styleUrl: 'navbar-item.css',\n shadow: true,\n})\nexport class NavbarItem {\n\n @Element() el!: HTMLRoadNavbarItemElement;\n\n /**\n * If `true`, the user cannot interact with the tab button.\n */\n @Prop() disabled = false;\n\n /**\n * This attribute instructs browsers to download a URL instead of navigating to\n * it, so the user will be prompted to save it as a local file. If the attribute\n * has a value, it is used as the pre-filled file name in the Save prompt\n * (the user can still change the file name if they want).\n */\n @Prop() download: string | undefined;\n\n /**\n * Contains a URL or a URL fragment that the hyperlink points to.\n * If this property is set, an anchor tag will be rendered.\n */\n @Prop() href: string | undefined;\n\n /**\n * Specifies the relationship of the target object to the link object.\n * The value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).\n */\n @Prop() rel: string | undefined;\n\n /**\n * The selected tab component\n */\n @Prop({ mutable: true }) selected = false;\n\n /**\n * A tab id must be provided for each `road-tab`. It's used internally to reference\n * the selected tab.\n */\n @Prop() tab?: string;\n\n /**\n * Specifies where to display the linked URL.\n * Only applies when an `href` is provided.\n * Special keywords: `\"_blank\"`, `\"_self\"`, `\"_parent\"`, `\"_top\"`.\n */\n @Prop() target: string | undefined;\n\n /**\n * Emitted when the tab bar is clicked\n * @internal\n */\n @Event() roadnavbaritemclick!: EventEmitter;\n /** @internal */\n @Event() roadNavbarItemClick!: EventEmitter;\n\n @Listen('roadNavbarChanged', { target: 'window' })\n @Listen('roadnavbarchanged', { target: 'window' })\n onNavbarChanged(ev: CustomEvent) {\n this.selected = this.tab === ev.detail.tab;\n }\n\n private selectTab(ev: Event | KeyboardEvent) {\n if (this.tab !== undefined) {\n if (!this.disabled) {\n this.roadnavbaritemclick.emit({\n tab: this.tab,\n href: this.href,\n selected: this.selected,\n });\n this.roadNavbarItemClick.emit({\n tab: this.tab,\n href: this.href,\n selected: this.selected,\n });\n }\n if(this.href === undefined) {\n ev.preventDefault();\n }\n }\n }\n\n private onKeyUp = (ev: KeyboardEvent) => {\n if (ev.key === 'Enter' || ev.key === ' ') {\n this.selectTab(ev);\n }\n };\n\n private onClick = (ev: Event) => {\n this.selectTab(ev);\n };\n\n render() {\n const { href, rel, target, selected, tab, disabled } = this;\n const attrs = {\n download: this.download,\n href,\n rel,\n target,\n };\n\n return (\n <Host\n onClick={this.onClick}\n onKeyup={this.onKeyUp}\n role=\"menu\"\n tabindex=\"0\"\n aria-selected={selected ? 'true' : null}\n id={tab !== undefined ? `navbar-item-${tab}` : null}\n disabled={disabled}\n class={{\n 'navbar-item': true,\n 'tab-selected': selected,\n 'tab-disabled': disabled,\n }}\n >\n <a {...attrs} tabIndex={-1} class=\"button-native\" part=\"native\">\n <span class=\"button-inner\">\n <slot/>\n </span>\n </a>\n </Host>\n );\n }\n\n}\n"],"version":3}
|
|
1
|
+
{"file":"road-navbar-item.entry.js","mappings":";;AAAA,MAAM,aAAa,GAAG,kiGAAkiG;;MCa3iG,UAAU;;;;;IA2Fb,YAAO,GAAG,CAAC,EAAiB;MAClC,IAAI,EAAE,CAAC,GAAG,KAAK,OAAO,IAAI,EAAE,CAAC,GAAG,KAAK,GAAG,EAAE;QACxC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;OACpB;KACF,CAAC;IAEM,YAAO,GAAG,CAAC,EAAS;MAC1B,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;KACpB,CAAC;oBA5FiB,KAAK;;;;oBAyBY,KAAK;;;;EAyBzC,eAAe,CAAC,EAAe;IAC7B,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC;GAC5C;;;;EAMD,oBAAoB,CAAC,QAAiB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B,cAAc,EAAE,QAAQ;OACzB,IAED,yBAAO,KAAK,IAAE,QAAQ,EAAE,CAAC,CAAC,EAAE,KAAK,EAAC,eAAe,EAAC,IAAI,EAAC,QAAQ,KAC7D,YAAM,KAAK,EAAC,cAAc,IACxB,eAAO,CACF,CACL,CACC,EACP;GACH;;;;;;;;;;","names":[],"sources":["src/components/navbar-item/navbar-item.css?tag=road-navbar-item&encapsulation=shadow","src/components/navbar-item/navbar-item.tsx"],"sourcesContent":["/*\n * Navbar item\n *\n * Index\n * - Native\n * - Inner\n * - Icon\n * - Badge\n */\n\n\n:host {\n position: relative;\n box-sizing: border-box;\n display: flex;\n flex: 1;\n flex-basis: 0;\n flex-direction: column;\n flex-grow: 1;\n align-items: center;\n justify-content: center;\n text-align: center;\n white-space: nowrap;\n}\n\n@media (min-width: 1200px) {\n\n :host {\n flex-grow: inherit;\n width: 100%;\n padding: 0.5rem;\n }\n\n}\n\n/**\n * Disabled\n */\n\n:host(.tab-disabled),\n:host(.tab-disabled) road-tooltip,\n:host(.tab-disabled) road-tooltip road-icon,\n:host(.tab-disabled) ::slotted(road-icon) {\n color: var(--road-on-surface-disabled);\n cursor: not-allowed;\n fill: var(--road-on-surface-disabled);\n}\n\n/**\n * Selected state\n */\n\n:host(.tab-selected),\n:host(.tab-selected) road-tooltip road-icon,\n:host(.tab-selected) ::slotted(road-icon) {\n color: var(--road-on-button-tertiary);\n fill: var(--road-on-button-tertiary);\n}\n\n:host(.tab-selected)::after {\n position: absolute;\n bottom: -12px;\n left: 0;\n display: block;\n width: 100%;\n height: 4px;\n color: var(--road-on-button-tertiary);\n content: \"\";\n background-color: var(--road-on-button-tertiary);\n}\n\n@media (min-width: 1200px) {\n\n :host(.tab-selected)::after {\n bottom: auto;\n left: 0;\n width: 4px;\n height: 100%;\n }\n\n}\n\n\n/**\n * Focus on Tab state\n */\n\n:host(.focus-visible) ::slotted(road-icon),\n:host(.focus-visible) ::slotted(road-icon)::after,\n:host(.focus-visible) ::slotted(road-label),\n:host(.focus-visible) ::slotted(road-label)::after,\n:host(:hover) ::slotted(road-icon),\n:host(:hover) ::slotted(road-icon)::after,\n:host(:hover) ::slotted(road-label),\n:host(:hover) ::slotted(road-label)::after {\n color: var(--road-on-button-tertiary);\n}\n\n:host(.tab-disabled.focus-visible) ::slotted(road-icon),\n:host(.tab-disabled.focus-visible) ::slotted(road-label),\n:host(.tab-disabled:hover) ::slotted(road-icon),\n:host(.tab-disabled:hover) ::slotted(road-label) {\n color: var(--road-on-surface-disabled);\n cursor: not-allowed;\n fill: var(--road-on-surface-disabled);\n}\n\n\n/* NATIVE\n -------------------- */\n\n.button-native {\n position: relative;\n box-sizing: border-box;\n display: flex;\n flex-direction: inherit;\n align-items: inherit;\n justify-content: inherit;\n width: 100%;\n height: 100%;\n margin: 0;\n overflow: visible;\n font-family: inherit;\n font-size: inherit;\n font-style: inherit;\n font-weight: inherit;\n color: inherit;\n text-align: inherit;\n text-decoration: none;\n text-indent: inherit;\n text-overflow: inherit;\n text-transform: inherit;\n letter-spacing: inherit;\n white-space: inherit;\n cursor: pointer;\n background: transparent;\n border-color: initial;\n border-style: initial;\n border-width: 0;\n border-radius: inherit;\n border-image: initial;\n outline: 0;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n:host(.tab-disabled) .button-native {\n cursor: not-allowed;\n}\n\n/* INNER\n -------------------- */\n\n.button-inner {\n position: relative;\n z-index: 1;\n display: flex;\n flex-flow: inherit;\n align-items: inherit;\n justify-content: inherit;\n width: 100%;\n height: 100%;\n}\n\n/* ICON\n -------------------- */\n\n::slotted(road-icon) {\n display: block;\n width: 2rem;\n height: 2rem;\n margin-right: auto;\n margin-bottom: 0.25rem;\n margin-left: auto;\n fill: currentColor;\n}\n\n/* TOOLTIP\n -------------------- */\n\n@media (min-width: 1200px) {\n\n :host ::slotted(road-tooltip) {\n width: 100%;\n }\n\n}\n\n/* LABEL\n -------------------- */\n\n::slotted(road-label) {\n position: relative;\n box-sizing: border-box;\n display: flex;\n flex: 1;\n flex-direction: column;\n font-size: var(--road-label-small);\n font-weight: 700;\n text-align: center;\n white-space: nowrap;\n}\n\n@media (min-width: 1200px) {\n\n ::slotted(road-label) {\n display: block;\n }\n}\n\n/* BADGE\n -------------------- */\n\n::slotted(road-badge) {\n position: absolute;\n top: 4px;\n left: calc(50% + 0.375rem);\n z-index: 1;\n box-sizing: border-box;\n height: auto;\n font-size: var(--road-font-size-10);\n font-weight: 400;\n}\n","import { Component, Host, h, Element, Prop, Event, EventEmitter, Listen, Watch } from '@stencil/core';\n\n/**\n * @slot - Content of the item, it should be road-icon and road-label elements.\n *\n * @part native - The native HTML anchor element that wraps all child elements.\n */\n\n@Component({\n tag: 'road-navbar-item',\n styleUrl: 'navbar-item.css',\n shadow: true,\n})\nexport class NavbarItem {\n\n @Element() el!: HTMLRoadNavbarItemElement;\n\n /**\n * If `true`, the user cannot interact with the tab button.\n */\n @Prop() disabled = false;\n\n /**\n * This attribute instructs browsers to download a URL instead of navigating to\n * it, so the user will be prompted to save it as a local file. If the attribute\n * has a value, it is used as the pre-filled file name in the Save prompt\n * (the user can still change the file name if they want).\n */\n @Prop() download: string | undefined;\n\n /**\n * Contains a URL or a URL fragment that the hyperlink points to.\n * If this property is set, an anchor tag will be rendered.\n */\n @Prop() href: string | undefined;\n\n /**\n * Specifies the relationship of the target object to the link object.\n * The value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).\n */\n @Prop() rel: string | undefined;\n\n /**\n * The selected tab component\n */\n @Prop({ mutable: true }) selected = false;\n\n /**\n * A tab id must be provided for each `road-tab`. It's used internally to reference\n * the selected tab.\n */\n @Prop() tab?: string;\n\n /**\n * Specifies where to display the linked URL.\n * Only applies when an `href` is provided.\n * Special keywords: `\"_blank\"`, `\"_self\"`, `\"_parent\"`, `\"_top\"`.\n */\n @Prop() target: string | undefined;\n\n /**\n * Emitted when the tab bar is clicked\n * @internal\n */\n @Event() roadnavbaritemclick!: EventEmitter;\n /** @internal */\n @Event() roadNavbarItemClick!: EventEmitter;\n\n @Listen('roadNavbarChanged', { target: 'window' })\n @Listen('roadnavbarchanged', { target: 'window' })\n onNavbarChanged(ev: CustomEvent) {\n this.selected = this.tab === ev.detail.tab;\n }\n\n /**\n * Watch for changes to `selected` and move focus to this element if `selected` is true.\n */\n @Watch('selected')\n handleSelectedChange(newValue: boolean) {\n if (newValue) {\n this.el.focus();\n }\n }\n\n private selectTab(ev: Event | KeyboardEvent) {\n if (this.tab !== undefined) {\n if (!this.disabled) {\n this.roadnavbaritemclick.emit({\n tab: this.tab,\n href: this.href,\n selected: this.selected,\n });\n this.roadNavbarItemClick.emit({\n tab: this.tab,\n href: this.href,\n selected: this.selected,\n });\n }\n if(this.href === undefined) {\n ev.preventDefault();\n }\n }\n }\n\n private onKeyUp = (ev: KeyboardEvent) => {\n if (ev.key === 'Enter' || ev.key === ' ') {\n this.selectTab(ev);\n }\n };\n\n private onClick = (ev: Event) => {\n this.selectTab(ev);\n };\n\n render() {\n const { href, rel, target, selected, tab, disabled } = this;\n const attrs = {\n download: this.download,\n href,\n rel,\n target,\n };\n\n return (\n <Host\n onClick={this.onClick}\n onKeyup={this.onKeyUp}\n role=\"menuitem\"\n tabindex=\"0\"\n aria-selected={selected ? 'true' : null}\n id={tab !== undefined ? `navbar-item-${tab}` : null}\n disabled={disabled}\n class={{\n 'navbar-item': true,\n 'tab-selected': selected,\n 'tab-disabled': disabled,\n }}\n >\n <a {...attrs} tabIndex={-1} class=\"button-native\" part=\"native\">\n <span class=\"button-inner\">\n <slot/>\n </span>\n </a>\n </Host>\n );\n }\n\n}\n"],"version":3}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-52302079.js';
|
|
2
2
|
|
|
3
|
-
const progressIndicatorHorizontalCss = ":host{display:block}.progress-indicator-horizontal{display:flex;padding-left:0;margin:0;font-family:var(--road-font);line-height:1.5;list-style:none}.progress-indicator-horizontal.progress-indicator-horizontal-header{background-color:var(--road-header-surface)}.progress-indicator-horizontal-item{display:flex;flex:1;flex-direction:column;text-align:center}.progress-indicator-horizontal-item:last-child{margin-top:0.125rem}.progress-indicator-horizontal-item:not(:last-child)::after{position:relative;top:0.8rem;left:calc(50% + 12px);order:-1;width:calc(100% - 24px);height:2px;content:\"\";background:var(--road-surface-disabled)}.progress-indicator-horizontal-header .progress-indicator-horizontal-item:not(:last-child)::after{position:relative;top:0.8rem;left:calc(50% + 12px);order:-1;width:calc(100% - 24px);height:2px;content:\"\";background:var(--road-header-surface-disabled)}.progress-indicator-horizontal-item:not(.completed) .progress-indicator-horizontal-link{cursor:not-allowed}.progress-indicator-horizontal-link{z-index:1;display:flex;flex-direction:column;align-items:center;text-decoration:none}.progress-indicator-horizontal-icon{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;font-size:var(--road-font-size-12);font-weight:700;color:var(--road-on-surface-disabled);background:var(--road-surface-disabled);border-radius:50%;fill:currentColor}::slotted([slot=\"progress-indicator-horizontal-icon\"]) road-icon{color:currentColor}.progress-indicator-horizontal-header ::slotted([slot=\"progress-indicator-horizontal-icon\"]) road-icon{color:currentColor}.progress-indicator-horizontal-header .progress-indicator-horizontal-icon{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;font-size:var(--road-font-size-12);font-weight:700;color:var(--road-on-header-surface-disabled);background:var(--road-header-surface-disabled);border-radius:50%;fill:currentColor}.progress-indicator-horizontal-title{display:block;margin-top:0.25rem;font-size:var(--road-body-small);font-weight:700;color:var(--road-on-surface-disabled)}.progress-indicator-horizontal-title span{display:block;font-size:var(--road-body-small);font-weight:400;color:var(--road-on-surface-weak)}.progress-indicator-horizontal-header .progress-indicator-horizontal-title{display:block;margin-top:0.25rem;font-size:var(--road-body-small);font-weight:700;color:var(--road-on-header-surface-disabled)}.progress-indicator-horizontal-header .progress-indicator-horizontal-title span{display:block;font-size:var(--road-body-small);font-weight:400;color:var(--road-on-header-surface-weak)}.completed:not(:last-child)::after{background:var(--road-primary)}.progress-indicator-horizontal-header .completed:not(:last-child)::after{background:var(--road-header-badge)}.current .progress-indicator-horizontal-icon{color:var(--road-on-primary);background:var(--road-primary);border:0}.completed .progress-indicator-horizontal-icon{width:calc(1.5rem - 4px);height:calc(1.5rem - 4px);color:var(--road-primary);background:var(--road-surface);border:2px solid var(--road-primary)}.progress-indicator-horizontal-header .completed .progress-indicator-horizontal-icon{color:var(--road-header-badge);background:none;border:2px solid var(--road-header-badge)}.progress-indicator-horizontal-header .current .progress-indicator-horizontal-icon{width:calc(1.5rem);height:calc(1.5rem);color:var(--road-on-header-badge);background:var(--road-header-badge);border:0}.current .progress-indicator-horizontal-title,.completed .progress-indicator-horizontal-title{font-weight:700;color:var(--road-on-surface)}.progress-indicator-horizontal-header .current .progress-indicator-horizontal-title,.progress-indicator-horizontal-header .completed .progress-indicator-horizontal-title{font-weight:700;color:var(--road-on-header-surface)}";
|
|
3
|
+
const progressIndicatorHorizontalCss = ":host{display:block}.progress-indicator-horizontal{display:flex;padding-left:0;margin:0;font-family:var(--road-font);line-height:1.5;list-style:none}.progress-indicator-horizontal.progress-indicator-horizontal-header{background-color:var(--road-header-surface)}.progress-indicator-horizontal-item{display:flex;flex:1;flex-direction:column;text-align:center}.progress-indicator-horizontal-item:last-child{margin-top:0.125rem}.progress-indicator-horizontal-item:not(:last-child)::after{position:relative;top:0.8rem;left:calc(50% + 12px);order:-1;width:calc(100% - 24px);height:2px;content:\"\";background:var(--road-surface-disabled)}.progress-indicator-horizontal-header .progress-indicator-horizontal-item:not(:last-child)::after{position:relative;top:0.8rem;left:calc(50% + 12px);order:-1;width:calc(100% - 24px);height:2px;content:\"\";background:var(--road-header-surface-disabled)}.progress-indicator-horizontal-item:not(.completed) .progress-indicator-horizontal-link{cursor:not-allowed}.progress-indicator-horizontal-link{z-index:1;display:flex;flex-direction:column;align-items:center;text-decoration:none}.progress-indicator-horizontal-icon{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;font-size:var(--road-font-size-12);font-weight:700;color:var(--road-on-surface-disabled);background:var(--road-surface-disabled);border-radius:50%;fill:currentColor}::slotted([slot=\"progress-indicator-horizontal-icon\"]) road-icon{color:currentColor}.progress-indicator-horizontal-header ::slotted([slot=\"progress-indicator-horizontal-icon\"]) road-icon{color:currentColor}.progress-indicator-horizontal-header .progress-indicator-horizontal-icon{display:inline-flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;font-size:var(--road-font-size-12);font-weight:700;color:var(--road-on-header-surface-disabled);background:var(--road-header-surface-disabled);border-radius:50%;fill:currentColor}.progress-indicator-horizontal-title{display:block;margin-top:0.25rem;font-size:var(--road-body-small);font-weight:700;color:var(--road-on-surface-disabled)}.progress-indicator-horizontal-title span{display:block;font-size:var(--road-body-small);font-weight:400;color:var(--road-on-surface-weak)}.progress-indicator-horizontal-header .progress-indicator-horizontal-title{display:block;margin-top:0.25rem;font-size:var(--road-body-small);font-weight:700;color:var(--road-on-header-surface-disabled)}.progress-indicator-horizontal-header .progress-indicator-horizontal-title span{display:block;font-size:var(--road-body-small);font-weight:400;color:var(--road-on-header-surface-weak)}.completed:not(:last-child)::after{background:var(--road-primary)}.progress-indicator-horizontal-header .completed:not(:last-child)::after,.progress-indicator-horizontal-header .in-progress:not(:last-child)::after{background:var(--road-header-badge)}.current .progress-indicator-horizontal-icon{color:var(--road-on-primary);background:var(--road-primary);border:0}.completed .progress-indicator-horizontal-icon,.in-progress .progress-indicator-horizontal-icon{width:calc(1.5rem - 4px);height:calc(1.5rem - 4px);color:var(--road-primary);background:var(--road-surface);border:2px solid var(--road-primary)}.progress-indicator-horizontal-header .completed .progress-indicator-horizontal-icon,.progress-indicator-horizontal-header .in-progress .progress-indicator-horizontal-icon{color:var(--road-header-badge);background:none;border:2px solid var(--road-header-badge)}.progress-indicator-horizontal-header .current .progress-indicator-horizontal-icon{width:calc(1.5rem);height:calc(1.5rem);color:var(--road-on-header-badge);background:var(--road-header-badge);border:0}.current .progress-indicator-horizontal-title,.completed .progress-indicator-horizontal-title,.in-progress .progress-indicator-horizontal-title{font-weight:700;color:var(--road-on-surface)}.progress-indicator-horizontal-header .current .progress-indicator-horizontal-title,.progress-indicator-horizontal-header .completed .progress-indicator-horizontal-title,.progress-indicator-horizontal-header .in-progress .progress-indicator-horizontal-title{font-weight:700;color:var(--road-on-header-surface)}.in-progress.progress-indicator-horizontal-item:not(:last-child)::before{position:relative;top:0.93rem;left:calc(50% + 12px);order:-1;width:calc(50% - 24px);height:2px;content:\"\";background:var(--road-primary)}";
|
|
4
4
|
|
|
5
5
|
const Stepper = class {
|
|
6
6
|
constructor(hostRef) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"road-progress-indicator-horizontal.entry.js","mappings":";;AAAA,MAAM,8BAA8B,GAAG,gxHAAgxH;;MCmB1yH,OAAO;;;iBAKwC,SAAS;sBAKpC,CAAC;;;;;;;;EAiC7B,MAAM;IAEJ,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,KAAK,SAAS,GAAG,+DAA+D,IAAI,CAAC,KAAK,EAAE,GAAG,+BAA+B,CAAC;IAC5J,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,KAAK,SAAS,GAAG,sCAAsC,IAAI,CAAC,cAAc,EAAE,GAAG,oCAAoC,CAAC;IAC1J,MAAM,oBAAoB,GAAG,IAAI,CAAC,eAAe,KAAK,SAAS,GAAG,sCAAsC,IAAI,CAAC,eAAe,EAAE,GAAG,oCAAoC,CAAC;IACtK,MAAM,mBAAmB,GAAG,IAAI,CAAC,cAAc,KAAK,SAAS,GAAG,sCAAsC,IAAI,CAAC,cAAc,EAAE,GAAG,oCAAoC,CAAC;IACnK,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,KAAK,SAAS,GAAG,GAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,GAAG,CAAC;IACxE,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,KAAK,SAAS,GAAG,GAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,GAAG,CAAC;IACxE,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,KAAK,SAAS,GAAG,GAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,GAAG,CAAC;IAExE,QACE,EAAC,IAAI,QACH,eACK,UAAI,KAAK,EAAE,GAAG,UAAU,EAAE,IAC1B,UAAI,KAAK,EAAE,GAAG,UAAU,EAAE,IACxB,SAAG,KAAK,EAAC,oCAAoC,EAAC,IAAI,EAAE,GAAG,QAAQ,EAAE,IAC/D,YAAM,KAAK,EAAC,oCAAoC,IAC9C,YAAM,IAAI,EAAC,oCAAoC,GAAE,CAC5C,EACP,YAAM,KAAK,EAAC,qCAAqC,IAC/C,YAAM,IAAI,EAAC,qCAAqC,GAAE,CAC7C,CACL,CACD,EACL,UAAI,KAAK,EAAE,GAAG,oBAAoB,EAAE,IACnC,SAAG,KAAK,EAAC,oCAAoC,EAAC,IAAI,EAAE,GAAG,QAAQ,EAAE,IAC/D,YAAM,KAAK,EAAC,oCAAoC,IAC9C,YAAM,IAAI,EAAC,qCAAqC,GAAE,CAC7C,EACP,YAAM,KAAK,EAAC,qCAAqC,IAC/C,YAAM,IAAI,EAAC,sCAAsC,GAAE,CAC9C,CACL,CACD,EACJ,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,UAAI,KAAK,EAAE,GAAG,mBAAmB,EAAE,IAC1D,SAAG,KAAK,EAAC,oCAAoC,EAAC,IAAI,EAAE,GAAG,QAAQ,EAAE,IAC/D,YAAM,KAAK,EAAC,oCAAoC,IAC9C,YAAM,IAAI,EAAC,qCAAqC,GAAE,CAC7C,EACP,YAAM,KAAK,EAAC,qCAAqC,IAC/C,YAAM,IAAI,EAAC,sCAAsC,GAAE,CAC9C,CACL,CACD,CAEF,CACD,CACD,EACP;GACH;;;;;;","names":[],"sources":["src/components/progress-indicator-horizontal/progress-indicator-horizontal.css?tag=road-progress-indicator-horizontal&encapsulation=shadow","src/components/progress-indicator-horizontal/progress-indicator-horizontal.tsx"],"sourcesContent":["/*\n * Progress-indicator-horizontal\n *\n * Index\n * - Item\n * - Link\n * - Icon\n * - Title\n * - Completed\n */\n\n:host {\n display: block;\n}\n\n/* PROGRESS INDICATOR HORIZONTAL\n -------------------- */\n\n.progress-indicator-horizontal {\n display: flex;\n padding-left: 0;\n margin: 0;\n font-family: var(--road-font);\n line-height: 1.5;\n list-style: none;\n}\n\n.progress-indicator-horizontal.progress-indicator-horizontal-header {\n background-color: var(--road-header-surface);\n}\n\n\n/* PROGRESS INDICATOR HORIZONTAL ITEM\n -------------------- */\n\n.progress-indicator-horizontal-item {\n display: flex;\n flex: 1;\n flex-direction: column;\n text-align: center;\n}\n\n.progress-indicator-horizontal-item:last-child {\n margin-top: 0.125rem;\n}\n\n/**\n * Line between items\n */\n\n\n.progress-indicator-horizontal-item:not(:last-child)::after {\n position: relative;\n top: 0.8rem;\n left: calc(50% + 12px);\n order: -1;\n width: calc(100% - 24px);\n height: 2px;\n content: \"\";\n background: var(--road-surface-disabled);\n}\n\n.progress-indicator-horizontal-header .progress-indicator-horizontal-item:not(:last-child)::after {\n position: relative;\n top: 0.8rem;\n left: calc(50% + 12px);\n order: -1;\n width: calc(100% - 24px);\n height: 2px;\n content: \"\";\n background: var(--road-header-surface-disabled);\n}\n\n\n/**\n * Disabled click for current and next steps\n */\n\n\n.progress-indicator-horizontal-item:not(.completed) .progress-indicator-horizontal-link {\n cursor: not-allowed;\n}\n\n/* PROGRESS INDICATOR HORIZONTAL LINK\n -------------------- */\n\n.progress-indicator-horizontal-link {\n z-index: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n text-decoration: none;\n}\n\n/* PROGRESS INDICATOR HORIZONTAL ICON\n -------------------- */\n\n.progress-indicator-horizontal-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 1.5rem;\n height: 1.5rem;\n font-size: var(--road-font-size-12);\n font-weight: 700;\n color: var(--road-on-surface-disabled);\n background: var(--road-surface-disabled);\n border-radius: 50%;\n fill: currentColor;\n}\n\n::slotted([slot=\"progress-indicator-horizontal-icon\"]) road-icon{\n color: currentColor;\n}\n\n.progress-indicator-horizontal-header ::slotted([slot=\"progress-indicator-horizontal-icon\"]) road-icon{\n color: currentColor;\n}\n\n.progress-indicator-horizontal-header .progress-indicator-horizontal-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 1.5rem;\n height: 1.5rem;\n font-size: var(--road-font-size-12);\n font-weight: 700;\n color: var(--road-on-header-surface-disabled);\n background: var(--road-header-surface-disabled);\n border-radius: 50%;\n fill: currentColor;\n}\n\n/* PROGRESS INDICATOR HORIZONTAL TITLE\n -------------------- */\n\n.progress-indicator-horizontal-title {\n display: block;\n margin-top: 0.25rem;\n font-size: var(--road-body-small);\n font-weight: 700;\n color: var(--road-on-surface-disabled);\n}\n\n.progress-indicator-horizontal-title span{\n display: block;\n font-size: var(--road-body-small);\n font-weight: 400;\n color: var(--road-on-surface-weak);\n}\n\n.progress-indicator-horizontal-header .progress-indicator-horizontal-title {\n display: block;\n margin-top: 0.25rem;\n font-size: var(--road-body-small);\n font-weight: 700;\n color: var(--road-on-header-surface-disabled);\n}\n\n.progress-indicator-horizontal-header .progress-indicator-horizontal-title span{\n display: block;\n font-size: var(--road-body-small);\n font-weight: 400;\n color: var(--road-on-header-surface-weak);\n}\n\n/* STEP COMPLETED\n -------------------- */\n\n.completed:not(:last-child)::after {\n background: var(--road-primary);\n}\n\n.progress-indicator-horizontal-header .completed:not(:last-child)::after {\n background: var(--road-header-badge);\n}\n\n.current .progress-indicator-horizontal-icon {\n color: var(--road-on-primary);\n background: var(--road-primary);\n border: 0;\n}\n\n.completed .progress-indicator-horizontal-icon{\n width: calc(1.5rem - 4px);\n height: calc(1.5rem - 4px);\n color: var(--road-primary);\n background: var(--road-surface);\n border: 2px solid var(--road-primary);\n}\n\n.progress-indicator-horizontal-header .completed .progress-indicator-horizontal-icon {\n color: var(--road-header-badge);\n background: none;\n border: 2px solid var(--road-header-badge);\n}\n\n.progress-indicator-horizontal-header .current .progress-indicator-horizontal-icon {\n width: calc(1.5rem);\n height: calc(1.5rem);\n color: var(--road-on-header-badge);\n background: var(--road-header-badge);\n border: 0;\n}\n\n.current .progress-indicator-horizontal-title,\n.completed .progress-indicator-horizontal-title {\n font-weight: 700;\n color: var(--road-on-surface);\n}\n\n.progress-indicator-horizontal-header .current .progress-indicator-horizontal-title,\n.progress-indicator-horizontal-header .completed .progress-indicator-horizontal-title {\n font-weight: 700;\n color: var(--road-on-header-surface);\n}\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n/**\n * @slot progress-indicator-horizontal-icon - if the state of the step 1 is completed add\n * `<road-icon name=\"check-small\" class=\"d-block\" style=\"color: currentColor;\"></road-icon>` by default.\n * @slot progress-indicator-horizontal-title \n * @slot progress-indicator-horizontal-icon2 - if the state of the step 2 is completed add\n * `<road-icon name=\"check-small\" class=\"d-block\" style=\"color: currentColor;\"></road-icon>` by default.\n * @slot progress-indicator-horizontal-title2 \n * @slot progress-indicator-horizontal-icon3 - if the state of the step 3 is completed add\n * `<road-icon name=\"check-small\" class=\"d-block\" style=\"color: currentColor;\"></road-icon>` by default.\n * @slot progress-indicator-horizontal-title3\n */\n\n@Component({\n tag: 'road-progress-indicator-horizontal',\n styleUrl: 'progress-indicator-horizontal.css',\n shadow: true,\n})\nexport class Stepper {\n\n /**\n * The color progress-indicator-horizontal.\n */\n @Prop({ reflect: true }) color?: 'default' | 'header' = 'default';\n\n /**\n * The nombre of steps.\n */\n @Prop() numberStep?: 3 | 2 = 3;\n\n /**\n * The color of the first step.\n */\n @Prop() stateFirstStep?: 'default' | 'current' | 'comleted';\n\n /**\n * The color of the second step.\n */\n @Prop() stateSecondStep?: 'default' | 'current' | 'comleted';\n\n /**\n * The color of the third step.\n */\n @Prop() stateThirdStep?: 'default' | 'current' | 'comleted';\n\n /**\n * The url of the first step.\n */\n @Prop() urlStep1?: string;\n\n /**\n * The url of the first step.\n */\n @Prop() urlStep2?: string;\n\n /**\n * The url of the first step.\n */\n @Prop() urlStep3?: string;\n \n\n render() {\n\n const colorClass = this.color !== undefined ? `progress-indicator-horizontal progress-indicator-horizontal-${this.color}` : 'progress-indicator-horizontal';\n const stateClass = this.stateFirstStep !== undefined ? `progress-indicator-horizontal-item ${this.stateFirstStep}` : 'progress-indicator-horizontal-item';\n const stateSecondStepClass = this.stateSecondStep !== undefined ? `progress-indicator-horizontal-item ${this.stateSecondStep}` : 'progress-indicator-horizontal-item';\n const stateThirdStepClass = this.stateThirdStep !== undefined ? `progress-indicator-horizontal-item ${this.stateThirdStep}` : 'progress-indicator-horizontal-item';\n const urlStep1 = this.urlStep1 !== undefined ? `${this.urlStep1}` : '#';\n const urlStep2 = this.urlStep2 !== undefined ? `${this.urlStep2}` : '#';\n const urlStep3 = this.urlStep3 !== undefined ? `${this.urlStep3}` : '#';\n\n return (\n <Host>\n <nav>\n <ul class={`${colorClass}`}>\n <li class={`${stateClass}`}>\n <a class=\"progress-indicator-horizontal-link\" href={`${urlStep1}`}>\n <span class=\"progress-indicator-horizontal-icon\">\n <slot name=\"progress-indicator-horizontal-icon\"/>\n </span>\n <span class=\"progress-indicator-horizontal-title\">\n <slot name=\"progress-indicator-horizontal-title\"/>\n </span>\n </a>\n </li>\n <li class={`${stateSecondStepClass}`}>\n <a class=\"progress-indicator-horizontal-link\" href={`${urlStep2}`}>\n <span class=\"progress-indicator-horizontal-icon\">\n <slot name=\"progress-indicator-horizontal-icon2\"/>\n </span>\n <span class=\"progress-indicator-horizontal-title\">\n <slot name=\"progress-indicator-horizontal-title2\"/>\n </span>\n </a>\n </li>\n {this.numberStep == 3 && <li class={`${stateThirdStepClass}`}>\n <a class=\"progress-indicator-horizontal-link\" href={`${urlStep3}`}>\n <span class=\"progress-indicator-horizontal-icon\">\n <slot name=\"progress-indicator-horizontal-icon3\"/>\n </span>\n <span class=\"progress-indicator-horizontal-title\">\n <slot name=\"progress-indicator-horizontal-title3\"/>\n </span>\n </a>\n </li>}\n \n </ul>\n </nav>\n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AAE,CAC5C,EACP,YAAM,KAAK,EAAC,qCAAqC,IAC/C,YAAM,IAAI,EAAC,qCAAqC,GAAE,CAC7C,CACL,CACD,EACL,UAAI,KAAK,EAAE,GAAG,oBAAoB,EAAE,IACnC,SAAG,KAAK,EAAC,oCAAoC,EAAC,IAAI,EAAE,GAAG,QAAQ,EAAE,IAC/D,YAAM,KAAK,EAAC,oCAAoC,IAC9C,YAAM,IAAI,EAAC,qCAAqC,GAAE,CAC7C,EACP,YAAM,KAAK,EAAC,qCAAqC,IAC/C,YAAM,IAAI,EAAC,sCAAsC,GAAE,CAC9C,CACL,CACD,EACJ,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,UAAI,KAAK,EAAE,GAAG,mBAAmB,EAAE,IAC1D,SAAG,KAAK,EAAC,oCAAoC,EAAC,IAAI,EAAE,GAAG,QAAQ,EAAE,IAC/D,YAAM,KAAK,EAAC,oCAAoC,IAC9C,YAAM,IAAI,EAAC,qCAAqC,GAAE,CAC7C,EACP,YAAM,KAAK,EAAC,qCAAqC,IAC/C,YAAM,IAAI,EAAC,sCAAsC,GAAE,CAC9C,CACL,CACD,CAEF,CACD,CACD,EACP;GACH;;;;;;","names":[],"sources":["src/components/progress-indicator-horizontal/progress-indicator-horizontal.css?tag=road-progress-indicator-horizontal&encapsulation=shadow","src/components/progress-indicator-horizontal/progress-indicator-horizontal.tsx"],"sourcesContent":["/*\n * Progress-indicator-horizontal\n *\n * Index\n * - Item\n * - Link\n * - Icon\n * - Title\n * - Completed\n */\n\n:host {\n display: block;\n}\n\n/* PROGRESS INDICATOR HORIZONTAL\n -------------------- */\n\n.progress-indicator-horizontal {\n display: flex;\n padding-left: 0;\n margin: 0;\n font-family: var(--road-font);\n line-height: 1.5;\n list-style: none;\n}\n\n.progress-indicator-horizontal.progress-indicator-horizontal-header {\n background-color: var(--road-header-surface);\n}\n\n\n/* PROGRESS INDICATOR HORIZONTAL ITEM\n -------------------- */\n\n.progress-indicator-horizontal-item {\n display: flex;\n flex: 1;\n flex-direction: column;\n text-align: center;\n}\n\n.progress-indicator-horizontal-item:last-child {\n margin-top: 0.125rem;\n}\n\n/**\n * Line between items\n */\n\n\n.progress-indicator-horizontal-item:not(:last-child)::after {\n position: relative;\n top: 0.8rem;\n left: calc(50% + 12px);\n order: -1;\n width: calc(100% - 24px);\n height: 2px;\n content: \"\";\n background: var(--road-surface-disabled);\n}\n\n.progress-indicator-horizontal-header .progress-indicator-horizontal-item:not(:last-child)::after {\n position: relative;\n top: 0.8rem;\n left: calc(50% + 12px);\n order: -1;\n width: calc(100% - 24px);\n height: 2px;\n content: \"\";\n background: var(--road-header-surface-disabled);\n}\n\n\n/**\n * Disabled click for current and next steps\n */\n\n\n.progress-indicator-horizontal-item:not(.completed) .progress-indicator-horizontal-link {\n cursor: not-allowed;\n}\n\n/* PROGRESS INDICATOR HORIZONTAL LINK\n -------------------- */\n\n.progress-indicator-horizontal-link {\n z-index: 1;\n display: flex;\n flex-direction: column;\n align-items: center;\n text-decoration: none;\n}\n\n/* PROGRESS INDICATOR HORIZONTAL ICON\n -------------------- */\n\n.progress-indicator-horizontal-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 1.5rem;\n height: 1.5rem;\n font-size: var(--road-font-size-12);\n font-weight: 700;\n color: var(--road-on-surface-disabled);\n background: var(--road-surface-disabled);\n border-radius: 50%;\n fill: currentColor;\n}\n\n::slotted([slot=\"progress-indicator-horizontal-icon\"]) road-icon{\n color: currentColor;\n}\n\n.progress-indicator-horizontal-header ::slotted([slot=\"progress-indicator-horizontal-icon\"]) road-icon{\n color: currentColor;\n}\n\n.progress-indicator-horizontal-header .progress-indicator-horizontal-icon {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 1.5rem;\n height: 1.5rem;\n font-size: var(--road-font-size-12);\n font-weight: 700;\n color: var(--road-on-header-surface-disabled);\n background: var(--road-header-surface-disabled);\n border-radius: 50%;\n fill: currentColor;\n}\n\n/* PROGRESS INDICATOR HORIZONTAL TITLE\n -------------------- */\n\n.progress-indicator-horizontal-title {\n display: block;\n margin-top: 0.25rem;\n font-size: var(--road-body-small);\n font-weight: 700;\n color: var(--road-on-surface-disabled);\n}\n\n.progress-indicator-horizontal-title span{\n display: block;\n font-size: var(--road-body-small);\n font-weight: 400;\n color: var(--road-on-surface-weak);\n}\n\n.progress-indicator-horizontal-header .progress-indicator-horizontal-title {\n display: block;\n margin-top: 0.25rem;\n font-size: var(--road-body-small);\n font-weight: 700;\n color: var(--road-on-header-surface-disabled);\n}\n\n.progress-indicator-horizontal-header .progress-indicator-horizontal-title span{\n display: block;\n font-size: var(--road-body-small);\n font-weight: 400;\n color: var(--road-on-header-surface-weak);\n}\n\n/* STEP COMPLETED\n -------------------- */\n\n.completed:not(:last-child)::after {\n background: var(--road-primary);\n}\n\n.progress-indicator-horizontal-header .completed:not(:last-child)::after,\n.progress-indicator-horizontal-header .in-progress:not(:last-child)::after {\n background: var(--road-header-badge);\n}\n\n.current .progress-indicator-horizontal-icon {\n color: var(--road-on-primary);\n background: var(--road-primary);\n border: 0;\n}\n\n.completed .progress-indicator-horizontal-icon,\n.in-progress .progress-indicator-horizontal-icon{\n width: calc(1.5rem - 4px);\n height: calc(1.5rem - 4px);\n color: var(--road-primary);\n background: var(--road-surface);\n border: 2px solid var(--road-primary);\n}\n\n.progress-indicator-horizontal-header .completed .progress-indicator-horizontal-icon,\n.progress-indicator-horizontal-header .in-progress .progress-indicator-horizontal-icon {\n color: var(--road-header-badge);\n background: none;\n border: 2px solid var(--road-header-badge);\n}\n\n.progress-indicator-horizontal-header .current .progress-indicator-horizontal-icon {\n width: calc(1.5rem);\n height: calc(1.5rem);\n color: var(--road-on-header-badge);\n background: var(--road-header-badge);\n border: 0;\n}\n\n.current .progress-indicator-horizontal-title,\n.completed .progress-indicator-horizontal-title,\n.in-progress .progress-indicator-horizontal-title {\n font-weight: 700;\n color: var(--road-on-surface);\n}\n\n.progress-indicator-horizontal-header .current .progress-indicator-horizontal-title,\n.progress-indicator-horizontal-header .completed .progress-indicator-horizontal-title,\n.progress-indicator-horizontal-header .in-progress .progress-indicator-horizontal-title {\n font-weight: 700;\n color: var(--road-on-header-surface);\n}\n\n/* IN PROGRESS\n-------------------- */\n\n.in-progress.progress-indicator-horizontal-item:not(:last-child)::before {\n position: relative;\n top: 0.93rem;\n left: calc(50% + 12px);\n order: -1;\n width: calc(50% - 24px);\n height: 2px;\n content: \"\";\n background: var(--road-primary);\n}\n","import { Component, Host, h, Prop } from '@stencil/core';\n\n/**\n * @slot progress-indicator-horizontal-icon - if the state of the step 1 is completed add\n * `<road-icon name=\"check-small\" class=\"d-block\" style=\"color: currentColor;\"></road-icon>` by default.\n * @slot progress-indicator-horizontal-title \n * @slot progress-indicator-horizontal-icon2 - if the state of the step 2 is completed add\n * `<road-icon name=\"check-small\" class=\"d-block\" style=\"color: currentColor;\"></road-icon>` by default.\n * @slot progress-indicator-horizontal-title2 \n * @slot progress-indicator-horizontal-icon3 - if the state of the step 3 is completed add\n * `<road-icon name=\"check-small\" class=\"d-block\" style=\"color: currentColor;\"></road-icon>` by default.\n * @slot progress-indicator-horizontal-title3\n */\n\n@Component({\n tag: 'road-progress-indicator-horizontal',\n styleUrl: 'progress-indicator-horizontal.css',\n shadow: true,\n})\nexport class Stepper {\n\n /**\n * The color progress-indicator-horizontal.\n */\n @Prop({ reflect: true }) color?: 'default' | 'header' = 'default';\n\n /**\n * The nombre of steps.\n */\n @Prop() numberStep?: 3 | 2 = 3;\n\n /**\n * The color of the first step.\n */\n @Prop() stateFirstStep?: 'default' | 'current' | 'comleted' | 'in-progress';\n\n /**\n * The color of the second step.\n */\n @Prop() stateSecondStep?: 'default' | 'current' | 'comleted' | 'in-progress';\n\n /**\n * The color of the third step.\n */\n @Prop() stateThirdStep?: 'default' | 'current' | 'comleted' | 'in-progress';\n\n /**\n * The url of the first step.\n */\n @Prop() urlStep1?: string;\n\n /**\n * The url of the first step.\n */\n @Prop() urlStep2?: string;\n\n /**\n * The url of the first step.\n */\n @Prop() urlStep3?: string;\n \n\n render() {\n\n const colorClass = this.color !== undefined ? `progress-indicator-horizontal progress-indicator-horizontal-${this.color}` : 'progress-indicator-horizontal';\n const stateClass = this.stateFirstStep !== undefined ? `progress-indicator-horizontal-item ${this.stateFirstStep}` : 'progress-indicator-horizontal-item';\n const stateSecondStepClass = this.stateSecondStep !== undefined ? `progress-indicator-horizontal-item ${this.stateSecondStep}` : 'progress-indicator-horizontal-item';\n const stateThirdStepClass = this.stateThirdStep !== undefined ? `progress-indicator-horizontal-item ${this.stateThirdStep}` : 'progress-indicator-horizontal-item';\n const urlStep1 = this.urlStep1 !== undefined ? `${this.urlStep1}` : '#';\n const urlStep2 = this.urlStep2 !== undefined ? `${this.urlStep2}` : '#';\n const urlStep3 = this.urlStep3 !== undefined ? `${this.urlStep3}` : '#';\n\n return (\n <Host>\n <nav>\n <ul class={`${colorClass}`}>\n <li class={`${stateClass}`}>\n <a class=\"progress-indicator-horizontal-link\" href={`${urlStep1}`}>\n <span class=\"progress-indicator-horizontal-icon\">\n <slot name=\"progress-indicator-horizontal-icon\"/>\n </span>\n <span class=\"progress-indicator-horizontal-title\">\n <slot name=\"progress-indicator-horizontal-title\"/>\n </span>\n </a>\n </li>\n <li class={`${stateSecondStepClass}`}>\n <a class=\"progress-indicator-horizontal-link\" href={`${urlStep2}`}>\n <span class=\"progress-indicator-horizontal-icon\">\n <slot name=\"progress-indicator-horizontal-icon2\"/>\n </span>\n <span class=\"progress-indicator-horizontal-title\">\n <slot name=\"progress-indicator-horizontal-title2\"/>\n </span>\n </a>\n </li>\n {this.numberStep == 3 && <li class={`${stateThirdStepClass}`}>\n <a class=\"progress-indicator-horizontal-link\" href={`${urlStep3}`}>\n <span class=\"progress-indicator-horizontal-icon\">\n <slot name=\"progress-indicator-horizontal-icon3\"/>\n </span>\n <span class=\"progress-indicator-horizontal-title\">\n <slot name=\"progress-indicator-horizontal-title3\"/>\n </span>\n </a>\n </li>}\n \n </ul>\n </nav>\n </Host>\n );\n }\n\n}\n"],"version":3}
|