@statistikzh/leu 0.16.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/CHANGELOG.md +7 -0
  3. package/dist/Accordion.js +1 -1
  4. package/dist/Button.js +1 -1
  5. package/dist/ButtonGroup.js +1 -1
  6. package/dist/ChartWrapper.js +1 -1
  7. package/dist/Checkbox.js +1 -1
  8. package/dist/CheckboxGroup.js +1 -1
  9. package/dist/Chip.js +1 -1
  10. package/dist/ChipGroup.js +1 -1
  11. package/dist/ChipLink.js +1 -1
  12. package/dist/ChipRemovable.js +1 -1
  13. package/dist/ChipSelectable.js +1 -1
  14. package/dist/Dialog.js +1 -1
  15. package/dist/Dropdown.js +1 -1
  16. package/dist/Icon.js +1 -1
  17. package/dist/Input.js +1 -1
  18. package/dist/{LeuElement-C0BZ_nPB.js → LeuElement-BRZYxDjR.js} +1 -1
  19. package/dist/Menu.js +1 -1
  20. package/dist/MenuItem.js +1 -1
  21. package/dist/Message.js +1 -1
  22. package/dist/Pagination.js +1 -1
  23. package/dist/Placeholder.js +1 -1
  24. package/dist/Popup.js +1 -1
  25. package/dist/Radio.js +1 -1
  26. package/dist/RadioGroup.js +1 -1
  27. package/dist/Range.js +1 -1
  28. package/dist/ScrollTop.js +1 -1
  29. package/dist/Select.js +1 -1
  30. package/dist/Spinner.js +1 -1
  31. package/dist/Table.js +1 -1
  32. package/dist/Tag.d.ts +17 -0
  33. package/dist/Tag.js +75 -0
  34. package/dist/VisuallyHidden.js +1 -1
  35. package/dist/components/tag/Tag.d.ts +13 -0
  36. package/dist/components/tag/Tag.d.ts.map +1 -0
  37. package/dist/components/tag/leu-tag.d.ts +3 -0
  38. package/dist/components/tag/leu-tag.d.ts.map +1 -0
  39. package/dist/components/tag/stories/tag.stories.d.ts +136 -0
  40. package/dist/components/tag/stories/tag.stories.d.ts.map +1 -0
  41. package/dist/components/tag/test/tag.test.d.ts +2 -0
  42. package/dist/components/tag/test/tag.test.d.ts.map +1 -0
  43. package/dist/index.js +1 -1
  44. package/dist/leu-accordion.js +1 -1
  45. package/dist/leu-button-group.js +1 -1
  46. package/dist/leu-button.js +1 -1
  47. package/dist/leu-chart-wrapper.js +1 -1
  48. package/dist/leu-checkbox-group.js +1 -1
  49. package/dist/leu-checkbox.js +1 -1
  50. package/dist/leu-chip-group.js +1 -1
  51. package/dist/leu-chip-link.js +1 -1
  52. package/dist/leu-chip-removable.js +1 -1
  53. package/dist/leu-chip-selectable.js +1 -1
  54. package/dist/leu-dialog.js +1 -1
  55. package/dist/leu-dropdown.js +1 -1
  56. package/dist/leu-icon.js +1 -1
  57. package/dist/leu-input.js +1 -1
  58. package/dist/leu-menu-item.js +1 -1
  59. package/dist/leu-menu.js +1 -1
  60. package/dist/leu-message.js +1 -1
  61. package/dist/leu-pagination.js +1 -1
  62. package/dist/leu-placeholder.js +1 -1
  63. package/dist/leu-popup.js +1 -1
  64. package/dist/leu-radio-group.js +1 -1
  65. package/dist/leu-radio.js +1 -1
  66. package/dist/leu-range.js +1 -1
  67. package/dist/leu-scroll-top.js +1 -1
  68. package/dist/leu-select.js +1 -1
  69. package/dist/leu-spinner.js +1 -1
  70. package/dist/leu-table.js +1 -1
  71. package/dist/leu-tag.d.ts +4 -0
  72. package/dist/leu-tag.js +9 -0
  73. package/dist/leu-visually-hidden.js +1 -1
  74. package/dist/vscode.html-custom-data.json +20 -0
  75. package/dist/vue/index.d.ts +20 -0
  76. package/dist/web-types.json +29 -1
  77. package/package.json +1 -1
  78. package/src/components/tag/Tag.ts +28 -0
  79. package/src/components/tag/leu-tag.ts +5 -0
  80. package/src/components/tag/stories/tag.stories.ts +107 -0
  81. package/src/components/tag/tag.css +42 -0
  82. package/src/components/tag/test/tag.test.ts +28 -0
  83. package/src/docs/theme.mdx +49 -2
