q2-tecton-elements 1.45.0 → 1.45.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/cjs/{index-c385e32f.js → index-0430339e.js} +1 -1
  2. package/dist/cjs/{index-c385e32f.js.map → index-0430339e.js.map} +1 -1
  3. package/dist/cjs/q2-calendar.cjs.entry.js +3 -2
  4. package/dist/cjs/q2-calendar.cjs.entry.js.map +1 -1
  5. package/dist/cjs/q2-icon.cjs.entry.js +1 -1
  6. package/dist/cjs/q2-icon.cjs.entry.js.map +1 -1
  7. package/dist/cjs/q2-relative-time.cjs.entry.js +1 -1
  8. package/dist/collection/components/q2-calendar/q2-calendar.js +2 -1
  9. package/dist/collection/components/q2-calendar/q2-calendar.js.map +1 -1
  10. package/dist/collection/components/q2-data-table/q2-data-table.js +6 -6
  11. package/dist/collection/components/q2-icon/assets/status.symbol.svg +1 -1
  12. package/dist/collection/components/q2-icon/q2-icon.css +4 -4
  13. package/dist/collection/components/q2-input/q2-input.js +1 -1
  14. package/dist/collection/components/q2-option-list/q2-option-list.js +2 -2
  15. package/dist/collection/components/q2-stepper-pane/q2-stepper-pane.js +2 -2
  16. package/dist/components/q2-calendar.js +2 -1
  17. package/dist/components/q2-calendar.js.map +1 -1
  18. package/dist/components/q2-icon2.js +1 -1
  19. package/dist/components/q2-icon2.js.map +1 -1
  20. package/dist/esm/{index-f0dfb099.js → index-e940b40e.js} +1 -1
  21. package/dist/esm/{index-f0dfb099.js.map → index-e940b40e.js.map} +1 -1
  22. package/dist/esm/q2-calendar.entry.js +3 -2
  23. package/dist/esm/q2-calendar.entry.js.map +1 -1
  24. package/dist/esm/q2-icon.entry.js +1 -1
  25. package/dist/esm/q2-icon.entry.js.map +1 -1
  26. package/dist/esm/q2-relative-time.entry.js +1 -1
  27. package/dist/q2-tecton-elements/assets/status.symbol.svg +1 -1
  28. package/dist/q2-tecton-elements/{p-3c42c90f.js → p-7ce6e587.js} +1 -1
  29. package/dist/q2-tecton-elements/{p-8dc489e1.entry.js → p-b376c111.entry.js} +2 -2
  30. package/dist/q2-tecton-elements/{p-0d548810.entry.js → p-c4c458b7.entry.js} +2 -2
  31. package/dist/q2-tecton-elements/p-c4c458b7.entry.js.map +1 -0
  32. package/dist/q2-tecton-elements/{p-b21ed2d9.entry.js → p-f1281e3f.entry.js} +2 -2
  33. package/dist/q2-tecton-elements/{p-b21ed2d9.entry.js.map → p-f1281e3f.entry.js.map} +1 -1
  34. package/dist/q2-tecton-elements/q2-tecton-elements.esm.js +1 -1
  35. package/dist/test/elements/q2-calendar-test.e2e.js +35 -0
  36. package/dist/test/elements/q2-calendar-test.e2e.js.map +1 -1
  37. package/dist/test/elements/q2-icon-test.e2e.js +2 -2
  38. package/dist/test/elements/q2-icon-test.e2e.js.map +1 -1
  39. package/package.json +3 -3
  40. package/dist/q2-tecton-elements/p-0d548810.entry.js.map +0 -1
  41. /package/dist/q2-tecton-elements/{p-3c42c90f.js.map → p-7ce6e587.js.map} +0 -0
  42. /package/dist/q2-tecton-elements/{p-8dc489e1.entry.js.map → p-b376c111.entry.js.map} +0 -0
  43. /package/dist/types/workspace/workspace/{_Gitlab_tecton-production_master → tecton-production_release_1.45.x}/packages/q2-tecton-elements/.stencil/test/elements/q2-detail/slot-component.d.ts +0 -0
  44. /package/dist/types/workspace/workspace/{_Gitlab_tecton-production_master → tecton-production_release_1.45.x}/packages/q2-tecton-elements/.stencil/test/helpers.d.ts +0 -0
@@ -98,8 +98,8 @@ describe('q2-icon', () => {
98
98
  expect(symbolElement).toEqualAttribute('id', 'tct-success');
99
99
  expect(symbolElement).toEqualHtml(`
100
100
  <symbol fill="none" id="tct-success" viewbox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
101
- <path d="M12 21.244a9.244 9.244 0 1 0 0-18.488 9.244 9.244 0 0 0 0 18.488Z" stroke="#0E8A00" stroke-linecap="round" stroke-linejoin="round"></path>
102
- <path d="m7.754 12.739 2.613 2.613 5.88-5.88" stroke="#0E8A00" stroke-linecap="round" stroke-linejoin="round"></path>
101
+ <path d="M12 21.244a9.244 9.244 0 1 0 0-18.488 9.244 9.244 0 0 0 0 18.488Z" stroke="var(--comp-status-color)" stroke-linecap="round" stroke-linejoin="round"></path>
102
+ <path d="m7.754 12.739 2.613 2.613 5.88-5.88" stroke="var(--comp-status-color)" stroke-linecap="round" stroke-linejoin="round"></path>
103
103
  </symbol>
104
104
  `);
105
105
  });
