@aquera/nile-elements 0.0.74 → 0.0.76

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 (55) hide show
  1. package/README.md +10 -0
  2. package/dist/index.iife.js +182 -214
  3. package/dist/nile-calendar/nile-calendar.css.cjs.js +1 -1
  4. package/dist/nile-calendar/nile-calendar.css.cjs.js.map +1 -1
  5. package/dist/nile-calendar/nile-calendar.css.esm.js +13 -0
  6. package/dist/nile-card/nile-card.css.cjs.js +1 -1
  7. package/dist/nile-card/nile-card.css.cjs.js.map +1 -1
  8. package/dist/nile-card/nile-card.css.esm.js +4 -4
  9. package/dist/nile-checkbox/nile-checkbox.cjs.js +1 -1
  10. package/dist/nile-checkbox/nile-checkbox.cjs.js.map +1 -1
  11. package/dist/nile-checkbox/nile-checkbox.css.cjs.js +1 -1
  12. package/dist/nile-checkbox/nile-checkbox.css.cjs.js.map +1 -1
  13. package/dist/nile-checkbox/nile-checkbox.css.esm.js +30 -47
  14. package/dist/nile-checkbox/nile-checkbox.esm.js +56 -54
  15. package/dist/nile-drawer/nile-drawer.cjs.js +1 -1
  16. package/dist/nile-drawer/nile-drawer.cjs.js.map +1 -1
  17. package/dist/nile-drawer/nile-drawer.css.cjs.js +1 -1
  18. package/dist/nile-drawer/nile-drawer.css.cjs.js.map +1 -1
  19. package/dist/nile-drawer/nile-drawer.css.esm.js +7 -2
  20. package/dist/nile-drawer/nile-drawer.esm.js +15 -8
  21. package/dist/nile-tag/nile-tag.cjs.js +1 -1
  22. package/dist/nile-tag/nile-tag.cjs.js.map +1 -1
  23. package/dist/nile-tag/nile-tag.css.cjs.js +1 -1
  24. package/dist/nile-tag/nile-tag.css.cjs.js.map +1 -1
  25. package/dist/nile-tag/nile-tag.css.esm.js +50 -91
  26. package/dist/nile-tag/nile-tag.esm.js +13 -14
  27. package/dist/src/nile-calendar/nile-calendar.css.js +13 -0
  28. package/dist/src/nile-calendar/nile-calendar.css.js.map +1 -1
  29. package/dist/src/nile-card/nile-card.css.js +2 -2
  30. package/dist/src/nile-card/nile-card.css.js.map +1 -1
  31. package/dist/src/nile-checkbox/nile-checkbox.css.js +30 -47
  32. package/dist/src/nile-checkbox/nile-checkbox.css.js.map +1 -1
  33. package/dist/src/nile-checkbox/nile-checkbox.d.ts +2 -4
  34. package/dist/src/nile-checkbox/nile-checkbox.js +63 -67
  35. package/dist/src/nile-checkbox/nile-checkbox.js.map +1 -1
  36. package/dist/src/nile-drawer/nile-drawer.css.d.ts +5 -5
  37. package/dist/src/nile-drawer/nile-drawer.css.js +10 -5
  38. package/dist/src/nile-drawer/nile-drawer.css.js.map +1 -1
  39. package/dist/src/nile-drawer/nile-drawer.js +18 -9
  40. package/dist/src/nile-drawer/nile-drawer.js.map +1 -1
  41. package/dist/src/nile-tag/nile-tag.css.js +48 -89
  42. package/dist/src/nile-tag/nile-tag.css.js.map +1 -1
  43. package/dist/src/nile-tag/nile-tag.d.ts +2 -1
  44. package/dist/src/nile-tag/nile-tag.js +30 -13
  45. package/dist/src/nile-tag/nile-tag.js.map +1 -1
  46. package/dist/tsconfig.tsbuildinfo +1 -1
  47. package/package.json +1 -1
  48. package/src/nile-calendar/nile-calendar.css.ts +13 -0
  49. package/src/nile-card/nile-card.css.ts +2 -2
  50. package/src/nile-checkbox/nile-checkbox.css.ts +34 -51
  51. package/src/nile-checkbox/nile-checkbox.ts +111 -108
  52. package/src/nile-drawer/nile-drawer.css.ts +11 -6
  53. package/src/nile-drawer/nile-drawer.ts +18 -9
  54. package/src/nile-tag/nile-tag.css.ts +48 -89
  55. package/src/nile-tag/nile-tag.ts +34 -15