@@ -3,7 +3,7 @@ import './_tslib-CNEFicEt.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/class-map.js';
5
5
  import 'lit/decorators.js';
6
- import './LeuElement-C0BZ_nPB.js';
6
+ import './LeuElement-BRZYxDjR.js';
7
7
  import './Checkbox.js';
8
8
  import './Icon.js';
9
9
 
@@ -2,7 +2,7 @@ import { LeuCheckbox } from './Checkbox.js';
2
2
  import './_tslib-CNEFicEt.js';
3
3
  import 'lit';
4
4
  import 'lit/decorators.js';
5
- import './LeuElement-C0BZ_nPB.js';
5
+ import './LeuElement-BRZYxDjR.js';
6
6
  import './Icon.js';
7
7
 
8
8
  LeuCheckbox.define("leu-checkbox");
@@ -1,6 +1,6 @@
1
1
  import { LeuChipGroup } from './ChipGroup.js';
2
2
  import 'lit/static-html.js';
3
- import './LeuElement-C0BZ_nPB.js';
3
+ import './LeuElement-BRZYxDjR.js';
4
4
  import 'lit';
5
5
 
6
6
  LeuChipGroup.define("leu-chip-group");
@@ -1,7 +1,7 @@
1
1
  import { LeuChipLink } from './ChipLink.js';
2
2
  import 'lit';
3
3
  import './Chip.js';
4
- import './LeuElement-C0BZ_nPB.js';
4
+ import './LeuElement-BRZYxDjR.js';
5
5
 
6
6
  LeuChipLink.define("leu-chip-link");
7
7
 
@@ -1,7 +1,7 @@
1
1
  import { LeuChipRemovable } from './ChipRemovable.js';
2
2
  import 'lit';
3
3
  import './Chip.js';
4
- import './LeuElement-C0BZ_nPB.js';
4
+ import './LeuElement-BRZYxDjR.js';
5
5
  import './Icon.js';
6
6
 
7
7
  LeuChipRemovable.define("leu-chip-removable");
@@ -1,7 +1,7 @@
1
1
  import { LeuChipSelectable } from './ChipSelectable.js';
2
2
  import 'lit';
3
3
  import './Chip.js';
4
- import './LeuElement-C0BZ_nPB.js';
4
+ import './LeuElement-BRZYxDjR.js';
5
5
 
6
6
  LeuChipSelectable.define("leu-chip-selectable");
7
7
 
@@ -2,7 +2,7 @@ import { LeuDialog } from './Dialog.js';
2
2
  import 'lit';
3
3
  import 'lit/directives/ref.js';
4
4
  import 'lit/directives/class-map.js';
5
- import './LeuElement-C0BZ_nPB.js';
5
+ import './LeuElement-BRZYxDjR.js';
6
6
  import './hasSlotController-Bm2tipvG.js';
7
7
  import './Icon.js';
8
8
 
@@ -1,7 +1,7 @@
1
1
  import { LeuDropdown } from './Dropdown.js';
2
2
  import 'lit';
3
3
  import 'lit/directives/ref.js';
4
- import './LeuElement-C0BZ_nPB.js';
4
+ import './LeuElement-BRZYxDjR.js';
5
5
  import './hasSlotController-Bm2tipvG.js';
6
6
  import './Button.js';
7
7
  import './_tslib-CNEFicEt.js';
package/dist/leu-icon.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { LeuIcon } from './Icon.js';
2
2
  import 'lit';
3
- import './LeuElement-C0BZ_nPB.js';
3
+ import './LeuElement-BRZYxDjR.js';
4
4
 
5
5
  LeuIcon.define("leu-icon");
6
6
 
package/dist/leu-input.js CHANGED
@@ -4,7 +4,7 @@ import 'lit/directives/class-map.js';
4
4
  import 'lit/directives/if-defined.js';
5
5
  import 'lit/directives/live.js';
6
6
  import 'lit/directives/ref.js';
7
- import './LeuElement-C0BZ_nPB.js';
7
+ import './LeuElement-BRZYxDjR.js';
8
8
  import './Icon.js';
9
9
 
10
10
  LeuInput.define("leu-input");
