@aquera/nile-elements 0.0.17 → 0.0.19

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 (57) hide show
  1. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button/nile-button.css.js +113 -64
  2. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-button/nile-button.css.js.map +1 -1
  3. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.css.js +4 -0
  4. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.css.js.map +1 -1
  5. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.d.ts +1 -0
  6. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.js +25 -10
  7. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-content-editor/nile-content-editor.js.map +1 -1
  8. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-group/nile-radio-group.js +1 -1
  9. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-radio-group/nile-radio-group.js.map +1 -1
  10. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.css.js +9 -6
  11. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.css.js.map +1 -1
  12. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.d.ts +1 -0
  13. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js +9 -3
  14. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/src/nile-switcher/nile-switcher.js.map +1 -1
  15. package/.rollup.cache/opt/atlassian/pipelines/agent/build/packages/nile-elements/dist/tsconfig.tsbuildinfo +1 -1
  16. package/demo/index.html +18 -1
  17. package/dist/index.iife.js +324 -263
  18. package/dist/nile-button/nile-button.css.cjs.js +1 -1
  19. package/dist/nile-button/nile-button.css.cjs.js.map +1 -1
  20. package/dist/nile-button/nile-button.css.esm.js +115 -66
  21. package/dist/nile-content-editor/nile-content-editor.cjs.js +1 -1
  22. package/dist/nile-content-editor/nile-content-editor.cjs.js.map +1 -1
  23. package/dist/nile-content-editor/nile-content-editor.css.cjs.js +1 -1
  24. package/dist/nile-content-editor/nile-content-editor.css.cjs.js.map +1 -1
  25. package/dist/nile-content-editor/nile-content-editor.css.esm.js +4 -0
  26. package/dist/nile-content-editor/nile-content-editor.esm.js +7 -7
  27. package/dist/nile-radio-group/nile-radio-group.cjs.js +1 -1
  28. package/dist/nile-radio-group/nile-radio-group.cjs.js.map +1 -1
  29. package/dist/nile-radio-group/nile-radio-group.esm.js +1 -1
  30. package/dist/nile-switcher/nile-switcher.cjs.js +1 -1
  31. package/dist/nile-switcher/nile-switcher.cjs.js.map +1 -1
  32. package/dist/nile-switcher/nile-switcher.css.cjs.js +1 -1
  33. package/dist/nile-switcher/nile-switcher.css.cjs.js.map +1 -1
  34. package/dist/nile-switcher/nile-switcher.css.esm.js +11 -8
  35. package/dist/nile-switcher/nile-switcher.esm.js +26 -21
  36. package/dist/src/nile-button/nile-button.css.js +113 -64
  37. package/dist/src/nile-button/nile-button.css.js.map +1 -1
  38. package/dist/src/nile-content-editor/nile-content-editor.css.js +4 -0
  39. package/dist/src/nile-content-editor/nile-content-editor.css.js.map +1 -1
  40. package/dist/src/nile-content-editor/nile-content-editor.d.ts +1 -0
  41. package/dist/src/nile-content-editor/nile-content-editor.js +25 -10
  42. package/dist/src/nile-content-editor/nile-content-editor.js.map +1 -1
  43. package/dist/src/nile-radio-group/nile-radio-group.js +1 -1
  44. package/dist/src/nile-radio-group/nile-radio-group.js.map +1 -1
  45. package/dist/src/nile-switcher/nile-switcher.css.js +9 -6
  46. package/dist/src/nile-switcher/nile-switcher.css.js.map +1 -1
  47. package/dist/src/nile-switcher/nile-switcher.d.ts +1 -0
  48. package/dist/src/nile-switcher/nile-switcher.js +9 -3
  49. package/dist/src/nile-switcher/nile-switcher.js.map +1 -1
  50. package/dist/tsconfig.tsbuildinfo +1 -1
  51. package/package.json +1 -1
  52. package/src/nile-button/nile-button.css.ts +113 -64
  53. package/src/nile-content-editor/nile-content-editor.css.ts +4 -0
  54. package/src/nile-content-editor/nile-content-editor.ts +24 -10
  55. package/src/nile-radio-group/nile-radio-group.ts +1 -1
  56. package/src/nile-switcher/nile-switcher.css.ts +9 -6
  57. package/src/nile-switcher/nile-switcher.ts +10 -2