@@ -1 +1 @@
1
- {"version":3,"file":"nile-drawer.js","sourceRoot":"","sources":["../../../src/nile-drawer/nile-drawer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EA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CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAC3C,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC","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 '../nile-icon-button/nile-icon-button';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { HasSlotController } from '../internal/slot';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { lockBodyScrolling, unlockBodyScrolling } from '../internal/scroll';\nimport { uppercaseFirstLetter } from '../internal/string';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport Modal from '../internal/modal';\nimport NileElement from '../internal/nile-element';\nimport styles from './nile-drawer.css';\nimport type { CSSResultGroup, TemplateResult } from 'lit';\n\n/**\n * Nile drawer component.\n *\n * @tag nile-drawer\n *\n * @summary Drawers slide in from a container to expose additional options and information.\n *\n * @dependency nile-icon-button\n *\n * @slot - The drawer's main content.\n * @slot label - The drawer's label. Alternatively, you can use the `label` attribute.\n * @slot header-actions - Optional actions to add to the header. Works best with `<nile-icon-button>`.\n * @slot footer - The drawer's footer, usually one or more buttons representing various options.\n *\n * @event nile-show - Emitted when the drawer opens.\n * @event nile-after-show - Emitted after the drawer opens and all animations are complete.\n * @event nile-hide - Emitted when the drawer closes.\n * @event nile-after-hide - Emitted after the drawer closes and all animations are complete.\n * @event nile-initial-focus - Emitted when the drawer opens and is ready to receive focus. Calling\n * `event.preventDefault()` will prevent focusing and allow you to set it on a different element, such as an input.\n * @event {{ source: 'close-button' | 'keyboard' | 'overlay' }} nile-request-close - Emitted when the user attempts to\n * close the drawer by clicking the close button, clicking the overlay, or pressing escape. Calling\n * `event.preventDefault()` will keep the drawer open. Avoid using this unless closing the drawer will result in\n * destructive behavior such as data loss.\n *\n * @csspart base - The component's base wrapper.\n * @csspart overlay - The overlay that covers the screen behind the drawer.\n * @csspart panel - The drawer's panel (where the drawer and its content are rendered).\n * @csspart header - The drawer's header. This element wraps the title and header actions.\n * @csspart header-actions - Optional actions to add to the header. Works best with `<nile-icon-button>`.\n * @csspart title - The drawer's title.\n * @csspart close-button - The close button, an `<nile-icon-button>`.\n * @csspart close-button__base - The close button's exported `base` part.\n * @csspart body - The drawer's body.\n * @csspart footer - The drawer's footer.\n *\n * @cssproperty --size - The preferred size of the drawer. This will be applied to the drawer's width or height\n * depending on its `placement`. Note that the drawer will shrink to accommodate smaller screens.\n * @cssproperty --header-spacing - The amount of padding to use for the header.\n * @cssproperty --body-spacing - The amount of padding to use for the body.\n * @cssproperty --footer-spacing - The amount of padding to use for the footer.\n *\n * @animation drawer.showTop - The animation to use when showing a drawer with `top` placement.\n * @animation drawer.showEnd - The animation to use when showing a drawer with `end` placement.\n * @animation drawer.showBottom - The animation to use when showing a drawer with `bottom` placement.\n * @animation drawer.showStart - The animation to use when showing a drawer with `start` placement.\n * @animation drawer.hideTop - The animation to use when hiding a drawer with `top` placement.\n * @animation drawer.hideEnd - The animation to use when hiding a drawer with `end` placement.\n * @animation drawer.hideBottom - The animation to use when hiding a drawer with `bottom` placement.\n * @animation drawer.hideStart - The animation to use when hiding a drawer with `start` placement.\n * @animation drawer.denyClose - The animation to use when a request to close the drawer is denied.\n * @animation drawer.overlay.show - The animation to use when showing the drawer's overlay.\n * @animation drawer.overlay.hide - The animation to use when hiding the drawer's overlay.\n */\n@customElement('nile-drawer')\nexport class NileDrawer extends NileElement {\n\n\tstatic styles: CSSResultGroup = styles;\n\n private readonly hasSlotController = new HasSlotController(this, 'footer');\n private modal: Modal;\n private originalTrigger: HTMLElement | null;\n\n @query('.drawer') drawer: HTMLElement;\n @query('.drawer__panel') panel: HTMLElement;\n @query('.drawer__overlay') overlay: HTMLElement;\n\n /**\n * Indicates whether or not the drawer is open. You can toggle this attribute to show and hide the drawer, or you can\n * use the `show()` and `hide()` methods and this attribute will reflect the drawer's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /**\n * The drawer's label as displayed in the header. You should always include a relevant label even when using\n * `no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.\n */\n @property({ reflect: true }) label = '';\n\n /** The direction from which the drawer will open. */\n @property({ reflect: true }) placement: 'top' | 'end' | 'bottom' | 'start' = 'end';\n\n /**\n * By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of\n * its parent element, set this attribute and add `position: relative` to the parent.\n */\n @property({ type: Boolean, reflect: true }) contained = false;\n\n /**\n * Removes the header. This will also remove the default close button, so please ensure you provide an easy,\n * accessible way for users to dismiss the drawer.\n */\n @property({ attribute: 'no-header', type: Boolean, reflect: true }) noHeader = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);\n this.modal = new Modal(this);\n }\n\n firstUpdated() {\n this.drawer.hidden = !this.open;\n\n if (this.open) {\n this.addOpenListeners();\n\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n unlockBodyScrolling(this);\n }\n\n private requestClose(source: 'close-button' | 'keyboard' | 'overlay') {\n const slRequestClose = this.emit('nile-request-close', {\n cancelable: true,\n detail: { source }\n });\n\n if (slRequestClose.defaultPrevented) {\n const animation = getAnimation(this, 'drawer.denyClose', { dir: '' });\n animateTo(this.panel, animation.keyframes, animation.options);\n return;\n }\n\n this.hide();\n }\n\n private addOpenListeners() {\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private removeOpenListeners() {\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private handleDocumentKeyDown(event: KeyboardEvent) {\n if (this.open && !this.contained && event.key === 'Escape') {\n event.stopPropagation();\n this.requestClose('keyboard');\n }\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.open) {\n // Show\n this.emit('nile-show');\n this.addOpenListeners();\n this.originalTrigger = document.activeElement as HTMLElement;\n\n // Lock body scrolling only if the drawer isn't contained\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n\n // When the drawer is shown, Safari will attempt to set focus on whatever element has autofocus. This causes the\n // drawer's animation to jitter, so we'll temporarily remove the attribute, call `focus({ preventScroll: true })`\n // ourselves, and add the attribute back afterwards.\n //\n //\n const autoFocusTarget = this.querySelector('[autofocus]');\n if (autoFocusTarget) {\n autoFocusTarget.removeAttribute('autofocus');\n }\n\n await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);\n this.drawer.hidden = false;\n\n // Set initial focus\n requestAnimationFrame(() => {\n const slInitialFocus = this.emit('nile-initial-focus', { cancelable: true });\n\n if (!slInitialFocus.defaultPrevented) {\n // Set focus to the autofocus target and restore the attribute\n if (autoFocusTarget) {\n (autoFocusTarget as HTMLInputElement).focus({ preventScroll: true });\n } else {\n this.panel.focus({ preventScroll: true });\n }\n }\n\n // Restore the autofocus attribute\n if (autoFocusTarget) {\n autoFocusTarget.setAttribute('autofocus', '');\n }\n });\n\n const panelAnimation = getAnimation(this, `drawer.show${uppercaseFirstLetter(this.placement)}`, {\n dir: ''\n });\n const overlayAnimation = getAnimation(this, 'drawer.overlay.show', { dir: '' });\n await Promise.all([\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options),\n animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options)\n ]);\n\n this.emit('nile-after-show');\n } else {\n // Hide\n this.emit('nile-hide');\n this.removeOpenListeners();\n\n if (!this.contained) {\n this.modal.deactivate();\n unlockBodyScrolling(this);\n }\n\n await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);\n const panelAnimation = getAnimation(this, `drawer.hide${uppercaseFirstLetter(this.placement)}`, {\n dir: ''\n });\n const overlayAnimation = getAnimation(this, 'drawer.overlay.hide', { dir: '' });\n\n // Animate the overlay and the panel at the same time. Because animation durations might be different, we need to\n // hide each one individually when the animation finishes, otherwise the first one that finishes will reappear\n // unexpectedly. We'll unhide them after all animations have completed.\n await Promise.all([\n animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options).then(() => {\n this.overlay.hidden = true;\n }),\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options).then(() => {\n this.panel.hidden = true;\n })\n ]);\n\n this.drawer.hidden = true;\n\n // Now that the dialog is hidden, restore the overlay and panel for next time\n this.overlay.hidden = false;\n this.panel.hidden = false;\n\n // Restore focus to the original trigger\n const trigger = this.originalTrigger;\n if (typeof trigger?.focus === 'function') {\n setTimeout(() => trigger.focus());\n }\n\n this.emit('nile-after-hide');\n }\n }\n\n @watch('contained', { waitUntilFirstUpdate: true })\n handleNoModalChange() {\n if (this.open && !this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n\n if (this.open && this.contained) {\n this.modal.deactivate();\n unlockBodyScrolling(this);\n }\n }\n\n /** Shows the drawer. */\n async show() {\n if (this.open) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n }\n\n /** Hides the drawer */\n async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n }\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n drawer: true,\n 'drawer--open': this.open,\n 'drawer--top': this.placement === 'top',\n 'drawer--end': this.placement === 'end',\n 'drawer--bottom': this.placement === 'bottom',\n 'drawer--start': this.placement === 'start',\n 'drawer--contained': this.contained,\n 'drawer--fixed': !this.contained,\n 'drawer--rtl': 'rtl',\n 'drawer--has-footer': this.hasSlotController.test('footer')\n })}\n >\n <div part=\"overlay\" class=\"drawer__overlay\" @click=${() => this.requestClose('overlay')} tabindex=\"-1\"></div>\n\n <div\n part=\"panel\"\n class=\"drawer__panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-hidden=${this.open ? 'false' : 'true'}\n aria-label=${ifDefined(this.noHeader ? this.label : undefined)}\n aria-labelledby=${ifDefined(!this.noHeader ? 'title' : undefined)}\n tabindex=\"0\"\n >\n ${!this.noHeader\n ? html`\n <header part=\"header\" class=\"drawer__header\">\n <h2 part=\"title\" class=\"drawer__title\" id=\"title\">\n <!-- If there's no label, use an invisible character to prevent the header from collapsing -->\n <slot name=\"label\"> ${this.label.length > 0 ? this.label : String.fromCharCode(65279)} </slot>\n </h2>\n <div part=\"header-actions\" class=\"drawer__header-actions\">\n <slot name=\"header-actions\"></slot>\n <nile-icon-button\n part=\"close-button\"\n exportparts=\"base:close-button__base\"\n class=\"drawer__close\"\n name=\"close\"\n label='close'\n library=\"system\"\n @click=${() => this.requestClose('close-button')}\n ></nile-icon-button>\n </div>\n </header>\n `\n : ''}\n\n <slot part=\"body\" class=\"drawer__body\"></slot>\n\n <footer part=\"footer\" class=\"drawer__footer\">\n <slot name=\"footer\"></slot>\n </footer>\n </div>\n </div>\n `;\n }\n}\n\n// Top\nsetDefaultAnimation('drawer.showTop', {\n keyframes: [\n { opacity: 0, translate: '0 -100%' },\n { opacity: 1, translate: '0 0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideTop', {\n keyframes: [\n { opacity: 1, translate: '0 0' },\n { opacity: 0, translate: '0 -100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// End\nsetDefaultAnimation('drawer.showEnd', {\n keyframes: [\n { opacity: 0, translate: '100%' },\n { opacity: 1, translate: '0' }\n ],\n rtlKeyframes: [\n { opacity: 0, translate: '-100%' },\n { opacity: 1, translate: '0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideEnd', {\n keyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '100%' }\n ],\n rtlKeyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '-100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Bottom\nsetDefaultAnimation('drawer.showBottom', {\n keyframes: [\n { opacity: 0, translate: '0 100%' },\n { opacity: 1, translate: '0 0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideBottom', {\n keyframes: [\n { opacity: 1, translate: '0 0' },\n { opacity: 0, translate: '0 100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Start\nsetDefaultAnimation('drawer.showStart', {\n keyframes: [\n { opacity: 0, translate: '-100%' },\n { opacity: 1, translate: '0' }\n ],\n rtlKeyframes: [\n { opacity: 0, translate: '100%' },\n { opacity: 1, translate: '0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideStart', {\n keyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '-100%' }\n ],\n rtlKeyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Deny close\nsetDefaultAnimation('drawer.denyClose', {\n keyframes: [{ scale: 1 }, { scale: 1.01 }, { scale: 1 }],\n options: { duration: 250 }\n});\n\n// Overlay\nsetDefaultAnimation('drawer.overlay.show', {\n keyframes: [{ opacity: 0 }, { opacity: 1 }],\n options: { duration: 250 }\n});\n\nsetDefaultAnimation('drawer.overlay.hide', {\n keyframes: [{ opacity: 1 }, { opacity: 0 }],\n options: { duration: 250 }\n});\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-drawer': NileDrawer;\n }\n}\n"]}
1
+ {"version":3,"file":"nile-drawer.js","sourceRoot":"","sources":["../../../src/nile-drawer/nile-drawer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,sCAAsC,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AACvD,OAAO,EA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E,CAAC;IAC3C,OAAO,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE;CAC3B,CAAC,CAAC","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 '../nile-icon-button/nile-icon-button';\nimport { animateTo, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { HasSlotController } from '../internal/slot';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { lockBodyScrolling, unlockBodyScrolling } from '../internal/scroll';\nimport { uppercaseFirstLetter } from '../internal/string';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport Modal from '../internal/modal';\nimport NileElement from '../internal/nile-element';\nimport styles from './nile-drawer.css';\nimport type { CSSResultGroup, TemplateResult } from 'lit';\n\n/**\n * Nile drawer component.\n *\n * @tag nile-drawer\n *\n * @summary Drawers slide in from a container to expose additional options and information.\n *\n * @dependency nile-icon-button\n *\n * @slot - The drawer's main content.\n * @slot label - The drawer's label. Alternatively, you can use the `label` attribute.\n * @slot header-actions - Optional actions to add to the header. Works best with `<nile-icon-button>`.\n * @slot footer - The drawer's footer, usually one or more buttons representing various options.\n *\n * @event nile-show - Emitted when the drawer opens.\n * @event nile-after-show - Emitted after the drawer opens and all animations are complete.\n * @event nile-hide - Emitted when the drawer closes.\n * @event nile-after-hide - Emitted after the drawer closes and all animations are complete.\n * @event nile-initial-focus - Emitted when the drawer opens and is ready to receive focus. Calling\n * `event.preventDefault()` will prevent focusing and allow you to set it on a different element, such as an input.\n * @event {{ source: 'close-button' | 'keyboard' | 'overlay' }} nile-request-close - Emitted when the user attempts to\n * close the drawer by clicking the close button, clicking the overlay, or pressing escape. Calling\n * `event.preventDefault()` will keep the drawer open. Avoid using this unless closing the drawer will result in\n * destructive behavior such as data loss.\n *\n * @csspart base - The component's base wrapper.\n * @csspart overlay - The overlay that covers the screen behind the drawer.\n * @csspart panel - The drawer's panel (where the drawer and its content are rendered).\n * @csspart header - The drawer's header. This element wraps the title and header actions.\n * @csspart header-actions - Optional actions to add to the header. Works best with `<nile-icon-button>`.\n * @csspart title - The drawer's title.\n * @csspart close-button - The close button, an `<nile-icon-button>`.\n * @csspart close-button__base - The close button's exported `base` part.\n * @csspart body - The drawer's body.\n * @csspart footer - The drawer's footer.\n *\n * @cssproperty --size - The preferred size of the drawer. This will be applied to the drawer's width or height\n * depending on its `placement`. Note that the drawer will shrink to accommodate smaller screens.\n * @cssproperty --header-spacing - The amount of padding to use for the header.\n * @cssproperty --body-spacing - The amount of padding to use for the body.\n * @cssproperty --footer-spacing - The amount of padding to use for the footer.\n *\n * @animation drawer.showTop - The animation to use when showing a drawer with `top` placement.\n * @animation drawer.showEnd - The animation to use when showing a drawer with `end` placement.\n * @animation drawer.showBottom - The animation to use when showing a drawer with `bottom` placement.\n * @animation drawer.showStart - The animation to use when showing a drawer with `start` placement.\n * @animation drawer.hideTop - The animation to use when hiding a drawer with `top` placement.\n * @animation drawer.hideEnd - The animation to use when hiding a drawer with `end` placement.\n * @animation drawer.hideBottom - The animation to use when hiding a drawer with `bottom` placement.\n * @animation drawer.hideStart - The animation to use when hiding a drawer with `start` placement.\n * @animation drawer.denyClose - The animation to use when a request to close the drawer is denied.\n * @animation drawer.overlay.show - The animation to use when showing the drawer's overlay.\n * @animation drawer.overlay.hide - The animation to use when hiding the drawer's overlay.\n */\n@customElement('nile-drawer')\nexport class NileDrawer extends NileElement {\n\n\tstatic styles: CSSResultGroup = styles;\n\n private readonly hasSlotController = new HasSlotController(this, 'footer');\n private modal: Modal;\n private originalTrigger: HTMLElement | null;\n\n @query('.drawer') drawer: HTMLElement;\n @query('.drawer__panel') panel: HTMLElement;\n @query('.drawer__overlay') overlay: HTMLElement;\n\n /**\n * Indicates whether or not the drawer is open. You can toggle this attribute to show and hide the drawer, or you can\n * use the `show()` and `hide()` methods and this attribute will reflect the drawer's open state.\n */\n @property({ type: Boolean, reflect: true }) open = false;\n\n /**\n * The drawer's label as displayed in the header. You should always include a relevant label even when using\n * `no-header`, as it is required for proper accessibility. If you need to display HTML, use the `label` slot instead.\n */\n @property({ reflect: true }) label = '';\n\n /** The direction from which the drawer will open. */\n @property({ reflect: true }) placement: 'top' | 'end' | 'bottom' | 'start' = 'end';\n\n /**\n * By default, the drawer slides out of its containing block (usually the viewport). To make the drawer slide out of\n * its parent element, set this attribute and add `position: relative` to the parent.\n */\n @property({ type: Boolean, reflect: true }) contained = false;\n\n /**\n * Removes the header. This will also remove the default close button, so please ensure you provide an easy,\n * accessible way for users to dismiss the drawer.\n */\n @property({ attribute: 'no-header', type: Boolean, reflect: true }) noHeader = false;\n\n connectedCallback() {\n super.connectedCallback();\n this.handleDocumentKeyDown = this.handleDocumentKeyDown.bind(this);\n this.modal = new Modal(this);\n }\n\n firstUpdated() {\n this.drawer.hidden = !this.open;\n\n if (this.open) {\n this.addOpenListeners();\n\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n }\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n unlockBodyScrolling(this);\n }\n\n private requestClose(source: 'close-button' | 'keyboard' | 'overlay') {\n const slRequestClose = this.emit('nile-request-close', {\n cancelable: true,\n detail: { source }\n });\n\n if (slRequestClose.defaultPrevented) {\n const animation = getAnimation(this, 'drawer.denyClose', { dir: '' });\n animateTo(this.panel, animation.keyframes, animation.options);\n return;\n }\n\n this.hide();\n }\n\n private addOpenListeners() {\n document.addEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private removeOpenListeners() {\n document.removeEventListener('keydown', this.handleDocumentKeyDown);\n }\n\n private handleDocumentKeyDown(event: KeyboardEvent) {\n if (this.open && !this.contained && event.key === 'Escape') {\n event.stopPropagation();\n this.requestClose('keyboard');\n }\n }\n\n @watch('open', { waitUntilFirstUpdate: true })\n async handleOpenChange() {\n if (this.open) {\n // Show\n this.emit('nile-show');\n this.addOpenListeners();\n this.originalTrigger = document.activeElement as HTMLElement;\n\n // Lock body scrolling only if the drawer isn't contained\n if (!this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n\n // When the drawer is shown, Safari will attempt to set focus on whatever element has autofocus. This causes the\n // drawer's animation to jitter, so we'll temporarily remove the attribute, call `focus({ preventScroll: true })`\n // ourselves, and add the attribute back afterwards.\n //\n //\n const autoFocusTarget = this.querySelector('[autofocus]');\n if (autoFocusTarget) {\n autoFocusTarget.removeAttribute('autofocus');\n }\n\n await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);\n this.drawer.hidden = false;\n\n // Set initial focus\n requestAnimationFrame(() => {\n const slInitialFocus = this.emit('nile-initial-focus', { cancelable: true });\n\n if (!slInitialFocus.defaultPrevented) {\n // Set focus to the autofocus target and restore the attribute\n if (autoFocusTarget) {\n (autoFocusTarget as HTMLInputElement).focus({ preventScroll: true });\n } else {\n this.panel.focus({ preventScroll: true });\n }\n }\n\n // Restore the autofocus attribute\n if (autoFocusTarget) {\n autoFocusTarget.setAttribute('autofocus', '');\n }\n });\n\n const panelAnimation = getAnimation(this, `drawer.show${uppercaseFirstLetter(this.placement)}`, {\n dir: ''\n });\n const overlayAnimation = getAnimation(this, 'drawer.overlay.show', { dir: '' });\n await Promise.all([\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options),\n animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options)\n ]);\n\n this.emit('nile-after-show');\n } else {\n // Hide\n this.emit('nile-hide');\n this.removeOpenListeners();\n\n if (!this.contained) {\n this.modal.deactivate();\n unlockBodyScrolling(this);\n }\n\n await Promise.all([stopAnimations(this.drawer), stopAnimations(this.overlay)]);\n const panelAnimation = getAnimation(this, `drawer.hide${uppercaseFirstLetter(this.placement)}`, {\n dir: ''\n });\n const overlayAnimation = getAnimation(this, 'drawer.overlay.hide', { dir: '' });\n\n // Animate the overlay and the panel at the same time. Because animation durations might be different, we need to\n // hide each one individually when the animation finishes, otherwise the first one that finishes will reappear\n // unexpectedly. We'll unhide them after all animations have completed.\n await Promise.all([\n animateTo(this.overlay, overlayAnimation.keyframes, overlayAnimation.options).then(() => {\n this.overlay.hidden = true;\n }),\n animateTo(this.panel, panelAnimation.keyframes, panelAnimation.options).then(() => {\n this.panel.hidden = true;\n })\n ]);\n\n this.drawer.hidden = true;\n\n // Now that the dialog is hidden, restore the overlay and panel for next time\n this.overlay.hidden = false;\n this.panel.hidden = false;\n\n // Restore focus to the original trigger\n const trigger = this.originalTrigger;\n if (typeof trigger?.focus === 'function') {\n setTimeout(() => trigger.focus());\n }\n\n this.emit('nile-after-hide');\n }\n }\n\n @watch('contained', { waitUntilFirstUpdate: true })\n handleNoModalChange() {\n if (this.open && !this.contained) {\n this.modal.activate();\n lockBodyScrolling(this);\n }\n\n if (this.open && this.contained) {\n this.modal.deactivate();\n unlockBodyScrolling(this);\n }\n }\n\n /** Shows the drawer. */\n async show() {\n if (this.open) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n }\n\n /** Hides the drawer */\n async hide() {\n if (!this.open) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n }\n\n render() {\n return html`\n <div\n part=\"base\"\n class=${classMap({\n drawer: true,\n 'drawer--open': this.open,\n 'drawer--top': this.placement === 'top',\n 'drawer--end': this.placement === 'end',\n 'drawer--bottom': this.placement === 'bottom',\n 'drawer--start': this.placement === 'start',\n 'drawer--contained': this.contained,\n 'drawer--fixed': !this.contained,\n 'drawer--rtl': 'rtl',\n 'drawer--has-footer': this.hasSlotController.test('footer'),\n })}\n >\n <div\n part=\"overlay\"\n class=\"drawer__overlay\"\n @click=${() => this.requestClose('overlay')}\n tabindex=\"-1\"\n ></div>\n\n <div\n part=\"panel\"\n class=\"drawer__panel\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-hidden=${this.open ? 'false' : 'true'}\n aria-label=${ifDefined(this.noHeader ? this.label : undefined)}\n aria-labelledby=${ifDefined(!this.noHeader ? 'title' : undefined)}\n tabindex=\"0\"\n >\n ${!this.noHeader\n ? html`\n <header part=\"header\" class=\"drawer__header\">\n <h2 part=\"title\" class=\"drawer__title\" id=\"title\">\n <!-- If there's no label, use an invisible character to prevent the header from collapsing -->\n <slot name=\"label\">\n ${this.label.length > 0\n ? this.label\n : String.fromCharCode(65279)}\n </slot>\n </h2>\n <div part=\"header-actions\" class=\"drawer__header-actions\">\n <slot name=\"header-actions\"></slot>\n <nile-icon\n class=\"drawer__close\"\n name=\"close\"\n label=\"close\"\n part=\"close-button\"\n exportparts=\"base:close-button__base\"\n color=\"var(--nile-drawer-remove-icon-color)\"\n @click=${() => this.requestClose('close-button')}\n ></nile-icon>\n </div>\n </header>\n `\n : ''}\n\n <slot part=\"body\" class=\"drawer__body\"></slot>\n\n <footer part=\"footer\" class=\"drawer__footer\">\n <slot name=\"footer\"></slot>\n </footer>\n </div>\n </div>\n `;\n }\n}\n\n// Top\nsetDefaultAnimation('drawer.showTop', {\n keyframes: [\n { opacity: 0, translate: '0 -100%' },\n { opacity: 1, translate: '0 0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideTop', {\n keyframes: [\n { opacity: 1, translate: '0 0' },\n { opacity: 0, translate: '0 -100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// End\nsetDefaultAnimation('drawer.showEnd', {\n keyframes: [\n { opacity: 0, translate: '100%' },\n { opacity: 1, translate: '0' }\n ],\n rtlKeyframes: [\n { opacity: 0, translate: '-100%' },\n { opacity: 1, translate: '0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideEnd', {\n keyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '100%' }\n ],\n rtlKeyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '-100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Bottom\nsetDefaultAnimation('drawer.showBottom', {\n keyframes: [\n { opacity: 0, translate: '0 100%' },\n { opacity: 1, translate: '0 0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideBottom', {\n keyframes: [\n { opacity: 1, translate: '0 0' },\n { opacity: 0, translate: '0 100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Start\nsetDefaultAnimation('drawer.showStart', {\n keyframes: [\n { opacity: 0, translate: '-100%' },\n { opacity: 1, translate: '0' }\n ],\n rtlKeyframes: [\n { opacity: 0, translate: '100%' },\n { opacity: 1, translate: '0' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\nsetDefaultAnimation('drawer.hideStart', {\n keyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '-100%' }\n ],\n rtlKeyframes: [\n { opacity: 1, translate: '0' },\n { opacity: 0, translate: '100%' }\n ],\n options: { duration: 250, easing: 'ease' }\n});\n\n// Deny close\nsetDefaultAnimation('drawer.denyClose', {\n keyframes: [{ scale: 1 }, { scale: 1.01 }, { scale: 1 }],\n options: { duration: 250 }\n});\n\n// Overlay\nsetDefaultAnimation('drawer.overlay.show', {\n keyframes: [{ opacity: 0 }, { opacity: 1 }],\n options: { duration: 250 }\n});\n\nsetDefaultAnimation('drawer.overlay.hide', {\n keyframes: [{ opacity: 1 }, { opacity: 0 }],\n options: { duration: 250 }\n});\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-drawer': NileDrawer;\n }\n}\n"]}
@@ -11,21 +11,22 @@ import { css } from 'lit-element';
11
11
  export const styles = css `
12
12
  :host {
13
13
  display: inline-block;
14
- --nile-remove-icon-color: var(--nile-colors-blue-500);
15
14
  }
16
15
 
17
16
  .tag {
18
17
  display: flex;
19
18
  align-items: center;
20
- justify-items: center;
21
- text-align: center;
22
- gap: 3px;
19
+ border: solid 2px;
20
+ line-height: 1;
23
21
  white-space: nowrap;
24
22
  user-select: none;
25
23
  border-radius: 4px;
26
- box-sizing: border-box;
27
- color: var(--colors-text-text-secondary-700, #344054);
28
- font-family: var(--nile-font-family-serif);
24
+ gap: 6px;
25
+ }
26
+
27
+ .tag__remove::part(base) {
28
+ color: inherit;
29
+ padding: 0;
29
30
  }
30
31
 
31
32
  /*
@@ -33,120 +34,101 @@ export const styles = css `
33
34
  */