@@ -1,7 +1,7 @@
1
1
  import { LeuMenuItem } from './MenuItem.js';
2
2
  import 'lit';
3
3
  import 'lit/directives/if-defined.js';
4
- import './LeuElement-C0BZ_nPB.js';
4
+ import './LeuElement-BRZYxDjR.js';
5
5
  import './Icon.js';
6
6
 
7
7
  LeuMenuItem.define("leu-menu-item");
package/dist/leu-menu.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { LeuMenu } from './Menu.js';
2
2
  import 'lit';
3
- import './LeuElement-C0BZ_nPB.js';
3
+ import './LeuElement-BRZYxDjR.js';
4
4
  import './MenuItem.js';
5
5
  import 'lit/directives/if-defined.js';
6
6
  import './Icon.js';
@@ -3,7 +3,7 @@ import './_tslib-CNEFicEt.js';
3
3
  import 'lit';
4
4
  import 'lit/decorators.js';
5
5
  import 'lit/directives/class-map.js';
6
- import './LeuElement-C0BZ_nPB.js';
6
+ import './LeuElement-BRZYxDjR.js';
7
7
  import './Icon.js';
8
8
  import './hasSlotController-Bm2tipvG.js';
9
9
 
@@ -3,7 +3,7 @@ import './_tslib-CNEFicEt.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/live.js';
5
5
  import 'lit/decorators.js';
6
- import './LeuElement-C0BZ_nPB.js';
6
+ import './LeuElement-BRZYxDjR.js';
7
7
  import './Button.js';
8
8
  import 'lit/directives/class-map.js';
9
9
  import 'lit/directives/if-defined.js';
@@ -1,6 +1,6 @@
1
1
  import { LeuPlaceholder } from './Placeholder.js';
2
2
  import 'lit';
3
- import './LeuElement-C0BZ_nPB.js';
3
+ import './LeuElement-BRZYxDjR.js';
4
4
 
5
5
  LeuPlaceholder.define("leu-placeholder");
6
6
 
package/dist/leu-popup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { LeuPopup } from './Popup.js';
2
2
  import 'lit';
3
3
  import '@floating-ui/dom';
4
- import './LeuElement-C0BZ_nPB.js';
4
+ import './LeuElement-BRZYxDjR.js';
5
5
 
6
6
  LeuPopup.define("leu-popup");
7
7
 
@@ -3,7 +3,7 @@ import './_tslib-CNEFicEt.js';
3
3
  import 'lit';
4
4
  import 'lit/directives/class-map.js';
5
5
  import 'lit/decorators.js';
6
- import './LeuElement-C0BZ_nPB.js';
6
+ import './LeuElement-BRZYxDjR.js';
7
7
  import './Radio.js';
8
8
 
9
9
  LeuRadioGroup.define("leu-radio-group");
package/dist/leu-radio.js CHANGED
@@ -2,7 +2,7 @@ import { LeuRadio } from './Radio.js';
2
2
  import './_tslib-CNEFicEt.js';
3
3
  import 'lit';
4
4
  import 'lit/decorators.js';
5
- import './LeuElement-C0BZ_nPB.js';
5
+ import './LeuElement-BRZYxDjR.js';
6
6
 
7
7
  LeuRadio.define("leu-radio");
8
8
 
package/dist/leu-range.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { LeuRange } from './Range.js';
2
2
  import 'lit';
3
- import './LeuElement-C0BZ_nPB.js';
3
+ import './LeuElement-BRZYxDjR.js';
4
4
 
5
5
  LeuRange.define("leu-range");
6
6
 
@@ -1,7 +1,7 @@
1
1
  import { LeuScrollTop } from './ScrollTop.js';
2
2
  import 'lit';
3
3
  import 'lit/directives/class-map.js';
4
- import './LeuElement-C0BZ_nPB.js';
4
+ import './LeuElement-BRZYxDjR.js';
5
5
  import './Button.js';
6
6
  import './_tslib-CNEFicEt.js';
7
7
  import 'lit/directives/if-defined.js';
@@ -3,7 +3,7 @@ import 'lit';
3
3
  import 'lit/directives/class-map.js';
4
4
  import 'lit/directives/ref.js';
5
5
  import 'lit/directives/if-defined.js';
6
- import './LeuElement-C0BZ_nPB.js';
6
+ import './LeuElement-BRZYxDjR.js';
7
7
  import './hasSlotController-Bm2tipvG.js';
