@six-group/ui-library 5.1.0 → 5.2.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/six-button.six-spinner.entry.cjs.js.map +1 -1
  3. package/dist/cjs/six-button_2.cjs.entry.js +1 -1
  4. package/dist/cjs/six-button_2.cjs.entry.js.map +1 -1
  5. package/dist/cjs/six-dropdown.six-menu.entry.cjs.js.map +1 -1
  6. package/dist/cjs/six-dropdown_2.cjs.entry.js +13 -6
  7. package/dist/cjs/six-dropdown_2.cjs.entry.js.map +1 -1
  8. package/dist/cjs/six-file-upload.cjs.entry.js +9 -5
  9. package/dist/cjs/six-file-upload.cjs.entry.js.map +1 -1
  10. package/dist/cjs/six-file-upload.entry.cjs.js.map +1 -1
  11. package/dist/cjs/six-tab.cjs.entry.js +3 -3
  12. package/dist/cjs/six-tab.cjs.entry.js.map +1 -1
  13. package/dist/cjs/six-tab.entry.cjs.js.map +1 -1
  14. package/dist/cjs/ui-library.cjs.js +1 -1
  15. package/dist/collection/components/six-dropdown/six-dropdown.js +33 -6
  16. package/dist/collection/components/six-dropdown/six-dropdown.js.map +1 -1
  17. package/dist/collection/components/six-file-upload/six-file-upload.js +9 -5
  18. package/dist/collection/components/six-file-upload/six-file-upload.js.map +1 -1
  19. package/dist/collection/components/six-spinner/six-spinner.css +6 -20
  20. package/dist/collection/components/six-tab/six-tab.js +22 -3
  21. package/dist/collection/components/six-tab/six-tab.js.map +1 -1
  22. package/dist/components/{p-BDCdPEjW.js → p-BLoBZxyR.js} +3 -3
  23. package/dist/components/{p-BDCdPEjW.js.map → p-BLoBZxyR.js.map} +1 -1
  24. package/dist/components/{p-BB2rei7y.js → p-BTKXuKvc.js} +3 -3
  25. package/dist/components/p-BTKXuKvc.js.map +1 -0
  26. package/dist/components/{p-C6ozoFuw.js → p-Cn6eoiRl.js} +16 -8
  27. package/dist/components/p-Cn6eoiRl.js.map +1 -0
  28. package/dist/components/six-breadcrumbs-item.js +2 -2
  29. package/dist/components/six-button.js +1 -1
  30. package/dist/components/six-dropdown.js +1 -1
  31. package/dist/components/six-file-upload.js +10 -6
  32. package/dist/components/six-file-upload.js.map +1 -1
  33. package/dist/components/six-header-dropdown-item.js +1 -1
  34. package/dist/components/six-header-menu-button.js +2 -2
  35. package/dist/components/six-select.js +3 -3
  36. package/dist/components/six-spinner.js +1 -1
  37. package/dist/components/six-tab.js +4 -3
  38. package/dist/components/six-tab.js.map +1 -1
  39. package/dist/components.json +56 -1
  40. package/dist/esm/loader.js +1 -1
  41. package/dist/esm/six-button.six-spinner.entry.js.map +1 -1
  42. package/dist/esm/six-button_2.entry.js +1 -1
  43. package/dist/esm/six-button_2.entry.js.map +1 -1
  44. package/dist/esm/six-dropdown.six-menu.entry.js.map +1 -1
  45. package/dist/esm/six-dropdown_2.entry.js +13 -6
  46. package/dist/esm/six-dropdown_2.entry.js.map +1 -1
  47. package/dist/esm/six-file-upload.entry.js +9 -5
  48. package/dist/esm/six-file-upload.entry.js.map +1 -1
  49. package/dist/esm/six-tab.entry.js +3 -3
  50. package/dist/esm/six-tab.entry.js.map +1 -1
  51. package/dist/esm/ui-library.js +1 -1
  52. package/dist/types/components/six-dropdown/six-dropdown.d.ts +5 -0
  53. package/dist/types/components/six-file-upload/six-file-upload.d.ts +1 -1
  54. package/dist/types/components/six-tab/six-tab.d.ts +2 -0
  55. package/dist/types/components.d.ts +18 -0
  56. package/dist/ui-library/p-27baf557.entry.js +2 -0
  57. package/dist/ui-library/p-27baf557.entry.js.map +1 -0
  58. package/dist/ui-library/{p-014f44f4.entry.js → p-68cb0eaa.entry.js} +2 -2
  59. package/dist/ui-library/{p-014f44f4.entry.js.map → p-68cb0eaa.entry.js.map} +1 -1
  60. package/dist/ui-library/{p-9b75e009.entry.js → p-a9a5485a.entry.js} +2 -2
  61. package/dist/ui-library/p-a9a5485a.entry.js.map +1 -0
  62. package/dist/ui-library/{p-0eb90caf.entry.js → p-cc7202c3.entry.js} +2 -2
  63. package/dist/ui-library/p-cc7202c3.entry.js.map +1 -0
  64. package/dist/ui-library/six-button.six-spinner.entry.esm.js.map +1 -1
  65. package/dist/ui-library/six-dropdown.six-menu.entry.esm.js.map +1 -1
  66. package/dist/ui-library/six-file-upload.entry.esm.js.map +1 -1
  67. package/dist/ui-library/six-tab.entry.esm.js.map +1 -1
  68. package/dist/ui-library/ui-library.css +1 -1
  69. package/dist/ui-library/ui-library.esm.js +1 -1
  70. package/package.json +15 -1
  71. package/dist/components/p-BB2rei7y.js.map +0 -1
  72. package/dist/components/p-C6ozoFuw.js.map +0 -1
  73. package/dist/ui-library/p-0eb90caf.entry.js.map +0 -1
  74. package/dist/ui-library/p-59568c0f.entry.js +0 -2
  75. package/dist/ui-library/p-59568c0f.entry.js.map +0 -1
  76. package/dist/ui-library/p-9b75e009.entry.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"names":["sixButtonCss","SixButton","constructor","hostRef","this","hasFocus","hasLabel","hasPrefix","hasSuffix","type","size","caret","disabled","loading","pill","circle","submit","reset","name","value","handleSlotChange","hasSlot","host","prefixIcon","querySelector","suffixIcon","tagName","toLowerCase","setAttribute","mapSizeToIconSize","handleBlur","sixBlur","emit","handleFocus","sixFocus","handleClick","event","preventDefault","stopPropagation","submitForm","componentWillLoad","setFocus","options","_a","nativeButton","focus","removeFocus","blur","buttonSize","sizeMap","small","medium","large","render","isLink","href","isButton","Button","h","key","onClick","class","ref","el","part","button","undefined","tabindex","target","download","rel","onBlur","onFocus","onSlotchange","viewBox","fill","stroke","points","sixSpinnerCss","SixSpinner","renderWrapper","content","renderSIXLogo","sixLogo","d","renderBMELogo","bmeLogo","renderSimpleSpinner","six","console","warn","logo"],"sources":["src/components/six-button/six-button.scss?tag=six-button&encapsulation=shadow","src/components/six-button/six-button.tsx","src/components/six-spinner/six-spinner.scss?tag=six-spinner&encapsulation=shadow","src/components/six-spinner/six-spinner.tsx"],"sourcesContent":["@import '../../../src/global/component';\n\n:host {\n display: inline-block;\n width: auto;\n cursor: pointer;\n}\n\n.button {\n display: inline-flex;\n align-items: stretch;\n justify-content: center;\n width: 100%;\n border-style: solid;\n border-width: var(--six-border-width);\n border-radius: 0;\n font-family: var(--six-font-family);\n font-weight: var(--six-font-weight-semibold);\n text-decoration: none;\n user-select: none;\n white-space: nowrap;\n vertical-align: middle;\n padding: 0;\n transition:\n var(--six-transition-fast) background-color,\n var(--six-transition-fast) color,\n var(--six-transition-fast) border,\n var(--six-transition-fast) box-shadow;\n cursor: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n }\n\n &:focus {\n outline: none;\n }\n\n &.button--disabled {\n pointer-events: none;\n }\n\n ::slotted(six-icon) {\n // Clicks on icons shouldn't prevent the button from gaining focus\n pointer-events: none;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n }\n}\n\n.button-wrapper--disabled {\n cursor: not-allowed;\n}\n\n.button__prefix,\n.button__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Standard buttons\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button {\n &:focus-visible {\n outline: var(--six-focus-ring);\n outline-offset: var(--six-focus-ring-offset);\n }\n\n &.button--secondary {\n background-color: var(--six-color-white);\n border-color: var(--six-color-web-rock-900);\n color: var(--six-color-web-rock-900);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-web-rock-100);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-web-rock-300);\n border-color: var(--six-color-web-rock-900);\n border-width: 1px;\n }\n }\n\n &.button--primary {\n background-color: var(--six-color-web-rock-900);\n border-color: var(--six-color-web-rock-900);\n color: var(--six-color-white);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-web-rock-800);\n border-color: var(--six-color-web-rock-800);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-web-rock-900);\n border-color: var(--six-color-web-rock-900);\n opacity: 70%;\n }\n }\n\n &.button--link {\n background-color: transparent;\n border-color: transparent;\n color: var(--six-color-action-500);\n\n &.button--disabled {\n color: var(--six-color-web-rock-400);\n }\n\n &:hover:not(.button--disabled) {\n color: var(--six-color-action-600);\n }\n\n &:active:not(.button--disabled) {\n color: var(--six-color-action-light-to-be-defined);\n }\n }\n\n &.button--danger {\n background-color: var(--six-color-danger-800);\n border-color: var(--six-color-danger-800);\n color: var(--six-color-white);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-danger-900);\n border-color: var(--six-color-danger-900);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-danger-800);\n border-color: var(--six-color-danger-800);\n opacity: 70%;\n }\n }\n\n &.button--warning {\n background-color: var(--six-color-warning-700);\n border-color: var(--six-color-warning-700);\n color: var(--six-color-web-rock-900);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-warning-800);\n border-color: var(--six-color-warning-800);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-warning-700);\n border-color: var(--six-color-warning-700);\n opacity: 70%;\n }\n }\n\n &.button--success {\n background-color: var(--six-color-success-500);\n border-color: var(--six-color-success-500);\n color: var(--six-color-web-rock-900);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-success-600);\n border-color: var(--six-color-success-600);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-success-500);\n border-color: var(--six-color-success-500);\n opacity: 70%;\n }\n }\n\n &.button--action {\n background-color: var(--six-color-action-500);\n border-color: var(--six-color-action-500);\n color: var(--six-color-white);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-action-600);\n border-color: var(--six-color-action-600);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-action-500);\n border-color: var(--six-color-action-500);\n opacity: 70%;\n }\n }\n\n &.button--action-outline {\n border-color: var(--six-color-action-500);\n background-color: var(--six-color-white);\n color: var(--six-color-action-500);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-web-rock-100);\n }\n\n &:active:not(.button--disabled) {\n border-color: var(--six-color-action-500);\n opacity: 70%;\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Size modifiers\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--small {\n font-size: var(--six-button-font-size-small);\n height: var(--six-height-small);\n line-height: calc(var(--six-height-small) - var(--six-border-width) * 2);\n}\n\n.button--medium {\n font-size: var(--six-button-font-size-medium);\n height: var(--six-height-medium);\n line-height: calc(var(--six-height-medium) - var(--six-border-width) * 2);\n}\n\n.button--large {\n font-size: var(--six-button-font-size-large);\n height: var(--six-height-large);\n line-height: calc(var(--six-height-large) - var(--six-border-width) * 2);\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Pill modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--pill {\n &.button--small {\n border-radius: var(--six-height-small);\n }\n\n &.button--medium {\n border-radius: var(--six-height-medium);\n }\n\n &.button--large {\n border-radius: var(--six-height-large);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Circle modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--circle {\n padding-left: 0;\n padding-right: 0;\n font-size: revert;\n\n &.button--small {\n width: var(--six-height-small);\n border-radius: 50%;\n }\n\n &.button--medium {\n width: var(--six-height-medium);\n border-radius: 50%;\n }\n\n &.button--large {\n width: var(--six-height-large);\n border-radius: 50%;\n }\n\n .button__prefix,\n .button__suffix,\n .button__caret {\n display: none;\n\n svg {\n color: var(--six-color-web-rock-900);\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Caret modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--caret {\n .button__suffix {\n display: none;\n }\n\n .button__caret {\n display: flex;\n align-items: center;\n\n svg {\n color: var(--six-color-web-rock-900);\n width: 1em;\n height: 1em;\n }\n }\n}\n\n.button--primary,\n.button--action,\n.button--danger {\n .button__caret {\n svg {\n color: var(--six-color-white);\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Loading modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--loading {\n position: relative;\n cursor: wait;\n\n .button__prefix,\n .button__label,\n .button__suffix,\n .button__caret {\n visibility: hidden;\n }\n\n six-spinner {\n --indicator-color: currentColor;\n position: absolute;\n height: 1em;\n width: 1em;\n top: calc(50% - 0.5em);\n left: calc(50% - 0.5em);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Badges\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button ::slotted(six-badge) {\n position: absolute;\n top: 0;\n right: 0;\n transform: translateY(-50%) translateX(50%);\n pointer-events: none;\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Button spacing\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--has-label {\n &.button--small .button__label {\n padding: 0 var(--six-spacing-small);\n }\n\n &.button--medium .button__label {\n padding: 0 var(--six-spacing-medium);\n }\n\n &.button--large .button__label {\n padding: 0 var(--six-spacing-large);\n }\n}\n\n.button--has-prefix {\n &.button--small {\n padding-left: var(--six-spacing-x-small);\n\n .button__label {\n padding-left: var(--six-spacing-x-small);\n }\n }\n\n &.button--medium {\n padding-left: var(--six-spacing-small);\n\n .button__label {\n padding-left: var(--six-spacing-small);\n }\n }\n\n &.button--large {\n padding-left: var(--six-spacing-small);\n\n .button__label {\n padding-left: var(--six-spacing-small);\n }\n }\n}\n\n.button--has-suffix,\n.button--caret {\n &.button--small {\n padding-right: var(--six-spacing-x-small);\n\n .button__label {\n padding-right: var(--six-spacing-x-small);\n }\n }\n\n &.button--medium {\n padding-right: var(--six-spacing-small);\n\n .button__label {\n padding-right: var(--six-spacing-small);\n }\n }\n\n &.button--large {\n padding-right: var(--six-spacing-small);\n\n .button__label {\n padding-right: var(--six-spacing-small);\n }\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State } from '@stencil/core';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { submitForm } from '../../utils/form';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The button's label.\n * @slot prefix - Used to prepend an icon or similar element to the button.\n * @slot suffix - Used to append an icon or similar element to the button.\n *\n * @part base - The component's base wrapper.\n * @part prefix - The prefix container.\n * @part label - The button's label.\n * @part suffix - The suffix container.\n * @part caret - The button's caret.\n */\n\n@Component({\n tag: 'six-button',\n styleUrl: 'six-button.scss',\n shadow: true,\n})\nexport class SixButton {\n private nativeButton?: HTMLButtonElement | HTMLAnchorElement;\n\n @Element() host!: HTMLSixButtonElement;\n\n @State() hasFocus = false;\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasSuffix = false;\n\n /** The button's type. */\n @Prop({ reflect: true }) type:\n | 'secondary'\n | 'primary'\n | 'link'\n | 'success'\n | 'warning'\n | 'danger'\n | 'action'\n | 'action-outline' = 'primary';\n\n /** The button's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to draw the button with a caret for use with dropdowns, popovers, etc. */\n @Prop() caret = false;\n\n /** Set to true to disable the button. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true to draw the button in a loading state. */\n @Prop({ reflect: true }) loading = false;\n\n /** Set to true to draw a pill-style button with rounded edges. */\n @Prop({ reflect: true }) pill = false;\n\n /** Set to true to draw a circle button. */\n @Prop({ reflect: true }) circle = false;\n\n /** Indicates if activating the button should submit the form. Ignored when `href` is set. */\n @Prop({ reflect: true }) submit = false;\n\n /** Indicates if activating the button should reset the form. */\n @Prop({ reflect: true }) reset = false;\n\n /** An optional name for the button. Ignored when `href` is set. */\n @Prop() name = '';\n\n /** An optional value for the button. Ignored when `href` is set. */\n @Prop() value = '';\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`. */\n @Prop() href?: string;\n\n /** Tells the browser where to open the link. Only used when `href` is set. */\n @Prop() target?: '_blank' | '_parent' | '_self' | '_top';\n\n /** Tells the browser to download the linked file as this filename. Only used when `href` is set. */\n @Prop() download?: string;\n\n /** Emitted when the button loses focus. */\n @Event({ eventName: 'six-button-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the button gains focus. */\n @Event({ eventName: 'six-button-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n /** Sets focus on the button. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeButton?.focus(options);\n }\n\n /** Removes focus from the button. */\n @Method()\n async removeFocus() {\n this.nativeButton?.blur();\n }\n\n private handleSlotChange = () => {\n this.hasLabel = hasSlot(this.host);\n this.hasPrefix = hasSlot(this.host, 'prefix');\n this.hasSuffix = hasSlot(this.host, 'suffix');\n\n // set the correct icon size for suffix and prefix icons\n const prefixIcon = this.host.querySelector('[slot=\"prefix\"]');\n const suffixIcon = this.host.querySelector('[slot=\"suffix\"]');\n\n if (prefixIcon?.tagName.toLowerCase() === 'six-icon') {\n prefixIcon.setAttribute('size', this.mapSizeToIconSize(this.size));\n }\n\n if (suffixIcon?.tagName.toLowerCase() === 'six-icon') {\n suffixIcon.setAttribute('size', this.mapSizeToIconSize(this.size));\n }\n };\n\n private mapSizeToIconSize(buttonSize: 'small' | 'medium' | 'large'): string {\n const sizeMap = {\n small: 'xSmall',\n medium: 'small',\n large: 'medium',\n };\n return sizeMap[buttonSize] || 'small'; // Default to small\n }\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit();\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleClick = (event: MouseEvent) => {\n if (this.disabled || this.loading) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n if (this.submit) {\n event.preventDefault();\n submitForm(this.host);\n }\n };\n\n render() {\n const isLink = this.href != null;\n const isButton = !isLink;\n const Button = isLink ? 'a' : 'button';\n\n return (\n <div onClick={this.handleClick} class={{ 'button-wrapper--disabled': this.disabled }}>\n <Button\n ref={(el) => (this.nativeButton = el)}\n part=\"base\"\n class={{\n button: true,\n\n // Types\n 'button--secondary': this.type === 'secondary',\n 'button--primary': this.type === 'primary',\n 'button--link': this.type === 'link',\n 'button--success': this.type === 'success',\n 'button--warning': this.type === 'warning',\n 'button--danger': this.type === 'danger',\n 'button--action': this.type === 'action',\n 'button--action-outline': this.type === 'action-outline',\n\n // Sizes\n 'button--small': this.size === 'small',\n 'button--medium': this.size === 'medium',\n 'button--large': this.size === 'large',\n\n // Modifiers\n 'button--caret': this.caret,\n 'button--circle': this.circle,\n 'button--disabled': this.disabled,\n 'button--focused': this.hasFocus,\n 'button--loading': this.loading,\n 'button--pill': this.pill,\n 'button--has-label': this.hasLabel,\n 'button--has-prefix': this.hasPrefix,\n 'button--has-suffix': this.hasSuffix,\n }}\n disabled={isButton ? this.disabled : undefined}\n tabindex={this.disabled ? '-1' : undefined}\n type={isButton ? (this.submit ? 'submit' : this.reset ? 'reset' : 'button') : undefined}\n name={isButton ? this.name : undefined}\n value={isButton ? this.value : undefined}\n href={isLink ? this.href : undefined}\n target={isLink && this.target != null ? this.target : undefined}\n download={isLink && this.download != null ? this.download : undefined}\n rel={isLink && this.target != null ? 'noreferrer noopener' : undefined}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n data-testid=\"button\"\n >\n <span part=\"prefix\" class=\"button__prefix\">\n <slot onSlotchange={this.handleSlotChange} name=\"prefix\" />\n </span>\n <span part=\"label\" class=\"button__label\">\n <slot onSlotchange={this.handleSlotChange} />\n </span>\n <span part=\"suffix\" class=\"button__suffix\">\n <slot onSlotchange={this.handleSlotChange} name=\"suffix\" />\n </span>\n {this.caret && (\n <span part=\"caret\" class=\"button__caret\">\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n )}\n\n {this.loading && <six-spinner />}\n </Button>\n </div>\n );\n }\n}\n","@import 'src/global/component';\n\n/**\n * @prop --track-color: The color of the spinner's track.\n * @prop --indicator-color: The color of the spinner's indicator.\n * @prop --stroke-width: The width of the indicator.\n */\n:host {\n --track-color: var(--six-progress-track-color);\n --indicator-color: var(--six-progress-indicator-color);\n --stroke-width: 2px;\n\n display: inline-flex;\n}\n\n.spinner {\n display: inline-block;\n width: 1em;\n height: 1em;\n border-radius: 50%;\n border: solid var(--stroke-width) var(--track-color);\n border-top-color: var(--indicator-color);\n border-right-color: var(--indicator-color);\n animation: 1s linear infinite spin;\n}\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n$color-six-spinner-background: rgba(255, 255, 255, 0.7);\n\n.six-spinner {\n width: auto;\n height: auto;\n position: relative;\n\n .six-spinner__container {\n margin: 0;\n transform: translateX(0);\n }\n\n .six-spinner__container svg {\n transform: translateX(0);\n }\n\n &__container {\n position: relative;\n margin: 0 auto;\n top: calc(50% - 20px);\n z-index: 1;\n }\n\n &__container,\n &__container svg {\n width: 40px;\n height: 40px;\n display: block;\n transform: translateX(40px);\n }\n\n path {\n stroke-dashoffset: 70px;\n stroke-dasharray: 70, 444;\n -webkit-animation: six-spinner 2s cubic-bezier(0.56, 0.39, 0.51, 0.96) infinite;\n animation: six-spinner 2s cubic-bezier(0.56, 0.39, 0.51, 0.96) infinite;\n }\n\n polygon {\n stroke-dasharray: 310;\n stroke-dashoffset: 310;\n animation: big-polygon-draw 2s ease-in-out infinite;\n -webkit-animation: big-polygon-draw 2s ease-in-out infinite;\n }\n\n polygon:nth-child(2),\n polygon:nth-child(3) {\n stroke-dasharray: 110;\n stroke-dashoffset: 110;\n animation: small-polygon-draw 2s ease-in-out infinite;\n -webkit-animation: small-polygon-draw 2s ease-in-out infinite;\n }\n\n @keyframes big-polygon-draw {\n 0%,\n 100% {\n stroke-dashoffset: 310;\n }\n 50% {\n stroke-dashoffset: 140;\n }\n }\n\n @-webkit-keyframes big-polygon-draw {\n 0%,\n 100% {\n stroke-dashoffset: 310;\n }\n 50% {\n stroke-dashoffset: 140;\n }\n }\n\n @keyframes small-polygon-draw {\n 0%,\n 100% {\n stroke-dashoffset: 110;\n }\n 50% {\n stroke-dashoffset: 50;\n }\n }\n\n @-webkit-keyframes small-polygon-draw {\n 0%,\n 100% {\n stroke-dashoffset: 110;\n }\n 50% {\n stroke-dashoffset: 50;\n }\n }\n\n @-webkit-keyframes six-spinner {\n to {\n stroke-dashoffset: -444;\n }\n }\n\n @keyframes six-spinner {\n to {\n stroke-dashoffset: -444;\n }\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @part base - The component's base wrapper.\n * @part svg - The spinner icon.\n */\n@Component({\n tag: 'six-spinner',\n styleUrl: 'six-spinner.scss',\n shadow: true,\n})\nexport class SixSpinner {\n /** Indicates if the spinner is shown as animated SIX or BME logo or a simple spinner. */\n @Prop() logo?: 'six' | 'bme';\n /**\n * **@deprecated** Use `logo=\"six\"` instead.\n *\n * If set to true, the spinner displays the SIX logo.\n */\n @Prop() six?: boolean;\n\n /**\n * Renders a container with a given SVG content.\n */\n private renderWrapper(content: SVGElement) {\n return (\n <span class=\"six-spinner\" aria-busy=\"true\" aria-live=\"polite\">\n <div class=\"six-spinner__container\">{content}</div>\n </span>\n );\n }\n\n /**\n * Renders the SIX logo spinner.\n */\n private renderSIXLogo() {\n const sixLogo = (\n <svg viewBox=\"0 0 40 40\" part=\"svg\">\n <path\n fill=\"none\"\n stroke=\"#de3919\"\n stroke-width=\"5\"\n stroke-linecap=\"round\"\n d=\"M 35 5 V 35 H 5 T 5 5 H 35 V 35 H 5 V 5 H 35 V 35 H -34 V 30 H 7 A 9 8 0 0 0 14 27 L 27 14 A 8 6 0 0 1 33 12 H 42\"\n ></path>\n </svg>\n );\n return this.renderWrapper(sixLogo);\n }\n\n /**\n * Renders the BME logo spinner.\n */\n private renderBMELogo() {\n const bmeLogo = (\n <svg viewBox=\"0 0 45 55\" part=\"svg\">\n <polygon\n fill=\"none\"\n stroke=\"black\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n points=\"4.42 51.96 17.02 31.473 2 31.473 2 22.486 17.02 22.486 4.42 2 15.404 2 30.289 26.98 14.763 51.96 4.42 51.96\"\n />\n <polygon\n fill=\"none\"\n stroke=\"black\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n points=\"42 51.96 31.655 51.96 24.598 40.498 29.831 32.073 42 51.96\"\n />\n <polygon\n fill=\"none\"\n stroke=\"black\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n points=\"24.518 12.719 31.014 2 42 2 29.831 21.637 24.518 12.719\"\n />\n </svg>\n );\n return this.renderWrapper(bmeLogo);\n }\n\n /**\n * Renders a simple spinner.\n */\n private renderSimpleSpinner() {\n return <span part=\"base\" class=\"spinner\" aria-busy=\"true\" aria-live=\"polite\" />;\n }\n\n render() {\n // Check the deprecated `six` property first\n if (this.six) {\n console.warn('The \"six\" prop is deprecated. Use \"logo=\\'six\\'\" instead.');\n return this.renderSIXLogo();\n }\n\n switch (this.logo) {\n case 'six':\n return this.renderSIXLogo();\n case 'bme':\n return this.renderBMELogo();\n default:\n return this.renderSimpleSpinner();\n }\n }\n}\n"],"mappings":"iIAAA,MAAMA,EAAe,m+R,MC2BRC,EAAS,MALtB,WAAAC,CAAAC,G,0FAUWC,KAAQC,SAAG,MACXD,KAAQE,SAAG,MACXF,KAASG,UAAG,MACZH,KAASI,UAAG,MAGIJ,KAAIK,KAQN,UAGEL,KAAIM,KAAiC,SAGtDN,KAAKO,MAAG,MAGSP,KAAQQ,SAAG,MAGXR,KAAOS,QAAG,MAGVT,KAAIU,KAAG,MAGPV,KAAMW,OAAG,MAGTX,KAAMY,OAAG,MAGTZ,KAAKa,MAAG,MAGzBb,KAAIc,KAAG,GAGPd,KAAKe,MAAG,GAiCRf,KAAgBgB,iBAAG,KACzBhB,KAAKE,SAAWe,EAAQjB,KAAKkB,MAC7BlB,KAAKG,UAAYc,EAAQjB,KAAKkB,KAAM,UACpClB,KAAKI,UAAYa,EAAQjB,KAAKkB,KAAM,UAGpC,MAAMC,EAAanB,KAAKkB,KAAKE,cAAc,mBAC3C,MAAMC,EAAarB,KAAKkB,KAAKE,cAAc,mBAE3C,IAAID,IAAA,MAAAA,SAAU,SAAVA,EAAYG,QAAQC,iBAAkB,WAAY,CACpDJ,EAAWK,aAAa,OAAQxB,KAAKyB,kBAAkBzB,KAAKM,M,CAG9D,IAAIe,IAAA,MAAAA,SAAU,SAAVA,EAAYC,QAAQC,iBAAkB,WAAY,CACpDF,E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K,QAAQH,MAAM,iBACvBH,EAAA,OAAAC,IAAA,2CACEe,QAAQ,YACRC,KAAK,OACLC,OAAO,eACM,mBACE,yBAAO,kBACN,SAEhBlB,EAAA,YAAAC,IAAA,2CAAUkB,OAAO,qBAKtBzE,KAAKS,SAAW6C,EAAA,eAAAC,IAAA,8C,uCC3O3B,MAAMmB,EAAgB,+mE,MCgBTC,EAAU,M,yBAab,aAAAC,CAAcC,GACpB,OACEvB,EAAA,QAAMG,MAAM,cAAwB,mBAAM,YAAW,UACnDH,EAAK,OAAAG,MAAM,0BAA0BoB,G,CAQnC,aAAAC,GACN,MAAMC,EACJzB,EAAK,OAAAgB,QAAQ,YAAYV,KAAK,OAC5BN,EAAA,QACEiB,KAAK,OACLC,OAAO,UACM,mBACE,yBACfQ,EAAE,uHAIR,OAAOhF,KAAK4E,cAAcG,E,CAMpB,aAAAE,GACN,MAAMC,EACJ5B,EAAK,OAAAgB,QAAQ,YAAYV,KAAK,OAC5BN,EAAA,WACEiB,KAAK,OACLC,OAAO,QACM,mBAAG,iBACD,QACfC,OAAO,gHAETnB,EAAA,WACEiB,KAAK,OACLC,OAAO,QACM,mBAAG,iBACD,QACfC,OAAO,+DAETnB,EAAA,WACEiB,KAAK,OACLC,OAAO,QACM,mBACE,yBACfC,OAAO,6DAIb,OAAOzE,KAAK4E,cAAcM,E,CAMpB,mBAAAC,GACN,OAAO7B,EAAM,QAAAM,KAAK,OAAOH,MAAM,UAAoB,mBAAiB,sB,CAGtE,MAAAR,GAEE,GAAIjD,KAAKoF,IAAK,CACZC,QAAQC,KAAK,6DACb,OAAOtF,KAAK8E,e,CAGd,OAAQ9E,KAAKuF,MACX,IAAK,MACH,OAAOvF,KAAK8E,gBACd,IAAK,MACH,OAAO9E,KAAKiF,gBACd,QACE,OAAOjF,KAAKmF,sB","ignoreList":[]}
