From 0c1f656cf7b8a22391e4b76e79f01c6ef54a5e2a Mon Sep 17 00:00:00 2001 From: Anna Wen <54281166+annawen1@users.noreply.github.com> Date: Thu, 14 Dec 2023 14:11:52 -0500 Subject: [PATCH] feat(tag): slug (#11226) * feat(tag): tag with slug * feat(tag): icon slot for tag * feat(slug): add tag specific styles for slug * chore(ci-check): fix ts errors --- .../src/components/checkbox/checkbox-story.ts | 1 - .../src/components/slug/slug-example-story.ts | 62 ++++++ .../src/components/slug/slug-story.scss | 4 + .../src/components/slug/slug.scss | 201 ++++++++++++++++++ .../src/components/tag/tag-story.ts | 6 +- .../src/components/tag/tag.scss | 4 + .../src/components/tag/tag.ts | 44 ++-- 7 files changed, 301 insertions(+), 21 deletions(-) diff --git a/packages/carbon-web-components/src/components/checkbox/checkbox-story.ts b/packages/carbon-web-components/src/components/checkbox/checkbox-story.ts index 5681f4ed5ab..24b7db11659 100644 --- a/packages/carbon-web-components/src/components/checkbox/checkbox-story.ts +++ b/packages/carbon-web-components/src/components/checkbox/checkbox-story.ts @@ -10,7 +10,6 @@ import { html } from 'lit'; import { action } from '@storybook/addon-actions'; import { boolean } from '@storybook/addon-knobs'; -import { ifDefined } from 'lit/directives/if-defined.js'; import { prefix } from '../../globals/settings'; import textNullable from '../../../.storybook/knob-text-nullable'; import './index'; diff --git a/packages/carbon-web-components/src/components/slug/slug-example-story.ts b/packages/carbon-web-components/src/components/slug/slug-example-story.ts index c196e0196eb..5da43c79d39 100644 --- a/packages/carbon-web-components/src/components/slug/slug-example-story.ts +++ b/packages/carbon-web-components/src/components/slug/slug-example-story.ts @@ -12,6 +12,7 @@ import { boolean } from '@storybook/addon-knobs'; import View16 from '@carbon/icons/lib/view/16'; import FolderOpen16 from '@carbon/icons/lib/folder--open/16'; import Folders16 from '@carbon/icons/lib/folders/16'; +import Asleep16 from '@carbon/icons/lib/asleep/16'; import textNullable from '../../../.storybook/knob-text-nullable'; import { prefix } from '../../globals/settings'; import './index'; @@ -409,6 +410,67 @@ export const _Select = () => { `; }; +const tagTypes = [ + 'red', + 'magenta', + 'purple', + 'blue', + 'cyan', + 'teal', + 'green', + 'gray', + 'cool-gray', + 'warm-gray', + 'high-contrast', + 'outline', +]; + +export const _Tag = () => { + return html` + +