34
35
 
35
36
  .tag--primary {
36
- background: #005ea6;
37
- color: #fff;
38
- --nile-remove-icon-color: var(--nile-colors-blue-500);
37
+ background: #005EA6;
38
+ border-color: #005EA6;
39
+ border: 2px solid #005EA6;
40
+ color: #FFF;
39
41
  }
40
42
 
41
43
  .tag--primary:hover {
42
- outline: 2px solid rgba(0, 94, 166, 0.5);
44
+ border: 2px solid rgba(0, 94, 166, 0.50);
43
45
  }
44
46
 
45
- .tag--primary:active > nile-icon {
47
+ .tag--primary:active > nile-icon-button {
46
48
  color: hsl(200.4 98% 39.4%);
47
49
  }
48
50
 
49
51
  .tag--success {
50
- background: #a5f3e1;
52
+ background: #A5F3E1;
53
+ border: 2px solid #A5F3E1;
51
54
  color: #000;
52
- --nile-remove-icon-color: var(--nile-colors-green-500);
53
55
  }
54
56
 
55
57
  .tag--success:hover {
56
- outline: 2px solid #43e5c0;
58
+ border: 2px solid #43E5C0;
57
59
  }
58
60
 
59
- .tag--success:active > nile-icon {
61
+ .tag--success:active > nile-icon-button {
60
62
  color: hsl(142.1 76.2% 36.3%);
61
63
  }
62
64
 
63
65
  .tag--normal {
64
- background: #e5e9eb;
66
+ background: #E5E9EB;
67
+ border: 2px solid #E5E9EB;
65
68
  color: #000;
66
- --nile-remove-icon-color: var(--nile-colors-dark-500);
67
69
  }
68
70
 
69
71
  .tag--normal:hover {
70
- outline: 2px solid #c7ced4;
72
+ border: 2px solid #C7CED4;
71
73
  }
72
74
 
73
- .tag--normal:active > nile-icon {
75
+
76
+ .tag--normal:active > nile-icon-button {
74
77
  color: hsl(240 5.2% 33.9%);
75
78
  }
76
79
 
77
80
  .tag--warning {
78
- background: #f3e0a5;
81
+ background: #F3E0A5;
82
+ border: 2px solid #F3E0A5;
79
83
  color: #000;
80
- --nile-remove-icon-color: var(--nile-colors-yellow-500);
81
84
  }
82
85
 
83
86
  .tag--warning:hover {
84
- outline: 2px solid #e5bf43;
87
+ border: 2px solid #E5BF43;
85
88
  }
86
89
 
87
- .tag--warning:active > nile-icon {
90
+ .tag--warning:active > nile-icon-button {
88
91
  color: hsl(32.1 94.6% 43.7%);
89
92
  }
90
93
 
94
+
91
95
  .tag--error {
92
- background: #f3a5aa;
96
+ background: #F3A5AA;
97
+ border: 2px solid #F3A5AA;
93
98
  color: #000;
94
- --nile-remove-icon-color: var(--nile-colors-red-500);
95
99
  }
96
100
 
97
101
  .tag--error:hover {
98
- outline: 2px solid #e5434d;
102
+ border: 2px solid #E5434D;
99
103
  }
100
104
 
101
- .tag--error:active > nile-icon {
105
+ .tag--error:active > nile-icon-button {
102
106
  color: hsl(0 72.2% 50.6%);
103
107
  }
104
108
 
105
109
  .tag--info {
106
- background: #a5d3f3;
110
+ background: #A5D3F3;
111
+ border: 2px solid #A5D3F3;
107
112
  color: #000000;
108
- --nile-remove-icon-color: var(--nile-colors-blue-500);
109
113
  }
110
114
 
111
115
  .tag--info:hover {
112
- outline: 2px solid #42a3e5;
116
+ border: 2px solid #42A3E5;
113
117
  }
114
118
 
115
- .tag--info:active > nile-icon {
119
+ .tag--info:active > nile-icon-button {
116
120
  color: hsl(0 72.2% 50.6%);
117
121
  }
118
122
 
119
- .tag--gray {
120
- background: var(--nile-tag-gray-background-color);
121
- border: 1px solid var(--nile-colors-gray-light-mode-300);
122
- color: var(--nile-tag-gray-color);
123
- --nile-remove-icon-color: var(--nile-tag-gray-x-color);
124
- }
125
-
126
- .tag--gray:hover {
127
- background-color: var(--nile-tag-gray-hover-background-color);
128
- }
129
-
130
- /* .tag--gray:active > nile-icon {
131
- color: #101828;
132
- } */
133
-
134
- .tag--small {
135
- height: 24px;
136
- padding: 3px 8px;
137
- font-size: 12px;
138
- font-style: normal;
139
- font-weight: 500;
140
- line-height: 18px;
141
- }
142
123
 
143
124
  .tag--medium {
144
- height: 24px;
145
- padding: 2px 9px;
146
125
  font-size: 14px;
147
- font-style: normal;
148
- font-weight: 500;
149
- line-height: 20px;
126
+ height: 26px;
127
+ padding: 0 0.75rem;
128
+ }
129
+
130
+ .tag__remove {
131
+ margin-inline-start: 0.5rem;
150
132
  }
151
133
 
152
134
  /*
@@ -157,37 +139,14 @@ export const styles = css `
157
139
  border-radius: 9999px;
158
140
  }
159
141
 
160
- .tag__content {
161
- display: inline-block;
162
- }
163
-
164
- .tag--medium .tag__remove-wrapper {
165
- display: inline-flex;
166
- justify-content: centre;
167
- box-sizing: border-box;
168
- height: 16px;
169
- width: 16px;
170
- padding: 2px;
171
- }
142
+ .tag__prefix {
143
+ padding: 3px 6px;
144
+ }
172
145
 
173
- .tag--small .tag__remove-wrapper {
174
- display: inline-flex;
175
- justify-content: centre;
176
- box-sizing: border-box;
177
- height: 14px;
178
- width: 14px;
179
- padding: 2px;
180
- }
146
+ .tag__content {
147
+ font-size: 14px;
148
+ }
181
149
 
182
- .tag--removable {
183
- padding: 2px 2px 2px 9px;
184
- }
185
-
186
- .tag__remove:hover {
187
- cursor: pointer;
188
- --nile-remove-icon-color: #101828;
189
- color: red;
190
- }
191
150
  `;
192
151
  export default [styles];
193
152
  //# sourceMappingURL=nile-tag.css.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-tag.css.js","sourceRoot":"","sources":["../../../src/nile-tag/nile-tag.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoLxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","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 * Tag CSS\n */\nexport const styles = css`\n :host {\n display: inline-block;\n --nile-remove-icon-color: var(--nile-colors-blue-500);\n }\n\n .tag {\n display: flex;\n align-items: center;\n justify-items: center;\n text-align: center;\n gap: 3px;\n white-space: nowrap;\n user-select: none;\n border-radius: 4px;\n box-sizing: border-box;\n color: var(--colors-text-text-secondary-700, #344054);\n font-family: var(--nile-font-family-serif);\n }\n\n /*\n * Variant modifiers\n */\n\n .tag--primary {\n background: #005ea6;\n color: #fff;\n --nile-remove-icon-color: var(--nile-colors-blue-500);\n }\n\n .tag--primary:hover {\n outline: 2px solid rgba(0, 94, 166, 0.5);\n }\n\n .tag--primary:active > nile-icon {\n color: hsl(200.4 98% 39.4%);\n }\n\n .tag--success {\n background: #a5f3e1;\n color: #000;\n --nile-remove-icon-color: var(--nile-colors-green-500);\n }\n\n .tag--success:hover {\n outline: 2px solid #43e5c0;\n }\n\n .tag--success:active > nile-icon {\n color: hsl(142.1 76.2% 36.3%);\n }\n\n .tag--normal {\n background: #e5e9eb;\n color: #000;\n --nile-remove-icon-color: var(--nile-colors-dark-500);\n }\n\n .tag--normal:hover {\n outline: 2px solid #c7ced4;\n }\n\n .tag--normal:active > nile-icon {\n color: hsl(240 5.2% 33.9%);\n }\n\n .tag--warning {\n background: #f3e0a5;\n color: #000;\n --nile-remove-icon-color: var(--nile-colors-yellow-500);\n }\n\n .tag--warning:hover {\n outline: 2px solid #e5bf43;\n }\n\n .tag--warning:active > nile-icon {\n color: hsl(32.1 94.6% 43.7%);\n }\n\n .tag--error {\n background: #f3a5aa;\n color: #000;\n --nile-remove-icon-color: var(--nile-colors-red-500);\n }\n\n .tag--error:hover {\n outline: 2px solid #e5434d;\n }\n\n .tag--error:active > nile-icon {\n color: hsl(0 72.2% 50.6%);\n }\n\n .tag--info {\n background: #a5d3f3;\n color: #000000;\n --nile-remove-icon-color: var(--nile-colors-blue-500);\n }\n\n .tag--info:hover {\n outline: 2px solid #42a3e5;\n }\n\n .tag--info:active > nile-icon {\n color: hsl(0 72.2% 50.6%);\n }\n\n .tag--gray {\n background: var(--nile-tag-gray-background-color);\n border: 1px solid var(--nile-colors-gray-light-mode-300);\n color: var(--nile-tag-gray-color);\n --nile-remove-icon-color: var(--nile-tag-gray-x-color);\n }\n\n .tag--gray:hover {\n background-color: var(--nile-tag-gray-hover-background-color);\n }\n\n /* .tag--gray:active > nile-icon {\n color: #101828;\n } */\n\n .tag--small {\n height: 24px;\n padding: 3px 8px;\n font-size: 12px;\n font-style: normal;\n font-weight: 500;\n line-height: 18px;\n }\n\n .tag--medium {\n height: 24px;\n padding: 2px 9px;\n font-size: 14px;\n font-style: normal;\n font-weight: 500;\n line-height: 20px;\n }\n\n /*\n * Pill modifier\n */\n\n .tag--pill {\n border-radius: 9999px;\n }\n\n .tag__content {\n display: inline-block;\n }\n\n .tag--medium .tag__remove-wrapper {\n display: inline-flex;\n justify-content: centre;\n box-sizing: border-box;\n height: 16px;\n width: 16px;\n padding: 2px;\n }\n\n .tag--small .tag__remove-wrapper {\n display: inline-flex;\n justify-content: centre;\n box-sizing: border-box;\n height: 14px;\n width: 14px;\n padding: 2px;\n }\n\n .tag--removable {\n padding: 2px 2px 2px 9px;\n }\n\n .tag__remove:hover {\n cursor: pointer;\n --nile-remove-icon-color: #101828;\n color: red;\n }\n`;\n\nexport default [styles];\n"]}
1
+ {"version":3,"file":"nile-tag.css.js","sourceRoot":"","sources":["../../../src/nile-tag/nile-tag.css.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAElC;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2IxB,CAAC;AAEF,eAAe,CAAC,MAAM,CAAC,CAAC","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 * Tag CSS\n */\nexport const styles = css`\n :host {\n display: inline-block;\n }\n\n .tag {\n display: flex;\n align-items: center;\n border: solid 2px;\n line-height: 1;\n white-space: nowrap;\n user-select: none;\n border-radius: 4px;\n gap: 6px;\n }\n\n .tag__remove::part(base) {\n color: inherit;\n padding: 0;\n }\n\n /*\n * Variant modifiers\n */\n\n .tag--primary {\n background: #005EA6;\n border-color: #005EA6;\n border: 2px solid #005EA6;\n color: #FFF;\n }\n\n .tag--primary:hover {\n border: 2px solid rgba(0, 94, 166, 0.50);\n }\n\n .tag--primary:active > nile-icon-button {\n color: hsl(200.4 98% 39.4%);\n }\n\n .tag--success {\n background: #A5F3E1;\n border: 2px solid #A5F3E1;\n color: #000;\n }\n\n .tag--success:hover {\n border: 2px solid #43E5C0;\n }\n\n .tag--success:active > nile-icon-button {\n color: hsl(142.1 76.2% 36.3%);\n }\n\n .tag--normal {\n background: #E5E9EB;\n border: 2px solid #E5E9EB;\n color: #000;\n }\n\n .tag--normal:hover {\n border: 2px solid #C7CED4;\n }\n\n\n .tag--normal:active > nile-icon-button {\n color: hsl(240 5.2% 33.9%);\n }\n\n .tag--warning {\n background: #F3E0A5;\n border: 2px solid #F3E0A5;\n color: #000;\n }\n\n .tag--warning:hover {\n border: 2px solid #E5BF43;\n }\n\n .tag--warning:active > nile-icon-button {\n color: hsl(32.1 94.6% 43.7%);\n }\n\n\n .tag--error {\n background: #F3A5AA;\n border: 2px solid #F3A5AA;\n color: #000;\n }\n\n .tag--error:hover {\n border: 2px solid #E5434D;\n }\n\n .tag--error:active > nile-icon-button {\n color: hsl(0 72.2% 50.6%);\n }\n\n .tag--info {\n background: #A5D3F3;\n border: 2px solid #A5D3F3;\n color: #000000;\n }\n\n .tag--info:hover {\n border: 2px solid #42A3E5;\n }\n\n .tag--info:active > nile-icon-button {\n color: hsl(0 72.2% 50.6%);\n }\n\n\n .tag--medium {\n font-size: 14px;\n height: 26px;\n padding: 0 0.75rem;\n }\n\n .tag__remove {\n margin-inline-start: 0.5rem;\n }\n\n /*\n * Pill modifier\n */\n\n .tag--pill {\n border-radius: 9999px;\n }\n\n .tag__prefix {\n padding: 3px 6px;\n}\n\n .tag__content {\n font-size: 14px;\n}\n\n`;\n\nexport default [styles];\n"]}
@@ -32,7 +32,7 @@ import type { CSSResultGroup } from 'lit';
32
32
  export declare class NileTag extends NileElement {
33
33
  static styles: CSSResultGroup;
34
34
  /** The tag's theme variant. */
35
- variant: 'primary' | 'success' | 'normal' | 'warning' | 'error' | 'info' | 'gray';
35
+ variant: 'primary' | 'success' | 'normal' | 'warning' | 'error' | 'info';
36
36
  /** The tag's size. */
37
37
  size: 'small' | 'medium' | 'large';
38
38
  /** Draws a pill-style tag with rounded edges. */
@@ -40,6 +40,7 @@ export declare class NileTag extends NileElement {
40
40
  /** Makes the tag removable and shows a remove button. */
41
41
  removable: boolean;
42
42
  private handleRemoveClick;
43
+ getCloseButtonColor(): "--nile-colors-blue-500" | "--nile-colors-green-500" | "--nile-colors-dark-500" | "--nile-colors-yellow-500" | "--nile-colors-red-500";
43
44
  render(): TemplateResult<1>;
44
45
  }
45
46
  export default NileTag;
@@ -47,7 +47,26 @@ let NileTag = class NileTag extends NileElement {
47
47
  handleRemoveClick() {
48
48
  this.emit('nile-remove');
49
49
  }
50
+ getCloseButtonColor() {
51
+ switch (this.variant) {
52
+ case 'primary':
53
+ return '--nile-colors-blue-500';
54
+ case 'success':
55
+ return '--nile-colors-green-500';
56
+ case 'normal':
57
+ return '--nile-colors-dark-500';
58
+ case 'warning':
59
+ return '--nile-colors-yellow-500';
60
+ case 'error':
61
+ return '--nile-colors-red-500';
62
+ case 'info':
63
+ return '--nile-colors-blue-500';
64
+ default:
65
+ return '--nile-colors-dark-500';
66
+ }
67
+ }
50
68
  render() {
69
+ const colorVariable = this.getCloseButtonColor();
51
70
  return html `
52
71
  <span
53
72
  part="base"
@@ -60,7 +79,6 @@ let NileTag = class NileTag extends NileElement {
60
79
  'tag--warning': this.variant === 'warning',
61
80
  'tag--error': this.variant === 'error',
62
81
  'tag--info': this.variant === 'info',
63
- 'tag--gray': this.variant === 'gray',
64
82
  // Sizes
65
83
  'tag--small': this.size === 'small',
66
84
  'tag--medium': this.size === 'medium',
@@ -76,18 +94,17 @@ let NileTag = class NileTag extends NileElement {
76
94
 
77
95
  ${this.removable
78
96
  ? html `
79
- <span class="tag__remove-wrapper">
80
- <nile-icon
81
- name="close"
82
- part="remove-button"
83
- exportparts="base:remove-button__base"
84
- class="tag__remove"
85
- @click=${this.handleRemoveClick}
86
- tabindex="-1"
87
- color="var(--nile-remove-icon-color)"
88
- size="${this.size === 'small' ? '10' : '12'}"
89
- /> </nile-icon>
90
- </span>
97
+ <nile-icon-button
98
+ part="remove-button"
99
+ exportparts="base:remove-button__base"
100
+ name="close"
101
+ library="system"
102
+ label="remove"
103
+ class="tag__remove"
104
+ @click=${this.handleRemoveClick}
105
+ tabindex="-1"
106
+ color="var(${colorVariable})"
107
+ ></nile-icon-button>
91
108
  `
92
109
  : ''}
93
110
  </span>
@@ -1 +1 @@
1
- {"version":3,"file":"nile-tag.js","sourceRoot":"","sources":["../../../src/nile-tag/nile-tag.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,EAEL,IAAI,EACJ,QAAQ,GAGT,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE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AgB,EAAE,IAAI,CAAC,SAAS;SACjC,CAAC;;;;;;UAMA,IAAI,CAAC,SAAS;YACd,CAAC,CAAC,IAAI,CAAA;;;;;;;uBAOO,IAAI,CAAC,iBAAiB;;;sBAGvB,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI;;;aAG5C;YACH,CAAC,CAAC,EAAE;;KAET,CAAC;IACJ,CAAC;;AAzEM,cAAM,GAAmB,MAAM,CAAC;AAGV;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wCAON;AAGO;IAA5B,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qCAA+C;AAG/B;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qCAAc;AAG5B;IAA5B,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;0CAAmB;AApBpC,OAAO;IADnB,aAAa,CAAC,UAAU,CAAC;GACb,OAAO,CA2EnB;SA3EY,OAAO;AA6EpB,eAAe,OAAO,CAAC","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 {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { styles } from './nile-tag.css';\nimport '../nile-icon-button/nile-icon-button';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement } from 'lit/decorators.js';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\n/**\n * Nile icon component.\n *\n * @tag nile-tag\n *\n */\n\n/**\n * @summary Tags are used as labels to organize things or to indicate a selection.\n * @status stable\n *\n * @dependency nile-icon-button\n *\n * @slot - The tag's content.\n *\n * @event nile-remove - Emitted when the remove button is activated.\n *\n * @csspart base - The component's base wrapper.\n * @csspart content - The tag's content.\n * @csspart remove-button - The tag's remove button, an `<nile-icon-button>`.\n * @csspart remove-button__base - The remove button's exported `base` part.\n */\n\n@customElement('nile-tag')\nexport class NileTag extends NileElement {\n static styles: CSSResultGroup = styles;\n\n /** The tag's theme variant. */\n @property({ reflect: true }) variant:\n | 'primary'\n | 'success'\n | 'normal'\n | 'warning'\n | 'error'\n | 'info'\n | 'gray' = 'normal';\n\n /** The tag's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Draws a pill-style tag with rounded edges. */\n @property({ type: Boolean, reflect: true }) pill = false;\n\n /** Makes the tag removable and shows a remove button. */\n @property({ type: Boolean }) removable = false;\n\n private handleRemoveClick() {\n this.emit('nile-remove');\n }\n \n render() {\n return html`\n <span\n part=\"base\"\n class=${classMap({\n tag: true,\n\n // Types\n 'tag--primary': this.variant === 'primary',\n 'tag--success': this.variant === 'success',\n 'tag--normal': this.variant === 'normal',\n 'tag--warning': this.variant === 'warning',\n 'tag--error': this.variant === 'error',\n 'tag--info': this.variant === 'info',\n 'tag--gray': this.variant === 'gray',\n\n // Sizes\n 'tag--small': this.size === 'small',\n 'tag--medium': this.size === 'medium',\n 'tag--large': this.size === 'large',\n\n // Modifiers\n 'tag--pill': this.pill,\n 'tag--removable': this.removable,\n })}\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"tag__prefix\"></slot>\n\n <slot part=\"content\" class=\"tag__content\"></slot>\n\n ${this.removable\n ? html`\n <span class=\"tag__remove-wrapper\">\n <nile-icon \n name=\"close\"\n part=\"remove-button\"\n exportparts=\"base:remove-button__base\"\n class=\"tag__remove\"\n @click=${this.handleRemoveClick}\n tabindex=\"-1\"\n color=\"var(--nile-remove-icon-color)\"\n size=\"${this.size === 'small' ? '10' : '12'}\"\n /> </nile-icon>\n </span>\n `\n : ''}\n </span>\n `;\n }\n}\n\nexport default NileTag;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-tag': NileTag;\n }\n}\n"]}
1
+ {"version":3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023\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 {\n LitElement,\n html,\n property,\n CSSResultArray,\n TemplateResult,\n} from 'lit-element';\nimport { styles } from './nile-tag.css';\nimport '../nile-icon-button/nile-icon-button';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement } from 'lit/decorators.js';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\n/**\n * Nile icon component.\n *\n * @tag nile-tag\n *\n */\n\n/**\n * @summary Tags are used as labels to organize things or to indicate a selection.\n * @status stable\n *\n * @dependency nile-icon-button\n *\n * @slot - The tag's content.\n *\n * @event nile-remove - Emitted when the remove button is activated.\n *\n * @csspart base - The component's base wrapper.\n * @csspart content - The tag's content.\n * @csspart remove-button - The tag's remove button, an `<nile-icon-button>`.\n * @csspart remove-button__base - The remove button's exported `base` part.\n */\n\n@customElement('nile-tag')\nexport class NileTag extends NileElement {\n static styles: CSSResultGroup = styles;\n\n /** The tag's theme variant. */\n @property({ reflect: true }) variant:\n | 'primary'\n | 'success'\n | 'normal'\n | 'warning'\n | 'error'\n | 'info' = 'normal';\n\n /** The tag's size. */\n @property({ reflect: true }) size: 'small' | 'medium' | 'large' = 'medium';\n\n /** Draws a pill-style tag with rounded edges. */\n @property({ type: Boolean, reflect: true }) pill = false;\n\n /** Makes the tag removable and shows a remove button. */\n @property({ type: Boolean }) removable = false;\n\n private handleRemoveClick() {\n this.emit('nile-remove');\n }\n\n getCloseButtonColor() {\n switch (this.variant) {\n case 'primary':\n return '--nile-colors-blue-500'; \n case 'success':\n return '--nile-colors-green-500'; \n case 'normal':\n return '--nile-colors-dark-500'; \n case 'warning':\n return '--nile-colors-yellow-500';\n case 'error':\n return '--nile-colors-red-500';\n case 'info':\n return '--nile-colors-blue-500';\n default:\n return '--nile-colors-dark-500'; \n }\n }\n \n\n render() {\n const colorVariable = this.getCloseButtonColor();\n return html`\n <span\n part=\"base\"\n class=${classMap({\n tag: true,\n\n // Types\n 'tag--primary': this.variant === 'primary',\n 'tag--success': this.variant === 'success',\n 'tag--normal': this.variant === 'normal',\n 'tag--warning': this.variant === 'warning',\n 'tag--error': this.variant === 'error',\n 'tag--info': this.variant === 'info',\n\n // Sizes\n 'tag--small': this.size === 'small',\n 'tag--medium': this.size === 'medium',\n 'tag--large': this.size === 'large',\n\n // Modifiers\n 'tag--pill': this.pill,\n 'tag--removable': this.removable,\n\n })}\n >\n <slot name=\"prefix\" part=\"prefix\" class=\"tag__prefix\"></slot>\n\n <slot part=\"content\" class=\"tag__content\"></slot>\n\n ${this.removable\n ? html`\n <nile-icon-button\n part=\"remove-button\"\n exportparts=\"base:remove-button__base\"\n name=\"close\"\n library=\"system\"\n label=\"remove\"\n class=\"tag__remove\"\n @click=${this.handleRemoveClick}\n tabindex=\"-1\"\n color=\"var(${colorVariable})\"\n ></nile-icon-button>\n `\n : ''}\n </span>\n `;\n }\n}\n\nexport default NileTag;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-tag': NileTag;\n }\n}\n"]}