8
8
  import './Button.js';
9
9
  import './_tslib-CNEFicEt.js';
@@ -1,6 +1,6 @@
1
1
  import { LeuSpinner } from './Spinner.js';
2
2
  import 'lit';
3
- import './LeuElement-C0BZ_nPB.js';
3
+ import './LeuElement-BRZYxDjR.js';
4
4
 
5
5
  LeuSpinner.define("leu-spinner");
6
6
 
package/dist/leu-table.js CHANGED
@@ -3,7 +3,7 @@ import 'lit';
3
3
  import 'lit/directives/class-map.js';
4
4
  import 'lit/directives/style-map.js';
5
5
  import 'lit/directives/ref.js';
6
- import './LeuElement-C0BZ_nPB.js';
6
+ import './LeuElement-BRZYxDjR.js';
7
7
  import './Icon.js';
8
8
  import './Pagination.js';
9
9
  import './_tslib-CNEFicEt.js';
@@ -0,0 +1,4 @@
1
+ export { LeuTag } from './Tag.js';
2
+ import 'lit-html';
3
+ import 'lit';
4
+ import './LeuElement.d-BevHqLUu.js';
@@ -0,0 +1,9 @@
1
+ import { LeuTag } from './Tag.js';
2
+ import './_tslib-CNEFicEt.js';
3
+ import 'lit';
4
+ import 'lit/decorators.js';
5
+ import './LeuElement-BRZYxDjR.js';
6
+
7
+ LeuTag.define("leu-tag");
8
+
9
+ export { LeuTag };
@@ -1,6 +1,6 @@
1
1
  import { LeuVisuallyHidden } from './VisuallyHidden.js';
2
2
  import 'lit';
3
- import './LeuElement-C0BZ_nPB.js';
3
+ import './LeuElement-BRZYxDjR.js';
4
4
 
5
5
  LeuVisuallyHidden.define("leu-visually-hidden");
6
6
 
@@ -754,6 +754,26 @@
754
754
  }
755
755
  ]
756
756
  },