@@ -1,2 +1,2 @@
1
- System.register(["../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";var o,_templateObject,r;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){o=_index001CjsJs.i;}],execute:function(){_export("s",r=o(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n display: inline-block;\n position: relative;\n width: auto;\n cursor: pointer;\n }\n\n .button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-style: solid;\n border-width: 1px;\n font-style: normal;\n font-weight: var(--nile-font-weight-regular);\n font-family: var(--nile-font-family-serif);\n font-size: var(--nile-type-scale-3);\n text-align: center;\n letter-spacing: 0.2px;\n text-decoration: none;\n user-select: none;\n white-space: nowrap;\n vertical-align: middle;\n transition: var(--nile-transition-duration-default) background-color,\n var(--nile-transition-duration-default) color,\n var(--nile-transition-duration-default) border,\n var(--nile-transition-duration-default) box-shadow;\n cursor: inherit;\n padding: var(--nile-spacing-2-x);\n gap: var(--nile-spacing-2-x);\n border-radius: var(--nile-radius-base-standard);\n line-height: var(--nile-type-scale-3);\n box-sizing: border-box;\n height: 38px;\n }\n\n .button::-moz-focus-inner {\n border: 0;\n }\n\n .button:focus {\n outline: none;\n }\n\n .button:focus-visible {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n\n .button--disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .button--disabled * {\n pointer-events: none;\n }\n\n .button__label::slotted(nile-icon) {\n /* vertical-align: -2px; */\n }\n\n .button--standard.button--secondary {\n background-color: var(--nile-colors-neutral-400);\n border-color: var(--nile-colors-neutral-400);\n color: var(--nile-colors-neutral-900);\n }\n\n .button--standard.button--secondary:hover:not(.button--disabled) {\n background-color: var(--nile-colors-neutral-500);\n border : none;\n box-shadow: 0px 4px 8px var(--nile-colors-dark-200);\n color: var(--nile-colors-neutral-900);\n }\n\n .button--standard.button--secondary:active:not(.button--disabled) {\n background-color: var(--nile-colors-neutral-500);\n border-color: var(--nile-colors-neutral-700);\n color: var(--nile-colors-neutral-900);\n }\n\n .button--standard.button--secondary.button--disabled {\n background-color: var(--nile-colors-neutral-400);\n border-color: var(--nile-colors-neutral-400);\n color: var(--nile-colors-dark-500);\n cursor: not-allowed;\n }\n\n .button--standard.button--secondary.button--disabled:hover,\n .button--standard.button--secondary.button--disabled:active {\n background-color: var(--nile-colors-neutral-400);\n border-color: var(--nile-colors-neutral-400);\n color: var(--nile-colors-dark-500);\n box-shadow: none;\n }\n\n /* Primary */\n .button--standard.button--primary {\n background-color: var(--nile-colors-primary-600);\n border-color: var(--nile-colors-primary-600);\n color: var(--nile-colors-white-base);\n }\n\n .button--standard.button--primary:hover:not(.button--disabled) {\n background-color: var(--nile-colors-primary-700);\n border-color: var(--nile-colors-primary-700);\n box-shadow: 0px 4px 8px var(--nile-colors-dark-200);\n color: var(--nile-colors-white-base);\n }\n\n .button--standard.button--primary:active:not(.button--disabled) {\n background-color: var(--nile-colors-primary-700);\n border-color: var(--nile-colors-primary-900);\n color: var(--nile-colors-white-base);\n }\n\n .button--standard.button--primary.button--disabled {\n background-color: var(--nile-colors-neutral-700);\n border-color: var(--nile-colors-neutral-700);\n color: var(--nile-colors-white-base);\n cursor: not-allowed;\n }\n\n .button--standard.button--primary.button--disabled:hover,\n .button--standard.button--primary.button--disabled:active {\n background-color: var(--nile-colors-neutral-700);\n border-color: var(--nile-colors-neutral-700);\n color: var(--nile-colors-white-base);\n box-shadow: none;\n }\n\n /* Tertiary */\n .button--standard.button--tertiary {\n background-color: var(--nile-colors-white-base);\n border-color: var(--nile-colors-neutral-500);\n color: var(--nile-colors-dark-900);\n box-shadow: 0px 2px 4px var(--nile-colors-dark-200);\n }\n\n .button--standard.button--tertiary:hover:not(.button--disabled) {\n background-color: var(--nile-colors-neutral-100);\n border-color: var(--nile-colors-neutral-500);\n box-shadow: 0px 4px 8px var(--nile-colors-dark-200);\n color: var(--nile-colors-neutral-700);\n }\n\n .button--standard.button--tertiary:active:not(.button--disabled) {\n background-color: var(--nile-colors-neutral-400);\n border-color: var(--nile-colors-neutral-700);\n color: var(--nile-colors-neutral-700);\n }\n .button--standard.button--tertiary.button--disabled {\n border-color: #e5e9eb;\n background-color: var(--nile-colors-white-base);\n color: var(--nile-colors-neutral-700);\n cursor: not-allowed;\n box-shadow: none;\n }\n\n .button--standard.button--tertiary.button--disabled:hover,\n .button--standard.button--tertiary.button--disabled:active {\n border-color: #e5e9eb;\n background-color: var(--nile-colors-white-base);\n color: var(--nile-colors-neutral-700);\n box-shadow: none;\n }\n\n /* caution */\n .button--standard.button--caution {\n background-color: var(--nile-colors-red-500);\n border-color: var(--nile-colors-red-500);\n color: var(--nile-colors-white-base);\n }\n .button--standard.button--caution:hover:not(.button--disabled) {\n background-color: var(--nile-colors-red-700);\n border-color: var(--nile-colors-red-700);\n color: var(--nile-colors-white-base);\n }\n\n .button--standard.button--caution:active:not(.button--disabled) {\n background-color: var(--nile-colors-red-700);\n border-color: var(--nile-colors-red-500);\n color: var(--nile-colors-white-base);\n }\n\n /*\n * Outline buttons\n */\n\n .button--outline {\n background: none;\n border: solid 2px;\n }\n\n /* Default */\n .button--outline.button--secondary {\n border-color: var(--nile-colors-neutral-300);\n color: var(--nile-colors-neutral-700);\n }\n\n .button--outline.button--secondary:hover:not(.button--disabled),\n .button--outline.button--secondary.button--checked:not(.button--disabled) {\n border-color: var(--nile-colors-primary-600);\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--secondary:active:not(.button--disabled) {\n border-color: var(--nile-colors-neutral-700);\n color: var(--nile-colors-white-base);\n }\n\n /* Primary */\n .button--outline.button--primary {\n border-color: var(--nile-colors-primary-600);\n color: var(--nile-colors-primary-600);\n }\n\n .button--outline.button--primary:hover:not(.button--disabled),\n .button--outline.button--primary.button--checked:not(.button--disabled) {\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--primary:active:not(.button--disabled) {\n border-color: var(--nile-colors-primary-700);\n color: var(--nile-colors-white-base);\n }\n\n /* Success */\n .button--outline.button--success {\n border-color: var(--nile-colors-green-600);\n color: var(--nile-colors-green-600);\n }\n\n .button--outline.button--success:hover:not(.button--disabled),\n .button--outline.button--success.button--checked:not(.button--disabled) {\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--success:active:not(.button--disabled) {\n border-color: var(--nile-colors-green-700);\n color: var(--nile-colors-white-base);\n }\n\n /* Neutral */\n .button--outline.button--neutral {\n border-color: var(--nile-colors-neutral-600);\n color: var(--nile-colors-neutral-600);\n }\n\n .button--outline.button--neutral:hover:not(.button--disabled),\n .button--outline.button--neutral.button--checked:not(.button--disabled) {\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--neutral:active:not(.button--disabled) {\n border-color: var(--nile-colors-neutral-700);\n color: var(--nile-colors-white-base);\n }\n\n /* Warning */\n .button--outline.button--warning {\n border-color: var(--nile-colors-orange-600);\n color: var(--nile-colors-orange-600);\n }\n\n .button--outline.button--warning:hover:not(.button--disabled),\n .button--outline.button--warning.button--checked:not(.button--disabled) {\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--warning:active:not(.button--disabled) {\n border-color: var(--nile-colors-orange-700);\n color: var(--nile-colors-white-base);\n }\n\n /* Danger */\n .button--outline.button--danger {\n border-color: var(--nile-colors-red-600);\n color: var(--nile-colors-red-600);\n }\n\n .button--outline.button--danger:hover:not(.button--disabled),\n .button--outline.button--danger.button--checked:not(.button--disabled) {\n background-color: var(--nile-colors-red-600);\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--danger:active:not(.button--disabled) {\n border-color: var(--nile-colors-red-700);\n background-color: var(--nile-colors-red-700);\n color: var(--nile-colors-white-base);\n }\n\n @media (forced-colors: active) {\n .button.button--outline.button--checked:not(.button--disabled) {\n outline: solid 2px transparent;\n }\n }\n\n /*\n * Pill modifier\n */\n\n .button--pill.button--small {\n border-radius: 24px;\n }\n\n .button--pill.button--medium {\n border-radius: 32px;\n }\n\n /*\n * Circle modifier\n */\n\n .button--circle {\n padding-left: 0;\n padding-right: 0;\n }\n\n .button--circle.button--small {\n width: 24px;\n height: 24px;\n border-radius: 50%;\n }\n\n .button--circle.button--medium {\n width: 38px;\n height: 38px;\n border-radius: 50%;\n }\n\n .button--circle .button__prefix,\n .button--circle .button__suffix,\n .button--circle .button__caret {\n display: none;\n }\n\n /* Caret modifier */\n\n .button--caret .button__suffix {\n display: none;\n }\n\n .button--caret .button__caret {\n height: auto;\n }\n\n /*\n * Loading modifier\n */\n\n .button--loading {\n position: relative;\n cursor: wait;\n }\n\n .button--loading .button__prefix,\n .button--loading .button__label,\n .button--loading .button__suffix,\n .button--loading .button__caret {\n visibility: hidden;\n }\n\n .button--loading nile-spinner {\n --indicator-color: currentColor;\n position: absolute;\n font-size: 1em;\n height: 1em;\n width: 1em;\n top: calc(50% - 0.5em);\n left: calc(50% - 0.5em);\n }\n /*\n * Badges\n */\n\n .button ::slotted(nile-badge) {\n position: absolute;\n top: 0;\n right: 0;\n translate: 50% -50%;\n pointer-events: none;\n }\n\n"]))));}};});
1
+ System.register(["../index-cd83c5c8.cjs.js"],function(_export,_context){"use strict";var o,_templateObject,t;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){o=_index001CjsJs.i;}],execute:function(){_export("s",t=o(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n display: inline-block;\n position: relative;\n width: auto;\n cursor: pointer;\n }\n\n .button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-style: solid;\n border-width: 1px;\n font-style: normal;\n font-weight: var(--nile-font-weight-regular);\n font-family: var(--nile-font-family-serif);\n font-size: var(--nile-type-scale-3);\n text-align: center;\n letter-spacing: 0.2px;\n text-decoration: none;\n user-select: none;\n white-space: nowrap;\n vertical-align: middle;\n transition: var(--nile-transition-duration-default) background-color,\n var(--nile-transition-duration-default) color,\n var(--nile-transition-duration-default) border,\n var(--nile-transition-duration-default) box-shadow;\n cursor: inherit;\n padding: var(--nile-spacing-2-x);\n gap: var(--nile-spacing-2-x);\n border-radius: var(--nile-radius-base-standard);\n line-height: var(--nile-type-scale-3);\n box-sizing: border-box;\n height: 38px;\n }\n\n .button::-moz-focus-inner {\n border: 0;\n }\n\n .button:focus {\n outline: none;\n }\n\n .button:focus-visible {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n\n .button--disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .button--disabled * {\n pointer-events: none;\n }\n\n .button__label::slotted(nile-icon) {\n /* vertical-align: -2px; */\n }\n\n .button--standard.button--secondary {\n background-color: var(--nile-colors-button-secondary);\n border-color: var(--nile-colors-button-secondary-border);\n color: var(--nile-colors-button-secondary-text);\n }\n\n .button--standard.button--secondary:hover:not(.button--disabled) {\n background-color: var(--nile-colors-button-secondary-hover);\n border-color: var(--nile-colors-button-secondary-border);\n color: var(--nile-colors-button-secondary-text);\n }\n\n .button--standard.button--secondary:active:not(.button--disabled) {\n background-color: var(--nile-colors-button-secondary-pressed);\n border-color: var(--nile-colors-button-secondary-pressed-border);\n color: var(--nile-colors-button-secondary-text);\n }\n\n .button--standard.button--secondary.button--disabled {\n background-color: var(--nile-colors-button-secondary-disabled);\n border-color: var(--nile-colors-button-secondary-disabled-border);\n color: var(--nile-colors-button-secondary-disabled-text);\n cursor: not-allowed;\n }\n\n .button--standard.button--secondary.button--disabled:hover,\n .button--standard.button--secondary.button--disabled:active {\n background-color: var(--nile-colors-button-secondary-disabled);\n border-color: var(--nile-colors-button-secondary-disabled-border);\n color: var(--nile-colors-button-secondary-disabled-text);\n cursor: not-allowed;\n }\n\n /* Primary */\n .button--standard.button--primary {\n background-color: var(--nile-colors-button-primary);\n border-color: var(--nile-colors-button-primary-border);\n color: var(--nile-colors-button-primary-text);\n }\n\n .button--standard.button--primary:hover:not(.button--disabled) {\n background-color: var(--nile-colors-button-primary-hover);\n border-color: var(--nile-colors-button-primary-hover);\n color: var(--nile-colors-button-primary-text);\n }\n\n .button--standard.button--primary:active:not(.button--disabled) {\n background-color: var(--nile-colors-button-primary-pressed);\n border-color: var(--nile-colors-button-primary-pressed);\n color: var(--nile-colors-button-primary-text);\n }\n\n .button--standard.button--primary.button--disabled {\n background-color: var(--nile-colors-button-primary-disabled);\n border-color: var(--nile-colors-button-primary-disabled);\n color: var(--nile-colors-button-primary-disabled-text);\n cursor: not-allowed;\n }\n\n .button--standard.button--primary.button--disabled:hover,\n .button--standard.button--primary.button--disabled:active {\n background-color: var(--nile-colors-button-primary-disabled);\n border-color: var(--nile-colors-button-primary-disabled);\n color: var(--nile-colors-button-primary-disabled-text);\n cursor: not-allowed;\n }\n\n /* Tertiary */\n .button--standard.button--tertiary {\n background-color: var(--nile-colors-button-tertiary);\n border-color: var(--nile-colors-button-tertiary-border);\n color: var(--nile-colors-button-tertiary-text);\n }\n\n .button--standard.button--tertiary:hover:not(.button--disabled) {\n background-color: var(--nile-colors-button-tertiary-hover);\n border-color: var(--nile-colors-neutral-500);\n color: var(--nile-colors-button-tertiary-text);\n }\n\n .button--standard.button--tertiary:active:not(.button--disabled) {\n background-color: var(--nile-colors-button-tertiary-pressed);\n border-color: var(--nile-colors-button-tertiary-pressed-border);\n color: var(--nile-colors-button-tertiary-text);\n }\n\n .button--standard.button--tertiary.button--disabled,\n .button--standard.button--tertiary.button--disabled:hover,\n .button--standard.button--tertiary.button--disabled:active {\n border-color: var(--nile-colors-neutral-500);\n background-color: var(--nile-colors-button-tertiary-disabled);\n color: var(--nile-colors-button-tertiary-disabled-text);\n cursor: not-allowed;\n box-shadow: none;\n }\n\n /* caution */\n .button--standard.button--caution {\n background-color: var(--nile-colors-button-caution);\n border-color: var(--nile-colors-button-caution);\n color: var(--nile-colors-button-caution-text);\n }\n\n .button--standard.button--caution:hover:not(.button--disabled) {\n background-color: var(--nile-colors-button-caution-hover);\n border-color: var(--nile-colors-button-caution-hover);\n color: var(--nile-colors-button-caution-text);\n }\n\n .button--standard.button--caution:active:not(.button--disabled) {\n background-color: var(--nile-colors-button-caution-pressed);\n border-color: var(--nile-colors-button-caution-pressed);\n color: var(--nile-colors-button-caution-text);\n }\n\n .button--standard.button--caution.button--disabled,\n .button--standard.button--caution.button--disabled:hover,\n .button--standard.button--caution.button--disabled:active {\n background-color: var(--nile-colors-button-caution-disabled);\n border-color: var(--nile-colors-button-caution-disabled);\n color: var(--nile-colors-button-caution-disabled-text);\n }\n\n\n /* Primary Variant - Nile Icon Fill */\n .button--standard.button--primary ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-primary-text) !important;\n }\n .button--standard.button--primary:hover:not(.button--disabled) ::slotted(nile-icon),\n .button--standard.button--primary:active:not(.button--disabled) ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-primary-text) !important;\n }\n .button--standard.button--primary.button--disabled ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-primary-disabled-text) !important;\n }\n\n /* Secondary Variant */\n .button--standard.button--secondary ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-secondary-text) !important;\n }\n .button--standard.button--secondary:hover:not(.button--disabled) ::slotted(nile-icon),\n .button--standard.button--secondary:active:not(.button--disabled) ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-secondary-text) !important;\n }\n .button--standard.button--secondary.button--disabled ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-secondary-disabled-text) !important;\n }\n\n /* Tertiary Variant */\n .button--standard.button--tertiary ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-tertiary-text) !important;\n }\n .button--standard.button--tertiary:hover:not(.button--disabled) ::slotted(nile-icon),\n .button--standard.button--tertiary:active:not(.button--disabled) ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-tertiary-text) !important;\n }\n .button--standard.button--tertiary.button--disabled ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-tertiary-disabled-text) !important;\n }\n\n /* Caution Variant */\n .button--standard.button--caution ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-caution-text) !important;\n }\n .button--standard.button--caution:hover:not(.button--disabled) ::slotted(nile-icon),\n .button--standard.button--caution:active:not(.button--disabled) ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-caution-text) !important;\n }\n .button--standard.button--caution.button--disabled ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-caution-disabled-text) !important;\n }\n\n /*\n * Outline buttons\n */\n\n .button--outline {\n background: none;\n border: solid 2px;\n }\n\n /* Default */\n .button--outline.button--secondary {\n border-color: var(--nile-colors-neutral-300);\n color: var(--nile-colors-neutral-700);\n }\n\n .button--outline.button--secondary:hover:not(.button--disabled),\n .button--outline.button--secondary.button--checked:not(.button--disabled) {\n border-color: var(--nile-colors-primary-600);\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--secondary:active:not(.button--disabled) {\n border-color: var(--nile-colors-neutral-700);\n color: var(--nile-colors-white-base);\n }\n\n /* Primary */\n .button--outline.button--primary {\n border-color: var(--nile-colors-primary-600);\n color: var(--nile-colors-primary-600);\n }\n\n .button--outline.button--primary:hover:not(.button--disabled),\n .button--outline.button--primary.button--checked:not(.button--disabled) {\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--primary:active:not(.button--disabled) {\n border-color: var(--nile-colors-primary-700);\n color: var(--nile-colors-white-base);\n }\n\n /* Success */\n .button--outline.button--success {\n border-color: var(--nile-colors-green-600);\n color: var(--nile-colors-green-600);\n }\n\n .button--outline.button--success:hover:not(.button--disabled),\n .button--outline.button--success.button--checked:not(.button--disabled) {\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--success:active:not(.button--disabled) {\n border-color: var(--nile-colors-green-700);\n color: var(--nile-colors-white-base);\n }\n\n /* Neutral */\n .button--outline.button--neutral {\n border-color: var(--nile-colors-neutral-600);\n color: var(--nile-colors-neutral-600);\n }\n\n .button--outline.button--neutral:hover:not(.button--disabled),\n .button--outline.button--neutral.button--checked:not(.button--disabled) {\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--neutral:active:not(.button--disabled) {\n border-color: var(--nile-colors-neutral-700);\n color: var(--nile-colors-white-base);\n }\n\n /* Warning */\n .button--outline.button--warning {\n border-color: var(--nile-colors-orange-600);\n color: var(--nile-colors-orange-600);\n }\n\n .button--outline.button--warning:hover:not(.button--disabled),\n .button--outline.button--warning.button--checked:not(.button--disabled) {\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--warning:active:not(.button--disabled) {\n border-color: var(--nile-colors-orange-700);\n color: var(--nile-colors-white-base);\n }\n\n /* Danger */\n .button--outline.button--danger {\n border-color: var(--nile-colors-red-600);\n color: var(--nile-colors-red-600);\n }\n\n .button--outline.button--danger:hover:not(.button--disabled),\n .button--outline.button--danger.button--checked:not(.button--disabled) {\n background-color: var(--nile-colors-red-600);\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--danger:active:not(.button--disabled) {\n border-color: var(--nile-colors-red-700);\n background-color: var(--nile-colors-red-700);\n color: var(--nile-colors-white-base);\n }\n\n @media (forced-colors: active) {\n .button.button--outline.button--checked:not(.button--disabled) {\n outline: solid 2px transparent;\n }\n }\n\n /*\n * Pill modifier\n */\n\n .button--pill.button--small {\n border-radius: 24px;\n }\n\n .button--pill.button--medium {\n border-radius: 32px;\n }\n\n /*\n * Circle modifier\n */\n\n .button--circle {\n padding-left: 0;\n padding-right: 0;\n }\n\n .button--circle.button--small {\n width: 24px;\n height: 24px;\n border-radius: 50%;\n }\n\n .button--circle.button--medium {\n width: 38px;\n height: 38px;\n border-radius: 50%;\n }\n\n .button--circle .button__prefix,\n .button--circle .button__suffix,\n .button--circle .button__caret {\n display: none;\n }\n\n /* Caret modifier */\n\n .button--caret .button__suffix {\n display: none;\n }\n\n .button--caret .button__caret {\n height: auto;\n }\n\n /*\n * Loading modifier\n */\n\n .button--loading {\n position: relative;\n cursor: wait;\n }\n\n .button--loading .button__prefix,\n .button--loading .button__label,\n .button--loading .button__suffix,\n .button--loading .button__caret {\n visibility: hidden;\n }\n\n .button--loading nile-spinner {\n --indicator-color: currentColor;\n position: absolute;\n font-size: 1em;\n height: 1em;\n width: 1em;\n top: calc(50% - 0.5em);\n left: calc(50% - 0.5em);\n }\n /*\n * Badges\n */\n\n .button ::slotted(nile-badge) {\n position: absolute;\n top: 0;\n right: 0;\n translate: 50% -50%;\n pointer-events: none;\n }\n\n"]))));}};});
2
2
  //# sourceMappingURL=nile-button.css.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-button.css.cjs.js","sources":["../../../src/nile-button/nile-button.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * Button CSS\n */\nexport const styles = css`\n :host {\n display: inline-block;\n position: relative;\n width: auto;\n cursor: pointer;\n }\n\n .button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-style: solid;\n border-width: 1px;\n font-style: normal;\n font-weight: var(--nile-font-weight-regular);\n font-family: var(--nile-font-family-serif);\n font-size: var(--nile-type-scale-3);\n text-align: center;\n letter-spacing: 0.2px;\n text-decoration: none;\n user-select: none;\n white-space: nowrap;\n vertical-align: middle;\n transition: var(--nile-transition-duration-default) background-color,\n var(--nile-transition-duration-default) color,\n var(--nile-transition-duration-default) border,\n var(--nile-transition-duration-default) box-shadow;\n cursor: inherit;\n padding: var(--nile-spacing-2-x);\n gap: var(--nile-spacing-2-x);\n border-radius: var(--nile-radius-base-standard);\n line-height: var(--nile-type-scale-3);\n box-sizing: border-box;\n height: 38px;\n }\n\n .button::-moz-focus-inner {\n border: 0;\n }\n\n .button:focus {\n outline: none;\n }\n\n .button:focus-visible {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n\n .button--disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .button--disabled * {\n pointer-events: none;\n }\n\n .button__label::slotted(nile-icon) {\n /* vertical-align: -2px; */\n }\n\n .button--standard.button--secondary {\n background-color: var(--nile-colors-neutral-400);\n border-color: var(--nile-colors-neutral-400);\n color: var(--nile-colors-neutral-900);\n }\n\n .button--standard.button--secondary:hover:not(.button--disabled) {\n background-color: var(--nile-colors-neutral-500);\n border : none;\n box-shadow: 0px 4px 8px var(--nile-colors-dark-200);\n color: var(--nile-colors-neutral-900);\n }\n\n .button--standard.button--secondary:active:not(.button--disabled) {\n background-color: var(--nile-colors-neutral-500);\n border-color: var(--nile-colors-neutral-700);\n color: var(--nile-colors-neutral-900);\n }\n\n .button--standard.button--secondary.button--disabled {\n background-color: var(--nile-colors-neutral-400);\n border-color: var(--nile-colors-neutral-400);\n color: var(--nile-colors-dark-500);\n cursor: not-allowed;\n }\n\n .button--standard.button--secondary.button--disabled:hover,\n .button--standard.button--secondary.button--disabled:active {\n background-color: var(--nile-colors-neutral-400);\n border-color: var(--nile-colors-neutral-400);\n color: var(--nile-colors-dark-500);\n box-shadow: none;\n }\n\n /* Primary */\n .button--standard.button--primary {\n background-color: var(--nile-colors-primary-600);\n border-color: var(--nile-colors-primary-600);\n color: var(--nile-colors-white-base);\n }\n\n .button--standard.button--primary:hover:not(.button--disabled) {\n background-color: var(--nile-colors-primary-700);\n border-color: var(--nile-colors-primary-700);\n box-shadow: 0px 4px 8px var(--nile-colors-dark-200);\n color: var(--nile-colors-white-base);\n }\n\n .button--standard.button--primary:active:not(.button--disabled) {\n background-color: var(--nile-colors-primary-700);\n border-color: var(--nile-colors-primary-900);\n color: var(--nile-colors-white-base);\n }\n\n .button--standard.button--primary.button--disabled {\n background-color: var(--nile-colors-neutral-700);\n border-color: var(--nile-colors-neutral-700);\n color: var(--nile-colors-white-base);\n cursor: not-allowed;\n }\n\n .button--standard.button--primary.button--disabled:hover,\n .button--standard.button--primary.button--disabled:active {\n background-color: var(--nile-colors-neutral-700);\n border-color: var(--nile-colors-neutral-700);\n color: var(--nile-colors-white-base);\n box-shadow: none;\n }\n\n /* Tertiary */\n .button--standard.button--tertiary {\n background-color: var(--nile-colors-white-base);\n border-color: var(--nile-colors-neutral-500);\n color: var(--nile-colors-dark-900);\n box-shadow: 0px 2px 4px var(--nile-colors-dark-200);\n }\n\n .button--standard.button--tertiary:hover:not(.button--disabled) {\n background-color: var(--nile-colors-neutral-100);\n border-color: var(--nile-colors-neutral-500);\n box-shadow: 0px 4px 8px var(--nile-colors-dark-200);\n color: var(--nile-colors-neutral-700);\n }\n\n .button--standard.button--tertiary:active:not(.button--disabled) {\n background-color: var(--nile-colors-neutral-400);\n border-color: var(--nile-colors-neutral-700);\n color: var(--nile-colors-neutral-700);\n }\n .button--standard.button--tertiary.button--disabled {\n border-color: #e5e9eb;\n background-color: var(--nile-colors-white-base);\n color: var(--nile-colors-neutral-700);\n cursor: not-allowed;\n box-shadow: none;\n }\n\n .button--standard.button--tertiary.button--disabled:hover,\n .button--standard.button--tertiary.button--disabled:active {\n border-color: #e5e9eb;\n background-color: var(--nile-colors-white-base);\n color: var(--nile-colors-neutral-700);\n box-shadow: none;\n }\n\n /* caution */\n .button--standard.button--caution {\n background-color: var(--nile-colors-red-500);\n border-color: var(--nile-colors-red-500);\n color: var(--nile-colors-white-base);\n }\n .button--standard.button--caution:hover:not(.button--disabled) {\n background-color: var(--nile-colors-red-700);\n border-color: var(--nile-colors-red-700);\n color: var(--nile-colors-white-base);\n }\n\n .button--standard.button--caution:active:not(.button--disabled) {\n background-color: var(--nile-colors-red-700);\n border-color: var(--nile-colors-red-500);\n color: var(--nile-colors-white-base);\n }\n\n /*\n * Outline buttons\n */\n\n .button--outline {\n background: none;\n border: solid 2px;\n }\n\n /* Default */\n .button--outline.button--secondary {\n border-color: var(--nile-colors-neutral-300);\n color: var(--nile-colors-neutral-700);\n }\n\n .button--outline.button--secondary:hover:not(.button--disabled),\n .button--outline.button--secondary.button--checked:not(.button--disabled) {\n border-color: var(--nile-colors-primary-600);\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--secondary:active:not(.button--disabled) {\n border-color: var(--nile-colors-neutral-700);\n color: var(--nile-colors-white-base);\n }\n\n /* Primary */\n .button--outline.button--primary {\n border-color: var(--nile-colors-primary-600);\n color: var(--nile-colors-primary-600);\n }\n\n .button--outline.button--primary:hover:not(.button--disabled),\n .button--outline.button--primary.button--checked:not(.button--disabled) {\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--primary:active:not(.button--disabled) {\n border-color: var(--nile-colors-primary-700);\n color: var(--nile-colors-white-base);\n }\n\n /* Success */\n .button--outline.button--success {\n border-color: var(--nile-colors-green-600);\n color: var(--nile-colors-green-600);\n }\n\n .button--outline.button--success:hover:not(.button--disabled),\n .button--outline.button--success.button--checked:not(.button--disabled) {\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--success:active:not(.button--disabled) {\n border-color: var(--nile-colors-green-700);\n color: var(--nile-colors-white-base);\n }\n\n /* Neutral */\n .button--outline.button--neutral {\n border-color: var(--nile-colors-neutral-600);\n color: var(--nile-colors-neutral-600);\n }\n\n .button--outline.button--neutral:hover:not(.button--disabled),\n .button--outline.button--neutral.button--checked:not(.button--disabled) {\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--neutral:active:not(.button--disabled) {\n border-color: var(--nile-colors-neutral-700);\n color: var(--nile-colors-white-base);\n }\n\n /* Warning */\n .button--outline.button--warning {\n border-color: var(--nile-colors-orange-600);\n color: var(--nile-colors-orange-600);\n }\n\n .button--outline.button--warning:hover:not(.button--disabled),\n .button--outline.button--warning.button--checked:not(.button--disabled) {\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--warning:active:not(.button--disabled) {\n border-color: var(--nile-colors-orange-700);\n color: var(--nile-colors-white-base);\n }\n\n /* Danger */\n .button--outline.button--danger {\n border-color: var(--nile-colors-red-600);\n color: var(--nile-colors-red-600);\n }\n\n .button--outline.button--danger:hover:not(.button--disabled),\n .button--outline.button--danger.button--checked:not(.button--disabled) {\n background-color: var(--nile-colors-red-600);\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--danger:active:not(.button--disabled) {\n border-color: var(--nile-colors-red-700);\n background-color: var(--nile-colors-red-700);\n color: var(--nile-colors-white-base);\n }\n\n @media (forced-colors: active) {\n .button.button--outline.button--checked:not(.button--disabled) {\n outline: solid 2px transparent;\n }\n }\n\n /*\n * Pill modifier\n */\n\n .button--pill.button--small {\n border-radius: 24px;\n }\n\n .button--pill.button--medium {\n border-radius: 32px;\n }\n\n /*\n * Circle modifier\n */\n\n .button--circle {\n padding-left: 0;\n padding-right: 0;\n }\n\n .button--circle.button--small {\n width: 24px;\n height: 24px;\n border-radius: 50%;\n }\n\n .button--circle.button--medium {\n width: 38px;\n height: 38px;\n border-radius: 50%;\n }\n\n .button--circle .button__prefix,\n .button--circle .button__suffix,\n .button--circle .button__caret {\n display: none;\n }\n\n /* Caret modifier */\n\n .button--caret .button__suffix {\n display: none;\n }\n\n .button--caret .button__caret {\n height: auto;\n }\n\n /*\n * Loading modifier\n */\n\n .button--loading {\n position: relative;\n cursor: wait;\n }\n\n .button--loading .button__prefix,\n .button--loading .button__label,\n .button--loading .button__suffix,\n .button--loading .button__caret {\n visibility: hidden;\n }\n\n .button--loading nile-spinner {\n --indicator-color: currentColor;\n position: absolute;\n font-size: 1em;\n height: 1em;\n width: 1em;\n top: calc(50% - 0.5em);\n left: calc(50% - 0.5em);\n }\n /*\n * Badges\n */\n\n .button ::slotted(nile-badge) {\n position: absolute;\n top: 0;\n right: 0;\n translate: 50% -50%;\n pointer-events: none;\n }\n\n`;\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
1
+ {"version":3,"file":"nile-button.css.cjs.js","sources":["../../../src/nile-button/nile-button.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit-element';\n\n/**\n * Button CSS\n */\nexport const styles = css`\n :host {\n display: inline-block;\n position: relative;\n width: auto;\n cursor: pointer;\n }\n\n .button {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-style: solid;\n border-width: 1px;\n font-style: normal;\n font-weight: var(--nile-font-weight-regular);\n font-family: var(--nile-font-family-serif);\n font-size: var(--nile-type-scale-3);\n text-align: center;\n letter-spacing: 0.2px;\n text-decoration: none;\n user-select: none;\n white-space: nowrap;\n vertical-align: middle;\n transition: var(--nile-transition-duration-default) background-color,\n var(--nile-transition-duration-default) color,\n var(--nile-transition-duration-default) border,\n var(--nile-transition-duration-default) box-shadow;\n cursor: inherit;\n padding: var(--nile-spacing-2-x);\n gap: var(--nile-spacing-2-x);\n border-radius: var(--nile-radius-base-standard);\n line-height: var(--nile-type-scale-3);\n box-sizing: border-box;\n height: 38px;\n }\n\n .button::-moz-focus-inner {\n border: 0;\n }\n\n .button:focus {\n outline: none;\n }\n\n .button:focus-visible {\n outline: 5px auto -webkit-focus-ring-color;\n outline-offset: 2px;\n }\n\n .button--disabled {\n opacity: 0.5;\n cursor: not-allowed;\n }\n\n .button--disabled * {\n pointer-events: none;\n }\n\n .button__label::slotted(nile-icon) {\n /* vertical-align: -2px; */\n }\n\n .button--standard.button--secondary {\n background-color: var(--nile-colors-button-secondary);\n border-color: var(--nile-colors-button-secondary-border);\n color: var(--nile-colors-button-secondary-text);\n }\n\n .button--standard.button--secondary:hover:not(.button--disabled) {\n background-color: var(--nile-colors-button-secondary-hover);\n border-color: var(--nile-colors-button-secondary-border);\n color: var(--nile-colors-button-secondary-text);\n }\n\n .button--standard.button--secondary:active:not(.button--disabled) {\n background-color: var(--nile-colors-button-secondary-pressed);\n border-color: var(--nile-colors-button-secondary-pressed-border);\n color: var(--nile-colors-button-secondary-text);\n }\n\n .button--standard.button--secondary.button--disabled {\n background-color: var(--nile-colors-button-secondary-disabled);\n border-color: var(--nile-colors-button-secondary-disabled-border);\n color: var(--nile-colors-button-secondary-disabled-text);\n cursor: not-allowed;\n }\n\n .button--standard.button--secondary.button--disabled:hover,\n .button--standard.button--secondary.button--disabled:active {\n background-color: var(--nile-colors-button-secondary-disabled);\n border-color: var(--nile-colors-button-secondary-disabled-border);\n color: var(--nile-colors-button-secondary-disabled-text);\n cursor: not-allowed;\n }\n\n /* Primary */\n .button--standard.button--primary {\n background-color: var(--nile-colors-button-primary);\n border-color: var(--nile-colors-button-primary-border);\n color: var(--nile-colors-button-primary-text);\n }\n\n .button--standard.button--primary:hover:not(.button--disabled) {\n background-color: var(--nile-colors-button-primary-hover);\n border-color: var(--nile-colors-button-primary-hover);\n color: var(--nile-colors-button-primary-text);\n }\n\n .button--standard.button--primary:active:not(.button--disabled) {\n background-color: var(--nile-colors-button-primary-pressed);\n border-color: var(--nile-colors-button-primary-pressed);\n color: var(--nile-colors-button-primary-text);\n }\n\n .button--standard.button--primary.button--disabled {\n background-color: var(--nile-colors-button-primary-disabled);\n border-color: var(--nile-colors-button-primary-disabled);\n color: var(--nile-colors-button-primary-disabled-text);\n cursor: not-allowed;\n }\n\n .button--standard.button--primary.button--disabled:hover,\n .button--standard.button--primary.button--disabled:active {\n background-color: var(--nile-colors-button-primary-disabled);\n border-color: var(--nile-colors-button-primary-disabled);\n color: var(--nile-colors-button-primary-disabled-text);\n cursor: not-allowed;\n }\n\n /* Tertiary */\n .button--standard.button--tertiary {\n background-color: var(--nile-colors-button-tertiary);\n border-color: var(--nile-colors-button-tertiary-border);\n color: var(--nile-colors-button-tertiary-text);\n }\n\n .button--standard.button--tertiary:hover:not(.button--disabled) {\n background-color: var(--nile-colors-button-tertiary-hover);\n border-color: var(--nile-colors-neutral-500);\n color: var(--nile-colors-button-tertiary-text);\n }\n\n .button--standard.button--tertiary:active:not(.button--disabled) {\n background-color: var(--nile-colors-button-tertiary-pressed);\n border-color: var(--nile-colors-button-tertiary-pressed-border);\n color: var(--nile-colors-button-tertiary-text);\n }\n\n .button--standard.button--tertiary.button--disabled,\n .button--standard.button--tertiary.button--disabled:hover,\n .button--standard.button--tertiary.button--disabled:active {\n border-color: var(--nile-colors-neutral-500);\n background-color: var(--nile-colors-button-tertiary-disabled);\n color: var(--nile-colors-button-tertiary-disabled-text);\n cursor: not-allowed;\n box-shadow: none;\n }\n\n /* caution */\n .button--standard.button--caution {\n background-color: var(--nile-colors-button-caution);\n border-color: var(--nile-colors-button-caution);\n color: var(--nile-colors-button-caution-text);\n }\n\n .button--standard.button--caution:hover:not(.button--disabled) {\n background-color: var(--nile-colors-button-caution-hover);\n border-color: var(--nile-colors-button-caution-hover);\n color: var(--nile-colors-button-caution-text);\n }\n\n .button--standard.button--caution:active:not(.button--disabled) {\n background-color: var(--nile-colors-button-caution-pressed);\n border-color: var(--nile-colors-button-caution-pressed);\n color: var(--nile-colors-button-caution-text);\n }\n\n .button--standard.button--caution.button--disabled,\n .button--standard.button--caution.button--disabled:hover,\n .button--standard.button--caution.button--disabled:active {\n background-color: var(--nile-colors-button-caution-disabled);\n border-color: var(--nile-colors-button-caution-disabled);\n color: var(--nile-colors-button-caution-disabled-text);\n }\n\n\n /* Primary Variant - Nile Icon Fill */\n .button--standard.button--primary ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-primary-text) !important;\n }\n .button--standard.button--primary:hover:not(.button--disabled) ::slotted(nile-icon),\n .button--standard.button--primary:active:not(.button--disabled) ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-primary-text) !important;\n }\n .button--standard.button--primary.button--disabled ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-primary-disabled-text) !important;\n }\n\n /* Secondary Variant */\n .button--standard.button--secondary ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-secondary-text) !important;\n }\n .button--standard.button--secondary:hover:not(.button--disabled) ::slotted(nile-icon),\n .button--standard.button--secondary:active:not(.button--disabled) ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-secondary-text) !important;\n }\n .button--standard.button--secondary.button--disabled ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-secondary-disabled-text) !important;\n }\n\n /* Tertiary Variant */\n .button--standard.button--tertiary ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-tertiary-text) !important;\n }\n .button--standard.button--tertiary:hover:not(.button--disabled) ::slotted(nile-icon),\n .button--standard.button--tertiary:active:not(.button--disabled) ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-tertiary-text) !important;\n }\n .button--standard.button--tertiary.button--disabled ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-tertiary-disabled-text) !important;\n }\n\n /* Caution Variant */\n .button--standard.button--caution ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-caution-text) !important;\n }\n .button--standard.button--caution:hover:not(.button--disabled) ::slotted(nile-icon),\n .button--standard.button--caution:active:not(.button--disabled) ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-caution-text) !important;\n }\n .button--standard.button--caution.button--disabled ::slotted(nile-icon) {\n --nile-svg-fill: var(--nile-colors-button-caution-disabled-text) !important;\n }\n\n /*\n * Outline buttons\n */\n\n .button--outline {\n background: none;\n border: solid 2px;\n }\n\n /* Default */\n .button--outline.button--secondary {\n border-color: var(--nile-colors-neutral-300);\n color: var(--nile-colors-neutral-700);\n }\n\n .button--outline.button--secondary:hover:not(.button--disabled),\n .button--outline.button--secondary.button--checked:not(.button--disabled) {\n border-color: var(--nile-colors-primary-600);\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--secondary:active:not(.button--disabled) {\n border-color: var(--nile-colors-neutral-700);\n color: var(--nile-colors-white-base);\n }\n\n /* Primary */\n .button--outline.button--primary {\n border-color: var(--nile-colors-primary-600);\n color: var(--nile-colors-primary-600);\n }\n\n .button--outline.button--primary:hover:not(.button--disabled),\n .button--outline.button--primary.button--checked:not(.button--disabled) {\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--primary:active:not(.button--disabled) {\n border-color: var(--nile-colors-primary-700);\n color: var(--nile-colors-white-base);\n }\n\n /* Success */\n .button--outline.button--success {\n border-color: var(--nile-colors-green-600);\n color: var(--nile-colors-green-600);\n }\n\n .button--outline.button--success:hover:not(.button--disabled),\n .button--outline.button--success.button--checked:not(.button--disabled) {\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--success:active:not(.button--disabled) {\n border-color: var(--nile-colors-green-700);\n color: var(--nile-colors-white-base);\n }\n\n /* Neutral */\n .button--outline.button--neutral {\n border-color: var(--nile-colors-neutral-600);\n color: var(--nile-colors-neutral-600);\n }\n\n .button--outline.button--neutral:hover:not(.button--disabled),\n .button--outline.button--neutral.button--checked:not(.button--disabled) {\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--neutral:active:not(.button--disabled) {\n border-color: var(--nile-colors-neutral-700);\n color: var(--nile-colors-white-base);\n }\n\n /* Warning */\n .button--outline.button--warning {\n border-color: var(--nile-colors-orange-600);\n color: var(--nile-colors-orange-600);\n }\n\n .button--outline.button--warning:hover:not(.button--disabled),\n .button--outline.button--warning.button--checked:not(.button--disabled) {\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--warning:active:not(.button--disabled) {\n border-color: var(--nile-colors-orange-700);\n color: var(--nile-colors-white-base);\n }\n\n /* Danger */\n .button--outline.button--danger {\n border-color: var(--nile-colors-red-600);\n color: var(--nile-colors-red-600);\n }\n\n .button--outline.button--danger:hover:not(.button--disabled),\n .button--outline.button--danger.button--checked:not(.button--disabled) {\n background-color: var(--nile-colors-red-600);\n color: var(--nile-colors-white-base);\n }\n\n .button--outline.button--danger:active:not(.button--disabled) {\n border-color: var(--nile-colors-red-700);\n background-color: var(--nile-colors-red-700);\n color: var(--nile-colors-white-base);\n }\n\n @media (forced-colors: active) {\n .button.button--outline.button--checked:not(.button--disabled) {\n outline: solid 2px transparent;\n }\n }\n\n /*\n * Pill modifier\n */\n\n .button--pill.button--small {\n border-radius: 24px;\n }\n\n .button--pill.button--medium {\n border-radius: 32px;\n }\n\n /*\n * Circle modifier\n */\n\n .button--circle {\n padding-left: 0;\n padding-right: 0;\n }\n\n .button--circle.button--small {\n width: 24px;\n height: 24px;\n border-radius: 50%;\n }\n\n .button--circle.button--medium {\n width: 38px;\n height: 38px;\n border-radius: 50%;\n }\n\n .button--circle .button__prefix,\n .button--circle .button__suffix,\n .button--circle .button__caret {\n display: none;\n }\n\n /* Caret modifier */\n\n .button--caret .button__suffix {\n display: none;\n }\n\n .button--caret .button__caret {\n height: auto;\n }\n\n /*\n * Loading modifier\n */\n\n .button--loading {\n position: relative;\n cursor: wait;\n }\n\n .button--loading .button__prefix,\n .button--loading .button__label,\n .button--loading .button__suffix,\n .button--loading .button__caret {\n visibility: hidden;\n }\n\n .button--loading nile-spinner {\n --indicator-color: currentColor;\n position: absolute;\n font-size: 1em;\n height: 1em;\n width: 1em;\n top: calc(50% - 0.5em);\n left: calc(50% - 0.5em);\n }\n /*\n * Badges\n */\n\n .button ::slotted(nile-badge) {\n position: absolute;\n top: 0;\n right: 0;\n translate: 50% -50%;\n pointer-events: none;\n }\n\n`;\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"gXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -1,4 +1,4 @@
1
- import{i as o}from"../index-cd2f9c12.esm.js";const r=o`
1
+ import{i as o}from"../index-cd2f9c12.esm.js";const t=o`
2
2
  :host {
3
3
  display: inline-block;
4
4
  position: relative;
@@ -62,127 +62,176 @@ import{i as o}from"../index-cd2f9c12.esm.js";const r=o`
62
62
  }
63
63
 
64
64
  .button--standard.button--secondary {
65
- background-color: var(--nile-colors-neutral-400);
66
- border-color: var(--nile-colors-neutral-400);
67
- color: var(--nile-colors-neutral-900);
65
+ background-color: var(--nile-colors-button-secondary);
66
+ border-color: var(--nile-colors-button-secondary-border);
67
+ color: var(--nile-colors-button-secondary-text);
68
68
  }
69
69
 
70
70
  .button--standard.button--secondary:hover:not(.button--disabled) {
71
- background-color: var(--nile-colors-neutral-500);
72
- border : none;
73
- box-shadow: 0px 4px 8px var(--nile-colors-dark-200);
74
- color: var(--nile-colors-neutral-900);
71
+ background-color: var(--nile-colors-button-secondary-hover);
72
+ border-color: var(--nile-colors-button-secondary-border);
73
+ color: var(--nile-colors-button-secondary-text);
75
74
  }
76
75
 
77
76
  .button--standard.button--secondary:active:not(.button--disabled) {
78
- background-color: var(--nile-colors-neutral-500);
79
- border-color: var(--nile-colors-neutral-700);
80
- color: var(--nile-colors-neutral-900);
77
+ background-color: var(--nile-colors-button-secondary-pressed);
78
+ border-color: var(--nile-colors-button-secondary-pressed-border);
79
+ color: var(--nile-colors-button-secondary-text);
81
80
  }
82
81
 
83
82
  .button--standard.button--secondary.button--disabled {
84
- background-color: var(--nile-colors-neutral-400);
85
- border-color: var(--nile-colors-neutral-400);
86
- color: var(--nile-colors-dark-500);
83
+ background-color: var(--nile-colors-button-secondary-disabled);
84
+ border-color: var(--nile-colors-button-secondary-disabled-border);
85
+ color: var(--nile-colors-button-secondary-disabled-text);
87
86
  cursor: not-allowed;
88
87
  }
89
88
 
90
89
  .button--standard.button--secondary.button--disabled:hover,
91
90
  .button--standard.button--secondary.button--disabled:active {
92
- background-color: var(--nile-colors-neutral-400);
93
- border-color: var(--nile-colors-neutral-400);
94
- color: var(--nile-colors-dark-500);
95
- box-shadow: none;
91
+ background-color: var(--nile-colors-button-secondary-disabled);
92
+ border-color: var(--nile-colors-button-secondary-disabled-border);
93
+ color: var(--nile-colors-button-secondary-disabled-text);
94
+ cursor: not-allowed;
96
95
  }
97
96
 
98
97
  /* Primary */
99
98
  .button--standard.button--primary {
100
- background-color: var(--nile-colors-primary-600);
101
- border-color: var(--nile-colors-primary-600);
102
- color: var(--nile-colors-white-base);
99
+ background-color: var(--nile-colors-button-primary);
100
+ border-color: var(--nile-colors-button-primary-border);
101
+ color: var(--nile-colors-button-primary-text);
103
102
  }
104
103
 
105
104
  .button--standard.button--primary:hover:not(.button--disabled) {
106
- background-color: var(--nile-colors-primary-700);
107
- border-color: var(--nile-colors-primary-700);
108
- box-shadow: 0px 4px 8px var(--nile-colors-dark-200);
109
- color: var(--nile-colors-white-base);
105
+ background-color: var(--nile-colors-button-primary-hover);
106
+ border-color: var(--nile-colors-button-primary-hover);
107
+ color: var(--nile-colors-button-primary-text);
110
108
  }
111
109
 
112
110
  .button--standard.button--primary:active:not(.button--disabled) {
113
- background-color: var(--nile-colors-primary-700);
114
- border-color: var(--nile-colors-primary-900);
115
- color: var(--nile-colors-white-base);
111
+ background-color: var(--nile-colors-button-primary-pressed);
112
+ border-color: var(--nile-colors-button-primary-pressed);
113
+ color: var(--nile-colors-button-primary-text);
116
114
  }
117
115
 
118
116
  .button--standard.button--primary.button--disabled {
119
- background-color: var(--nile-colors-neutral-700);
120
- border-color: var(--nile-colors-neutral-700);
121
- color: var(--nile-colors-white-base);
117
+ background-color: var(--nile-colors-button-primary-disabled);
118
+ border-color: var(--nile-colors-button-primary-disabled);
119
+ color: var(--nile-colors-button-primary-disabled-text);
122
120
  cursor: not-allowed;
123
121
  }
124
122
 
125
123
  .button--standard.button--primary.button--disabled:hover,
126
124
  .button--standard.button--primary.button--disabled:active {
127
- background-color: var(--nile-colors-neutral-700);
128
- border-color: var(--nile-colors-neutral-700);
129
- color: var(--nile-colors-white-base);
130
- box-shadow: none;
125
+ background-color: var(--nile-colors-button-primary-disabled);
126
+ border-color: var(--nile-colors-button-primary-disabled);
127
+ color: var(--nile-colors-button-primary-disabled-text);
128
+ cursor: not-allowed;
131
129
  }
132
130
 
133
131
  /* Tertiary */
134
132
  .button--standard.button--tertiary {
135
- background-color: var(--nile-colors-white-base);
136
- border-color: var(--nile-colors-neutral-500);
137
- color: var(--nile-colors-dark-900);
138
- box-shadow: 0px 2px 4px var(--nile-colors-dark-200);
133
+ background-color: var(--nile-colors-button-tertiary);
134
+ border-color: var(--nile-colors-button-tertiary-border);
135
+ color: var(--nile-colors-button-tertiary-text);
139
136
  }
140
137
 
141
138
  .button--standard.button--tertiary:hover:not(.button--disabled) {
142
- background-color: var(--nile-colors-neutral-100);
139
+ background-color: var(--nile-colors-button-tertiary-hover);
143
140
  border-color: var(--nile-colors-neutral-500);
144
- box-shadow: 0px 4px 8px var(--nile-colors-dark-200);
145
- color: var(--nile-colors-neutral-700);
141
+ color: var(--nile-colors-button-tertiary-text);
146
142
  }
147
143
 
148
144
  .button--standard.button--tertiary:active:not(.button--disabled) {
149
- background-color: var(--nile-colors-neutral-400);
150
- border-color: var(--nile-colors-neutral-700);
151
- color: var(--nile-colors-neutral-700);
152
- }
153
- .button--standard.button--tertiary.button--disabled {
154
- border-color: #e5e9eb;
155
- background-color: var(--nile-colors-white-base);
156
- color: var(--nile-colors-neutral-700);
157
- cursor: not-allowed;
158
- box-shadow: none;
145
+ background-color: var(--nile-colors-button-tertiary-pressed);
146
+ border-color: var(--nile-colors-button-tertiary-pressed-border);
147
+ color: var(--nile-colors-button-tertiary-text);
159
148
  }
160
149
 
150
+ .button--standard.button--tertiary.button--disabled,
161
151
  .button--standard.button--tertiary.button--disabled:hover,
162
152
  .button--standard.button--tertiary.button--disabled:active {
163
- border-color: #e5e9eb;
164
- background-color: var(--nile-colors-white-base);
165
- color: var(--nile-colors-neutral-700);
153
+ border-color: var(--nile-colors-neutral-500);
154
+ background-color: var(--nile-colors-button-tertiary-disabled);
155
+ color: var(--nile-colors-button-tertiary-disabled-text);
156
+ cursor: not-allowed;
166
157
  box-shadow: none;
167
158
  }
168
159
 
169
160
  /* caution */
170
161
  .button--standard.button--caution {
171
- background-color: var(--nile-colors-red-500);
172
- border-color: var(--nile-colors-red-500);
173
- color: var(--nile-colors-white-base);
162
+ background-color: var(--nile-colors-button-caution);
163
+ border-color: var(--nile-colors-button-caution);
164
+ color: var(--nile-colors-button-caution-text);
174
165
  }
166
+
175
167
  .button--standard.button--caution:hover:not(.button--disabled) {
176
- background-color: var(--nile-colors-red-700);
177
- border-color: var(--nile-colors-red-700);
178
- color: var(--nile-colors-white-base);
168
+ background-color: var(--nile-colors-button-caution-hover);
169
+ border-color: var(--nile-colors-button-caution-hover);
170
+ color: var(--nile-colors-button-caution-text);
179
171
  }
180
172
 
181
173
  .button--standard.button--caution:active:not(.button--disabled) {
182
- background-color: var(--nile-colors-red-700);
183
- border-color: var(--nile-colors-red-500);
184
- color: var(--nile-colors-white-base);
185
- }
174
+ background-color: var(--nile-colors-button-caution-pressed);
175
+ border-color: var(--nile-colors-button-caution-pressed);
176
+ color: var(--nile-colors-button-caution-text);
177
+ }
178
+
179
+ .button--standard.button--caution.button--disabled,
180
+ .button--standard.button--caution.button--disabled:hover,
181
+ .button--standard.button--caution.button--disabled:active {
182
+ background-color: var(--nile-colors-button-caution-disabled);
183
+ border-color: var(--nile-colors-button-caution-disabled);
184
+ color: var(--nile-colors-button-caution-disabled-text);
185
+ }
186
+
187
+
188
+ /* Primary Variant - Nile Icon Fill */
189
+ .button--standard.button--primary ::slotted(nile-icon) {
190
+ --nile-svg-fill: var(--nile-colors-button-primary-text) !important;
191
+ }
192
+ .button--standard.button--primary:hover:not(.button--disabled) ::slotted(nile-icon),
193
+ .button--standard.button--primary:active:not(.button--disabled) ::slotted(nile-icon) {
194
+ --nile-svg-fill: var(--nile-colors-button-primary-text) !important;
195
+ }
196
+ .button--standard.button--primary.button--disabled ::slotted(nile-icon) {
197
+ --nile-svg-fill: var(--nile-colors-button-primary-disabled-text) !important;
198
+ }
199
+
200
+ /* Secondary Variant */
201
+ .button--standard.button--secondary ::slotted(nile-icon) {
202
+ --nile-svg-fill: var(--nile-colors-button-secondary-text) !important;
203
+ }
204
+ .button--standard.button--secondary:hover:not(.button--disabled) ::slotted(nile-icon),
205
+ .button--standard.button--secondary:active:not(.button--disabled) ::slotted(nile-icon) {
206
+ --nile-svg-fill: var(--nile-colors-button-secondary-text) !important;
207
+ }
208
+ .button--standard.button--secondary.button--disabled ::slotted(nile-icon) {
209
+ --nile-svg-fill: var(--nile-colors-button-secondary-disabled-text) !important;
210
+ }
211
+
212
+ /* Tertiary Variant */
213
+ .button--standard.button--tertiary ::slotted(nile-icon) {
214
+ --nile-svg-fill: var(--nile-colors-button-tertiary-text) !important;
215
+ }
216
+ .button--standard.button--tertiary:hover:not(.button--disabled) ::slotted(nile-icon),
217
+ .button--standard.button--tertiary:active:not(.button--disabled) ::slotted(nile-icon) {
218
+ --nile-svg-fill: var(--nile-colors-button-tertiary-text) !important;
219
+ }
220
+ .button--standard.button--tertiary.button--disabled ::slotted(nile-icon) {
221
+ --nile-svg-fill: var(--nile-colors-button-tertiary-disabled-text) !important;
222
+ }
223
+
224
+ /* Caution Variant */
225
+ .button--standard.button--caution ::slotted(nile-icon) {
226
+ --nile-svg-fill: var(--nile-colors-button-caution-text) !important;
227
+ }
228
+ .button--standard.button--caution:hover:not(.button--disabled) ::slotted(nile-icon),
229
+ .button--standard.button--caution:active:not(.button--disabled) ::slotted(nile-icon) {
230
+ --nile-svg-fill: var(--nile-colors-button-caution-text) !important;
231
+ }
232
+ .button--standard.button--caution.button--disabled ::slotted(nile-icon) {
233
+ --nile-svg-fill: var(--nile-colors-button-caution-disabled-text) !important;
234
+ }
186
235
 
187
236
  /*
188
237
  * Outline buttons
@@ -384,4 +433,4 @@ import{i as o}from"../index-cd2f9c12.esm.js";const r=o`
384
433
  pointer-events: none;
385
434
  }
386
435
 
387
- `;export{r as s};
436
+ `;export{t as s};
@@ -1,2 +1,2 @@
1
- System.register(["tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-content-editor.css.cjs.js","lit/directives/class-map.js","../internal/nile-element.cjs.js","../internal/watch.cjs.js","../internal/enum.cjs.js","lit/directives/live.js","../property-0f6a51ec.cjs.js","lit"],function(_export,_context){"use strict";var t,i,s,e,o,n,h,r,a,l,d,p,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,c;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter);}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2;}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(typeof e+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw new Error("illegal catch attempt");},delegateYield:function(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_index001CjsJs){i=_index001CjsJs.x;},function(_litDecoratorsJs){s=_litDecoratorsJs.query;e=_litDecoratorsJs.state;o=_litDecoratorsJs.customElement;},function(_nileContentEditorCssCjsJs){n=_nileContentEditorCssCjsJs.s;},function(_litDirectivesClassMapJs){h=_litDirectivesClassMapJs.classMap;},function(_internalNileElementCjsJs){r=_internalNileElementCjsJs.N;},function(_internalWatchCjsJs){a=_internalWatchCjsJs.w;},function(_internalEnumCjsJs){l=_internalEnumCjsJs.K;},function(_litDirectivesLiveJs){d=_litDirectivesLiveJs.live;},function(_property002CjsJs){p=_property002CjsJs.n;},function(_lit){}],execute:function(){_export("N",c=/*#__PURE__*/function(_r){_inherits(c,_r);var _super=_createSuper(c);function c(){var _this;_classCallCheck(this,c);_this=_super.apply(this,arguments),_this.value="",_this.showLabel=!0,_this.labelText="",_this.type="text|text-area",_this.required=!0,_this.openDropdown=!1,_this.tagIdentifier="$",_this.filteredValue="",_this.helpText="",_this.readonly=!1,_this.errorMessage="",_this.error=!1;return _this;}_createClass(c,[{key:"connectedCallback",value:function connectedCallback(){this.handleOutsideClick=this.handleOutsideClick.bind(this),this.handleClipboardEvent=this.handleClipboardEvent.bind(this),_get(_getPrototypeOf(c.prototype),"connectedCallback",this).call(this),this.emit("nile-init"),this.addOpenListeners(),this.setInitialValues();}},{key:"setInitialValues",value:function setInitialValues(){var _this2=this;this.updateComplete.then(function(t){t&&_this2.value&&(_this2.contentEditor.innerHTML=_this2.generateHTMLTagsWithValues(_this2.value));});}},{key:"addOpenListeners",value:function addOpenListeners(){window.addEventListener("click",this.handleOutsideClick),window.addEventListener("cut",this.handleClipboardEvent),window.addEventListener("copy",this.handleClipboardEvent),window.addEventListener("paste",this.handleClipboardEvent);}},{key:"removeOpenListeners",value:function removeOpenListeners(){window.removeEventListener("click",this.handleOutsideClick),window.removeEventListener("cut",this.handleClipboardEvent),window.removeEventListener("copy",this.handleClipboardEvent),window.removeEventListener("paste",this.handleClipboardEvent);}},{key:"handleClipboardEvent",value:function(){var _handleClipboardEvent=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(t){var _window,_this3=this;var i,_s;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:i=(_window=window)===null||_window===void 0||(_window=_window.getSelection())===null||_window===void 0?void 0:_window.toString();_context2.t0=t.type;_context2.next=_context2.t0==="cut"?4:_context2.t0==="copy"?4:_context2.t0==="paste"?10:15;break;case 4:_context2.t1=i;if(!_context2.t1){_context2.next=8;break;}_context2.next=8;return navigator.clipboard.writeText(i);case 8:document.execCommand(t.type);return _context2.abrupt("break",15);case 10:t.preventDefault();_context2.next=13;return navigator.clipboard.readText();case 13:_s=_context2.sent;_s=_s.replace(/<(|\/)(html|body|meta|span)[^>]*?>/gi,"").trim(),document.execCommand("insertText",!1,_s);case 15:setTimeout(function(){_this3.emitInputChange();});case 16:case"end":return _context2.stop();}},_callee);}));function handleClipboardEvent(_x){return _handleClipboardEvent.apply(this,arguments);}return handleClipboardEvent;}()},{key:"toggleDropdown",value:function toggleDropdown(t){this.openDropdown=t;}},{key:"handleOutsideClick",value:function handleOutsideClick(t){t&&t.target&&this.toggleDropdown(!1);}},{key:"handleTypeChange",value:function handleTypeChange(){this.contentEditor.innerHTML=this.generateHTMLTagsWithValues(this.value);}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(c.prototype),"disconnectedCallback",this).call(this),this.removeOpenListeners(),this.emit("nile-destroy");}},{key:"handlekeyDown",value:function handlekeyDown(t){var _this4=this;if(t.code!==l.ENTER||"text"!==this.type){if(![l.CUT,l.COPY,l.PASTE].includes(t.code)||!t.ctrlKey&&!t.metaKey)return t.code===l.ESCAPE?(t.preventDefault(),void this.toggleDropdown(!1)):void setTimeout(function(){var t=_this4.contentEditor.innerText;_this4.emitInputChange(),t.includes(_this4.tagIdentifier)?(_this4.insertNodes(_this4.contentEditor,_this4.contentEditor.childNodes),_this4.filterOptions(),_this4.toggleDropdown(!0)):_this4.toggleDropdown(!1);},10);}else t.preventDefault();}},{key:"filterOptions",value:function filterOptions(){var _this5=this;this.filteredOptions=this.options,this.options.length&&this.filteredValue?this.filteredOptions=this.options.filter(function(t){return t.includes(_this5.filteredValue);}):this.filteredOptions=this.options;}},{key:"generateValuesFromHTMLTags",value:function generateValuesFromHTMLTags(t){return t.replace(/<span class="chips(?: chip-error)?" contenteditable="false">(.*?)<\/span>/g,function(t,i){return"{{"+i+"}}";});}},{key:"generateHTMLTagsWithValues",value:function generateHTMLTagsWithValues(t){var _this6=this;return t.replace(/{{(.*?)}}/g,function(t,i){return _this6.options.includes(i)?'<span class="chips" contenteditable="false">'+i+"</span>":_this6.setError(i);});}},{key:"setError",value:function setError(t){return this.error=!0,'<span class="chips chip-error" contenteditable="false">'+t+"</span>";}},{key:"emitInputChange",value:function emitInputChange(){if(this.contentEditor){var _t=this.contentEditor.innerHTML;""!==this.contentEditor.innerText&&(_t=this.generateValuesFromHTMLTags(_t)),_t=_t.replace(/&nbsp;/g," "),_t=_t.replace("<br>",""),this.emit("nile-change",{value:this.generateValuesFromHTMLTags(_t)});}}},{key:"insertNodes",value:function insertNodes(t,i,s){var _this7=this;_toConsumableArray(i).forEach(function(i,e){var _i$nodeValue,_i$nodeValue2,_t$childNodes$e;if(i.hasChildNodes())s?_this7.insertNodes(i,i.childNodes,s):_this7.insertNodes(i,i.childNodes);else if((_i$nodeValue=i.nodeValue)!==null&&_i$nodeValue!==void 0&&_i$nodeValue.includes(_this7.tagIdentifier))return s&&(t.childNodes[e].nodeValue=(_i$nodeValue2=i.nodeValue)===null||_i$nodeValue2===void 0?void 0:_i$nodeValue2.replace(_this7.tagIdentifier+_this7.filteredValue,""),t.childNodes[e].after(s)),void(_this7.filteredValue=(t===null||t===void 0||(_t$childNodes$e=t.childNodes[e])===null||_t$childNodes$e===void 0||(_t$childNodes$e=_t$childNodes$e.nodeValue)===null||_t$childNodes$e===void 0?void 0:_t$childNodes$e.split(_this7.tagIdentifier).slice(1).join())||"");});}},{key:"handleOptions",value:function handleOptions(t){this.toggleDropdown(!1);var i=document.createElement("span");i.setAttribute("class","chips"),i.setAttribute("contentEditable","false"),i.innerText=t,this.insertNodes(this.contentEditor,this.contentEditor.childNodes,i),this.filteredOptions=this.options,this.filteredValue="",this.emitInputChange();}},{key:"renderAutoOptions",value:function renderAutoOptions(){var _this8=this;return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["<div\n class=\"","\"\n >\n ","\n </div>"])),h({"nile-options-container":!0,"dropdown-position":"text-area"===this.type}),this.filteredOptions&&this.filteredOptions.map(function(t){return i(_templateObject2||(_templateObject2=_taggedTemplateLiteral([" <nile-option\n .value=\"","\"\n @click=\"","\"\n >","\n </nile-option>"])),t,function(i){_this8.handleOptions(t);},t);}));}},{key:"render",value:function render(){var t=!!this.helpText,s=!!this.error,e=!!this.errorMessage,o=!!this.readonly,n=this.type;return i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-popup\n .active=\"","\"\n sync=\"width\"\n strategy=\"fixed\"\n placement=\"bottom\"\n class=","\n >\n <div class=\"content-editable-wrapper\" slot=\"anchor\">\n ","\n <div\n contenteditable=\"","\"\n spellcheck=\"false\"\n class=","\n @keydown=","\n ></div>\n ","\n ","\n </div>\n ","\n </nile-popup>\n "])),d(this.openDropdown),h({dropdown:!0,"dropdown--open":!0,popup:!0}),this.showLabel&&this.labelText?i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<label class=\"ods-label\">"," </label> ",""])),this.labelText,this.required?i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<span class=\"asterik\">*</span>"]))):""):"",!o,h({"content-editable-input":!0,error:s||e,"read-only":o,"text-area":"text-area"===n}),this.handlekeyDown,t?i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-form-help-text>","</nile-form-help-text>\n "])),this.helpText):"",e?i(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <nile-form-error-message\n >","</nile-form-error-message\n >\n "])),this.errorMessage):"",this.filteredOptions&&this.filteredOptions.length?this.renderAutoOptions():null);}}]);return c;}(r));c.styles=n,t([p()],c.prototype,"value",void 0),t([p()],c.prototype,"options",void 0),t([p()],c.prototype,"filteredOptions",void 0),t([p()],c.prototype,"showLabel",void 0),t([p()],c.prototype,"labelText",void 0),t([p()],c.prototype,"type",void 0),t([p()],c.prototype,"required",void 0),t([s(".content-editable-input")],c.prototype,"contentEditor",void 0),t([s(".nile-options-container")],c.prototype,"autoOptions",void 0),t([e()],c.prototype,"openDropdown",void 0),t([p({attribute:"help-text"})],c.prototype,"helpText",void 0),t([p({attribute:"readonly"})],c.prototype,"readonly",void 0),t([p({attribute:"error-message"})],c.prototype,"errorMessage",void 0),t([p({attribute:"error"})],c.prototype,"error",void 0),t([a("type",{waitUntilFirstUpdate:!0})],c.prototype,"handleTypeChange",null),_export("N",c=t([o("nile-content-editor")],c));}};});
1
+ System.register(["tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-content-editor.css.cjs.js","lit/directives/class-map.js","../internal/nile-element.cjs.js","../internal/watch.cjs.js","../internal/enum.cjs.js","lit/directives/live.js","../property-0f6a51ec.cjs.js","lit"],function(_export,_context){"use strict";var t,i,s,e,o,h,n,r,a,l,p,d,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6,_templateObject7,c;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter);}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2;}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw new Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(typeof e+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw new Error("illegal catch attempt");},delegateYield:function(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_index001CjsJs){i=_index001CjsJs.x;},function(_litDecoratorsJs){s=_litDecoratorsJs.query;e=_litDecoratorsJs.state;o=_litDecoratorsJs.customElement;},function(_nileContentEditorCssCjsJs){h=_nileContentEditorCssCjsJs.s;},function(_litDirectivesClassMapJs){n=_litDirectivesClassMapJs.classMap;},function(_internalNileElementCjsJs){r=_internalNileElementCjsJs.N;},function(_internalWatchCjsJs){a=_internalWatchCjsJs.w;},function(_internalEnumCjsJs){l=_internalEnumCjsJs.K;},function(_litDirectivesLiveJs){p=_litDirectivesLiveJs.live;},function(_property002CjsJs){d=_property002CjsJs.n;},function(_lit){}],execute:function(){_export("N",c=/*#__PURE__*/function(_r){_inherits(c,_r);var _super=_createSuper(c);function c(){var _this;_classCallCheck(this,c);_this=_super.apply(this,arguments),_this.value="",_this.showLabel=!0,_this.labelText="",_this.type="text|text-area",_this.required=!0,_this.openDropdown=!1,_this.tagIdentifier="$",_this.filteredValue="",_this.helpText="",_this.readonly=!1,_this.errorMessage="",_this.error=!1,_this.noborder=!1;return _this;}_createClass(c,[{key:"connectedCallback",value:function connectedCallback(){this.handleOutsideClick=this.handleOutsideClick.bind(this),this.handleClipboardEvent=this.handleClipboardEvent.bind(this),_get(_getPrototypeOf(c.prototype),"connectedCallback",this).call(this),this.emit("nile-init"),this.addOpenListeners(),this.setInitialValues();}},{key:"setInitialValues",value:function setInitialValues(){var _this2=this;this.updateComplete.then(function(t){t&&_this2.value&&(_this2.contentEditor.innerHTML=_this2.generateHTMLTagsWithValues(_this2.value));});}},{key:"addOpenListeners",value:function addOpenListeners(){this.addEventListener("click",this.handleOutsideClick),this.addEventListener("cut",this.handleClipboardEvent),this.addEventListener("copy",this.handleClipboardEvent),this.addEventListener("paste",this.handleClipboardEvent);}},{key:"removeOpenListeners",value:function removeOpenListeners(){this.removeEventListener("click",this.handleOutsideClick),this.removeEventListener("cut",this.handleClipboardEvent),this.removeEventListener("copy",this.handleClipboardEvent),this.removeEventListener("paste",this.handleClipboardEvent);}},{key:"handleClipboardEvent",value:function(){var _handleClipboardEvent=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(t){var _window,_this3=this;var i,_s;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:i=(_window=window)===null||_window===void 0||(_window=_window.getSelection())===null||_window===void 0?void 0:_window.toString();_context2.t0=t.type;_context2.next=_context2.t0==="cut"?4:_context2.t0==="copy"?4:_context2.t0==="paste"?10:17;break;case 4:_context2.t1=i;if(!_context2.t1){_context2.next=8;break;}_context2.next=8;return navigator.clipboard.writeText(i);case 8:document.execCommand(t.type);return _context2.abrupt("break",17);case 10:t.preventDefault();_s="";_context2.next=14;return navigator.clipboard.readText();case 14:_s=_context2.sent;_s=_s.replace(/<(|\/)(html|body|meta|span)[^>]*?>/gi,"").trim();document.execCommand("insertText",!1,_s);case 17:setTimeout(function(){_this3.emitInputChange();});case 18:case"end":return _context2.stop();}},_callee);}));function handleClipboardEvent(_x){return _handleClipboardEvent.apply(this,arguments);}return handleClipboardEvent;}()},{key:"toggleDropdown",value:function toggleDropdown(t){this.openDropdown=t;}},{key:"handleOutsideClick",value:function handleOutsideClick(t){t&&t.target&&this.toggleDropdown(!1);}},{key:"handleTypeChange",value:function handleTypeChange(){this.contentEditor.innerHTML=this.generateHTMLTagsWithValues(this.value);}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(c.prototype),"disconnectedCallback",this).call(this),this.removeOpenListeners(),this.emit("nile-destroy");}},{key:"handlekeyDown",value:function handlekeyDown(t){var _this4=this;if(t.code!==l.ENTER||"text"!==this.type){if(![l.CUT,l.COPY,l.PASTE].includes(t.code)||!t.ctrlKey&&!t.metaKey){var _document;if(t.code===l.ARROW_RIGHT&&(this.contentEditor.focus(),document.execCommand("selectAll",!1,void 0),(_document=document)!==null&&_document!==void 0&&(_document=_document.getSelection())!==null&&_document!==void 0&&_document.collapseToEnd()),t.code===l.ESCAPE)return t.preventDefault(),void this.toggleDropdown(!1);setTimeout(function(){var t=_this4.contentEditor.innerText;_this4.emitInputChange(),t.includes(_this4.tagIdentifier)?(_this4.insertNodes(_this4.contentEditor,_this4.contentEditor.childNodes),_this4.filterOptions(),_this4.toggleDropdown(!0)):_this4.toggleDropdown(!1);},10);}}else t.preventDefault();}},{key:"filterOptions",value:function filterOptions(){var _this5=this;this.filteredOptions=this.options,this.filteredValue=this.filteredValue.trim(),this.options.length&&this.filteredValue?this.filteredOptions=this.options.filter(function(t){return t.includes(_this5.filteredValue);}):this.filteredOptions=this.options;}},{key:"generateValuesFromHTMLTags",value:function generateValuesFromHTMLTags(t){return t.replace(/<span class="chips(?: chip-error)?" contenteditable="false">(.*?)<\/span>/g,function(t,i){return"{{"+i+"}}";});}},{key:"generateHTMLTagsWithValues",value:function generateHTMLTagsWithValues(t){var _this6=this;return t.replace(/{{(.*?)}}/g,function(t,i){return _this6.options.includes(i)?'<span class="chips" contenteditable="false">'+i+"</span>":_this6.setError(i);});}},{key:"setError",value:function setError(t){return this.error=!0,'<span class="chips chip-error" contenteditable="false">'+t+"</span>";}},{key:"emitInputChange",value:function emitInputChange(){if(this.contentEditor){var _t=this.contentEditor.innerHTML;""!==this.contentEditor.innerText&&(_t=this.generateValuesFromHTMLTags(_t)),_t=_t.replace(/&nbsp;/g," "),_t=_t.replace("<br>",""),this.emit("nile-change",{value:this.generateValuesFromHTMLTags(_t)});}}},{key:"insertNodes",value:function insertNodes(t,i,s){var _this7=this;_toConsumableArray(i).forEach(function(i,e){var _i$nodeValue,_i$nodeValue2,_t$childNodes$e;if(i.hasChildNodes())s?_this7.insertNodes(i,i.childNodes,s):_this7.insertNodes(i,i.childNodes);else if((_i$nodeValue=i.nodeValue)!==null&&_i$nodeValue!==void 0&&_i$nodeValue.includes(_this7.tagIdentifier))return s&&(t.childNodes[e].nodeValue=(_i$nodeValue2=i.nodeValue)===null||_i$nodeValue2===void 0?void 0:_i$nodeValue2.replace(_this7.tagIdentifier+_this7.filteredValue,""),t.childNodes[e].after(s)),void(_this7.filteredValue=(t===null||t===void 0||(_t$childNodes$e=t.childNodes[e])===null||_t$childNodes$e===void 0||(_t$childNodes$e=_t$childNodes$e.nodeValue)===null||_t$childNodes$e===void 0?void 0:_t$childNodes$e.split(_this7.tagIdentifier).slice(1).join())||"");});}},{key:"handleOptions",value:function handleOptions(t){this.toggleDropdown(!1);var i=document.createElement("span");i.setAttribute("class","chips"),i.setAttribute("contentEditable","false"),i.innerText=t,this.insertNodes(this.contentEditor,this.contentEditor.childNodes,i),this.filteredOptions=this.options,this.filteredValue="",this.emitInputChange();}},{key:"renderAutoOptions",value:function renderAutoOptions(){var _this8=this;return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["<div\n class=\"","\"\n >\n ","\n </div>"])),n({"nile-options-container":!0,"dropdown-position":"text-area"===this.type}),this.filteredOptions&&this.filteredOptions.map(function(t){return i(_templateObject2||(_templateObject2=_taggedTemplateLiteral([" <nile-option\n .value=\"","\"\n @click=\"","\"\n >","\n </nile-option>"])),t,function(i){_this8.handleOptions(t);},t);}));}},{key:"render",value:function render(){var t=!!this.helpText,s=!!this.error,e=!!this.errorMessage,o=!!this.readonly,h=!!this.noborder,r=this.type;return i(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-popup\n .active=\"","\"\n sync=\"width\"\n strategy=\"fixed\"\n placement=\"bottom\"\n class=","\n >\n <div class=\"content-editable-wrapper\" slot=\"anchor\">\n ","\n <div\n contenteditable=\"","\"\n spellcheck=\"false\"\n class=","\n @keydown=","\n ></div>\n ","\n ","\n </div>\n ","\n </nile-popup>\n "])),p(this.openDropdown),n({dropdown:!0,"dropdown--open":!0,popup:!0}),this.showLabel&&this.labelText?i(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<label class=\"ods-label\">"," </label> ",""])),this.labelText,this.required?i(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["<span class=\"asterik\">*</span>"]))):""):"",!o,n({"content-editable-input":!0,error:s||e,"read-only":o,"no-border":h,"text-area":"text-area"===r}),this.handlekeyDown,t?i(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-form-help-text>","</nile-form-help-text>\n "])),this.helpText):"",e?i(_templateObject7||(_templateObject7=_taggedTemplateLiteral(["\n <nile-form-error-message\n >","</nile-form-error-message\n >\n "])),this.errorMessage):"",this.filteredOptions&&this.filteredOptions.length?this.renderAutoOptions():null);}}]);return c;}(r));c.styles=h,t([d()],c.prototype,"value",void 0),t([d()],c.prototype,"options",void 0),t([d()],c.prototype,"filteredOptions",void 0),t([d()],c.prototype,"showLabel",void 0),t([d()],c.prototype,"labelText",void 0),t([d()],c.prototype,"type",void 0),t([d()],c.prototype,"required",void 0),t([s(".content-editable-input")],c.prototype,"contentEditor",void 0),t([s(".nile-options-container")],c.prototype,"autoOptions",void 0),t([e()],c.prototype,"openDropdown",void 0),t([d({attribute:"help-text"})],c.prototype,"helpText",void 0),t([d({attribute:"readonly"})],c.prototype,"readonly",void 0),t([d({attribute:"error-message"})],c.prototype,"errorMessage",void 0),t([d({attribute:"error"})],c.prototype,"error",void 0),t([d({attribute:"noborder"})],c.prototype,"noborder",void 0),t([a(["type","value"],{waitUntilFirstUpdate:!0})],c.prototype,"handleTypeChange",null),_export("N",c=t([o("nile-content-editor")],c));}};});
2
2
  //# sourceMappingURL=nile-content-editor.cjs.js.map