1
+ {"version":3,"names":["sixButtonCss","SixButton","constructor","hostRef","this","hasFocus","hasLabel","hasPrefix","hasSuffix","type","size","caret","disabled","loading","pill","circle","submit","reset","name","value","handleSlotChange","hasSlot","host","prefixIcon","querySelector","suffixIcon","tagName","toLowerCase","setAttribute","mapSizeToIconSize","handleBlur","sixBlur","emit","handleFocus","sixFocus","handleClick","event","preventDefault","stopPropagation","submitForm","componentWillLoad","setFocus","options","_a","nativeButton","focus","removeFocus","blur","buttonSize","sizeMap","small","medium","large","render","isLink","href","isButton","Button","h","key","onClick","class","ref","el","part","button","undefined","tabindex","target","download","rel","onBlur","onFocus","onSlotchange","viewBox","fill","stroke","points","sixSpinnerCss","SixSpinner","renderWrapper","content","renderSIXLogo","sixLogo","d","renderBMELogo","bmeLogo","renderSimpleSpinner","six","console","warn","logo"],"sources":["src/components/six-button/six-button.scss?tag=six-button&encapsulation=shadow","src/components/six-button/six-button.tsx","src/components/six-spinner/six-spinner.scss?tag=six-spinner&encapsulation=shadow","src/components/six-spinner/six-spinner.tsx"],"sourcesContent":["@import '../../../src/global/component';\n\n:host {\n display: inline-block;\n width: auto;\n cursor: pointer;\n}\n\n.button {\n display: inline-flex;\n align-items: stretch;\n justify-content: center;\n width: 100%;\n border-style: solid;\n border-width: var(--six-border-width);\n border-radius: 0;\n font-family: var(--six-font-family);\n font-weight: var(--six-font-weight-semibold);\n text-decoration: none;\n user-select: none;\n white-space: nowrap;\n vertical-align: middle;\n padding: 0;\n transition:\n var(--six-transition-fast) background-color,\n var(--six-transition-fast) color,\n var(--six-transition-fast) border,\n var(--six-transition-fast) box-shadow;\n cursor: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n }\n\n &:focus {\n outline: none;\n }\n\n &.button--disabled {\n pointer-events: none;\n }\n\n ::slotted(six-icon) {\n // Clicks on icons shouldn't prevent the button from gaining focus\n pointer-events: none;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n }\n}\n\n.button-wrapper--disabled {\n cursor: not-allowed;\n}\n\n.button__prefix,\n.button__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Standard buttons\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button {\n &:focus-visible {\n outline: var(--six-focus-ring);\n outline-offset: var(--six-focus-ring-offset);\n }\n\n &.button--secondary {\n background-color: var(--six-color-white);\n border-color: var(--six-color-web-rock-900);\n color: var(--six-color-web-rock-900);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-web-rock-100);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-web-rock-300);\n border-color: var(--six-color-web-rock-900);\n border-width: 1px;\n }\n }\n\n &.button--primary {\n background-color: var(--six-color-web-rock-900);\n border-color: var(--six-color-web-rock-900);\n color: var(--six-color-white);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-web-rock-800);\n border-color: var(--six-color-web-rock-800);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-web-rock-900);\n border-color: var(--six-color-web-rock-900);\n opacity: 70%;\n }\n }\n\n &.button--link {\n background-color: transparent;\n border-color: transparent;\n color: var(--six-color-action-500);\n\n &.button--disabled {\n color: var(--six-color-web-rock-400);\n }\n\n &:hover:not(.button--disabled) {\n color: var(--six-color-action-600);\n }\n\n &:active:not(.button--disabled) {\n color: var(--six-color-action-light-to-be-defined);\n }\n }\n\n &.button--danger {\n background-color: var(--six-color-danger-800);\n border-color: var(--six-color-danger-800);\n color: var(--six-color-white);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-danger-900);\n border-color: var(--six-color-danger-900);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-danger-800);\n border-color: var(--six-color-danger-800);\n opacity: 70%;\n }\n }\n\n &.button--warning {\n background-color: var(--six-color-warning-700);\n border-color: var(--six-color-warning-700);\n color: var(--six-color-web-rock-900);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-warning-800);\n border-color: var(--six-color-warning-800);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-warning-700);\n border-color: var(--six-color-warning-700);\n opacity: 70%;\n }\n }\n\n &.button--success {\n background-color: var(--six-color-success-500);\n border-color: var(--six-color-success-500);\n color: var(--six-color-web-rock-900);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-success-600);\n border-color: var(--six-color-success-600);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-success-500);\n border-color: var(--six-color-success-500);\n opacity: 70%;\n }\n }\n\n &.button--action {\n background-color: var(--six-color-action-500);\n border-color: var(--six-color-action-500);\n color: var(--six-color-white);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-action-600);\n border-color: var(--six-color-action-600);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-action-500);\n border-color: var(--six-color-action-500);\n opacity: 70%;\n }\n }\n\n &.button--action-outline {\n border-color: var(--six-color-action-500);\n background-color: var(--six-color-white);\n color: var(--six-color-action-500);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-web-rock-100);\n }\n\n &:active:not(.button--disabled) {\n border-color: var(--six-color-action-500);\n opacity: 70%;\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Size modifiers\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--small {\n font-size: var(--six-button-font-size-small);\n height: var(--six-height-small);\n line-height: calc(var(--six-height-small) - var(--six-border-width) * 2);\n}\n\n.button--medium {\n font-size: var(--six-button-font-size-medium);\n height: var(--six-height-medium);\n line-height: calc(var(--six-height-medium) - var(--six-border-width) * 2);\n}\n\n.button--large {\n font-size: var(--six-button-font-size-large);\n height: var(--six-height-large);\n line-height: calc(var(--six-height-large) - var(--six-border-width) * 2);\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Pill modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--pill {\n &.button--small {\n border-radius: var(--six-height-small);\n }\n\n &.button--medium {\n border-radius: var(--six-height-medium);\n }\n\n &.button--large {\n border-radius: var(--six-height-large);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Circle modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--circle {\n padding-left: 0;\n padding-right: 0;\n font-size: revert;\n\n &.button--small {\n width: var(--six-height-small);\n border-radius: 50%;\n }\n\n &.button--medium {\n width: var(--six-height-medium);\n border-radius: 50%;\n }\n\n &.button--large {\n width: var(--six-height-large);\n border-radius: 50%;\n }\n\n .button__prefix,\n .button__suffix,\n .button__caret {\n display: none;\n\n svg {\n color: var(--six-color-web-rock-900);\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Caret modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--caret {\n .button__suffix {\n display: none;\n }\n\n .button__caret {\n display: flex;\n align-items: center;\n\n svg {\n color: var(--six-color-web-rock-900);\n width: 1em;\n height: 1em;\n }\n }\n}\n\n.button--primary,\n.button--action,\n.button--danger {\n .button__caret {\n svg {\n color: var(--six-color-white);\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Loading modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--loading {\n position: relative;\n cursor: wait;\n\n .button__prefix,\n .button__label,\n .button__suffix,\n .button__caret {\n visibility: hidden;\n }\n\n six-spinner {\n --indicator-color: currentColor;\n position: absolute;\n height: 1em;\n width: 1em;\n top: calc(50% - 0.5em);\n left: calc(50% - 0.5em);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Badges\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button ::slotted(six-badge) {\n position: absolute;\n top: 0;\n right: 0;\n transform: translateY(-50%) translateX(50%);\n pointer-events: none;\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Button spacing\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--has-label {\n &.button--small .button__label {\n padding: 0 var(--six-spacing-small);\n }\n\n &.button--medium .button__label {\n padding: 0 var(--six-spacing-medium);\n }\n\n &.button--large .button__label {\n padding: 0 var(--six-spacing-large);\n }\n}\n\n.button--has-prefix {\n &.button--small {\n padding-left: var(--six-spacing-x-small);\n\n .button__label {\n padding-left: var(--six-spacing-x-small);\n }\n }\n\n &.button--medium {\n padding-left: var(--six-spacing-small);\n\n .button__label {\n padding-left: var(--six-spacing-small);\n }\n }\n\n &.button--large {\n padding-left: var(--six-spacing-small);\n\n .button__label {\n padding-left: var(--six-spacing-small);\n }\n }\n}\n\n.button--has-suffix,\n.button--caret {\n &.button--small {\n padding-right: var(--six-spacing-x-small);\n\n .button__label {\n padding-right: var(--six-spacing-x-small);\n }\n }\n\n &.button--medium {\n padding-right: var(--six-spacing-small);\n\n .button__label {\n padding-right: var(--six-spacing-small);\n }\n }\n\n &.button--large {\n padding-right: var(--six-spacing-small);\n\n .button__label {\n padding-right: var(--six-spacing-small);\n }\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State } from '@stencil/core';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { submitForm } from '../../utils/form';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The button's label.\n * @slot prefix - Used to prepend an icon or similar element to the button.\n * @slot suffix - Used to append an icon or similar element to the button.\n *\n * @part base - The component's base wrapper.\n * @part prefix - The prefix container.\n * @part label - The button's label.\n * @part suffix - The suffix container.\n * @part caret - The button's caret.\n */\n\n@Component({\n tag: 'six-button',\n styleUrl: 'six-button.scss',\n shadow: true,\n})\nexport class SixButton {\n private nativeButton?: HTMLButtonElement | HTMLAnchorElement;\n\n @Element() host!: HTMLSixButtonElement;\n\n @State() hasFocus = false;\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasSuffix = false;\n\n /** The button's type. */\n @Prop({ reflect: true }) type:\n | 'secondary'\n | 'primary'\n | 'link'\n | 'success'\n | 'warning'\n | 'danger'\n | 'action'\n | 'action-outline' = 'primary';\n\n /** The button's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to draw the button with a caret for use with dropdowns, popovers, etc. */\n @Prop() caret = false;\n\n /** Set to true to disable the button. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true to draw the button in a loading state. */\n @Prop({ reflect: true }) loading = false;\n\n /** Set to true to draw a pill-style button with rounded edges. */\n @Prop({ reflect: true }) pill = false;\n\n /** Set to true to draw a circle button. */\n @Prop({ reflect: true }) circle = false;\n\n /** Indicates if activating the button should submit the form. Ignored when `href` is set. */\n @Prop({ reflect: true }) submit = false;\n\n /** Indicates if activating the button should reset the form. */\n @Prop({ reflect: true }) reset = false;\n\n /** An optional name for the button. Ignored when `href` is set. */\n @Prop() name = '';\n\n /** An optional value for the button. Ignored when `href` is set. */\n @Prop() value = '';\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`. */\n @Prop() href?: string;\n\n /** Tells the browser where to open the link. Only used when `href` is set. */\n @Prop() target?: '_blank' | '_parent' | '_self' | '_top';\n\n /** Tells the browser to download the linked file as this filename. Only used when `href` is set. */\n @Prop() download?: string;\n\n /** Emitted when the button loses focus. */\n @Event({ eventName: 'six-button-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the button gains focus. */\n @Event({ eventName: 'six-button-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n /** Sets focus on the button. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeButton?.focus(options);\n }\n\n /** Removes focus from the button. */\n @Method()\n async removeFocus() {\n this.nativeButton?.blur();\n }\n\n private handleSlotChange = () => {\n this.hasLabel = hasSlot(this.host);\n this.hasPrefix = hasSlot(this.host, 'prefix');\n this.hasSuffix = hasSlot(this.host, 'suffix');\n\n // set the correct icon size for suffix and prefix icons\n const prefixIcon = this.host.querySelector('[slot=\"prefix\"]');\n const suffixIcon = this.host.querySelector('[slot=\"suffix\"]');\n\n if (prefixIcon?.tagName.toLowerCase() === 'six-icon') {\n prefixIcon.setAttribute('size', this.mapSizeToIconSize(this.size));\n }\n\n if (suffixIcon?.tagName.toLowerCase() === 'six-icon') {\n suffixIcon.setAttribute('size', this.mapSizeToIconSize(this.size));\n }\n };\n\n private mapSizeToIconSize(buttonSize: 'small' | 'medium' | 'large'): string {\n const sizeMap = {\n small: 'xSmall',\n medium: 'small',\n large: 'medium',\n };\n return sizeMap[buttonSize] || 'small'; // Default to small\n }\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit();\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleClick = (event: MouseEvent) => {\n if (this.disabled || this.loading) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n if (this.submit) {\n event.preventDefault();\n submitForm(this.host);\n }\n };\n\n render() {\n const isLink = this.href != null;\n const isButton = !isLink;\n const Button = isLink ? 'a' : 'button';\n\n return (\n <div onClick={this.handleClick} class={{ 'button-wrapper--disabled': this.disabled }}>\n <Button\n ref={(el) => (this.nativeButton = el)}\n part=\"base\"\n class={{\n button: true,\n\n // Types\n 'button--secondary': this.type === 'secondary',\n 'button--primary': this.type === 'primary',\n 'button--link': this.type === 'link',\n 'button--success': this.type === 'success',\n 'button--warning': this.type === 'warning',\n 'button--danger': this.type === 'danger',\n 'button--action': this.type === 'action',\n 'button--action-outline': this.type === 'action-outline',\n\n // Sizes\n 'button--small': this.size === 'small',\n 'button--medium': this.size === 'medium',\n 'button--large': this.size === 'large',\n\n // Modifiers\n 'button--caret': this.caret,\n 'button--circle': this.circle,\n 'button--disabled': this.disabled,\n 'button--focused': this.hasFocus,\n 'button--loading': this.loading,\n 'button--pill': this.pill,\n 'button--has-label': this.hasLabel,\n 'button--has-prefix': this.hasPrefix,\n 'button--has-suffix': this.hasSuffix,\n }}\n disabled={isButton ? this.disabled : undefined}\n tabindex={this.disabled ? '-1' : undefined}\n type={isButton ? (this.submit ? 'submit' : this.reset ? 'reset' : 'button') : undefined}\n name={isButton ? this.name : undefined}\n value={isButton ? this.value : undefined}\n href={isLink ? this.href : undefined}\n target={isLink && this.target != null ? this.target : undefined}\n download={isLink && this.download != null ? this.download : undefined}\n rel={isLink && this.target != null ? 'noreferrer noopener' : undefined}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n data-testid=\"button\"\n >\n <span part=\"prefix\" class=\"button__prefix\">\n <slot onSlotchange={this.handleSlotChange} name=\"prefix\" />\n </span>\n <span part=\"label\" class=\"button__label\">\n <slot onSlotchange={this.handleSlotChange} />\n </span>\n <span part=\"suffix\" class=\"button__suffix\">\n <slot onSlotchange={this.handleSlotChange} name=\"suffix\" />\n </span>\n {this.caret && (\n <span part=\"caret\" class=\"button__caret\">\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n )}\n\n {this.loading && <six-spinner />}\n </Button>\n </div>\n );\n }\n}\n","@import 'src/global/component';\n\n/**\n * @prop --track-color: The color of the spinner's track.\n * @prop --indicator-color: The color of the spinner's indicator.\n * @prop --stroke-width: The width of the indicator.\n */\n:host {\n --track-color: var(--six-progress-track-color);\n --indicator-color: var(--six-progress-indicator-color);\n --stroke-width: 2px;\n\n display: inline-flex;\n font-size: 40px;\n}\n\n.spinner {\n display: inline-block;\n width: 1em;\n height: 1em;\n border-radius: 50%;\n border: solid var(--stroke-width) var(--track-color);\n border-top-color: var(--indicator-color);\n border-right-color: var(--indicator-color);\n animation: 1s linear infinite spin;\n}\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.six-spinner {\n display: inline-block;\n width: 1em;\n height: 1em;\n line-height: 0;\n\n &__container svg {\n display: block;\n }\n\n path {\n stroke-dashoffset: 70px;\n stroke-dasharray: 70, 444;\n -webkit-animation: six-spinner 2s cubic-bezier(0.56, 0.39, 0.51, 0.96) infinite;\n animation: six-spinner 2s cubic-bezier(0.56, 0.39, 0.51, 0.96) infinite;\n }\n\n polygon {\n stroke-dasharray: 310;\n stroke-dashoffset: 310;\n animation: big-polygon-draw 2s ease-in-out infinite;\n -webkit-animation: big-polygon-draw 2s ease-in-out infinite;\n }\n\n polygon:nth-child(2),\n polygon:nth-child(3) {\n stroke-dasharray: 110;\n stroke-dashoffset: 110;\n animation: small-polygon-draw 2s ease-in-out infinite;\n -webkit-animation: small-polygon-draw 2s ease-in-out infinite;\n }\n\n @keyframes big-polygon-draw {\n 0%,\n 100% {\n stroke-dashoffset: 310;\n }\n 50% {\n stroke-dashoffset: 140;\n }\n }\n\n @-webkit-keyframes big-polygon-draw {\n 0%,\n 100% {\n stroke-dashoffset: 310;\n }\n 50% {\n stroke-dashoffset: 140;\n }\n }\n\n @keyframes small-polygon-draw {\n 0%,\n 100% {\n stroke-dashoffset: 110;\n }\n 50% {\n stroke-dashoffset: 50;\n }\n }\n\n @-webkit-keyframes small-polygon-draw {\n 0%,\n 100% {\n stroke-dashoffset: 110;\n }\n 50% {\n stroke-dashoffset: 50;\n }\n }\n\n @-webkit-keyframes six-spinner {\n to {\n stroke-dashoffset: -444;\n }\n }\n\n @keyframes six-spinner {\n to {\n stroke-dashoffset: -444;\n }\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @part base - The component's base wrapper.\n * @part svg - The spinner icon.\n */\n@Component({\n tag: 'six-spinner',\n styleUrl: 'six-spinner.scss',\n shadow: true,\n})\nexport class SixSpinner {\n /** Indicates if the spinner is shown as animated SIX or BME logo or a simple spinner. */\n @Prop() logo?: 'six' | 'bme';\n /**\n * **@deprecated** Use `logo=\"six\"` instead.\n *\n * If set to true, the spinner displays the SIX logo.\n */\n @Prop() six?: boolean;\n\n /**\n * Renders a container with a given SVG content.\n */\n private renderWrapper(content: SVGElement) {\n return (\n <span class=\"six-spinner\" aria-busy=\"true\" aria-live=\"polite\">\n <div class=\"six-spinner__container\">{content}</div>\n </span>\n );\n }\n\n /**\n * Renders the SIX logo spinner.\n */\n private renderSIXLogo() {\n const sixLogo = (\n <svg viewBox=\"0 0 40 40\" part=\"svg\">\n <path\n fill=\"none\"\n stroke=\"#de3919\"\n stroke-width=\"5\"\n stroke-linecap=\"round\"\n d=\"M 35 5 V 35 H 5 T 5 5 H 35 V 35 H 5 V 5 H 35 V 35 H -34 V 30 H 7 A 9 8 0 0 0 14 27 L 27 14 A 8 6 0 0 1 33 12 H 42\"\n ></path>\n </svg>\n );\n return this.renderWrapper(sixLogo);\n }\n\n /**\n * Renders the BME logo spinner.\n */\n private renderBMELogo() {\n const bmeLogo = (\n <svg viewBox=\"0 0 45 55\" part=\"svg\">\n <polygon\n fill=\"none\"\n stroke=\"black\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n points=\"4.42 51.96 17.02 31.473 2 31.473 2 22.486 17.02 22.486 4.42 2 15.404 2 30.289 26.98 14.763 51.96 4.42 51.96\"\n />\n <polygon\n fill=\"none\"\n stroke=\"black\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n points=\"42 51.96 31.655 51.96 24.598 40.498 29.831 32.073 42 51.96\"\n />\n <polygon\n fill=\"none\"\n stroke=\"black\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n points=\"24.518 12.719 31.014 2 42 2 29.831 21.637 24.518 12.719\"\n />\n </svg>\n );\n return this.renderWrapper(bmeLogo);\n }\n\n /**\n * Renders a simple spinner.\n */\n private renderSimpleSpinner() {\n return <span part=\"base\" class=\"spinner\" aria-busy=\"true\" aria-live=\"polite\" />;\n }\n\n render() {\n // Check the deprecated `six` property first\n if (this.six) {\n console.warn('The \"six\" prop is deprecated. Use \"logo=\\'six\\'\" instead.');\n return this.renderSIXLogo();\n }\n\n switch (this.logo) {\n case 'six':\n return this.renderSIXLogo();\n case 'bme':\n return this.renderBMELogo();\n default:\n return this.renderSimpleSpinner();\n }\n }\n}\n"],"mappings":"iIAAA,MAAMA,EAAe,m+R,MC2BRC,EAAS,MALtB,WAAAC,CAAAC,G,0FAUWC,KAAQC,SAAG,MACXD,KAAQE,SAAG,MACXF,KAASG,UAAG,MACZH,KAASI,UAAG,MAGIJ,KAAIK,KAQN,UAGEL,KAAIM,KAAiC,SAGtDN,KAAKO,MAAG,MAGSP,KAAQQ,SAAG,MAGXR,KAAOS,QAAG,MAGVT,KAAIU,KAAG,MAGPV,KAAMW,OAAG,MAGTX,KAAMY,OAAG,MAGTZ,KAAKa,MAAG,MAGzBb,KAAIc,KAAG,GAGPd,KAAKe,MAAG,GAiCRf,KAAgBgB,iBAAG,KACzBhB,KAAKE,SAAWe,EAAQjB,KAAKkB,MAC7BlB,KAAKG,UAAYc,EAAQjB,KAA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OAAOH,MAAM,UAAoB,mBAAiB,sB,CAGtE,MAAAR,GAEE,GAAIjD,KAAKoF,IAAK,CACZC,QAAQC,KAAK,6DACb,OAAOtF,KAAK8E,e,CAGd,OAAQ9E,KAAKuF,MACX,IAAK,MACH,OAAOvF,KAAK8E,gBACd,IAAK,MACH,OAAO9E,KAAKiF,gBACd,QACE,OAAOjF,KAAKmF,sB","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as t,c as i,h as a,H as o,g as s}from"./p-JoG9I7EO.js";const e=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}.sr-only{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}:host{display:flex}.tab{display:inline-flex;align-items:center;font-family:var(--six-font-family);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-semibold);color:var(--six-tab-color);padding:var(--six-spacing-medium) var(--six-spacing-large);white-space:nowrap;user-select:none;cursor:pointer;width:100%}.tab:focus{outline:none}.tab:focus-visible{outline:var(--six-focus-ring);outline-offset:calc(-1 * var(--six-focus-ring-width) - var(--six-focus-ring-offset))}.tab.tab--active:not(.tab--disabled){color:var(--six-tab-color-active);font-weight:var(--six-font-weight-bold)}.tab.tab--closable{padding-right:var(--six-spacing-small)}.tab.tab--disabled{color:var(--six-tab-color-disabled);cursor:not-allowed}.tab:hover:not(.tab--disabled){color:var(--six-tab-color-hover)}.tab.tab--left,.tab.tab--right{display:inline-block;text-align:left}.tab.tab--left::before,.tab.tab--right::before{display:block;font-weight:var(--six-font-weight-bold);content:attr(title);height:0;overflow:hidden;visibility:hidden}.tab__close-button{font-size:var(--six-font-size-large);margin-left:var(--six-spacing-xx-small)}.tab__close-button::part(base){padding:var(--six-spacing-xxx-small)}.tab__indicator{position:absolute}.tab__indicator.tab__indicator--active{background-color:var(--six-tab-border-color-active)}.tab--top{margin-bottom:var(--six-spacing-xxx-small)}.tab__indicator--top{width:100%;bottom:0;height:var(--six-tab-border-width)}.tab--bottom{margin-top:var(--six-spacing-xxx-small)}.tab__indicator--bottom{width:100%;top:0;height:var(--six-tab-border-width)}.tab--left{margin-right:var(--six-spacing-xxx-small)}.tab__indicator--left{height:100%;right:0;top:0;width:var(--six-tab-border-width)}.tab--right{margin-left:var(--six-spacing-xxx-small)}.tab__indicator--right{height:100%;left:0;top:0;width:var(--six-tab-border-width)}";let r=0;const b=class{constructor(a){t(this,a);this.sixClose=i(this,"six-tab-close");this.componentId=`tab-${++r}`;this.panel="";this.active=false;this.closable=false;this.disabled=false}connectedCallback(){this.handleCloseClick=this.handleCloseClick.bind(this)}async setFocus(t){var i;(i=this.tab)===null||i===void 0?void 0:i.focus(t)}async removeFocus(){var t;(t=this.tab)===null||t===void 0?void 0:t.blur()}handleCloseClick(){this.sixClose.emit()}render(){var t;const i=this.host.closest("six-tab-group");const s=(t=i===null||i===void 0?void 0:i.placement)!==null&&t!==void 0?t:"top";return a(o,{key:"15b2a74f3b77603857f6e2ff65b2ba60ff66b610",id:this.host.id||this.componentId},a("div",{key:"6898094f10f1df9d600ed3250c1c264f4b9b1bfb",part:"base",ref:t=>this.tab=t,class:{tab:true,"tab--top":s==="top","tab--bottom":s==="bottom","tab--left":s==="left","tab--right":s==="right","tab--active":this.active,"tab--closable":this.closable,"tab--disabled":this.disabled},role:"tab","aria-disabled":this.disabled?"true":"false","aria-selected":this.active?"true":"false",tabindex:this.disabled||!this.active?"-1":"0",title:this.host.innerHTML},a("slot",{key:"e2dd12b15187571813d183a159096341cf4c3c0f"}),this.closable&&a("six-icon-button",{key:"6403e9ac9b8574870dc97f96313b50ed133f952f",name:"close",size:"xSmall",exportparts:"base:close-button",class:"tab__close-button",onClick:this.handleCloseClick,tabIndex:-1,"aria-hidden":"true"})),a("div",{key:"293c3734b3223eb57051bbd85003645ff1653e35",part:this.active?"active-tab-indicator":"",class:{tab__indicator:true,"tab__indicator--active":this.active,"tab__indicator--top":s==="top","tab__indicator--bottom":s==="bottom","tab__indicator--left":s==="left","tab__indicator--right":s==="right"}}))}get host(){return s(this)}};b.style=e;export{b as six_tab};
2
- //# sourceMappingURL=p-9b75e009.entry.js.map
1
+ import{r as t,c as i,h as a,H as o,g as s}from"./p-JoG9I7EO.js";const e=":host{position:relative;box-sizing:border-box}:host *,:host *:before,:host *:after{box-sizing:border-box}.sr-only{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}:host{display:flex}.tab{display:inline-flex;align-items:center;font-family:var(--six-font-family);font-size:var(--six-font-size-small);font-weight:var(--six-font-weight-semibold);color:var(--six-tab-color);padding:var(--six-spacing-medium) var(--six-spacing-large);white-space:nowrap;user-select:none;cursor:pointer;width:100%}.tab:focus{outline:none}.tab:focus-visible{outline:var(--six-focus-ring);outline-offset:calc(-1 * var(--six-focus-ring-width) - var(--six-focus-ring-offset))}.tab.tab--active:not(.tab--disabled){color:var(--six-tab-color-active);font-weight:var(--six-font-weight-bold)}.tab.tab--closable{padding-right:var(--six-spacing-small)}.tab.tab--disabled{color:var(--six-tab-color-disabled);cursor:not-allowed}.tab:hover:not(.tab--disabled){color:var(--six-tab-color-hover)}.tab.tab--left,.tab.tab--right{display:inline-block;text-align:left}.tab.tab--left::before,.tab.tab--right::before{display:block;font-weight:var(--six-font-weight-bold);content:attr(title);height:0;overflow:hidden;visibility:hidden}.tab__close-button{font-size:var(--six-font-size-large);margin-left:var(--six-spacing-xx-small)}.tab__close-button::part(base){padding:var(--six-spacing-xxx-small)}.tab__indicator{position:absolute}.tab__indicator.tab__indicator--active{background-color:var(--six-tab-border-color-active)}.tab--top{margin-bottom:var(--six-spacing-xxx-small)}.tab__indicator--top{width:100%;bottom:0;height:var(--six-tab-border-width)}.tab--bottom{margin-top:var(--six-spacing-xxx-small)}.tab__indicator--bottom{width:100%;top:0;height:var(--six-tab-border-width)}.tab--left{margin-right:var(--six-spacing-xxx-small)}.tab__indicator--left{height:100%;right:0;top:0;width:var(--six-tab-border-width)}.tab--right{margin-left:var(--six-spacing-xxx-small)}.tab__indicator--right{height:100%;left:0;top:0;width:var(--six-tab-border-width)}";let r=0;const l=class{constructor(a){t(this,a);this.sixClose=i(this,"six-tab-close");this.componentId=`tab-${++r}`;this.panel="";this.active=false;this.closable=false;this.disabled=false}connectedCallback(){this.handleCloseClick=this.handleCloseClick.bind(this)}async setFocus(t){var i;(i=this.tab)===null||i===void 0?void 0:i.focus(t)}async removeFocus(){var t;(t=this.tab)===null||t===void 0?void 0:t.blur()}handleCloseClick(){this.sixClose.emit()}render(){var t,i;const s=this.host.closest("six-tab-group");const e=(t=s===null||s===void 0?void 0:s.placement)!==null&&t!==void 0?t:"top";return a(o,{key:"cf68989c61bf87898620dd39ffa5f92907bd2585",id:this.host.id||this.componentId},a("div",{key:"987c14cf6a61901bdcec0f9029d28f23417f9527",part:"base",ref:t=>this.tab=t,class:{tab:true,"tab--top":e==="top","tab--bottom":e==="bottom","tab--left":e==="left","tab--right":e==="right","tab--active":this.active,"tab--closable":this.closable,"tab--disabled":this.disabled},role:"tab","aria-disabled":this.disabled?"true":"false","aria-selected":this.active?"true":"false",tabindex:this.disabled||!this.active?"-1":"0",title:(i=this.hoverContent)!==null&&i!==void 0?i:this.host.innerHTML},a("slot",{key:"dd6314fa392b9e4a853f50abb5c671c38a764d5f"}),this.closable&&a("six-icon-button",{key:"473fab356355da098555b0699c9ff2a08c778d1d",name:"close",size:"xSmall",exportparts:"base:close-button",class:"tab__close-button",onClick:this.handleCloseClick,tabIndex:-1,"aria-hidden":"true"})),a("div",{key:"9a662684f5471aea35cfe07072341495e6a20236",part:this.active?"active-tab-indicator":"",class:{tab__indicator:true,"tab__indicator--active":this.active,"tab__indicator--top":e==="top","tab__indicator--bottom":e==="bottom","tab__indicator--left":e==="left","tab__indicator--right":e==="right"}}))}get host(){return s(this)}};l.style=e;export{l as six_tab};
2
+ //# sourceMappingURL=p-a9a5485a.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixTabCss","id","SixTab","constructor","hostRef","this","componentId","panel","active","closable","disabled","connectedCallback","handleCloseClick","bind","setFocus","options","_a","tab","focus","removeFocus","blur","sixClose","emit","render","tabGroup","host","closest","placement","h","Host","key","part","ref","el","class","role","tabindex","title","_b","hoverContent","innerHTML","name","size","exportparts","onClick","tabIndex","tab__indicator"],"sources":["src/components/six-tab/six-tab.scss?tag=six-tab&encapsulation=shadow","src/components/six-tab/six-tab.tsx"],"sourcesContent":["@import 'src/global/component';\n\n:host {\n display: flex;\n}\n\n.tab {\n display: inline-flex;\n align-items: center;\n font-family: var(--six-font-family);\n font-size: var(--six-font-size-small);\n font-weight: var(--six-font-weight-semibold);\n color: var(--six-tab-color);\n padding: var(--six-spacing-medium) var(--six-spacing-large);\n white-space: nowrap;\n user-select: none;\n cursor: pointer;\n width: 100%;\n\n &:focus {\n outline: none;\n }\n\n &:focus-visible {\n outline: var(--six-focus-ring);\n outline-offset: calc(-1 * var(--six-focus-ring-width) - var(--six-focus-ring-offset));\n }\n\n &.tab--active:not(.tab--disabled) {\n color: var(--six-tab-color-active);\n font-weight: var(--six-font-weight-bold);\n }\n\n &.tab--closable {\n padding-right: var(--six-spacing-small);\n }\n\n &.tab--disabled {\n color: var(--six-tab-color-disabled);\n cursor: not-allowed;\n }\n\n &:hover:not(.tab--disabled) {\n color: var(--six-tab-color-hover);\n }\n\n &.tab--left,\n &.tab--right {\n display: inline-block;\n text-align: left;\n }\n\n &.tab--left::before,\n &.tab--right::before {\n display: block;\n font-weight: var(--six-font-weight-bold);\n content: attr(title);\n height: 0;\n overflow: hidden;\n visibility: hidden;\n }\n}\n\n.tab__close-button {\n font-size: var(--six-font-size-large);\n margin-left: var(--six-spacing-xx-small);\n\n &::part(base) {\n padding: var(--six-spacing-xxx-small);\n }\n}\n\n// TAB INDICATOR\n.tab__indicator {\n position: absolute;\n &.tab__indicator--active {\n background-color: var(--six-tab-border-color-active);\n }\n}\n\n// TOP\n.tab--top {\n margin-bottom: var(--six-spacing-xxx-small);\n}\n\n.tab__indicator--top {\n width: 100%;\n bottom: 0;\n height: var(--six-tab-border-width);\n}\n\n// BOTTOM\n.tab--bottom {\n margin-top: var(--six-spacing-xxx-small);\n}\n\n.tab__indicator--bottom {\n width: 100%;\n top: 0;\n height: var(--six-tab-border-width);\n}\n\n// LEFT\n.tab--left {\n margin-right: var(--six-spacing-xxx-small);\n}\n\n.tab__indicator--left {\n height: 100%;\n right: 0;\n top: 0;\n width: var(--six-tab-border-width);\n}\n\n// RIGHT\n.tab--right {\n margin-left: var(--six-spacing-xxx-small);\n}\n\n.tab__indicator--right {\n height: 100%;\n left: 0;\n top: 0;\n width: var(--six-tab-border-width);\n}\n","import { Component, Element, Event, EventEmitter, h, Host, Method, Prop } from '@stencil/core';\nimport { EmptyPayload } from '../../utils/types';\n\nlet id = 0;\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The tab's label.\n *\n * @part base - The component's base wrapper.\n * @part close-button - The close button, which is the icon button's base wrapper.\n */\n\n@Component({\n tag: 'six-tab',\n styleUrl: 'six-tab.scss',\n shadow: true,\n})\nexport class SixTab {\n private componentId = `tab-${++id}`;\n private tab?: HTMLElement;\n\n @Element() host!: HTMLSixTabElement;\n\n /** The name of the tab panel the tab will control. The panel must be located in the same tab group. */\n @Prop({ reflect: true }) panel = '';\n\n /** Set to true to draw the tab in an active state. */\n @Prop({ reflect: true }) active = false;\n\n /** When true, the tab will be rendered with a close icon. */\n @Prop() closable = false;\n\n /** The content to display when the user hovers over the tab's title. Useful if the tab's title has html content in it*/\n @Prop() hoverContent?: string;\n\n /** Set to true to draw the tab in a disabled state. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Emitted when the tab is closable and the close button is activated. */\n @Event({ eventName: 'six-tab-close' }) sixClose!: EventEmitter<EmptyPayload>;\n\n connectedCallback() {\n this.handleCloseClick = this.handleCloseClick.bind(this);\n }\n\n /** Sets focus to the tab. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.tab?.focus(options);\n }\n\n /** Removes focus from the tab. */\n @Method()\n async removeFocus() {\n this.tab?.blur();\n }\n\n private handleCloseClick() {\n this.sixClose.emit();\n }\n\n render() {\n const tabGroup: HTMLSixTabGroupElement | null = this.host.closest('six-tab-group');\n const placement = tabGroup?.placement ?? 'top';\n return (\n // If the user didn't provide an ID, we'll set one, so we can link tabs and tab panels with aria labels\n <Host id={this.host.id || this.componentId}>\n <div\n part=\"base\"\n ref={(el) => (this.tab = el)}\n class={{\n tab: true,\n\n // Placements\n 'tab--top': placement === 'top',\n 'tab--bottom': placement === 'bottom',\n 'tab--left': placement === 'left',\n 'tab--right': placement === 'right',\n\n // States\n 'tab--active': this.active,\n 'tab--closable': this.closable,\n 'tab--disabled': this.disabled,\n }}\n role=\"tab\"\n aria-disabled={this.disabled ? 'true' : 'false'}\n aria-selected={this.active ? 'true' : 'false'}\n tabindex={this.disabled || !this.active ? '-1' : '0'}\n title={this.hoverContent ?? this.host.innerHTML}\n >\n <slot />\n {this.closable && (\n <six-icon-button\n name=\"close\"\n size=\"xSmall\"\n exportparts=\"base:close-button\"\n class=\"tab__close-button\"\n onClick={this.handleCloseClick}\n tabIndex={-1}\n aria-hidden=\"true\"\n />\n )}\n </div>\n <div\n part={this.active ? 'active-tab-indicator' : ''}\n class={{\n tab__indicator: true,\n 'tab__indicator--active': this.active,\n\n // Placements\n 'tab__indicator--top': placement === 'top',\n 'tab__indicator--bottom': placement === 'bottom',\n 'tab__indicator--left': placement === 'left',\n 'tab__indicator--right': placement === 'right',\n }}\n ></div>\n </Host>\n );\n }\n}\n"],"mappings":"gEAAA,MAAMA,EAAY,whECGlB,IAAIC,EAAK,E,MAmBIC,EAAM,MALnB,WAAAC,CAAAC,G,gDAMUC,KAAAC,YAAc,SAASL,IAMNI,KAAKE,MAAG,GAGRF,KAAMG,OAAG,MAG1BH,KAAQI,SAAG,MAMMJ,KAAQK,SAAG,KAmFrC,CA9EC,iBAAAC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AChB,yBAA0BzC,KAAKG,OAG/B,sBAAuBmB,IAAc,MACrC,yBAA0BA,IAAc,SACxC,uBAAwBA,IAAc,OACtC,wBAAyBA,IAAc,W","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import{r as i,c as s,h as e,g as l}from"./p-JoG9I7EO.js";import{h as o}from"./p-j3oIB5oT.js";const a=".sc-six-file-upload-h{position:relative;box-sizing:border-box}.sc-six-file-upload-h *.sc-six-file-upload,.sc-six-file-upload-h *.sc-six-file-upload:before,.sc-six-file-upload-h *.sc-six-file-upload:after{box-sizing:border-box}.sr-only.sc-six-file-upload{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.sc-six-file-upload-h{position:static;display:block}.six-file-upload.sc-six-file-upload six-card.sc-six-file-upload{box-shadow:none;padding:0;width:100%}.six-file-upload__label--highlighted.sc-six-file-upload{color:var(--six-color-action-600)}.six-file-upload__container--full.sc-six-file-upload{border:dashed 1px var(--six-color-web-rock-500)}.six-file-upload__drop-zone.sc-six-file-upload{padding:2rem 0;display:flex;justify-content:center;width:100%;transition:background-color 0.3s}.six-file-upload__drop-zone__spinner-container.sc-six-file-upload{display:flex;align-items:center}.six-file-upload__drop-zone__spinner-container.sc-six-file-upload six-spinner.sc-six-file-upload{margin-right:var(--six-spacing-x-small)}.six-file-upload__drop-zone--compact.sc-six-file-upload{padding:0}.six-file-upload__input.sc-six-file-upload{cursor:pointer;position:absolute;top:0;left:0;width:100%;user-select:none;height:100%;opacity:0;outline:none}.six-file-upload--disabled.sc-six-file-upload .six-file-upload__drop-zone.sc-six-file-upload{background-color:var(--six-color-inactive);cursor:not-allowed}.six-file-upload.sc-six-file-upload:not(.six-file-upload--disabled) .six-file-upload__drop-zone.sc-six-file-upload:hover,.six-file-upload__drop-zone--hover.sc-six-file-upload{background-color:var(--six-color-action-light-to-be-defined)}.six-file-upload.sc-six-file-upload:not(.six-file-upload--disabled) .six-file-upload__drop-zone.sc-six-file-upload:hover.six-file-upload__drop-zone--compact,.six-file-upload__drop-zone--hover.six-file-upload__drop-zone--compact.sc-six-file-upload{background-color:inherit}.six-file-upload--disabled.sc-six-file-upload .six-file-upload__input.sc-six-file-upload{cursor:not-allowed}.six-file-upload__error-text.sc-six-file-upload{font-size:var(--six-input-help-text-font-size-medium)}";const t=class{constructor(e){i(this,e);this.success=s(this,"six-file-upload-success");this.failure=s(this,"six-file-upload-failure");this.isOver=false;this.hasError=false;this.compact=false;this.disabled=false;this.multiple=false;this.uploading=false;this.errorText="";this.invalid=false;this.handleSlotChange=()=>{let i=false;if(this.errorText!=null&&(typeof this.errorText=="string"&&this.errorText.trim().length>0||typeof this.errorText=="object"&&this.errorText.length>0)){i=true}this.hasError=i||o(this.host,"error-text")};this.handleFiles=i=>{if(this.disabled||i.length===0||this.uploading){return}if(!this.multiple&&i.length>1){return this.failure.emit({reason:"Only one file is allowed.",code:"ONLY_ONE_FILE_ALLOWED"})}for(const s of i){if(s==null){return}let e=[];if(this.accept!=null){e=this.accept.replace(/\s/g,"").split(",")}if(e.length>0&&e.indexOf(s.type)===-1){const s=i.length>1?"One or more files have invalid MIME type.":"File has invalid MIME type.";const e=i.length>1?"ONE_OR_MORE_FILES_HAVE_INVALID_MIME_TYPE":"INVALID_MIME_TYPE";return this.failure.emit({reason:s,code:e})}if(this.maxFileSize!=null&&s.size>this.maxFileSize){const s=i.length>1?"One or more files are too big":"File is too big.";const e=i.length>1?"ONE_OR_MULTIPLE_FILES_TOO_BIG":"FILE_TOO_BIG";return this.failure.emit({reason:s,code:e})}}this.success.emit({files:i})};this.onChange=()=>{var i;if(((i=this.fileInput)===null||i===void 0?void 0:i.files)!=null){const i=this.fileInput.files;this.handleFiles(i);this.fileInput.value=""}}}dragenterHandler(){if(!this.disabled){this.isOver=true}}dragoverHandler(){if(!this.disabled){this.isOver=true}}dragleaveHandler(){if(!this.disabled){this.isOver=false}}dropHandler(){if(!this.disabled){this.isOver=false}}componentWillLoad(){this.handleSlotChange()}componentDidLoad(){var i;["dragenter","dragover","dragleave","drop"].forEach((i=>{this.host.addEventListener(i,this.preventDefaults,false);document.body.addEventListener(i,this.preventDefaults,false)}));(i=this.host.shadowRoot)===null||i===void 0?void 0:i.addEventListener("slotchange",this.handleSlotChange)}disconnectedCallback(){var i;["dragenter","dragover","dragleave","drop"].forEach((i=>{this.host.removeEventListener(i,this.preventDefaults,false);document.body.removeEventListener(i,this.preventDefaults,false)}));(i=this.host.shadowRoot)===null||i===void 0?void 0:i.removeEventListener("slotchange",this.handleSlotChange)}preventDefaults(i){i.preventDefault();i.stopPropagation()}renderLabel(){var i;return(i=this.label)!==null&&i!==void 0?i:this.compact?"Upload":e("span",null,"Drop files to upload, or ",e("span",{class:"six-file-upload__label--highlighted"},"browse"))}render(){const i=this.compact?"six-button":"six-card";const s=(Array.isArray(this.errorText)?this.errorText:[this.errorText]).filter((i=>i!=null&&i.trim()!==""));return e("div",{key:"5e0eadc451195cb2c4d5c4f383e1a27b19a80dc4",class:{"six-file-upload":true,"six-file-upload--disabled":this.disabled||this.uploading}},e(i,{key:"16c443d8a887a3098cc04956bc607577ac3630b0",disabled:this.disabled||this.uploading,"aria-invalid":this.invalid?"true":"false",class:{"six-file-upload__container--compact":this.compact,"six-file-upload__container--full":!this.compact}},this.compact&&!this.uploading&&e("six-icon",{key:"9fe02f54c63e61928f0c1f5886982f568b926d0d",slot:"prefix"},"arrow_circle_up"),e("div",{key:"45350fcd292a61ddc6997019448b41d4bc94d5c8",class:{"six-file-upload__drop-zone":true,"six-file-upload__drop-zone--hover":this.isOver,"six-file-upload__drop-zone--compact":this.compact}},this.uploading?e("span",{class:"six-file-upload__drop-zone__spinner-container"},e("six-spinner",null)," Uploading..."):e("div",null,e("span",null,this.renderLabel()),e("input",{class:"six-file-upload__input",type:"file",name:"resume",disabled:this.disabled,accept:this.accept,multiple:this.multiple,onChange:this.onChange,ref:i=>this.fileInput=i})))),e("div",{key:"f5aa7f521d1ef6b2af5c23b697fa1014c87e1827","aria-hidden":this.invalid?"false":"true"},e("slot",{key:"ab2f2bf8bf27b3c67304b61c491e5ab73e76398f",name:"error-text"},s.map((i=>e("six-error",null,e("div",{class:"six-file-upload__error-text"},i)))))))}get host(){return l(this)}};t.style=a;export{t as six_file_upload};
2
- //# sourceMappingURL=p-0eb90caf.entry.js.map
1
+ import{r as i,c as s,h as e,g as l}from"./p-JoG9I7EO.js";import{h as o}from"./p-j3oIB5oT.js";const a=".sc-six-file-upload-h{position:relative;box-sizing:border-box}.sc-six-file-upload-h *.sc-six-file-upload,.sc-six-file-upload-h *.sc-six-file-upload:before,.sc-six-file-upload-h *.sc-six-file-upload:after{box-sizing:border-box}.sr-only.sc-six-file-upload{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.sc-six-file-upload-h{position:static;display:block}.six-file-upload.sc-six-file-upload six-card.sc-six-file-upload{box-shadow:none;padding:0;width:100%}.six-file-upload__label--highlighted.sc-six-file-upload{color:var(--six-color-action-600)}.six-file-upload__container--full.sc-six-file-upload{border:dashed 1px var(--six-color-web-rock-500)}.six-file-upload__drop-zone.sc-six-file-upload{padding:2rem 0;display:flex;justify-content:center;width:100%;transition:background-color 0.3s}.six-file-upload__drop-zone__spinner-container.sc-six-file-upload{display:flex;align-items:center}.six-file-upload__drop-zone__spinner-container.sc-six-file-upload six-spinner.sc-six-file-upload{margin-right:var(--six-spacing-x-small)}.six-file-upload__drop-zone--compact.sc-six-file-upload{padding:0}.six-file-upload__input.sc-six-file-upload{cursor:pointer;position:absolute;top:0;left:0;width:100%;user-select:none;height:100%;opacity:0;outline:none}.six-file-upload--disabled.sc-six-file-upload .six-file-upload__drop-zone.sc-six-file-upload{background-color:var(--six-color-inactive);cursor:not-allowed}.six-file-upload.sc-six-file-upload:not(.six-file-upload--disabled) .six-file-upload__drop-zone.sc-six-file-upload:hover,.six-file-upload__drop-zone--hover.sc-six-file-upload{background-color:var(--six-color-action-light-to-be-defined)}.six-file-upload.sc-six-file-upload:not(.six-file-upload--disabled) .six-file-upload__drop-zone.sc-six-file-upload:hover.six-file-upload__drop-zone--compact,.six-file-upload__drop-zone--hover.six-file-upload__drop-zone--compact.sc-six-file-upload{background-color:inherit}.six-file-upload--disabled.sc-six-file-upload .six-file-upload__input.sc-six-file-upload{cursor:not-allowed}.six-file-upload__error-text.sc-six-file-upload{font-size:var(--six-input-help-text-font-size-medium)}";const t=class{constructor(e){i(this,e);this.success=s(this,"six-file-upload-success");this.failure=s(this,"six-file-upload-failure");this.isOver=false;this.hasError=false;this.compact=false;this.disabled=false;this.multiple=false;this.uploading=false;this.errorText="";this.invalid=false;this.handleSlotChange=()=>{let i=false;if(this.errorText!=null&&(typeof this.errorText=="string"&&this.errorText.trim().length>0||typeof this.errorText=="object"&&this.errorText.length>0)){i=true}this.hasError=i||o(this.host,"error-text")};this.handleFiles=i=>{if(this.disabled||i.length===0||this.uploading){return}if(!this.multiple&&i.length>1){return this.failure.emit({reason:"Only one file is allowed.",code:"ONLY_ONE_FILE_ALLOWED"})}for(const s of i){if(s==null){return}let e=[];if(this.accept!=null){e=this.accept.replace(/\s/g,"").split(",")}if(e.length>0&&e.indexOf(s.type)===-1){const s=i.length>1?"One or more files have invalid MIME type.":"File has invalid MIME type.";const e=i.length>1?"ONE_OR_MORE_FILES_HAVE_INVALID_MIME_TYPE":"INVALID_MIME_TYPE";return this.failure.emit({reason:s,code:e})}if(this.maxFileSize!=null&&s.size>this.maxFileSize){const s=i.length>1?"One or more files are too big":"File is too big.";const e=i.length>1?"ONE_OR_MULTIPLE_FILES_TOO_BIG":"FILE_TOO_BIG";return this.failure.emit({reason:s,code:e})}}this.success.emit({files:i})};this.onChange=()=>{var i;if(((i=this.fileInput)===null||i===void 0?void 0:i.files)!=null){const i=this.fileInput.files;this.handleFiles(i);this.fileInput.value=""}}}dragenterHandler(){if(!this.disabled){this.isOver=true}}dragoverHandler(){if(!this.disabled){this.isOver=true}}dragleaveHandler(){if(!this.disabled){this.isOver=false}}dropHandler(i){var s;if(!this.disabled){this.isOver=false;if((s=i.dataTransfer)===null||s===void 0?void 0:s.files){this.handleFiles(i.dataTransfer.files)}}}componentWillLoad(){this.handleSlotChange()}componentDidLoad(){var i;["dragenter","dragover","dragleave","drop"].forEach((i=>{this.host.addEventListener(i,this.preventDefaults,false);document.body.addEventListener(i,this.preventDefaults,false)}));(i=this.host.shadowRoot)===null||i===void 0?void 0:i.addEventListener("slotchange",this.handleSlotChange)}disconnectedCallback(){var i;["dragenter","dragover","dragleave","drop"].forEach((i=>{this.host.removeEventListener(i,this.preventDefaults,false);document.body.removeEventListener(i,this.preventDefaults,false)}));(i=this.host.shadowRoot)===null||i===void 0?void 0:i.removeEventListener("slotchange",this.handleSlotChange)}preventDefaults(i){i.preventDefault();i.stopPropagation()}renderLabel(){var i;return(i=this.label)!==null&&i!==void 0?i:this.compact?"Upload":e("span",null,"Drop files to upload, or ",e("span",{class:"six-file-upload__label--highlighted"},"browse"))}render(){const i=this.compact?"six-button":"six-card";const s=(Array.isArray(this.errorText)?this.errorText:[this.errorText]).filter((i=>i!=null&&i.trim()!==""));return e("div",{key:"22f6273a8a3ff2134c570ea91e92a78039f69de9",class:{"six-file-upload":true,"six-file-upload--disabled":this.disabled||this.uploading}},e(i,{key:"c0978b21b218b9b8d251a98b6e52838029ca074a",disabled:this.disabled||this.uploading,"aria-invalid":this.invalid?"true":"false",class:{"six-file-upload__container--compact":this.compact,"six-file-upload__container--full":!this.compact}},this.compact&&!this.uploading&&e("six-icon",{key:"f1dcea5ddeab7fbf0eeea7af62cf8483f136a1c6",slot:"prefix"},"arrow_circle_up"),e("div",{key:"e166e39e3d4215de356d59fc3497191ba39e774f",class:{"six-file-upload__drop-zone":true,"six-file-upload__drop-zone--hover":this.isOver,"six-file-upload__drop-zone--compact":this.compact}},this.uploading?e("span",{class:"six-file-upload__drop-zone__spinner-container"},e("six-spinner",null)," Uploading..."):e("div",null,e("span",null,this.renderLabel()),e("input",{class:"six-file-upload__input",type:"file",name:"resume",disabled:this.disabled,accept:this.accept,multiple:this.multiple,onChange:this.onChange,ref:i=>this.fileInput=i})))),e("div",{key:"03cdbd08cd58667b279e0b5b961f88661125cf7d","aria-hidden":this.invalid?"false":"true"},e("slot",{key:"b022f0aa0ce0964da126a4484984553dd73d9094",name:"error-text"},s.map((i=>e("six-error",null,e("div",{class:"six-file-upload__error-text"},i)))))))}get host(){return l(this)}};t.style=a;export{t as six_file_upload};
2
+ //# sourceMappingURL=p-cc7202c3.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["sixFileUploadCss","SixFileUpload","constructor","hostRef","this","isOver","hasError","compact","disabled","multiple","uploading","errorText","invalid","handleSlotChange","validType","trim","length","hasSlot","host","handleFiles","files","failure","emit","reason","code","file","acceptedTypesList","accept","replace","split","indexOf","type","maxFileSize","size","success","onChange","_a","fileInput","value","dragenterHandler","dragoverHandler","dragleaveHandler","dropHandler","event","dataTransfer","componentWillLoad","componentDidLoad","forEach","eventName","addEventListener","preventDefaults","document","body","shadowRoot","disconnectedCallback","removeEventListener","e","preventDefault","stopPropagation","renderLabel","label","h","class","render","Container","errorMessages","Array","isArray","filter","text","key","slot","name","ref","el","map"],"sources":["src/components/six-file-upload/six-file-upload.scss?tag=six-file-upload&encapsulation=scoped","src/components/six-file-upload/six-file-upload.tsx"],"sourcesContent":["@import 'src/global/component';\n\n$over-color: var(--six-color-action-light-to-be-defined);\n$disabled-color: var(--six-color-inactive);\n$transition: 0.3s;\n$margin: 1rem;\n\n:host {\n position: static;\n display: block;\n}\n\n.six-file-upload {\n six-card {\n box-shadow: none;\n padding: 0;\n width: 100%;\n }\n\n &__label {\n &--highlighted {\n color: var(--six-color-action-600);\n }\n }\n\n &__container {\n &--full {\n border: dashed 1px var(--six-color-web-rock-500);\n }\n }\n\n &__drop-zone {\n padding: 2rem 0;\n display: flex;\n justify-content: center;\n width: 100%;\n transition: background-color $transition;\n\n &__spinner-container {\n display: flex;\n align-items: center;\n\n six-spinner {\n margin-right: var(--six-spacing-x-small);\n }\n }\n\n &--compact {\n padding: 0;\n }\n }\n\n &__input {\n cursor: pointer;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n user-select: none;\n height: 100%;\n opacity: 0;\n outline: none;\n }\n\n &--disabled &__drop-zone {\n background-color: $disabled-color;\n cursor: not-allowed;\n }\n\n &:not(.six-file-upload--disabled) &__drop-zone:hover,\n &__drop-zone--hover {\n background-color: $over-color;\n\n &.six-file-upload__drop-zone--compact {\n background-color: inherit;\n }\n }\n\n &--disabled &__input {\n cursor: not-allowed;\n }\n\n &__error-text {\n font-size: var(--six-input-help-text-font-size-medium);\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Listen, Prop, State } from '@stencil/core';\nimport { hasSlot } from '../../utils/slot';\n\nexport interface SixFileUploadSuccessPayload {\n files: FileList;\n}\n\nexport interface SixFileUploadFailurePayload {\n reason: string;\n code:\n | 'ONLY_ONE_FILE_ALLOWED'\n | 'ONE_OR_MORE_FILES_HAVE_INVALID_MIME_TYPE'\n | 'INVALID_MIME_TYPE'\n | 'ONE_OR_MULTIPLE_FILES_TOO_BIG'\n | 'FILE_TOO_BIG';\n}\n\n/**\n * @since 2.0.0\n * @status experimental\n *\n * @slot error-text - Error text that is shown when the status is set to invalid. Alternatively, you can use the error-text prop.\n */\n@Component({\n tag: 'six-file-upload',\n styleUrl: 'six-file-upload.scss',\n scoped: true,\n shadow: false,\n})\nexport class SixFileUpload {\n @Element() readonly host!: HTMLSixFileUploadElement;\n\n private fileInput?: HTMLInputElement;\n\n @State() isOver = false;\n @State() hasError = false;\n\n /** Set to true if file control should be small. */\n @Prop() readonly compact: boolean = false;\n\n /** Label of the drop area. */\n @Prop() readonly label?: string;\n\n /** Set when button is disabled. */\n @Prop() readonly disabled = false;\n\n /** Accepted MIME-Types. */\n @Prop() readonly accept?: string;\n\n /** More than one file allowed. */\n @Prop() readonly multiple = false;\n\n /** Allowed max file size in bytes. */\n @Prop() readonly maxFileSize?: number;\n\n /** Set to true to draw the control in a loading state. */\n @Prop({ reflect: true }) uploading = false;\n\n /** The error message shown, if `invalid` is set to true. */\n @Prop() errorText: string | string[] = '';\n\n /** If this property is set to true and an error message is provided by `errorText`, the error message is displayed. */\n @Prop({ reflect: true }) invalid = false;\n\n /** Triggers when a file is added. */\n @Event({ eventName: 'six-file-upload-success' }) success!: EventEmitter<SixFileUploadSuccessPayload>;\n\n /** Triggers when an uploaded file doesn't match MIME type or max file size. */\n @Event({ eventName: 'six-file-upload-failure' }) failure!: EventEmitter<SixFileUploadFailurePayload>;\n\n @Listen('dragenter', { capture: false })\n dragenterHandler() {\n if (!this.disabled) {\n this.isOver = true;\n }\n }\n\n @Listen('dragover', { capture: false })\n dragoverHandler() {\n if (!this.disabled) {\n this.isOver = true;\n }\n }\n\n @Listen('dragleave', { capture: false })\n dragleaveHandler() {\n if (!this.disabled) {\n this.isOver = false;\n }\n }\n\n @Listen('drop', { capture: false })\n dropHandler(event: DragEvent) {\n if (!this.disabled) {\n this.isOver = false;\n if (event.dataTransfer?.files) {\n this.handleFiles(event.dataTransfer.files);\n }\n }\n }\n\n private handleSlotChange = () => {\n let validType = false;\n\n if (\n this.errorText != null &&\n ((typeof this.errorText == 'string' && this.errorText.trim().length > 0) ||\n (typeof this.errorText == 'object' && this.errorText.length > 0))\n ) {\n validType = true;\n }\n\n this.hasError = validType || hasSlot(this.host, 'error-text');\n };\n\n private handleFiles = (files: FileList) => {\n if (this.disabled || files.length === 0 || this.uploading) {\n return;\n }\n\n if (!this.multiple && files.length > 1) {\n return this.failure.emit({\n reason: 'Only one file is allowed.',\n code: 'ONLY_ONE_FILE_ALLOWED',\n });\n }\n\n for (const file of files) {\n if (file == null) {\n return;\n }\n\n let acceptedTypesList: string[] = [];\n if (this.accept != null) {\n acceptedTypesList = this.accept.replace(/\\s/g, '').split(',');\n }\n\n if (acceptedTypesList.length > 0 && acceptedTypesList.indexOf(file.type) === -1) {\n const reason = files.length > 1 ? 'One or more files have invalid MIME type.' : 'File has invalid MIME type.';\n const code = files.length > 1 ? 'ONE_OR_MORE_FILES_HAVE_INVALID_MIME_TYPE' : 'INVALID_MIME_TYPE';\n return this.failure.emit({ reason, code });\n }\n\n if (this.maxFileSize != null && file.size > this.maxFileSize) {\n const reason = files.length > 1 ? 'One or more files are too big' : 'File is too big.';\n const code = files.length > 1 ? 'ONE_OR_MULTIPLE_FILES_TOO_BIG' : 'FILE_TOO_BIG';\n return this.failure.emit({ reason, code });\n }\n }\n\n this.success.emit({ files } as SixFileUploadSuccessPayload);\n };\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n componentDidLoad() {\n ['dragenter', 'dragover', 'dragleave', 'drop'].forEach((eventName) => {\n this.host.addEventListener(eventName, this.preventDefaults, false);\n document.body.addEventListener(eventName, this.preventDefaults, false);\n });\n this.host.shadowRoot?.addEventListener('slotchange', this.handleSlotChange);\n }\n\n disconnectedCallback() {\n ['dragenter', 'dragover', 'dragleave', 'drop'].forEach((eventName) => {\n this.host.removeEventListener(eventName, this.preventDefaults, false);\n document.body.removeEventListener(eventName, this.preventDefaults, false);\n });\n this.host.shadowRoot?.removeEventListener('slotchange', this.handleSlotChange);\n }\n\n private preventDefaults(e: Event) {\n e.preventDefault();\n e.stopPropagation();\n }\n\n private onChange = () => {\n if (this.fileInput?.files != null) {\n const files = this.fileInput.files;\n this.handleFiles(files);\n this.fileInput.value = '';\n }\n };\n\n private renderLabel() {\n return (\n this.label ??\n (this.compact ? (\n 'Upload'\n ) : (\n <span>\n Drop files to upload, or <span class=\"six-file-upload__label--highlighted\">browse</span>\n </span>\n ))\n );\n }\n\n render() {\n const Container = this.compact ? 'six-button' : 'six-card';\n\n const errorMessages = (Array.isArray(this.errorText) ? this.errorText : [this.errorText]).filter(\n (text) => text != null && text.trim() !== ''\n );\n\n return (\n <div\n class={{\n 'six-file-upload': true,\n 'six-file-upload--disabled': this.disabled || this.uploading,\n }}\n >\n <Container\n disabled={this.disabled || this.uploading}\n aria-invalid={this.invalid ? 'true' : 'false'}\n class={{\n 'six-file-upload__container--compact': this.compact,\n 'six-file-upload__container--full': !this.compact,\n }}\n >\n {this.compact && !this.uploading && <six-icon slot=\"prefix\">arrow_circle_up</six-icon>}\n <div\n class={{\n 'six-file-upload__drop-zone': true,\n 'six-file-upload__drop-zone--hover': this.isOver,\n 'six-file-upload__drop-zone--compact': this.compact,\n }}\n >\n {this.uploading ? (\n <span class=\"six-file-upload__drop-zone__spinner-container\">\n <six-spinner /> Uploading...\n </span>\n ) : (\n <div>\n <span>{this.renderLabel()}</span>\n <input\n class=\"six-file-upload__input\"\n type=\"file\"\n name=\"resume\"\n disabled={this.disabled}\n accept={this.accept}\n multiple={this.multiple}\n onChange={this.onChange}\n ref={(el) => (this.fileInput = el)}\n />\n </div>\n )}\n </div>\n </Container>\n <div aria-hidden={this.invalid ? 'false' : 'true'}>\n <slot name=\"error-text\">\n {errorMessages.map((text) => (\n <six-error>\n <div class=\"six-file-upload__error-text\">{text}</div>\n </six-error>\n ))}\n </slot>\n </div>\n </div>\n );\n }\n}\n"],"mappings":"6FAAA,MAAMA,EAAmB,uoE,MC6BZC,EAAa,MAN1B,WAAAC,CAAAC,G,wGAWWC,KAAMC,OAAG,MACTD,KAAQE,SAAG,MAGHF,KAAOG,QAAY,MAMnBH,KAAQI,SAAG,MAMXJ,KAAQK,SAAG,MAMHL,KAASM,UAAG,MAG7BN,KAASO,UAAsB,GAGdP,KAAOQ,QAAG,MAuC3BR,KAAgBS,iBAAG,KACzB,IAAIC,EAAY,MAEhB,GACEV,KAAKO,WAAa,cACTP,KAAKO,WAAa,UAAYP,KAAKO,UAAUI,OAAOC,OAAS,UAC5DZ,KAAKO,WAAa,UAAYP,KAAKO,UAAUK,OAAS,GAChE,CACAF,EAAY,I,CAGdV,KAAKE,SAAWQ,GAAaG,EAAQb,KAAKc,KAAM,aAAa,EAGvDd,KAAAe,YAAeC,IACrB,GAAIhB,KAAKI,UAAYY,EAAMJ,SAAW,GAAKZ,KAAKM,UAA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,KAAKI,UAAYJ,KAAKM,YAGrDmD,EAACG,EACC,CAAAM,IAAA,2CAAA9D,SAAUJ,KAAKI,UAAYJ,KAAKM,UAAS,eAC3BN,KAAKQ,QAAU,OAAS,QACtCkD,MAAO,CACL,sCAAuC1D,KAAKG,QAC5C,oCAAqCH,KAAKG,UAG3CH,KAAKG,UAAYH,KAAKM,WAAamD,EAAU,YAAAS,IAAA,2CAAAC,KAAK,UAAmC,mBACtFV,EAAA,OAAAS,IAAA,2CACER,MAAO,CACL,6BAA8B,KAC9B,oCAAqC1D,KAAKC,OAC1C,sCAAuCD,KAAKG,UAG7CH,KAAKM,UACJmD,EAAA,QAAMC,MAAM,iDACVD,EAAe,qCAGjBA,EAAA,WACEA,EAAA,YAAOzD,KAAKuD,eACZE,EACE,SAAAC,MAAM,yBACN/B,KAAK,OACLyC,KAAK,SACLhE,SAAUJ,KAAKI,SACfmB,OAAQvB,KAAKuB,OACblB,SAAUL,KAAKK,SACf0B,SAAU/B,KAAK+B,SACfsC,IAAMC,GAAQtE,KAAKiC,UAAYqC,OAMzCb,EAAkB,OAAAS,IAAA,yDAAAlE,KAAKQ,QAAU,QAAU,QACzCiD,EAAA,QAAAS,IAAA,2CAAME,KAAK,cACRP,EAAcU,KAAKN,GAClBR,EAAA,iBACEA,EAAA,OAAKC,MAAM,+BAA+BO,Q","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"six-button.six-spinner.entry.esm.js","sources":["src/components/six-button/six-button.scss?tag=six-button&encapsulation=shadow","src/components/six-button/six-button.tsx","src/components/six-spinner/six-spinner.scss?tag=six-spinner&encapsulation=shadow","src/components/six-spinner/six-spinner.tsx"],"sourcesContent":["@import '../../../src/global/component';\n\n:host {\n display: inline-block;\n width: auto;\n cursor: pointer;\n}\n\n.button {\n display: inline-flex;\n align-items: stretch;\n justify-content: center;\n width: 100%;\n border-style: solid;\n border-width: var(--six-border-width);\n border-radius: 0;\n font-family: var(--six-font-family);\n font-weight: var(--six-font-weight-semibold);\n text-decoration: none;\n user-select: none;\n white-space: nowrap;\n vertical-align: middle;\n padding: 0;\n transition:\n var(--six-transition-fast) background-color,\n var(--six-transition-fast) color,\n var(--six-transition-fast) border,\n var(--six-transition-fast) box-shadow;\n cursor: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n }\n\n &:focus {\n outline: none;\n }\n\n &.button--disabled {\n pointer-events: none;\n }\n\n ::slotted(six-icon) {\n // Clicks on icons shouldn't prevent the button from gaining focus\n pointer-events: none;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n }\n}\n\n.button-wrapper--disabled {\n cursor: not-allowed;\n}\n\n.button__prefix,\n.button__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Standard buttons\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button {\n &:focus-visible {\n outline: var(--six-focus-ring);\n outline-offset: var(--six-focus-ring-offset);\n }\n\n &.button--secondary {\n background-color: var(--six-color-white);\n border-color: var(--six-color-web-rock-900);\n color: var(--six-color-web-rock-900);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-web-rock-100);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-web-rock-300);\n border-color: var(--six-color-web-rock-900);\n border-width: 1px;\n }\n }\n\n &.button--primary {\n background-color: var(--six-color-web-rock-900);\n border-color: var(--six-color-web-rock-900);\n color: var(--six-color-white);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-web-rock-800);\n border-color: var(--six-color-web-rock-800);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-web-rock-900);\n border-color: var(--six-color-web-rock-900);\n opacity: 70%;\n }\n }\n\n &.button--link {\n background-color: transparent;\n border-color: transparent;\n color: var(--six-color-action-500);\n\n &.button--disabled {\n color: var(--six-color-web-rock-400);\n }\n\n &:hover:not(.button--disabled) {\n color: var(--six-color-action-600);\n }\n\n &:active:not(.button--disabled) {\n color: var(--six-color-action-light-to-be-defined);\n }\n }\n\n &.button--danger {\n background-color: var(--six-color-danger-800);\n border-color: var(--six-color-danger-800);\n color: var(--six-color-white);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-danger-900);\n border-color: var(--six-color-danger-900);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-danger-800);\n border-color: var(--six-color-danger-800);\n opacity: 70%;\n }\n }\n\n &.button--warning {\n background-color: var(--six-color-warning-700);\n border-color: var(--six-color-warning-700);\n color: var(--six-color-web-rock-900);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-warning-800);\n border-color: var(--six-color-warning-800);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-warning-700);\n border-color: var(--six-color-warning-700);\n opacity: 70%;\n }\n }\n\n &.button--success {\n background-color: var(--six-color-success-500);\n border-color: var(--six-color-success-500);\n color: var(--six-color-web-rock-900);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-success-600);\n border-color: var(--six-color-success-600);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-success-500);\n border-color: var(--six-color-success-500);\n opacity: 70%;\n }\n }\n\n &.button--action {\n background-color: var(--six-color-action-500);\n border-color: var(--six-color-action-500);\n color: var(--six-color-white);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-action-600);\n border-color: var(--six-color-action-600);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-action-500);\n border-color: var(--six-color-action-500);\n opacity: 70%;\n }\n }\n\n &.button--action-outline {\n border-color: var(--six-color-action-500);\n background-color: var(--six-color-white);\n color: var(--six-color-action-500);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-web-rock-100);\n }\n\n &:active:not(.button--disabled) {\n border-color: var(--six-color-action-500);\n opacity: 70%;\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Size modifiers\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--small {\n font-size: var(--six-button-font-size-small);\n height: var(--six-height-small);\n line-height: calc(var(--six-height-small) - var(--six-border-width) * 2);\n}\n\n.button--medium {\n font-size: var(--six-button-font-size-medium);\n height: var(--six-height-medium);\n line-height: calc(var(--six-height-medium) - var(--six-border-width) * 2);\n}\n\n.button--large {\n font-size: var(--six-button-font-size-large);\n height: var(--six-height-large);\n line-height: calc(var(--six-height-large) - var(--six-border-width) * 2);\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Pill modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--pill {\n &.button--small {\n border-radius: var(--six-height-small);\n }\n\n &.button--medium {\n border-radius: var(--six-height-medium);\n }\n\n &.button--large {\n border-radius: var(--six-height-large);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Circle modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--circle {\n padding-left: 0;\n padding-right: 0;\n font-size: revert;\n\n &.button--small {\n width: var(--six-height-small);\n border-radius: 50%;\n }\n\n &.button--medium {\n width: var(--six-height-medium);\n border-radius: 50%;\n }\n\n &.button--large {\n width: var(--six-height-large);\n border-radius: 50%;\n }\n\n .button__prefix,\n .button__suffix,\n .button__caret {\n display: none;\n\n svg {\n color: var(--six-color-web-rock-900);\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Caret modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--caret {\n .button__suffix {\n display: none;\n }\n\n .button__caret {\n display: flex;\n align-items: center;\n\n svg {\n color: var(--six-color-web-rock-900);\n width: 1em;\n height: 1em;\n }\n }\n}\n\n.button--primary,\n.button--action,\n.button--danger {\n .button__caret {\n svg {\n color: var(--six-color-white);\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Loading modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--loading {\n position: relative;\n cursor: wait;\n\n .button__prefix,\n .button__label,\n .button__suffix,\n .button__caret {\n visibility: hidden;\n }\n\n six-spinner {\n --indicator-color: currentColor;\n position: absolute;\n height: 1em;\n width: 1em;\n top: calc(50% - 0.5em);\n left: calc(50% - 0.5em);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Badges\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button ::slotted(six-badge) {\n position: absolute;\n top: 0;\n right: 0;\n transform: translateY(-50%) translateX(50%);\n pointer-events: none;\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Button spacing\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--has-label {\n &.button--small .button__label {\n padding: 0 var(--six-spacing-small);\n }\n\n &.button--medium .button__label {\n padding: 0 var(--six-spacing-medium);\n }\n\n &.button--large .button__label {\n padding: 0 var(--six-spacing-large);\n }\n}\n\n.button--has-prefix {\n &.button--small {\n padding-left: var(--six-spacing-x-small);\n\n .button__label {\n padding-left: var(--six-spacing-x-small);\n }\n }\n\n &.button--medium {\n padding-left: var(--six-spacing-small);\n\n .button__label {\n padding-left: var(--six-spacing-small);\n }\n }\n\n &.button--large {\n padding-left: var(--six-spacing-small);\n\n .button__label {\n padding-left: var(--six-spacing-small);\n }\n }\n}\n\n.button--has-suffix,\n.button--caret {\n &.button--small {\n padding-right: var(--six-spacing-x-small);\n\n .button__label {\n padding-right: var(--six-spacing-x-small);\n }\n }\n\n &.button--medium {\n padding-right: var(--six-spacing-small);\n\n .button__label {\n padding-right: var(--six-spacing-small);\n }\n }\n\n &.button--large {\n padding-right: var(--six-spacing-small);\n\n .button__label {\n padding-right: var(--six-spacing-small);\n }\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State } from '@stencil/core';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { submitForm } from '../../utils/form';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The button's label.\n * @slot prefix - Used to prepend an icon or similar element to the button.\n * @slot suffix - Used to append an icon or similar element to the button.\n *\n * @part base - The component's base wrapper.\n * @part prefix - The prefix container.\n * @part label - The button's label.\n * @part suffix - The suffix container.\n * @part caret - The button's caret.\n */\n\n@Component({\n tag: 'six-button',\n styleUrl: 'six-button.scss',\n shadow: true,\n})\nexport class SixButton {\n private nativeButton?: HTMLButtonElement | HTMLAnchorElement;\n\n @Element() host!: HTMLSixButtonElement;\n\n @State() hasFocus = false;\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasSuffix = false;\n\n /** The button's type. */\n @Prop({ reflect: true }) type:\n | 'secondary'\n | 'primary'\n | 'link'\n | 'success'\n | 'warning'\n | 'danger'\n | 'action'\n | 'action-outline' = 'primary';\n\n /** The button's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to draw the button with a caret for use with dropdowns, popovers, etc. */\n @Prop() caret = false;\n\n /** Set to true to disable the button. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true to draw the button in a loading state. */\n @Prop({ reflect: true }) loading = false;\n\n /** Set to true to draw a pill-style button with rounded edges. */\n @Prop({ reflect: true }) pill = false;\n\n /** Set to true to draw a circle button. */\n @Prop({ reflect: true }) circle = false;\n\n /** Indicates if activating the button should submit the form. Ignored when `href` is set. */\n @Prop({ reflect: true }) submit = false;\n\n /** Indicates if activating the button should reset the form. */\n @Prop({ reflect: true }) reset = false;\n\n /** An optional name for the button. Ignored when `href` is set. */\n @Prop() name = '';\n\n /** An optional value for the button. Ignored when `href` is set. */\n @Prop() value = '';\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`. */\n @Prop() href?: string;\n\n /** Tells the browser where to open the link. Only used when `href` is set. */\n @Prop() target?: '_blank' | '_parent' | '_self' | '_top';\n\n /** Tells the browser to download the linked file as this filename. Only used when `href` is set. */\n @Prop() download?: string;\n\n /** Emitted when the button loses focus. */\n @Event({ eventName: 'six-button-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the button gains focus. */\n @Event({ eventName: 'six-button-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n /** Sets focus on the button. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeButton?.focus(options);\n }\n\n /** Removes focus from the button. */\n @Method()\n async removeFocus() {\n this.nativeButton?.blur();\n }\n\n private handleSlotChange = () => {\n this.hasLabel = hasSlot(this.host);\n this.hasPrefix = hasSlot(this.host, 'prefix');\n this.hasSuffix = hasSlot(this.host, 'suffix');\n\n // set the correct icon size for suffix and prefix icons\n const prefixIcon = this.host.querySelector('[slot=\"prefix\"]');\n const suffixIcon = this.host.querySelector('[slot=\"suffix\"]');\n\n if (prefixIcon?.tagName.toLowerCase() === 'six-icon') {\n prefixIcon.setAttribute('size', this.mapSizeToIconSize(this.size));\n }\n\n if (suffixIcon?.tagName.toLowerCase() === 'six-icon') {\n suffixIcon.setAttribute('size', this.mapSizeToIconSize(this.size));\n }\n };\n\n private mapSizeToIconSize(buttonSize: 'small' | 'medium' | 'large'): string {\n const sizeMap = {\n small: 'xSmall',\n medium: 'small',\n large: 'medium',\n };\n return sizeMap[buttonSize] || 'small'; // Default to small\n }\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit();\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleClick = (event: MouseEvent) => {\n if (this.disabled || this.loading) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n if (this.submit) {\n event.preventDefault();\n submitForm(this.host);\n }\n };\n\n render() {\n const isLink = this.href != null;\n const isButton = !isLink;\n const Button = isLink ? 'a' : 'button';\n\n return (\n <div onClick={this.handleClick} class={{ 'button-wrapper--disabled': this.disabled }}>\n <Button\n ref={(el) => (this.nativeButton = el)}\n part=\"base\"\n class={{\n button: true,\n\n // Types\n 'button--secondary': this.type === 'secondary',\n 'button--primary': this.type === 'primary',\n 'button--link': this.type === 'link',\n 'button--success': this.type === 'success',\n 'button--warning': this.type === 'warning',\n 'button--danger': this.type === 'danger',\n 'button--action': this.type === 'action',\n 'button--action-outline': this.type === 'action-outline',\n\n // Sizes\n 'button--small': this.size === 'small',\n 'button--medium': this.size === 'medium',\n 'button--large': this.size === 'large',\n\n // Modifiers\n 'button--caret': this.caret,\n 'button--circle': this.circle,\n 'button--disabled': this.disabled,\n 'button--focused': this.hasFocus,\n 'button--loading': this.loading,\n 'button--pill': this.pill,\n 'button--has-label': this.hasLabel,\n 'button--has-prefix': this.hasPrefix,\n 'button--has-suffix': this.hasSuffix,\n }}\n disabled={isButton ? this.disabled : undefined}\n tabindex={this.disabled ? '-1' : undefined}\n type={isButton ? (this.submit ? 'submit' : this.reset ? 'reset' : 'button') : undefined}\n name={isButton ? this.name : undefined}\n value={isButton ? this.value : undefined}\n href={isLink ? this.href : undefined}\n target={isLink && this.target != null ? this.target : undefined}\n download={isLink && this.download != null ? this.download : undefined}\n rel={isLink && this.target != null ? 'noreferrer noopener' : undefined}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n data-testid=\"button\"\n >\n <span part=\"prefix\" class=\"button__prefix\">\n <slot onSlotchange={this.handleSlotChange} name=\"prefix\" />\n </span>\n <span part=\"label\" class=\"button__label\">\n <slot onSlotchange={this.handleSlotChange} />\n </span>\n <span part=\"suffix\" class=\"button__suffix\">\n <slot onSlotchange={this.handleSlotChange} name=\"suffix\" />\n </span>\n {this.caret && (\n <span part=\"caret\" class=\"button__caret\">\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n )}\n\n {this.loading && <six-spinner />}\n </Button>\n </div>\n );\n }\n}\n","@import 'src/global/component';\n\n/**\n * @prop --track-color: The color of the spinner's track.\n * @prop --indicator-color: The color of the spinner's indicator.\n * @prop --stroke-width: The width of the indicator.\n */\n:host {\n --track-color: var(--six-progress-track-color);\n --indicator-color: var(--six-progress-indicator-color);\n --stroke-width: 2px;\n\n display: inline-flex;\n}\n\n.spinner {\n display: inline-block;\n width: 1em;\n height: 1em;\n border-radius: 50%;\n border: solid var(--stroke-width) var(--track-color);\n border-top-color: var(--indicator-color);\n border-right-color: var(--indicator-color);\n animation: 1s linear infinite spin;\n}\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n$color-six-spinner-background: rgba(255, 255, 255, 0.7);\n\n.six-spinner {\n width: auto;\n height: auto;\n position: relative;\n\n .six-spinner__container {\n margin: 0;\n transform: translateX(0);\n }\n\n .six-spinner__container svg {\n transform: translateX(0);\n }\n\n &__container {\n position: relative;\n margin: 0 auto;\n top: calc(50% - 20px);\n z-index: 1;\n }\n\n &__container,\n &__container svg {\n width: 40px;\n height: 40px;\n display: block;\n transform: translateX(40px);\n }\n\n path {\n stroke-dashoffset: 70px;\n stroke-dasharray: 70, 444;\n -webkit-animation: six-spinner 2s cubic-bezier(0.56, 0.39, 0.51, 0.96) infinite;\n animation: six-spinner 2s cubic-bezier(0.56, 0.39, 0.51, 0.96) infinite;\n }\n\n polygon {\n stroke-dasharray: 310;\n stroke-dashoffset: 310;\n animation: big-polygon-draw 2s ease-in-out infinite;\n -webkit-animation: big-polygon-draw 2s ease-in-out infinite;\n }\n\n polygon:nth-child(2),\n polygon:nth-child(3) {\n stroke-dasharray: 110;\n stroke-dashoffset: 110;\n animation: small-polygon-draw 2s ease-in-out infinite;\n -webkit-animation: small-polygon-draw 2s ease-in-out infinite;\n }\n\n @keyframes big-polygon-draw {\n 0%,\n 100% {\n stroke-dashoffset: 310;\n }\n 50% {\n stroke-dashoffset: 140;\n }\n }\n\n @-webkit-keyframes big-polygon-draw {\n 0%,\n 100% {\n stroke-dashoffset: 310;\n }\n 50% {\n stroke-dashoffset: 140;\n }\n }\n\n @keyframes small-polygon-draw {\n 0%,\n 100% {\n stroke-dashoffset: 110;\n }\n 50% {\n stroke-dashoffset: 50;\n }\n }\n\n @-webkit-keyframes small-polygon-draw {\n 0%,\n 100% {\n stroke-dashoffset: 110;\n }\n 50% {\n stroke-dashoffset: 50;\n }\n }\n\n @-webkit-keyframes six-spinner {\n to {\n stroke-dashoffset: -444;\n }\n }\n\n @keyframes six-spinner {\n to {\n stroke-dashoffset: -444;\n }\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @part base - The component's base wrapper.\n * @part svg - The spinner icon.\n */\n@Component({\n tag: 'six-spinner',\n styleUrl: 'six-spinner.scss',\n shadow: true,\n})\nexport class SixSpinner {\n /** Indicates if the spinner is shown as animated SIX or BME logo or a simple spinner. */\n @Prop() logo?: 'six' | 'bme';\n /**\n * **@deprecated** Use `logo=\"six\"` instead.\n *\n * If set to true, the spinner displays the SIX logo.\n */\n @Prop() six?: boolean;\n\n /**\n * Renders a container with a given SVG content.\n */\n private renderWrapper(content: SVGElement) {\n return (\n <span class=\"six-spinner\" aria-busy=\"true\" aria-live=\"polite\">\n <div class=\"six-spinner__container\">{content}</div>\n </span>\n );\n }\n\n /**\n * Renders the SIX logo spinner.\n */\n private renderSIXLogo() {\n const sixLogo = (\n <svg viewBox=\"0 0 40 40\" part=\"svg\">\n <path\n fill=\"none\"\n stroke=\"#de3919\"\n stroke-width=\"5\"\n stroke-linecap=\"round\"\n d=\"M 35 5 V 35 H 5 T 5 5 H 35 V 35 H 5 V 5 H 35 V 35 H -34 V 30 H 7 A 9 8 0 0 0 14 27 L 27 14 A 8 6 0 0 1 33 12 H 42\"\n ></path>\n </svg>\n );\n return this.renderWrapper(sixLogo);\n }\n\n /**\n * Renders the BME logo spinner.\n */\n private renderBMELogo() {\n const bmeLogo = (\n <svg viewBox=\"0 0 45 55\" part=\"svg\">\n <polygon\n fill=\"none\"\n stroke=\"black\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n points=\"4.42 51.96 17.02 31.473 2 31.473 2 22.486 17.02 22.486 4.42 2 15.404 2 30.289 26.98 14.763 51.96 4.42 51.96\"\n />\n <polygon\n fill=\"none\"\n stroke=\"black\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n points=\"42 51.96 31.655 51.96 24.598 40.498 29.831 32.073 42 51.96\"\n />\n <polygon\n fill=\"none\"\n stroke=\"black\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n points=\"24.518 12.719 31.014 2 42 2 29.831 21.637 24.518 12.719\"\n />\n </svg>\n );\n return this.renderWrapper(bmeLogo);\n }\n\n /**\n * Renders a simple spinner.\n */\n private renderSimpleSpinner() {\n return <span part=\"base\" class=\"spinner\" aria-busy=\"true\" aria-live=\"polite\" />;\n }\n\n render() {\n // Check the deprecated `six` property first\n if (this.six) {\n console.warn('The \"six\" prop is deprecated. Use \"logo=\\'six\\'\" instead.');\n return this.renderSIXLogo();\n }\n\n switch (this.logo) {\n case 'six':\n return this.renderSIXLogo();\n case 'bme':\n return this.renderBMELogo();\n default:\n return this.renderSimpleSpinner();\n }\n }\n}\n"],"names":[],"mappings":";;;;AAAA,MAAM,YAAY,GAAG,k+RAAk+R;;MC2B1+R,SAAS,GAAA,MAAA;AALtB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;AAUW,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAChB,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAChB,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK;AACjB,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK;;AAGD,QAAA,IAAI,CAAA,IAAA,GAQN,SAAS;;AAGP,QAAA,IAAI,CAAA,IAAA,GAAiC,QAAQ;;AAG9D,QAAA,IAAK,CAAA,KAAA,GAAG,KAAK;;AAGI,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;;AAGhB,QAAA,IAAO,CAAA,OAAA,GAAG,KAAK;;AAGf,QAAA,IAAI,CAAA,IAAA,GAAG,KAAK;;AAGZ,QAAA,IAAM,CAAA,MAAA,GAAG,KAAK;;AAGd,QAAA,IAAM,CAAA,MAAA,GAAG,KAAK;;AAGd,QAAA,IAAK,CAAA,KAAA,GAAG,KAAK;;AAG9B,QAAA,IAAI,CAAA,IAAA,GAAG,EAAE;;AAGT,QAAA,IAAK,CAAA,KAAA,GAAG,EAAE;AAiCV,QAAA,IAAgB,CAAA,gBAAA,GAAG,MAAK;YAC9B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;YAClC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;YAC7C,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ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,EACjC,CAAA,CAAA,SAAA,EAAA,EACE,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,OAAO,EACD,cAAA,EAAA,GAAG,oBACD,OAAO,EACtB,MAAM,EAAC,6GAA6G,EACpH,CAAA,EACF,CAAA,CAAA,SAAA,EAAA,EACE,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,OAAO,EACD,cAAA,EAAA,GAAG,oBACD,OAAO,EACtB,MAAM,EAAC,4DAA4D,EACnE,CAAA,EACF,CAAA,CAAA,SAAA,EAAA,EACE,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,OAAO,EACD,cAAA,EAAA,GAAG,EACD,gBAAA,EAAA,OAAO,EACtB,MAAM,EAAC,yDAAyD,EAChE,CAAA,CACE,CACP;AACD,QAAA,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;;AAGpC;;AAEG;IACK,mBAAmB,GAAA;QACzB,OAAO,CAAM,CAAA,MAAA,EAAA,EAAA,IAAI,EAAC,MAAM,EAAC,KAAK,EAAC,SAAS,EAAW,WAAA,EAAA,MAAM,EAAW,WAAA,EAAA,QAAQ,GAAG;;IAGjF,MAAM,GAAA;;AAEJ,QAAA,IAAI,IAAI,CAAC,GAAG,EAAE;AACZ,YAAA,OAAO,CAAC,IAAI,CAAC,2DAA2D,CAAC;AACzE,YAAA,OAAO,IAAI,CAAC,aAAa,EAAE;;AAG7B,QAAA,QAAQ,IAAI,CAAC,IAAI;AACf,YAAA,KAAK,KAAK;AACR,gBAAA,OAAO,IAAI,CAAC,aAAa,EAAE;AAC7B,YAAA,KAAK,KAAK;AACR,gBAAA,OAAO,IAAI,CAAC,aAAa,EAAE;AAC7B,YAAA;AACE,gBAAA,OAAO,IAAI,CAAC,mBAAmB,EAAE;;;;;;;;"}
1
+ {"version":3,"file":"six-button.six-spinner.entry.esm.js","sources":["src/components/six-button/six-button.scss?tag=six-button&encapsulation=shadow","src/components/six-button/six-button.tsx","src/components/six-spinner/six-spinner.scss?tag=six-spinner&encapsulation=shadow","src/components/six-spinner/six-spinner.tsx"],"sourcesContent":["@import '../../../src/global/component';\n\n:host {\n display: inline-block;\n width: auto;\n cursor: pointer;\n}\n\n.button {\n display: inline-flex;\n align-items: stretch;\n justify-content: center;\n width: 100%;\n border-style: solid;\n border-width: var(--six-border-width);\n border-radius: 0;\n font-family: var(--six-font-family);\n font-weight: var(--six-font-weight-semibold);\n text-decoration: none;\n user-select: none;\n white-space: nowrap;\n vertical-align: middle;\n padding: 0;\n transition:\n var(--six-transition-fast) background-color,\n var(--six-transition-fast) color,\n var(--six-transition-fast) border,\n var(--six-transition-fast) box-shadow;\n cursor: inherit;\n\n &::-moz-focus-inner {\n border: 0;\n }\n\n &:focus {\n outline: none;\n }\n\n &.button--disabled {\n pointer-events: none;\n }\n\n ::slotted(six-icon) {\n // Clicks on icons shouldn't prevent the button from gaining focus\n pointer-events: none;\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n }\n}\n\n.button-wrapper--disabled {\n cursor: not-allowed;\n}\n\n.button__prefix,\n.button__suffix {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Standard buttons\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button {\n &:focus-visible {\n outline: var(--six-focus-ring);\n outline-offset: var(--six-focus-ring-offset);\n }\n\n &.button--secondary {\n background-color: var(--six-color-white);\n border-color: var(--six-color-web-rock-900);\n color: var(--six-color-web-rock-900);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-web-rock-100);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-web-rock-300);\n border-color: var(--six-color-web-rock-900);\n border-width: 1px;\n }\n }\n\n &.button--primary {\n background-color: var(--six-color-web-rock-900);\n border-color: var(--six-color-web-rock-900);\n color: var(--six-color-white);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-web-rock-800);\n border-color: var(--six-color-web-rock-800);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-web-rock-900);\n border-color: var(--six-color-web-rock-900);\n opacity: 70%;\n }\n }\n\n &.button--link {\n background-color: transparent;\n border-color: transparent;\n color: var(--six-color-action-500);\n\n &.button--disabled {\n color: var(--six-color-web-rock-400);\n }\n\n &:hover:not(.button--disabled) {\n color: var(--six-color-action-600);\n }\n\n &:active:not(.button--disabled) {\n color: var(--six-color-action-light-to-be-defined);\n }\n }\n\n &.button--danger {\n background-color: var(--six-color-danger-800);\n border-color: var(--six-color-danger-800);\n color: var(--six-color-white);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-danger-900);\n border-color: var(--six-color-danger-900);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-danger-800);\n border-color: var(--six-color-danger-800);\n opacity: 70%;\n }\n }\n\n &.button--warning {\n background-color: var(--six-color-warning-700);\n border-color: var(--six-color-warning-700);\n color: var(--six-color-web-rock-900);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-warning-800);\n border-color: var(--six-color-warning-800);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-warning-700);\n border-color: var(--six-color-warning-700);\n opacity: 70%;\n }\n }\n\n &.button--success {\n background-color: var(--six-color-success-500);\n border-color: var(--six-color-success-500);\n color: var(--six-color-web-rock-900);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-success-600);\n border-color: var(--six-color-success-600);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-success-500);\n border-color: var(--six-color-success-500);\n opacity: 70%;\n }\n }\n\n &.button--action {\n background-color: var(--six-color-action-500);\n border-color: var(--six-color-action-500);\n color: var(--six-color-white);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-action-600);\n border-color: var(--six-color-action-600);\n }\n\n &:active:not(.button--disabled) {\n background-color: var(--six-color-action-500);\n border-color: var(--six-color-action-500);\n opacity: 70%;\n }\n }\n\n &.button--action-outline {\n border-color: var(--six-color-action-500);\n background-color: var(--six-color-white);\n color: var(--six-color-action-500);\n\n &.button--disabled {\n background-color: var(--six-color-web-rock-400);\n border-color: var(--six-color-web-rock-400);\n color: var(--six-color-web-rock-700);\n }\n\n &:hover:not(.button--disabled) {\n background-color: var(--six-color-web-rock-100);\n }\n\n &:active:not(.button--disabled) {\n border-color: var(--six-color-action-500);\n opacity: 70%;\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Size modifiers\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--small {\n font-size: var(--six-button-font-size-small);\n height: var(--six-height-small);\n line-height: calc(var(--six-height-small) - var(--six-border-width) * 2);\n}\n\n.button--medium {\n font-size: var(--six-button-font-size-medium);\n height: var(--six-height-medium);\n line-height: calc(var(--six-height-medium) - var(--six-border-width) * 2);\n}\n\n.button--large {\n font-size: var(--six-button-font-size-large);\n height: var(--six-height-large);\n line-height: calc(var(--six-height-large) - var(--six-border-width) * 2);\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Pill modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--pill {\n &.button--small {\n border-radius: var(--six-height-small);\n }\n\n &.button--medium {\n border-radius: var(--six-height-medium);\n }\n\n &.button--large {\n border-radius: var(--six-height-large);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Circle modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--circle {\n padding-left: 0;\n padding-right: 0;\n font-size: revert;\n\n &.button--small {\n width: var(--six-height-small);\n border-radius: 50%;\n }\n\n &.button--medium {\n width: var(--six-height-medium);\n border-radius: 50%;\n }\n\n &.button--large {\n width: var(--six-height-large);\n border-radius: 50%;\n }\n\n .button__prefix,\n .button__suffix,\n .button__caret {\n display: none;\n\n svg {\n color: var(--six-color-web-rock-900);\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Caret modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--caret {\n .button__suffix {\n display: none;\n }\n\n .button__caret {\n display: flex;\n align-items: center;\n\n svg {\n color: var(--six-color-web-rock-900);\n width: 1em;\n height: 1em;\n }\n }\n}\n\n.button--primary,\n.button--action,\n.button--danger {\n .button__caret {\n svg {\n color: var(--six-color-white);\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Loading modifier\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--loading {\n position: relative;\n cursor: wait;\n\n .button__prefix,\n .button__label,\n .button__suffix,\n .button__caret {\n visibility: hidden;\n }\n\n six-spinner {\n --indicator-color: currentColor;\n position: absolute;\n height: 1em;\n width: 1em;\n top: calc(50% - 0.5em);\n left: calc(50% - 0.5em);\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Badges\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button ::slotted(six-badge) {\n position: absolute;\n top: 0;\n right: 0;\n transform: translateY(-50%) translateX(50%);\n pointer-events: none;\n}\n\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// Button spacing\n////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n\n.button--has-label {\n &.button--small .button__label {\n padding: 0 var(--six-spacing-small);\n }\n\n &.button--medium .button__label {\n padding: 0 var(--six-spacing-medium);\n }\n\n &.button--large .button__label {\n padding: 0 var(--six-spacing-large);\n }\n}\n\n.button--has-prefix {\n &.button--small {\n padding-left: var(--six-spacing-x-small);\n\n .button__label {\n padding-left: var(--six-spacing-x-small);\n }\n }\n\n &.button--medium {\n padding-left: var(--six-spacing-small);\n\n .button__label {\n padding-left: var(--six-spacing-small);\n }\n }\n\n &.button--large {\n padding-left: var(--six-spacing-small);\n\n .button__label {\n padding-left: var(--six-spacing-small);\n }\n }\n}\n\n.button--has-suffix,\n.button--caret {\n &.button--small {\n padding-right: var(--six-spacing-x-small);\n\n .button__label {\n padding-right: var(--six-spacing-x-small);\n }\n }\n\n &.button--medium {\n padding-right: var(--six-spacing-small);\n\n .button__label {\n padding-right: var(--six-spacing-small);\n }\n }\n\n &.button--large {\n padding-right: var(--six-spacing-small);\n\n .button__label {\n padding-right: var(--six-spacing-small);\n }\n }\n}\n","import { Component, Element, Event, EventEmitter, h, Method, Prop, State } from '@stencil/core';\nimport { hasSlot } from '../../utils/slot';\nimport { EmptyPayload } from '../../utils/types';\nimport { submitForm } from '../../utils/form';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @slot - The button's label.\n * @slot prefix - Used to prepend an icon or similar element to the button.\n * @slot suffix - Used to append an icon or similar element to the button.\n *\n * @part base - The component's base wrapper.\n * @part prefix - The prefix container.\n * @part label - The button's label.\n * @part suffix - The suffix container.\n * @part caret - The button's caret.\n */\n\n@Component({\n tag: 'six-button',\n styleUrl: 'six-button.scss',\n shadow: true,\n})\nexport class SixButton {\n private nativeButton?: HTMLButtonElement | HTMLAnchorElement;\n\n @Element() host!: HTMLSixButtonElement;\n\n @State() hasFocus = false;\n @State() hasLabel = false;\n @State() hasPrefix = false;\n @State() hasSuffix = false;\n\n /** The button's type. */\n @Prop({ reflect: true }) type:\n | 'secondary'\n | 'primary'\n | 'link'\n | 'success'\n | 'warning'\n | 'danger'\n | 'action'\n | 'action-outline' = 'primary';\n\n /** The button's size. */\n @Prop({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Set to true to draw the button with a caret for use with dropdowns, popovers, etc. */\n @Prop() caret = false;\n\n /** Set to true to disable the button. */\n @Prop({ reflect: true }) disabled = false;\n\n /** Set to true to draw the button in a loading state. */\n @Prop({ reflect: true }) loading = false;\n\n /** Set to true to draw a pill-style button with rounded edges. */\n @Prop({ reflect: true }) pill = false;\n\n /** Set to true to draw a circle button. */\n @Prop({ reflect: true }) circle = false;\n\n /** Indicates if activating the button should submit the form. Ignored when `href` is set. */\n @Prop({ reflect: true }) submit = false;\n\n /** Indicates if activating the button should reset the form. */\n @Prop({ reflect: true }) reset = false;\n\n /** An optional name for the button. Ignored when `href` is set. */\n @Prop() name = '';\n\n /** An optional value for the button. Ignored when `href` is set. */\n @Prop() value = '';\n\n /** When set, the underlying button will be rendered as an `<a>` with this `href` instead of a `<button>`. */\n @Prop() href?: string;\n\n /** Tells the browser where to open the link. Only used when `href` is set. */\n @Prop() target?: '_blank' | '_parent' | '_self' | '_top';\n\n /** Tells the browser to download the linked file as this filename. Only used when `href` is set. */\n @Prop() download?: string;\n\n /** Emitted when the button loses focus. */\n @Event({ eventName: 'six-button-blur' }) sixBlur!: EventEmitter<EmptyPayload>;\n\n /** Emitted when the button gains focus. */\n @Event({ eventName: 'six-button-focus' }) sixFocus!: EventEmitter<EmptyPayload>;\n\n componentWillLoad() {\n this.handleSlotChange();\n }\n\n /** Sets focus on the button. */\n @Method()\n async setFocus(options?: FocusOptions) {\n this.nativeButton?.focus(options);\n }\n\n /** Removes focus from the button. */\n @Method()\n async removeFocus() {\n this.nativeButton?.blur();\n }\n\n private handleSlotChange = () => {\n this.hasLabel = hasSlot(this.host);\n this.hasPrefix = hasSlot(this.host, 'prefix');\n this.hasSuffix = hasSlot(this.host, 'suffix');\n\n // set the correct icon size for suffix and prefix icons\n const prefixIcon = this.host.querySelector('[slot=\"prefix\"]');\n const suffixIcon = this.host.querySelector('[slot=\"suffix\"]');\n\n if (prefixIcon?.tagName.toLowerCase() === 'six-icon') {\n prefixIcon.setAttribute('size', this.mapSizeToIconSize(this.size));\n }\n\n if (suffixIcon?.tagName.toLowerCase() === 'six-icon') {\n suffixIcon.setAttribute('size', this.mapSizeToIconSize(this.size));\n }\n };\n\n private mapSizeToIconSize(buttonSize: 'small' | 'medium' | 'large'): string {\n const sizeMap = {\n small: 'xSmall',\n medium: 'small',\n large: 'medium',\n };\n return sizeMap[buttonSize] || 'small'; // Default to small\n }\n\n private handleBlur = () => {\n this.hasFocus = false;\n this.sixBlur.emit();\n };\n\n private handleFocus = () => {\n this.hasFocus = true;\n this.sixFocus.emit();\n };\n\n private handleClick = (event: MouseEvent) => {\n if (this.disabled || this.loading) {\n event.preventDefault();\n event.stopPropagation();\n return;\n }\n\n if (this.submit) {\n event.preventDefault();\n submitForm(this.host);\n }\n };\n\n render() {\n const isLink = this.href != null;\n const isButton = !isLink;\n const Button = isLink ? 'a' : 'button';\n\n return (\n <div onClick={this.handleClick} class={{ 'button-wrapper--disabled': this.disabled }}>\n <Button\n ref={(el) => (this.nativeButton = el)}\n part=\"base\"\n class={{\n button: true,\n\n // Types\n 'button--secondary': this.type === 'secondary',\n 'button--primary': this.type === 'primary',\n 'button--link': this.type === 'link',\n 'button--success': this.type === 'success',\n 'button--warning': this.type === 'warning',\n 'button--danger': this.type === 'danger',\n 'button--action': this.type === 'action',\n 'button--action-outline': this.type === 'action-outline',\n\n // Sizes\n 'button--small': this.size === 'small',\n 'button--medium': this.size === 'medium',\n 'button--large': this.size === 'large',\n\n // Modifiers\n 'button--caret': this.caret,\n 'button--circle': this.circle,\n 'button--disabled': this.disabled,\n 'button--focused': this.hasFocus,\n 'button--loading': this.loading,\n 'button--pill': this.pill,\n 'button--has-label': this.hasLabel,\n 'button--has-prefix': this.hasPrefix,\n 'button--has-suffix': this.hasSuffix,\n }}\n disabled={isButton ? this.disabled : undefined}\n tabindex={this.disabled ? '-1' : undefined}\n type={isButton ? (this.submit ? 'submit' : this.reset ? 'reset' : 'button') : undefined}\n name={isButton ? this.name : undefined}\n value={isButton ? this.value : undefined}\n href={isLink ? this.href : undefined}\n target={isLink && this.target != null ? this.target : undefined}\n download={isLink && this.download != null ? this.download : undefined}\n rel={isLink && this.target != null ? 'noreferrer noopener' : undefined}\n onBlur={this.handleBlur}\n onFocus={this.handleFocus}\n data-testid=\"button\"\n >\n <span part=\"prefix\" class=\"button__prefix\">\n <slot onSlotchange={this.handleSlotChange} name=\"prefix\" />\n </span>\n <span part=\"label\" class=\"button__label\">\n <slot onSlotchange={this.handleSlotChange} />\n </span>\n <span part=\"suffix\" class=\"button__suffix\">\n <slot onSlotchange={this.handleSlotChange} name=\"suffix\" />\n </span>\n {this.caret && (\n <span part=\"caret\" class=\"button__caret\">\n <svg\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n >\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </span>\n )}\n\n {this.loading && <six-spinner />}\n </Button>\n </div>\n );\n }\n}\n","@import 'src/global/component';\n\n/**\n * @prop --track-color: The color of the spinner's track.\n * @prop --indicator-color: The color of the spinner's indicator.\n * @prop --stroke-width: The width of the indicator.\n */\n:host {\n --track-color: var(--six-progress-track-color);\n --indicator-color: var(--six-progress-indicator-color);\n --stroke-width: 2px;\n\n display: inline-flex;\n font-size: 40px;\n}\n\n.spinner {\n display: inline-block;\n width: 1em;\n height: 1em;\n border-radius: 50%;\n border: solid var(--stroke-width) var(--track-color);\n border-top-color: var(--indicator-color);\n border-right-color: var(--indicator-color);\n animation: 1s linear infinite spin;\n}\n\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.six-spinner {\n display: inline-block;\n width: 1em;\n height: 1em;\n line-height: 0;\n\n &__container svg {\n display: block;\n }\n\n path {\n stroke-dashoffset: 70px;\n stroke-dasharray: 70, 444;\n -webkit-animation: six-spinner 2s cubic-bezier(0.56, 0.39, 0.51, 0.96) infinite;\n animation: six-spinner 2s cubic-bezier(0.56, 0.39, 0.51, 0.96) infinite;\n }\n\n polygon {\n stroke-dasharray: 310;\n stroke-dashoffset: 310;\n animation: big-polygon-draw 2s ease-in-out infinite;\n -webkit-animation: big-polygon-draw 2s ease-in-out infinite;\n }\n\n polygon:nth-child(2),\n polygon:nth-child(3) {\n stroke-dasharray: 110;\n stroke-dashoffset: 110;\n animation: small-polygon-draw 2s ease-in-out infinite;\n -webkit-animation: small-polygon-draw 2s ease-in-out infinite;\n }\n\n @keyframes big-polygon-draw {\n 0%,\n 100% {\n stroke-dashoffset: 310;\n }\n 50% {\n stroke-dashoffset: 140;\n }\n }\n\n @-webkit-keyframes big-polygon-draw {\n 0%,\n 100% {\n stroke-dashoffset: 310;\n }\n 50% {\n stroke-dashoffset: 140;\n }\n }\n\n @keyframes small-polygon-draw {\n 0%,\n 100% {\n stroke-dashoffset: 110;\n }\n 50% {\n stroke-dashoffset: 50;\n }\n }\n\n @-webkit-keyframes small-polygon-draw {\n 0%,\n 100% {\n stroke-dashoffset: 110;\n }\n 50% {\n stroke-dashoffset: 50;\n }\n }\n\n @-webkit-keyframes six-spinner {\n to {\n stroke-dashoffset: -444;\n }\n }\n\n @keyframes six-spinner {\n to {\n stroke-dashoffset: -444;\n }\n }\n}\n","import { Component, h, Prop } from '@stencil/core';\n\n/**\n * @since 1.0\n * @status stable\n *\n * Forked from https://github.com/shoelace-style/shoelace version v2.0.0-beta27.\n *\n * @part base - The component's base wrapper.\n * @part svg - The spinner icon.\n */\n@Component({\n tag: 'six-spinner',\n styleUrl: 'six-spinner.scss',\n shadow: true,\n})\nexport class SixSpinner {\n /** Indicates if the spinner is shown as animated SIX or BME logo or a simple spinner. */\n @Prop() logo?: 'six' | 'bme';\n /**\n * **@deprecated** Use `logo=\"six\"` instead.\n *\n * If set to true, the spinner displays the SIX logo.\n */\n @Prop() six?: boolean;\n\n /**\n * Renders a container with a given SVG content.\n */\n private renderWrapper(content: SVGElement) {\n return (\n <span class=\"six-spinner\" aria-busy=\"true\" aria-live=\"polite\">\n <div class=\"six-spinner__container\">{content}</div>\n </span>\n );\n }\n\n /**\n * Renders the SIX logo spinner.\n */\n private renderSIXLogo() {\n const sixLogo = (\n <svg viewBox=\"0 0 40 40\" part=\"svg\">\n <path\n fill=\"none\"\n stroke=\"#de3919\"\n stroke-width=\"5\"\n stroke-linecap=\"round\"\n d=\"M 35 5 V 35 H 5 T 5 5 H 35 V 35 H 5 V 5 H 35 V 35 H -34 V 30 H 7 A 9 8 0 0 0 14 27 L 27 14 A 8 6 0 0 1 33 12 H 42\"\n ></path>\n </svg>\n );\n return this.renderWrapper(sixLogo);\n }\n\n /**\n * Renders the BME logo spinner.\n */\n private renderBMELogo() {\n const bmeLogo = (\n <svg viewBox=\"0 0 45 55\" part=\"svg\">\n <polygon\n fill=\"none\"\n stroke=\"black\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n points=\"4.42 51.96 17.02 31.473 2 31.473 2 22.486 17.02 22.486 4.42 2 15.404 2 30.289 26.98 14.763 51.96 4.42 51.96\"\n />\n <polygon\n fill=\"none\"\n stroke=\"black\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n points=\"42 51.96 31.655 51.96 24.598 40.498 29.831 32.073 42 51.96\"\n />\n <polygon\n fill=\"none\"\n stroke=\"black\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n points=\"24.518 12.719 31.014 2 42 2 29.831 21.637 24.518 12.719\"\n />\n </svg>\n );\n return this.renderWrapper(bmeLogo);\n }\n\n /**\n * Renders a simple spinner.\n */\n private renderSimpleSpinner() {\n return <span part=\"base\" class=\"spinner\" aria-busy=\"true\" aria-live=\"polite\" />;\n }\n\n render() {\n // Check the deprecated `six` property first\n if (this.six) {\n console.warn('The \"six\" prop is deprecated. Use \"logo=\\'six\\'\" instead.');\n return this.renderSIXLogo();\n }\n\n switch (this.logo) {\n case 'six':\n return this.renderSIXLogo();\n case 'bme':\n return this.renderBMELogo();\n default:\n return this.renderSimpleSpinner();\n }\n }\n}\n"],"names":[],"mappings":";;;;AAAA,MAAM,YAAY,GAAG,k+RAAk+R;;MC2B1+R,SAAS,GAAA,MAAA;AALtB,IAAA,WAAA,CAAA,OAAA,EAAA;;;;AAUW,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAChB,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAChB,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK;AACjB,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK;;AAGD,QAAA,IAAI,CAAA,IAAA,GAQN,SAAS;;AAGP,QAAA,IAAI,CAAA,IAAA,GAAiC,QAAQ;;AAG9D,QAAA,IAAK,CAAA,KAAA,GAAG,KAAK;;AAGI,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;;AAGhB,QAAA,IAAO,CAAA,OAAA,GAAG,KAAK;;AAGf,QAAA,IAAI,CAAA,IAAA,GAAG,KAAK;;AAGZ,QAAA,IAAM,CAAA,MAAA,GAAG,KAAK;;AAGd,QAAA,IAAM,CAAA,MAAA,GAAG,KAAK;;AAGd,QAAA,IAAK,CAAA,KAAA,GAAG,KAAK;;AAG9B,QAAA,IAAI,CAAA,IAAA,GAAG,EAAE;;AAGT,QAAA,IAAK,CAAA,KAAA,GAAG,EAAE;AAiCV,QAAA,IAAgB,CAAA,gBAAA,GAAG,MAAK;YAC9B,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;YAClC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC;YAC7C,IAAI,CAAC,SAAS,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