@@ -1 +1 @@
1
- {"version":3,"file":"q2-icon-test.e2e.js","sourceRoot":"","sources":["../../../test/elements/q2-icon-test.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,WAAW,EAAY,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAE9D,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACrB,IAAI,OAAgB,CAAC;IACrB,IAAI,QAAkB,CAAC;IAEvB,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;QACxB,IAAI,sBAAgC,CAAC;QACrC,IAAI,oBAA8B,CAAC;QAEnC,UAAU,CAAC,KAAK,IAAI,EAAE;YAClB,OAAO,GAAG,MAAM,KAAK,CAAC;gBAClB,IAAI,EAAE,EAAE;aACX,CAAC,CAAC;YACH,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;YAChC,OAAO,CAAC,UAAU,CAAC,kCAAkC,CAAC,CAAC;YACvD,sBAAsB,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;YACzE,oBAAoB,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;YACrE,MAAM,OAAO,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;YACjD,MAAM,OAAO,CAAC,eAAe,CAAC,yBAAyB,CAAC,CAAC;YACzD,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WAAW,CAAC,CAAC;gBAE3D,OAAO,CAAC,MAAM,EAAE,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC;AAEH,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;CAevB,CAAC;AAEF,MAAM,eAAe,GAAG;;;;;;;;CAQvB,CAAC","sourcesContent":["import { E2EPage, EventSpy, newSpecPage, SpecPage } from '@stencil/core/testing';\nimport { mockIconFetch, setup } from '../helpers';\nimport { Q2Icon } from '../../src/components/q2-icon/q2-icon';\n\ndescribe('q2-icon', () => {\n let e2ePage: E2EPage;\n let specPage: SpecPage;\n\n describe('SVG Sprite', () => {\n let standardLoadedEventSpy: EventSpy;\n let statusLoadedEventSpy: EventSpy;\n\n beforeEach(async () => {\n e2ePage = await setup({\n html: '',\n });\n e2ePage.setDefaultTimeout(5000);\n e2ePage.setContent(`<q2-icon type=\"close\"></q2-icon>`);\n standardLoadedEventSpy = await e2ePage.spyOnEvent('tct-loaded-standard');\n statusLoadedEventSpy = await e2ePage.spyOnEvent('tct-loaded-status');\n await e2ePage.waitForSelector('#tecton-sprites');\n await e2ePage.waitForSelector('#tecton-sprite-standard');\n await e2ePage.waitForChanges();\n });\n\n it('creates the sprite container', async () => {\n const spriteContainers = await e2ePage.findAll('#tecton-sprites');\n expect(spriteContainers).toHaveLength(1);\n\n const spriteContainer = spriteContainers[0];\n expect(spriteContainer).toBeTruthy();\n expect((await spriteContainer.getComputedStyle()).display).toEqual('none');\n });\n\n it('adds the sprite', async () => {\n const spriteElements = await e2ePage.findAll('#tecton-sprites > svg');\n expect(spriteElements).toHaveLength(1);\n\n const spriteElement = spriteElements[0];\n expect(spriteElement).toBeTruthy();\n expect(spriteElement).toEqualAttribute('id', 'tecton-sprite-standard');\n expect(spriteElement).toHaveAttribute('data-loaded');\n });\n\n it('fires the loaded event', async () => {\n expect(standardLoadedEventSpy).toHaveReceivedEventTimes(1);\n expect(statusLoadedEventSpy).toHaveReceivedEventTimes(0);\n });\n\n it('renders the use element to the SVG', async () => {\n const useElement = await e2ePage.find('q2-icon >>> use');\n expect(useElement).toBeTruthy();\n expect(useElement).toEqualAttribute('href', '#tct-close');\n });\n\n it('renders the symbol element to the SVG', async () => {\n const symbolElements = await e2ePage.findAll('q2-icon >>> symbol');\n\n expect(symbolElements).toHaveLength(1);\n\n const symbolElement = symbolElements[0];\n expect(symbolElement).toBeTruthy();\n expect(symbolElement).toEqualAttribute('id', 'tct-close');\n expect(symbolElement).toEqualHtml(`\n <symbol fill=\"none\" id=\"tct-close\" viewbox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <g class=\"stroke-primary\">\n <path d=\"m17.875 6-12 12m0-12 12 12\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n </g>\n </symbol>\n `);\n });\n\n describe('when icon is updated to one in a separate sprite', () => {\n beforeEach(async () => {\n const icon = await e2ePage.find('q2-icon');\n await icon.setProperty('type', 'success');\n await e2ePage.waitForChanges();\n await e2ePage.waitForSelector('#tecton-sprite-status');\n });\n\n it('does not create a new sprite container', async () => {\n const spriteContainers = await e2ePage.findAll('#tecton-sprites');\n expect(spriteContainers).toHaveLength(1);\n\n const spriteContainer = spriteContainers[0];\n expect(spriteContainer).toBeTruthy();\n expect((await spriteContainer.getComputedStyle()).display).toEqual('none');\n });\n\n it('adds a new sprite without removing previous one', async () => {\n const spriteElements = await e2ePage.findAll('#tecton-sprites > svg');\n expect(spriteElements).toHaveLength(2);\n\n const oldSpriteElement = spriteElements[0];\n expect(oldSpriteElement).toEqualAttribute('id', 'tecton-sprite-standard');\n\n const newSpriteElement = spriteElements[1];\n expect(newSpriteElement).toBeTruthy();\n expect(newSpriteElement).toEqualAttribute('id', 'tecton-sprite-status');\n expect(newSpriteElement).toHaveAttribute('data-loaded');\n });\n\n it('fires the loaded event', async () => {\n expect(standardLoadedEventSpy).toHaveReceivedEventTimes(1);\n expect(statusLoadedEventSpy).toHaveReceivedEventTimes(1);\n });\n\n it('renders the use element to the SVG', async () => {\n const useElement = await e2ePage.find('q2-icon >>> use');\n expect(useElement).toBeTruthy();\n expect(useElement).toEqualAttribute('href', '#tct-success');\n });\n\n it('renders the symbol element to the SVG', async () => {\n const symbolElements = await e2ePage.findAll('q2-icon >>> symbol');\n expect(symbolElements).toHaveLength(1);\n\n const symbolElement = symbolElements[0];\n expect(symbolElement).toBeTruthy();\n expect(symbolElement).toEqualAttribute('id', 'tct-success');\n expect(symbolElement).toEqualHtml(`\n <symbol fill=\"none\" id=\"tct-success\" viewbox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 21.244a9.244 9.244 0 1 0 0-18.488 9.244 9.244 0 0 0 0 18.488Z\" stroke=\"#0E8A00\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n <path d=\"m7.754 12.739 2.613 2.613 5.88-5.88\" stroke=\"#0E8A00\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n </symbol>\n `);\n });\n });\n });\n\n describe('Props', () => {\n describe('inline', () => {\n it('uses the default width and height when false', async () => {\n e2ePage = await setup({\n html: `<q2-icon type=\"a11y\"></q2-icon>`,\n });\n const icon = await e2ePage.find('q2-icon');\n const iconComputedStyle = await icon.getComputedStyle();\n expect(iconComputedStyle.width).toEqual('24px');\n expect(iconComputedStyle.height).toEqual('24px');\n });\n\n it('sets the width and height to 1em when true', async () => {\n e2ePage = await setup({\n html: `<q2-icon type=\"a11y\" inline></q2-icon>`,\n });\n const icon = await e2ePage.find('q2-icon');\n const iconComputedStyle = await icon.getComputedStyle();\n expect(iconComputedStyle.width).toEqual('16px');\n expect(iconComputedStyle.height).toEqual('16px');\n });\n });\n\n describe('label', () => {\n beforeEach(async () => {\n mockIconFetch(`\n <symbol fill=\"none\" id=\"tct-close\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <g class=\"close\">\n <path class=\"stroke-primary\" d=\"m17.875 6-12 12m0-12 12 12\"></path>\n </g>\n </symbol>\n `);\n });\n\n afterEach(() => {\n jest.restoreAllMocks();\n });\n\n it('renders the expected output when provided', async () => {\n specPage = await newSpecPage({\n components: [Q2Icon],\n html: '<q2-icon label=\"Iron Man\" type=\"close\"></q2-icon>',\n });\n\n expect(specPage.root).toEqualHtml(`\n <q2-icon label=\"Iron Man\" type=\"close\">\n <mock:shadow-root>\n <svg aria-labelledby=\"label\" role=\"img\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <title id=\"label\">\n Iron Man\n </title>\n <use href=\"#tct-close\"></use>\n <g>\n <symbol fill=\"none\" id=\"tct-close\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <g class=\"close\">\n <path class=\"stroke-primary\" d=\"m17.875 6-12 12m0-12 12 12\"></path>\n </g>\n </symbol>\n </g>\n </svg>\n </mock:shadow-root>\n </q2-icon>\n `);\n });\n });\n\n describe('type', () => {\n beforeEach(async () => {\n mockIconFetch(`\n <symbol fill=\"none\" id=\"tct-close\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <g class=\"close\">\n <path class=\"stroke-primary\" d=\"m17.875 6-12 12m0-12 12 12\"></path>\n </g>\n </symbol>\n `);\n });\n\n afterEach(() => {\n jest.restoreAllMocks();\n });\n\n it('renders nothing when not provided', async () => {\n specPage = await newSpecPage({\n components: [Q2Icon],\n html: '<q2-icon></q2-icon>',\n });\n\n expect(specPage.root).toEqualHtml(emptyIconMarkup);\n });\n\n it('renders expected output when provided', async () => {\n specPage = await newSpecPage({\n components: [Q2Icon],\n html: '<q2-icon type=\"close\"></q2-icon>',\n });\n\n expect(specPage.root).toEqualHtml(closeIconMarkup);\n });\n\n it('clears the content when removed', async () => {\n specPage = await newSpecPage({\n components: [Q2Icon],\n html: '<q2-icon type=\"close\"></q2-icon>',\n });\n\n expect(specPage.root).toEqualHtml(closeIconMarkup);\n\n specPage.root.type = undefined;\n await specPage.waitForChanges();\n\n expect(specPage.root).toEqualHtml(emptyIconMarkup);\n });\n\n it('updates the content when added', async () => {\n specPage = await newSpecPage({\n components: [Q2Icon],\n html: '<q2-icon></q2-icon>',\n });\n\n expect(specPage.root).toEqualHtml(emptyIconMarkup);\n\n specPage.root.type = 'close';\n await specPage.waitForChanges();\n\n expect(specPage.root).toEqualHtml(closeIconMarkup);\n });\n\n describe(\"when type is 'custom'\", () => {\n it('it renders in a slot and adds necessary attributes', async () => {\n specPage = await newSpecPage({\n components: [Q2Icon],\n html: `\n <q2-icon type=\"custom\">\n <svg viewBox=\"0 0 34 34\">\n <circle cx=\"17\" cy=\"17\" r=\"10\" />\n </svg>\n </q2-icon>\n `,\n });\n\n const svg = specPage.root.querySelector('svg');\n\n expect(svg).toEqualAttribute('role', 'img');\n expect(svg).toEqualAttribute('xmlns', 'http://www.w3.org/2000/svg');\n expect(svg).toEqualAttribute('aria-hidden', 'true');\n expect(svg).not.toHaveAttribute('aria-labelledby');\n\n expect(specPage.root).toEqualHtml(`\n <q2-icon type=\"custom\">\n <mock:shadow-root>\n <slot />\n </mock:shadow-root>\n <svg aria-hidden=\"true\" role=\"img\" viewBox=\"0 0 34 34\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"17\" cy=\"17\" r=\"10\" />\n </svg>\n </q2-icon>\n `);\n });\n\n it('it renders in a slot and adds necessary attributes when label is provided', async () => {\n specPage = await newSpecPage({\n components: [Q2Icon],\n html: `\n <q2-icon type=\"custom\" label=\"Iron Man\">\n <svg viewBox=\"0 0 34 34\">\n <circle cx=\"17\" cy=\"17\" r=\"10\" />\n </svg>\n </q2-icon>\n `,\n });\n\n const svg = specPage.root.querySelector('svg');\n\n expect(svg).toEqualAttribute('role', 'img');\n expect(svg).toEqualAttribute('xmlns', 'http://www.w3.org/2000/svg');\n expect(svg).not.toHaveAttribute('aria-hidden');\n expect(svg).toHaveAttribute('aria-labelledby');\n\n expect(specPage.root).toEqualHtml(`\n <q2-icon label=\"Iron Man\" type=\"custom\">\n <mock:shadow-root>\n <slot />\n </mock:shadow-root>\n <svg aria-labelledby=\"label-1000\" role=\"img\" viewBox=\"0 0 34 34\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"17\" cy=\"17\" r=\"10\" />\n <title id=\"label-1000\">\n Iron Man\n </title>\n </svg>\n </q2-icon>\n `);\n });\n });\n });\n });\n\n describe('Styling', () => {\n describe('fill', () => {\n it('uses fallback color when override not provided', async () => {\n e2ePage = await setup({\n html: `<q2-icon type=\"brand-facebook-color\"></q2-icon>`,\n });\n const pathElements = await e2ePage.findAll('q2-icon >>> path');\n const pathOneStyle = await pathElements[0].getComputedStyle();\n const pathTwoStyle = await pathElements[1].getComputedStyle();\n expect(pathOneStyle.fill).toEqual('rgb(57, 87, 154)');\n expect(pathTwoStyle.fill).toEqual('rgb(255, 255, 255)');\n });\n\n it('uses override color when provided', async () => {\n e2ePage = await setup({\n html: `<q2-icon type=\"brand-facebook-color\" style=\"--tct-icon-brand-fill-primary: blue; --tct-icon-brand-fill-secondary: red;\"></q2-icon>`,\n });\n const pathElements = await e2ePage.findAll('q2-icon >>> path');\n const pathOneStyle = await pathElements[0].getComputedStyle();\n const pathTwoStyle = await pathElements[1].getComputedStyle();\n expect(pathOneStyle.fill).toEqual('rgb(0, 0, 255)');\n expect(pathTwoStyle.fill).toEqual('rgb(255, 0, 0)');\n });\n });\n });\n\n describe('Getters', () => {\n describe('isCustom', () => {\n it(\"returns true when type is 'custom'\", () => {\n const icon = new Q2Icon();\n icon.type = 'custom';\n expect(icon.isCustom).toBeTruthy();\n });\n\n it(\"returns false when type is not 'custom'\", () => {\n const icon = new Q2Icon();\n icon.type = 'close';\n expect(icon.isCustom).toBeFalsy();\n });\n });\n\n describe('spriteFileName', () => {\n it(\"returns undefined when type is 'custom'\", () => {\n const icon = new Q2Icon();\n icon.type = 'custom';\n expect(icon.spriteFileName).toBeUndefined();\n });\n\n it('returns undefined when type does not map to a file', () => {\n const icon = new Q2Icon();\n icon.type = 'foobar';\n expect(icon.spriteFileName).toBeUndefined();\n });\n\n it(\"returns the sprite filename when type is not 'custom'\", () => {\n const icon = new Q2Icon();\n icon.type = 'close';\n expect(icon.spriteFileName).toEqual('standard');\n });\n });\n\n describe('spriteId', () => {\n it(\"returns undefined when type is 'custom'\", () => {\n const icon = new Q2Icon();\n icon.type = 'custom';\n expect(icon.spriteId).toBeUndefined();\n });\n\n it('returns undefined when spriteFileName is undefined', () => {\n const icon = new Q2Icon();\n icon.type = 'foobar';\n expect(icon.spriteId).toBeUndefined();\n });\n\n it('returns the sprite ID when spriteFileName is defined', () => {\n const icon = new Q2Icon();\n icon.type = 'close';\n expect(icon.spriteId).toEqual('tecton-sprite-standard');\n });\n });\n\n describe('spriteElement', () => {\n it('returns undefined when spriteId is undefined', () => {\n const icon = new Q2Icon();\n icon.type = 'foobar';\n expect(icon.spriteElement).toBeUndefined();\n });\n\n it('returns the sprite element when spriteId is defined', () => {\n const icon = new Q2Icon();\n icon.type = 'close';\n\n const element = document.createElement('div');\n element.id = 'tecton-sprite-standard';\n document.body.appendChild(element);\n\n expect(icon.spriteElement).toBeTruthy();\n\n element.remove();\n });\n });\n\n describe('spriteEventName', () => {\n it('returns undefined when spriteFileName is undefined', () => {\n const icon = new Q2Icon();\n icon.type = 'foobar';\n expect(icon.spriteEventName).toBeUndefined();\n });\n\n it('returns the event name when spriteFileName is defined', () => {\n const icon = new Q2Icon();\n icon.type = 'close';\n expect(icon.spriteEventName).toEqual('tct-loaded-standard');\n });\n });\n });\n\n describe('Methods', () => {\n describe('getOrCreateSpriteContainer', () => {\n it('returns the existing sprite container', () => {\n const icon = new Q2Icon();\n const spriteContainer = document.createElement('div');\n spriteContainer.id = 'tecton-sprites';\n document.body.appendChild(spriteContainer);\n\n expect(icon.getOrCreateSpriteContainer()).toEqual(spriteContainer);\n\n spriteContainer.remove();\n });\n\n it('creates and returns a new sprite container', () => {\n const icon = new Q2Icon();\n const spriteContainer = icon.getOrCreateSpriteContainer();\n\n expect(spriteContainer).toBeTruthy();\n expect(spriteContainer).toEqualAttribute('id', 'tecton-sprites');\n });\n });\n\n describe('fetchSprite', () => {\n beforeEach(async () => {\n mockIconFetch();\n });\n\n afterEach(() => {\n jest.restoreAllMocks();\n });\n\n it('does nothing when type is not defined', async () => {\n const icon = new Q2Icon();\n icon.fetchSprite();\n expect(icon.spriteElement).toBeUndefined();\n });\n\n it('does not try to recreate sprite element if it already exists', async () => {\n const icon = new Q2Icon();\n icon.type = 'close';\n\n const container = icon.getOrCreateSpriteContainer();\n const spriteElement = document.createElement('SVG');\n spriteElement.id = 'tecton-sprite-standard';\n spriteElement.setAttribute('data-loaded', '');\n container.appendChild(spriteElement);\n\n expect(icon.spriteElement).toEqual(spriteElement);\n\n await icon.fetchSprite();\n\n expect(icon.spriteElement).toEqual(spriteElement);\n\n spriteElement.remove();\n });\n\n it('fetches the sprite when type is defined', async () => {\n const icon = new Q2Icon();\n icon.type = 'close';\n\n await icon.fetchSprite();\n\n expect(icon.spriteElement.tagName.toUpperCase()).toEqual('SVG');\n });\n });\n\n describe('cloneSpriteNode', () => {\n it('returns undefined when spriteElement is undefined', () => {\n const icon = new Q2Icon();\n icon.type = 'foobar';\n icon.cloneSpriteNode();\n expect(icon.iconClone).toBeUndefined();\n });\n\n it('returns a clone of the sprite element', () => {\n const icon = new Q2Icon();\n icon.type = 'close';\n\n const container = icon.getOrCreateSpriteContainer();\n\n const element = document.createElement('div');\n element.id = 'tct-close';\n container.appendChild(element);\n\n icon.cloneSpriteNode();\n\n expect(icon.iconClone).toBeTruthy();\n expect(icon.iconClone).toEqualAttribute('id', 'tct-close');\n\n element.remove();\n });\n });\n });\n});\n\nconst closeIconMarkup = `\n <q2-icon type=\"close\">\n <mock:shadow-root>\n <svg aria-hidden=\"true\" role=\"img\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <use href=\"#tct-close\"></use>\n <g>\n <symbol fill=\"none\" id=\"tct-close\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <g class=\"close\">\n <path class=\"stroke-primary\" d=\"m17.875 6-12 12m0-12 12 12\"></path>\n </g>\n </symbol>\n </g>\n </svg>\n </mock:shadow-root>\n </q2-icon>\n`;\n\nconst emptyIconMarkup = `\n <q2-icon>\n <mock:shadow-root>\n <svg aria-hidden=\"true\" role=\"img\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <g></g>\n </svg>\n </mock:shadow-root>\n </q2-icon>\n`;\n"]}
1
+ {"version":3,"file":"q2-icon-test.e2e.js","sourceRoot":"","sources":["../../../test/elements/q2-icon-test.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,WAAW,EAAY,MAAM,uBAAuB,CAAC;AACjF,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAE9D,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACrB,IAAI,OAAgB,CAAC;IACrB,IAAI,QAAkB,CAAC;IAEvB,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;QACxB,IAAI,sBAAgC,CAAC;QACrC,IAAI,oBAA8B,CAAC;QAEnC,UAAU,CAAC,KAAK,IAAI,EAAE;YAClB,OAAO,GAAG,MAAM,KAAK,CAAC;gBAClB,IAAI,EAAE,EAAE;aACX,CAAC,CAAC;YACH,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;YAChC,OAAO,CAAC,UAAU,CAAC,kCAAkC,CAAC,CAAC;YACvD,sBAAsB,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC;YACzE,oBAAoB,GAAG,MAAM,OAAO,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;YACrE,MAAM,OAAO,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;YACjD,MAAM,OAAO,CAAC,eAAe,C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AAC,gBAAgB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;gBAE3D,OAAO,CAAC,MAAM,EAAE,CAAC;YACrB,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC;AAEH,MAAM,eAAe,GAAG;;;;;;;;;;;;;;;CAevB,CAAC;AAEF,MAAM,eAAe,GAAG;;;;;;;;CAQvB,CAAC","sourcesContent":["import { E2EPage, EventSpy, newSpecPage, SpecPage } from '@stencil/core/testing';\nimport { mockIconFetch, setup } from '../helpers';\nimport { Q2Icon } from '../../src/components/q2-icon/q2-icon';\n\ndescribe('q2-icon', () => {\n let e2ePage: E2EPage;\n let specPage: SpecPage;\n\n describe('SVG Sprite', () => {\n let standardLoadedEventSpy: EventSpy;\n let statusLoadedEventSpy: EventSpy;\n\n beforeEach(async () => {\n e2ePage = await setup({\n html: '',\n });\n e2ePage.setDefaultTimeout(5000);\n e2ePage.setContent(`<q2-icon type=\"close\"></q2-icon>`);\n standardLoadedEventSpy = await e2ePage.spyOnEvent('tct-loaded-standard');\n statusLoadedEventSpy = await e2ePage.spyOnEvent('tct-loaded-status');\n await e2ePage.waitForSelector('#tecton-sprites');\n await e2ePage.waitForSelector('#tecton-sprite-standard');\n await e2ePage.waitForChanges();\n });\n\n it('creates the sprite container', async () => {\n const spriteContainers = await e2ePage.findAll('#tecton-sprites');\n expect(spriteContainers).toHaveLength(1);\n\n const spriteContainer = spriteContainers[0];\n expect(spriteContainer).toBeTruthy();\n expect((await spriteContainer.getComputedStyle()).display).toEqual('none');\n });\n\n it('adds the sprite', async () => {\n const spriteElements = await e2ePage.findAll('#tecton-sprites > svg');\n expect(spriteElements).toHaveLength(1);\n\n const spriteElement = spriteElements[0];\n expect(spriteElement).toBeTruthy();\n expect(spriteElement).toEqualAttribute('id', 'tecton-sprite-standard');\n expect(spriteElement).toHaveAttribute('data-loaded');\n });\n\n it('fires the loaded event', async () => {\n expect(standardLoadedEventSpy).toHaveReceivedEventTimes(1);\n expect(statusLoadedEventSpy).toHaveReceivedEventTimes(0);\n });\n\n it('renders the use element to the SVG', async () => {\n const useElement = await e2ePage.find('q2-icon >>> use');\n expect(useElement).toBeTruthy();\n expect(useElement).toEqualAttribute('href', '#tct-close');\n });\n\n it('renders the symbol element to the SVG', async () => {\n const symbolElements = await e2ePage.findAll('q2-icon >>> symbol');\n\n expect(symbolElements).toHaveLength(1);\n\n const symbolElement = symbolElements[0];\n expect(symbolElement).toBeTruthy();\n expect(symbolElement).toEqualAttribute('id', 'tct-close');\n expect(symbolElement).toEqualHtml(`\n <symbol fill=\"none\" id=\"tct-close\" viewbox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <g class=\"stroke-primary\">\n <path d=\"m17.875 6-12 12m0-12 12 12\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n </g>\n </symbol>\n `);\n });\n\n describe('when icon is updated to one in a separate sprite', () => {\n beforeEach(async () => {\n const icon = await e2ePage.find('q2-icon');\n await icon.setProperty('type', 'success');\n await e2ePage.waitForChanges();\n await e2ePage.waitForSelector('#tecton-sprite-status');\n });\n\n it('does not create a new sprite container', async () => {\n const spriteContainers = await e2ePage.findAll('#tecton-sprites');\n expect(spriteContainers).toHaveLength(1);\n\n const spriteContainer = spriteContainers[0];\n expect(spriteContainer).toBeTruthy();\n expect((await spriteContainer.getComputedStyle()).display).toEqual('none');\n });\n\n it('adds a new sprite without removing previous one', async () => {\n const spriteElements = await e2ePage.findAll('#tecton-sprites > svg');\n expect(spriteElements).toHaveLength(2);\n\n const oldSpriteElement = spriteElements[0];\n expect(oldSpriteElement).toEqualAttribute('id', 'tecton-sprite-standard');\n\n const newSpriteElement = spriteElements[1];\n expect(newSpriteElement).toBeTruthy();\n expect(newSpriteElement).toEqualAttribute('id', 'tecton-sprite-status');\n expect(newSpriteElement).toHaveAttribute('data-loaded');\n });\n\n it('fires the loaded event', async () => {\n expect(standardLoadedEventSpy).toHaveReceivedEventTimes(1);\n expect(statusLoadedEventSpy).toHaveReceivedEventTimes(1);\n });\n\n it('renders the use element to the SVG', async () => {\n const useElement = await e2ePage.find('q2-icon >>> use');\n expect(useElement).toBeTruthy();\n expect(useElement).toEqualAttribute('href', '#tct-success');\n });\n\n it('renders the symbol element to the SVG', async () => {\n const symbolElements = await e2ePage.findAll('q2-icon >>> symbol');\n expect(symbolElements).toHaveLength(1);\n\n const symbolElement = symbolElements[0];\n expect(symbolElement).toBeTruthy();\n expect(symbolElement).toEqualAttribute('id', 'tct-success');\n expect(symbolElement).toEqualHtml(`\n <symbol fill=\"none\" id=\"tct-success\" viewbox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 21.244a9.244 9.244 0 1 0 0-18.488 9.244 9.244 0 0 0 0 18.488Z\" stroke=\"var(--comp-status-color)\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n <path d=\"m7.754 12.739 2.613 2.613 5.88-5.88\" stroke=\"var(--comp-status-color)\" stroke-linecap=\"round\" stroke-linejoin=\"round\"></path>\n </symbol>\n `);\n });\n });\n });\n\n describe('Props', () => {\n describe('inline', () => {\n it('uses the default width and height when false', async () => {\n e2ePage = await setup({\n html: `<q2-icon type=\"a11y\"></q2-icon>`,\n });\n const icon = await e2ePage.find('q2-icon');\n const iconComputedStyle = await icon.getComputedStyle();\n expect(iconComputedStyle.width).toEqual('24px');\n expect(iconComputedStyle.height).toEqual('24px');\n });\n\n it('sets the width and height to 1em when true', async () => {\n e2ePage = await setup({\n html: `<q2-icon type=\"a11y\" inline></q2-icon>`,\n });\n const icon = await e2ePage.find('q2-icon');\n const iconComputedStyle = await icon.getComputedStyle();\n expect(iconComputedStyle.width).toEqual('16px');\n expect(iconComputedStyle.height).toEqual('16px');\n });\n });\n\n describe('label', () => {\n beforeEach(async () => {\n mockIconFetch(`\n <symbol fill=\"none\" id=\"tct-close\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <g class=\"close\">\n <path class=\"stroke-primary\" d=\"m17.875 6-12 12m0-12 12 12\"></path>\n </g>\n </symbol>\n `);\n });\n\n afterEach(() => {\n jest.restoreAllMocks();\n });\n\n it('renders the expected output when provided', async () => {\n specPage = await newSpecPage({\n components: [Q2Icon],\n html: '<q2-icon label=\"Iron Man\" type=\"close\"></q2-icon>',\n });\n\n expect(specPage.root).toEqualHtml(`\n <q2-icon label=\"Iron Man\" type=\"close\">\n <mock:shadow-root>\n <svg aria-labelledby=\"label\" role=\"img\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <title id=\"label\">\n Iron Man\n </title>\n <use href=\"#tct-close\"></use>\n <g>\n <symbol fill=\"none\" id=\"tct-close\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <g class=\"close\">\n <path class=\"stroke-primary\" d=\"m17.875 6-12 12m0-12 12 12\"></path>\n </g>\n </symbol>\n </g>\n </svg>\n </mock:shadow-root>\n </q2-icon>\n `);\n });\n });\n\n describe('type', () => {\n beforeEach(async () => {\n mockIconFetch(`\n <symbol fill=\"none\" id=\"tct-close\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <g class=\"close\">\n <path class=\"stroke-primary\" d=\"m17.875 6-12 12m0-12 12 12\"></path>\n </g>\n </symbol>\n `);\n });\n\n afterEach(() => {\n jest.restoreAllMocks();\n });\n\n it('renders nothing when not provided', async () => {\n specPage = await newSpecPage({\n components: [Q2Icon],\n html: '<q2-icon></q2-icon>',\n });\n\n expect(specPage.root).toEqualHtml(emptyIconMarkup);\n });\n\n it('renders expected output when provided', async () => {\n specPage = await newSpecPage({\n components: [Q2Icon],\n html: '<q2-icon type=\"close\"></q2-icon>',\n });\n\n expect(specPage.root).toEqualHtml(closeIconMarkup);\n });\n\n it('clears the content when removed', async () => {\n specPage = await newSpecPage({\n components: [Q2Icon],\n html: '<q2-icon type=\"close\"></q2-icon>',\n });\n\n expect(specPage.root).toEqualHtml(closeIconMarkup);\n\n specPage.root.type = undefined;\n await specPage.waitForChanges();\n\n expect(specPage.root).toEqualHtml(emptyIconMarkup);\n });\n\n it('updates the content when added', async () => {\n specPage = await newSpecPage({\n components: [Q2Icon],\n html: '<q2-icon></q2-icon>',\n });\n\n expect(specPage.root).toEqualHtml(emptyIconMarkup);\n\n specPage.root.type = 'close';\n await specPage.waitForChanges();\n\n expect(specPage.root).toEqualHtml(closeIconMarkup);\n });\n\n describe(\"when type is 'custom'\", () => {\n it('it renders in a slot and adds necessary attributes', async () => {\n specPage = await newSpecPage({\n components: [Q2Icon],\n html: `\n <q2-icon type=\"custom\">\n <svg viewBox=\"0 0 34 34\">\n <circle cx=\"17\" cy=\"17\" r=\"10\" />\n </svg>\n </q2-icon>\n `,\n });\n\n const svg = specPage.root.querySelector('svg');\n\n expect(svg).toEqualAttribute('role', 'img');\n expect(svg).toEqualAttribute('xmlns', 'http://www.w3.org/2000/svg');\n expect(svg).toEqualAttribute('aria-hidden', 'true');\n expect(svg).not.toHaveAttribute('aria-labelledby');\n\n expect(specPage.root).toEqualHtml(`\n <q2-icon type=\"custom\">\n <mock:shadow-root>\n <slot />\n </mock:shadow-root>\n <svg aria-hidden=\"true\" role=\"img\" viewBox=\"0 0 34 34\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"17\" cy=\"17\" r=\"10\" />\n </svg>\n </q2-icon>\n `);\n });\n\n it('it renders in a slot and adds necessary attributes when label is provided', async () => {\n specPage = await newSpecPage({\n components: [Q2Icon],\n html: `\n <q2-icon type=\"custom\" label=\"Iron Man\">\n <svg viewBox=\"0 0 34 34\">\n <circle cx=\"17\" cy=\"17\" r=\"10\" />\n </svg>\n </q2-icon>\n `,\n });\n\n const svg = specPage.root.querySelector('svg');\n\n expect(svg).toEqualAttribute('role', 'img');\n expect(svg).toEqualAttribute('xmlns', 'http://www.w3.org/2000/svg');\n expect(svg).not.toHaveAttribute('aria-hidden');\n expect(svg).toHaveAttribute('aria-labelledby');\n\n expect(specPage.root).toEqualHtml(`\n <q2-icon label=\"Iron Man\" type=\"custom\">\n <mock:shadow-root>\n <slot />\n </mock:shadow-root>\n <svg aria-labelledby=\"label-1000\" role=\"img\" viewBox=\"0 0 34 34\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"17\" cy=\"17\" r=\"10\" />\n <title id=\"label-1000\">\n Iron Man\n </title>\n </svg>\n </q2-icon>\n `);\n });\n });\n });\n });\n\n describe('Styling', () => {\n describe('fill', () => {\n it('uses fallback color when override not provided', async () => {\n e2ePage = await setup({\n html: `<q2-icon type=\"brand-facebook-color\"></q2-icon>`,\n });\n const pathElements = await e2ePage.findAll('q2-icon >>> path');\n const pathOneStyle = await pathElements[0].getComputedStyle();\n const pathTwoStyle = await pathElements[1].getComputedStyle();\n expect(pathOneStyle.fill).toEqual('rgb(57, 87, 154)');\n expect(pathTwoStyle.fill).toEqual('rgb(255, 255, 255)');\n });\n\n it('uses override color when provided', async () => {\n e2ePage = await setup({\n html: `<q2-icon type=\"brand-facebook-color\" style=\"--tct-icon-brand-fill-primary: blue; --tct-icon-brand-fill-secondary: red;\"></q2-icon>`,\n });\n const pathElements = await e2ePage.findAll('q2-icon >>> path');\n const pathOneStyle = await pathElements[0].getComputedStyle();\n const pathTwoStyle = await pathElements[1].getComputedStyle();\n expect(pathOneStyle.fill).toEqual('rgb(0, 0, 255)');\n expect(pathTwoStyle.fill).toEqual('rgb(255, 0, 0)');\n });\n });\n });\n\n describe('Getters', () => {\n describe('isCustom', () => {\n it(\"returns true when type is 'custom'\", () => {\n const icon = new Q2Icon();\n icon.type = 'custom';\n expect(icon.isCustom).toBeTruthy();\n });\n\n it(\"returns false when type is not 'custom'\", () => {\n const icon = new Q2Icon();\n icon.type = 'close';\n expect(icon.isCustom).toBeFalsy();\n });\n });\n\n describe('spriteFileName', () => {\n it(\"returns undefined when type is 'custom'\", () => {\n const icon = new Q2Icon();\n icon.type = 'custom';\n expect(icon.spriteFileName).toBeUndefined();\n });\n\n it('returns undefined when type does not map to a file', () => {\n const icon = new Q2Icon();\n icon.type = 'foobar';\n expect(icon.spriteFileName).toBeUndefined();\n });\n\n it(\"returns the sprite filename when type is not 'custom'\", () => {\n const icon = new Q2Icon();\n icon.type = 'close';\n expect(icon.spriteFileName).toEqual('standard');\n });\n });\n\n describe('spriteId', () => {\n it(\"returns undefined when type is 'custom'\", () => {\n const icon = new Q2Icon();\n icon.type = 'custom';\n expect(icon.spriteId).toBeUndefined();\n });\n\n it('returns undefined when spriteFileName is undefined', () => {\n const icon = new Q2Icon();\n icon.type = 'foobar';\n expect(icon.spriteId).toBeUndefined();\n });\n\n it('returns the sprite ID when spriteFileName is defined', () => {\n const icon = new Q2Icon();\n icon.type = 'close';\n expect(icon.spriteId).toEqual('tecton-sprite-standard');\n });\n });\n\n describe('spriteElement', () => {\n it('returns undefined when spriteId is undefined', () => {\n const icon = new Q2Icon();\n icon.type = 'foobar';\n expect(icon.spriteElement).toBeUndefined();\n });\n\n it('returns the sprite element when spriteId is defined', () => {\n const icon = new Q2Icon();\n icon.type = 'close';\n\n const element = document.createElement('div');\n element.id = 'tecton-sprite-standard';\n document.body.appendChild(element);\n\n expect(icon.spriteElement).toBeTruthy();\n\n element.remove();\n });\n });\n\n describe('spriteEventName', () => {\n it('returns undefined when spriteFileName is undefined', () => {\n const icon = new Q2Icon();\n icon.type = 'foobar';\n expect(icon.spriteEventName).toBeUndefined();\n });\n\n it('returns the event name when spriteFileName is defined', () => {\n const icon = new Q2Icon();\n icon.type = 'close';\n expect(icon.spriteEventName).toEqual('tct-loaded-standard');\n });\n });\n });\n\n describe('Methods', () => {\n describe('getOrCreateSpriteContainer', () => {\n it('returns the existing sprite container', () => {\n const icon = new Q2Icon();\n const spriteContainer = document.createElement('div');\n spriteContainer.id = 'tecton-sprites';\n document.body.appendChild(spriteContainer);\n\n expect(icon.getOrCreateSpriteContainer()).toEqual(spriteContainer);\n\n spriteContainer.remove();\n });\n\n it('creates and returns a new sprite container', () => {\n const icon = new Q2Icon();\n const spriteContainer = icon.getOrCreateSpriteContainer();\n\n expect(spriteContainer).toBeTruthy();\n expect(spriteContainer).toEqualAttribute('id', 'tecton-sprites');\n });\n });\n\n describe('fetchSprite', () => {\n beforeEach(async () => {\n mockIconFetch();\n });\n\n afterEach(() => {\n jest.restoreAllMocks();\n });\n\n it('does nothing when type is not defined', async () => {\n const icon = new Q2Icon();\n icon.fetchSprite();\n expect(icon.spriteElement).toBeUndefined();\n });\n\n it('does not try to recreate sprite element if it already exists', async () => {\n const icon = new Q2Icon();\n icon.type = 'close';\n\n const container = icon.getOrCreateSpriteContainer();\n const spriteElement = document.createElement('SVG');\n spriteElement.id = 'tecton-sprite-standard';\n spriteElement.setAttribute('data-loaded', '');\n container.appendChild(spriteElement);\n\n expect(icon.spriteElement).toEqual(spriteElement);\n\n await icon.fetchSprite();\n\n expect(icon.spriteElement).toEqual(spriteElement);\n\n spriteElement.remove();\n });\n\n it('fetches the sprite when type is defined', async () => {\n const icon = new Q2Icon();\n icon.type = 'close';\n\n await icon.fetchSprite();\n\n expect(icon.spriteElement.tagName.toUpperCase()).toEqual('SVG');\n });\n });\n\n describe('cloneSpriteNode', () => {\n it('returns undefined when spriteElement is undefined', () => {\n const icon = new Q2Icon();\n icon.type = 'foobar';\n icon.cloneSpriteNode();\n expect(icon.iconClone).toBeUndefined();\n });\n\n it('returns a clone of the sprite element', () => {\n const icon = new Q2Icon();\n icon.type = 'close';\n\n const container = icon.getOrCreateSpriteContainer();\n\n const element = document.createElement('div');\n element.id = 'tct-close';\n container.appendChild(element);\n\n icon.cloneSpriteNode();\n\n expect(icon.iconClone).toBeTruthy();\n expect(icon.iconClone).toEqualAttribute('id', 'tct-close');\n\n element.remove();\n });\n });\n });\n});\n\nconst closeIconMarkup = `\n <q2-icon type=\"close\">\n <mock:shadow-root>\n <svg aria-hidden=\"true\" role=\"img\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <use href=\"#tct-close\"></use>\n <g>\n <symbol fill=\"none\" id=\"tct-close\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <g class=\"close\">\n <path class=\"stroke-primary\" d=\"m17.875 6-12 12m0-12 12 12\"></path>\n </g>\n </symbol>\n </g>\n </svg>\n </mock:shadow-root>\n </q2-icon>\n`;\n\nconst emptyIconMarkup = `\n <q2-icon>\n <mock:shadow-root>\n <svg aria-hidden=\"true\" role=\"img\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\">\n <g></g>\n </svg>\n </mock:shadow-root>\n </q2-icon>\n`;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "q2-tecton-elements",
3
- "version": "1.45.0",
3
+ "version": "1.45.1",
4
4
  "description": "Q2 Tecton Custom Elements",
5
5
  "license": "MIT",
6
6
  "author": "Q2 Tecton Team",
@@ -33,7 +33,7 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "@stencil/core": "4.18.0",
36
- "q2-tecton-common": "1.45.0",
36
+ "q2-tecton-common": "1.45.1",
37
37
  "swiper": "8.4.4"
38
38
  },
39
39
  "devDependencies": {
@@ -54,5 +54,5 @@
54
54
  "typescript": "5.4.5",
55
55
  "typescript-eslint": "^7.11.0"
56
56
  },
57
- "gitHead": "df615423f7eb217c9c1ff29f0a21b2062b1849de"
57
+ "gitHead": "78846605e4899dd924dcfd42bf965800ef17ed3d"
58
58
  }
@@ -1 +0,0 @@
1
- {"version":3,"names":["q2IconCss","Q2IconStyle0","Q2Icon","componentWillLoad","this","handleIcon","componentDidRender","iconClone","_b","_a","spriteGroup","firstElementChild","remove","_c","appendChild","isCustom","setCustomSVGAttrs","type","fetchSprite","spriteFileName","iconMap","spriteId","spriteElement","document","querySelector","spriteEventName","iconCloneViewBox","getAttribute","getOrCreateSpriteContainer","spriteContainerId","spriteContainer","createElement","id","style","display","body","checkForSprite","hasAttribute","cloneSpriteNode","addEventListener","once","spriteExists","spritePath","getAssetPath","response","fetch","data","text","wrappingDiv","innerHTML","svg","setAttribute","tagName","replaceWith","parentNode","replaceChild","dispatchEvent","CustomEvent","bubbles","spriteNode","cloneNode","undefined","innerSVG","hostElement","label","title","labelId","createGuid","textContent","render","h","role","viewBox","xmlns","Fragment","href","ref","el"],"sources":["src/components/q2-icon/q2-icon.scss?tag=q2-icon&encapsulation=shadow","src/components/q2-icon/q2-icon.tsx"],"sourcesContent":["@import '../../styles/host.scss';\n@import '../../styles/functions';\n\n:host {\n display: inline-block;\n height: var(--tct-icon-size, 24px);\n width: var(--tct-icon-size, 24px);\n position: relative;\n fill: none;\n}\n\n:host([inline]) {\n height: 1em;\n width: 1em;\n}\n\nsvg {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n stroke-width: var-list(--tct-icon-stroke-width, --t-icon-stroke-width, 1.5);\n stroke-linecap: var-list(--tct-icon-cap, --t-icon-cap, round);\n stroke-linejoin: var-list(--tct-icon-cap, --t-icon-cap, round);\n transition: var(--tct-icon-transition, none);\n}\n\n.stroke-primary {\n stroke: var-list(--tct-icon-stroke-primary, --t-icon-stroke-primary, --t-text, currentcolor);\n transition: var(--tct-icon-stroke-primary-transition, none);\n}\n\n.stroke-secondary {\n stroke: var-list(--tct-icon-stroke-secondary, --t-icon-stroke-secondary, --t-text, currentcolor);\n transition: var(--tct-icon-stroke-secondary-transition, none);\n}\n\n.fill-primary {\n fill: var-list(--tct-icon-stroke-primary, --t-icon-stroke-primary, --t-text, currentcolor);\n transition: var(--tct-icon-stroke-primary-transition, none);\n}\n\n.fill-secondary {\n fill: var-list(--tct-icon-stroke-secondary, --t-icon-stroke-secondary, --t-text, currentcolor);\n transition: var(--tct-icon-stroke-secondary-transition, none);\n}\n\n.filled {\n fill: var-list(--tct-icon-fill, --comp-icon-fill, --t-icon-fill, none);\n transition: var(--tct-icon-fill-transition, none);\n}\n\n.uniform {\n fill: var-list(--tct-icon-stroke-primary, --t-icon-stroke-primary, currentcolor);\n transition: var(--tct-icon-stroke-primary-transition, none);\n}\n\n:host([type='info']),\n:host([type='info-filled']) {\n --tct-icon-stroke-primary: transparent;\n --comp-icon-fill: #{var-list(--tct-stoplight-info, --const-stoplight-info, #0079c1)};\n}\n\n:host([type='success']),\n:host([type='success-filled']) {\n --tct-icon-stroke-primary: transparent;\n --comp-icon-fill: #{var-list(--tct-stoplight-success, --const-stoplight-success, #0e8a00)};\n}\n\n:host([type='warning']),\n:host([type='warning-filled']) {\n --tct-icon-stroke-primary: transparent;\n --comp-icon-fill: #{var-list(--tct-stoplight-warning, --const-stoplight-warning, #c35500)};\n}\n\n:host([type='error']),\n:host([type='error-filled']) {\n --tct-icon-stroke-primary: transparent;\n --comp-icon-fill: #{var-list(--tct-stoplight-alert, --const-stoplight-alert, #d20a0a)};\n}\n","import { Component, ComponentInterface, Prop, h, Element, Watch, getAssetPath, State, Fragment } from '@stencil/core';\nimport { createGuid } from 'src/utils';\nimport iconMap from './assets/icon-map.json';\n\n@Component({ tag: 'q2-icon', shadow: true, styleUrl: 'q2-icon.scss', assetsDirs: ['assets'] })\nexport class Q2Icon implements ComponentInterface {\n /** Styles the component to have a `height` and `width` of `1em`, making it easy to place alongside text. */\n @Prop({ reflect: true }) inline: boolean;\n\n /** The text that is presented by screen-readers when they encounter the icon. */\n @Prop({ reflect: true }) label: string;\n\n /** The name of the icon to be displayed. */\n @Prop({ reflect: true }) type: string;\n\n @Element() hostElement: HTMLElement;\n\n @State() iconClone: SVGSymbolElement;\n\n spriteGroup: SVGElement;\n\n componentWillLoad() {\n this.handleIcon();\n }\n\n componentDidRender(): void {\n if (!this.iconClone) return;\n this.spriteGroup?.firstElementChild?.remove();\n this.spriteGroup?.appendChild(this.iconClone);\n }\n\n @Watch('type')\n handleIcon() {\n if (this.isCustom) {\n this.setCustomSVGAttrs();\n } else if (this.type) {\n this.fetchSprite();\n } else {\n this.iconClone = null;\n this.spriteGroup?.firstElementChild?.remove();\n }\n }\n\n get isCustom() {\n return this.type === 'custom';\n }\n\n get spriteFileName() {\n if (this.isCustom) return;\n return iconMap[this.type];\n }\n\n get spriteId() {\n const { spriteFileName } = this;\n if (!spriteFileName) return;\n return `tecton-sprite-${spriteFileName}`;\n }\n\n get spriteElement() {\n const { spriteId } = this;\n if (!spriteId) return;\n return document.querySelector<HTMLElement>(`#${spriteId}`);\n }\n\n get spriteEventName() {\n const { spriteFileName } = this;\n if (!spriteFileName) return;\n return `tct-loaded-${spriteFileName}`;\n }\n\n get iconCloneViewBox() {\n return this.iconClone?.getAttribute('viewBox') ?? '0 0 24 24';\n }\n\n /**\n * Checks for the sprite container element in the global DOM\n * If it does not exist, it creates and appends it to the body\n */\n getOrCreateSpriteContainer() {\n const spriteContainerId = 'tecton-sprites';\n let spriteContainer: HTMLDivElement = document.querySelector(`#${spriteContainerId}`);\n\n if (spriteContainer) return spriteContainer;\n spriteContainer = document.createElement('div');\n spriteContainer.id = spriteContainerId;\n spriteContainer.style.display = 'none';\n document.body.appendChild(spriteContainer);\n return spriteContainer;\n }\n\n checkForSprite() {\n const { spriteId, spriteEventName } = this;\n const spriteContainer = this.getOrCreateSpriteContainer();\n let spriteElement: HTMLElement = document.querySelector(`#${spriteId}`);\n\n // If the sprite element exists and has the `data-loaded` attribute, we know we have everything we need\n if (spriteElement?.hasAttribute('data-loaded') ?? false) {\n this.cloneSpriteNode();\n return true;\n }\n\n // If the sprite element exists but does not have the `data-loaded` attribute, we know it's being loaded\n // We'll listen for the event that will be dispatched when the sprite is loaded\n spriteContainer.addEventListener(\n spriteEventName,\n () => {\n this.cloneSpriteNode();\n },\n { once: true }\n );\n\n // If the sprite element exists, we know it's being loaded and will be handled by the event listener\n if (spriteElement) return true;\n\n // If sprite element does not exist, create a placeholder\n // This will let other icons know the sprite is being loaded\n spriteElement = document.createElement('div');\n spriteElement.id = spriteId;\n spriteContainer.appendChild(spriteElement);\n return false;\n }\n\n async fetchSprite() {\n const { spriteFileName, spriteId, spriteEventName } = this;\n\n const spriteExists = this.checkForSprite();\n if (spriteExists) return;\n\n if (!spriteFileName) return;\n const spritePath = getAssetPath(`assets/${spriteFileName}.symbol.svg`);\n const response = await fetch(spritePath);\n const data = await response.text();\n const wrappingDiv = document.createElement('div');\n wrappingDiv.innerHTML = data;\n const svg = wrappingDiv.querySelector('svg');\n\n svg.id = spriteId;\n svg.setAttribute('data-loaded', '');\n\n let { spriteElement } = this;\n if (spriteElement?.tagName === 'SVG') return;\n\n if (typeof spriteElement.replaceWith === 'function') {\n spriteElement.replaceWith(svg);\n } else {\n spriteElement.parentNode.replaceChild(svg, spriteElement);\n }\n\n spriteElement = document.querySelector(`#${spriteId}`);\n spriteElement.dispatchEvent(new CustomEvent(spriteEventName, { bubbles: true }));\n }\n\n cloneSpriteNode() {\n const spriteContainer = this.getOrCreateSpriteContainer();\n const spriteNode = spriteContainer.querySelector<HTMLElement>(`#tct-${this.type}`);\n this.iconClone = spriteNode ? (spriteNode.cloneNode(true) as SVGSymbolElement) : undefined;\n }\n\n setCustomSVGAttrs() {\n const innerSVG = this.hostElement.querySelector('svg');\n\n if (!innerSVG) return;\n\n innerSVG.setAttribute('role', 'img');\n innerSVG.setAttribute('xmlns', 'http://www.w3.org/2000/svg');\n\n const { label } = this;\n if (label) {\n const title = document.createElement('title');\n const labelId = `label-${createGuid()}`;\n title.id = labelId;\n title.textContent = label;\n innerSVG.appendChild(title);\n innerSVG.setAttribute('aria-labelledby', labelId);\n } else {\n innerSVG.setAttribute('aria-hidden', 'true');\n }\n }\n\n render() {\n const { label, type } = this;\n return this.isCustom ? (\n <slot />\n ) : (\n <svg\n aria-hidden={label ? undefined : 'true'}\n role=\"img\"\n aria-labelledby={label ? 'label' : undefined}\n viewBox={this.iconCloneViewBox}\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n {label && <title id=\"label\">{label}</title>}\n <Fragment>\n {!!type && <use href={`#tct-${type}`} />}\n <g ref={el => (this.spriteGroup = el)}></g>\n </Fragment>\n </svg>\n );\n }\n}\n"],"mappings":"+xVAAA,MAAMA,GAAY,wtFA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