757
+ {
758
+ "name": "leu-tag",
759
+ "description": "\n---\n\n\n### **Slots:**\n - **default** - The label of the tag\n- **icon** - An icon to display in the tag\n\n### **CSS Properties:**\n - **--leu-tag-accent-color** - The color of the tag _(default: undefined)_",
760
+ "attributes": [
761
+ {
762
+ "name": "variant",
763
+ "values": [
764
+ { "name": "solid" },
765
+ { "name": "outline" },
766
+ { "name": "ghost" }
767
+ ]
768
+ }
769
+ ],
770
+ "references": [
771
+ {
772
+ "name": "Documentation",
773
+ "url": "https://statistikzh.github.io/leu/?path=/story/tag"
774
+ }
775
+ ]
776
+ },
757
777
  {
758
778
  "name": "leu-visually-hidden",
759
779
  "description": "\n---\n",
@@ -27,6 +27,7 @@ import type { LeuScrollTop } from "../ScrollTop.js";
27
27
  import type { LeuSelect } from "../Select.js";
28
28
  import type { LeuSpinner } from "../Spinner.js";
29
29
  import type { LeuTable } from "../Table.js";
30
+ import type { LeuTag } from "../Tag.js";
30
31
  import type { LeuVisuallyHidden } from "../VisuallyHidden.js";
31
32
 
32
33
  type LeuAccordionProps = {
@@ -449,6 +450,11 @@ type LeuTableProps = {
449
450
  _resizeObserver?: LeuTable["_resizeObserver"];
450
451
  };
451
452
 
453
+ type LeuTagProps = {
454
+ /** */
455
+ variant?: LeuTag["variant"];
456
+ };
457
+
452
458
  type LeuVisuallyHiddenProps = {};
453
459
 
454
460
  export type CustomElements = {
@@ -759,6 +765,20 @@ export type CustomElements = {
759
765
  */
760
766
  "leu-table": DefineComponent<LeuTableProps>;
761
767
 
768
+ /**
769
+ *
770
+ * ---
771
+ *
772
+ *
773
+ * ### **Slots:**
774
+ * - **default** - The label of the tag
775
+ * - **icon** - An icon to display in the tag
776
+ *
777
+ * ### **CSS Properties:**
778
+ * - **--leu-tag-accent-color** - The color of the tag _(default: undefined)_
779
+ */
780
+ "leu-tag": DefineComponent<LeuTagProps>;
781
+
762
782
  /**
763
783
  *
764
784
  * ---
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@statistikzh/leu",
4
- "version": "0.16.0",
4
+ "version": "0.17.0",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -1514,6 +1514,34 @@
1514
1514
  "events": []
1515
1515
  }
1516
1516
  },
1517
+ {
1518
+ "name": "leu-tag",
1519
+ "description": "\n---\n\n\n### **Slots:**\n - **default** - The label of the tag\n- **icon** - An icon to display in the tag\n\n### **CSS Properties:**\n - **--leu-tag-accent-color** - The color of the tag _(default: undefined)_",
1520
+ "doc-url": "",
1521
+ "attributes": [
1522
+ {
1523
+ "name": "variant",
1524
+ "value": {
1525
+ "type": "\"solid\" | \"outline\" | \"ghost\"",
1526
+ "default": "\"solid\""
1527
+ }
1528
+ }
1529
+ ],
1530
+ "slots": [
1531
+ { "name": "default", "description": "The label of the tag" },
1532
+ { "name": "icon", "description": "An icon to display in the tag" }
1533
+ ],
1534
+ "events": [],
1535
+ "js": {
1536
+ "properties": [
1537
+ {
1538
+ "name": "variant",
1539
+ "type": "\"solid\" | \"outline\" | \"ghost\""
1540
+ }
1541
+ ],
1542
+ "events": []
1543
+ }
1544
+ },
1517
1545
  {
1518
1546
  "name": "leu-visually-hidden",
1519
1547
  "description": "\n---\n",
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "UI component library of the canton of zurich",
4
4
  "license": "MIT",
5
5
  "author": "statistikzh",
6
- "version": "0.16.0",
6
+ "version": "0.17.0",
7
7
  "type": "module",
8
8
  "main": "dist/index.js",
9
9
  "module": "dist/index.js",
@@ -0,0 +1,28 @@
1
+ import { html } from "lit"
2
+ import { property } from "lit/decorators.js"
3
+
4
+ import { LeuElement } from "../../lib/LeuElement.js"
5
+
6
+ import styles from "./tag.css"
7
+
8
+ /**
9
+ * @tagname leu-tag
10
+ * @cssprop --leu-tag-accent-color - The color of the tag
11
+ * @slot default - The label of the tag
12
+ * @slot icon - An icon to display in the tag
13
+ */
14
+ export class LeuTag extends LeuElement {
15
+ static styles = [LeuElement.styles, styles]
16
+
17
+ @property({ type: String })
18
+ variant: "solid" | "outline" | "ghost" = "solid"
19
+
20
+ render() {
21
+ return html`
22
+ <div class="tag tag--${this.variant}">
23
+ <slot class="tag__icon" name="icon"></slot>
24
+ <slot class="tag__label"></slot>
25
+ </div>
26
+ `
27
+ }
28
+ }
@@ -0,0 +1,5 @@
1
+ import { LeuTag } from "./Tag.js"
2
+
3
+ export { LeuTag }
4
+
5
+ LeuTag.define("leu-tag")
@@ -0,0 +1,107 @@
1
+ import { Meta, StoryObj } from "@storybook/web-components"
2
+ import { html } from "lit"
3
+ import { ifDefined } from "lit/directives/if-defined.js"
4
+
5
+ import "../leu-tag.js"
6
+ import "../../icon/leu-icon.js"
7
+ import { LeuTag } from "../Tag.js"
8
+
9
+ import { paths as iconPaths } from "../../icon/paths.js"
10
+
11
+ type StoryArgs = LeuTag
12
+ type Story = StoryObj<StoryArgs>
13
+
14
+ export default {
15
+ title: "Components/Tag",
16
+ component: "leu-tag",
17
+ parameters: {
18
+ design: {
19
+ type: "figma",
20
+ url: "https://www.figma.com/design/d6Pv21UVUbnBs3AdcZijHmbN/KTZH-Design-System?node-id=21161-184432&t=QMYWpoD4FMWFrUkK-11",
21
+ },
22
+ },
23
+ argTypes: {
24
+ variant: {
25
+ control: "select",
26
+ options: ["solid", "outline", "ghost"],
27
+ },
28
+ "--leu-tag-accent-color": {
29
+ control: {
30
+ type: "color",
31
+ presetColors: [
32
+ "#0076bd",
33
+ "#00407c",
34
+ "#00797b",
35
+ "#1a7f1f",
36
+ "#b01657",
37
+ "#d40053",
38
+ "#7f3da7",
39
+ "#666666",
40
+ "#009ee0",
41
+ "#d93c1a",
42
+ "#1a7f1f",
43
+ ],
44
+ },
45
+ },
46
+ icon: { control: "select", options: Object.keys(iconPaths) },
47
+ },
48
+ args: {
49
+ variant: "solid",
50
+ icon: "confirm",
51
+ default: "Abgeschlossen",
52
+ "--leu-tag-accent-color": "#7f3da7",
53
+ },
54
+ } satisfies Meta<StoryArgs>
55
+
56
+ const Template: Story = {
57
+ render: (args: StoryArgs) =>
58
+ html` <leu-tag
59
+ variant=${ifDefined(args.variant)}
60
+ style="--leu-tag-accent-color: ${args["--leu-tag-accent-color"] ??
61
+ "unset"}"
62
+ >
63
+ ${args.icon
64
+ ? html`<leu-icon slot="icon" name=${args.icon}></leu-icon>`
65
+ : ""}
66
+ ${args.default}</leu-tag
67
+ >`,
68
+ }
69
+
70
+ export const Solid = {
71
+ ...Template,
72
+ args: {
73
+ variant: "solid",
74
+ },
75
+ }
76
+
77
+ export const Outline = {
78
+ ...Template,
79
+ args: {
80
+ variant: "outline",
81
+ },
82
+ }
83
+
84
+ export const Ghost = {
85
+ ...Template,
86
+ args: {
87
+ variant: "ghost",
88
+ },
89
+ }
90
+
91
+ export const Warning = {
92
+ ...Template,
93
+ args: {
94
+ variant: "solid",
95
+ "--leu-tag-accent-color": "#d93c1a",
96
+ default: "Abgelaufen",
97
+ },
98
+ }
99
+
100
+ export const NoIcon = {
101
+ ...Template,
102
+ args: {
103
+ variant: "solid",
104
+ "--leu-tag-accent-color": "#7f3da7",
105
+ icon: undefined,
106
+ },
107
+ }
@@ -0,0 +1,42 @@
1
+ :host {
2
+ /* --tag-font-regular: var(--leu-font-family-regular);
3
+ --tag-font-black: var(--leu-font-family-black);
4
+
5
+ font-family: var(--tag-font-regular); */
6
+ }
7
+
8
+ .tag {
9
+ --_accent-color: var(--leu-tag-accent-color, var(--leu-color-black-60));
10
+
11
+ display: inline-flex;
12
+ align-items: center;
13
+ padding: 0.25rem 0.5rem;
14
+ gap: 0.25rem;
15
+ border-radius: 0.25rem;
16
+
17
+ background-color: var(--_accent-color);
18
+ border: 2px solid var(--_accent-color);
19
+ color: var(--leu-color-black-0);
20
+ }
21
+
22
+ .tag--outline {
23
+ background-color: transparent;
24
+ border-color: var(--_accent-color);
25
+ color: var(--_accent-color);
26
+ }
27
+
28
+ .tag--ghost {
29
+ background-color: transparent;
30
+ border-color: transparent;
31
+ color: var(--_accent-color);
32
+ }
33
+
34
+ .tag__icon {
35
+ --leu-icon-size: 1rem;
36
+ }
37
+
38
+ .tag__label {
39
+ display: block;
40
+ font: var(--leu-t-tiny-regular-font);
41
+ line-height: 1rem;
42
+ }
@@ -0,0 +1,28 @@
1
+ import { html } from "lit"
2
+ import { fixture, expect } from "@open-wc/testing"
3
+
4
+ import "../leu-tag.js"
5
+
6
+ async function defaultFixture() {
7
+ return fixture(html`<leu-tag>Abgeschlossen</leu-tag>`)
8
+ }
9
+
10
+ describe("LeuTag", () => {
11
+ it("is a defined element", async () => {
12
+ const el = customElements.get("leu-tag")
13
+
14
+ expect(el).not.to.be.undefined
15
+ })
16
+
17
+ it("passes the a11y audit", async () => {
18
+ const el = await defaultFixture()
19
+
20
+ await expect(el).shadowDom.to.be.accessible()
21
+ })
22
+
23
+ it("renders with default slot content", async () => {
24
+ const el = await defaultFixture()
25
+
26
+ expect(el).to.have.trimmed.text("Abgeschlossen")
27
+ })
28
+ })