@tmorrow/cre8-wc 2.0.3 → 2.0.5
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.
- package/a2ui/build-knowledge-graph.py +297 -0
- package/a2ui/catalog +240 -0
- package/a2ui/catalog-kg.json +6704 -0
- package/a2ui/catalog.json +6114 -0
- package/a2ui/catalog.svg +3295 -0
- package/a2ui/demo.html +243 -0
- package/a2ui/examples/card-gallery.json +786 -0
- package/a2ui/examples/dating-grid.json +456 -0
- package/a2ui/examples/llm-observability.json +1719 -0
- package/a2ui/examples/portfolio.json +341 -0
- package/a2ui/generate-catalog.mjs +246 -0
- package/a2ui/index.d.ts +4 -0
- package/a2ui/index.js +2 -0
- package/a2ui/index.ts +12 -0
- package/a2ui/registry.d.ts +3 -0
- package/a2ui/registry.js +166 -0
- package/a2ui/registry.ts +182 -0
- package/a2ui/renderer.d.ts +7 -0
- package/a2ui/renderer.js +108 -0
- package/a2ui/renderer.ts +156 -0
- package/a2ui/smoke-test.mjs +238 -0
- package/a2ui/types.d.ts +75 -0
- package/a2ui/types.js +1 -0
- package/a2ui/types.ts +80 -0
- package/cdn/cre8-wc.esm.js +3057 -2438
- package/cdn/cre8-wc.esm.js.map +1 -1
- package/cdn/cre8-wc.min.js +1801 -1204
- package/cdn/cre8-wc.min.js.map +1 -1
- package/lib/a2ui/index.d.ts +5 -0
- package/lib/a2ui/index.d.ts.map +1 -0
- package/lib/a2ui/index.js +3 -0
- package/lib/a2ui/index.js.map +1 -0
- package/lib/a2ui/registry.d.ts +4 -0
- package/lib/a2ui/registry.d.ts.map +1 -0
- package/lib/a2ui/registry.js +167 -0
- package/lib/a2ui/registry.js.map +1 -0
- package/lib/a2ui/renderer.d.ts +8 -0
- package/lib/a2ui/renderer.d.ts.map +1 -0
- package/lib/a2ui/renderer.js +109 -0
- package/lib/a2ui/renderer.js.map +1 -0
- package/lib/a2ui/types.d.ts +76 -0
- package/lib/a2ui/types.d.ts.map +1 -0
- package/lib/a2ui/types.js +2 -0
- package/lib/a2ui/types.js.map +1 -0
- package/lib/components/accordion/accordion.d.ts +1 -0
- package/lib/components/accordion/accordion.d.ts.map +1 -1
- package/lib/components/accordion/accordion.js +1 -0
- package/lib/components/accordion/accordion.js.map +1 -1
- package/lib/components/accordion-item/accordion-item.d.ts +1 -0
- package/lib/components/accordion-item/accordion-item.d.ts.map +1 -1
- package/lib/components/accordion-item/accordion-item.js +1 -0
- package/lib/components/accordion-item/accordion-item.js.map +1 -1
- package/lib/components/alert/alert.d.ts +6 -0
- package/lib/components/alert/alert.d.ts.map +1 -1
- package/lib/components/alert/alert.js +6 -0
- package/lib/components/alert/alert.js.map +1 -1
- package/lib/components/button/button.d.ts +2 -0
- package/lib/components/button/button.d.ts.map +1 -1
- package/lib/components/button/button.js +2 -0
- package/lib/components/button/button.js.map +1 -1
- package/lib/components/button/button.styles.d.ts.map +1 -1
- package/lib/components/button/button.styles.js +1120 -557
- package/lib/components/button/button.styles.js.map +1 -1
- package/lib/components/button-group/button-group.d.ts +9 -0
- package/lib/components/button-group/button-group.d.ts.map +1 -1
- package/lib/components/button-group/button-group.js +8 -0
- package/lib/components/button-group/button-group.js.map +1 -1
- package/lib/components/button-group/button-group.styles.d.ts.map +1 -1
- package/lib/components/button-group/button-group.styles.js +12 -0
- package/lib/components/button-group/button-group.styles.js.map +1 -1
- package/lib/components/card/card.d.ts +1 -1
- package/lib/components/card/card.d.ts.map +1 -1
- package/lib/components/card/card.js +1 -0
- package/lib/components/card/card.js.map +1 -1
- package/lib/components/card/card.styles.d.ts.map +1 -1
- package/lib/components/card/card.styles.js +8 -0
- package/lib/components/card/card.styles.js.map +1 -1
- package/lib/components/checkbox-field-item/checkbox-field-item.d.ts +6 -0
- package/lib/components/checkbox-field-item/checkbox-field-item.d.ts.map +1 -1
- package/lib/components/checkbox-field-item/checkbox-field-item.js +6 -0
- package/lib/components/checkbox-field-item/checkbox-field-item.js.map +1 -1
- package/lib/components/checkbox-field-item/checkbox-field-item.styles.js +1 -1
- package/lib/components/checkbox-field-item/checkbox-field-item.styles.js.map +1 -1
- package/lib/components/date-picker/date-picker.d.ts +5 -0
- package/lib/components/date-picker/date-picker.d.ts.map +1 -1
- package/lib/components/date-picker/date-picker.js +12 -10
- package/lib/components/date-picker/date-picker.js.map +1 -1
- package/lib/components/dropdown/dropdown.d.ts +2 -0
- package/lib/components/dropdown/dropdown.d.ts.map +1 -1
- package/lib/components/dropdown/dropdown.js +2 -0
- package/lib/components/dropdown/dropdown.js.map +1 -1
- package/lib/components/dropdown-item/dropdown-item.d.ts +8 -0
- package/lib/components/dropdown-item/dropdown-item.d.ts.map +1 -1
- package/lib/components/dropdown-item/dropdown-item.js +15 -2
- package/lib/components/dropdown-item/dropdown-item.js.map +1 -1
- package/lib/components/feature/feature.d.ts +4 -0
- package/lib/components/feature/feature.d.ts.map +1 -1
- package/lib/components/feature/feature.js +4 -1
- package/lib/components/feature/feature.js.map +1 -1
- package/lib/components/field/field.d.ts +2 -0
- package/lib/components/field/field.d.ts.map +1 -1
- package/lib/components/field/field.js +3 -0
- package/lib/components/field/field.js.map +1 -1
- package/lib/components/global-nav-item/global-nav-item.d.ts +2 -0
- package/lib/components/global-nav-item/global-nav-item.d.ts.map +1 -1
- package/lib/components/global-nav-item/global-nav-item.js +2 -0
- package/lib/components/global-nav-item/global-nav-item.js.map +1 -1
- package/lib/components/header/header.d.ts +2 -0
- package/lib/components/header/header.d.ts.map +1 -1
- package/lib/components/header/header.js +2 -0
- package/lib/components/header/header.js.map +1 -1
- package/lib/components/hero/hero.d.ts +4 -0
- package/lib/components/hero/hero.d.ts.map +1 -1
- package/lib/components/hero/hero.js +4 -0
- package/lib/components/hero/hero.js.map +1 -1
- package/lib/components/hero/hero.styles.d.ts.map +1 -1
- package/lib/components/hero/hero.styles.js +13 -0
- package/lib/components/hero/hero.styles.js.map +1 -1
- package/lib/components/icon/icon.d.ts +3 -0
- package/lib/components/icon/icon.d.ts.map +1 -1
- package/lib/components/icon/icon.js +7 -5
- package/lib/components/icon/icon.js.map +1 -1
- package/lib/components/link/link.d.ts +2 -0
- package/lib/components/link/link.d.ts.map +1 -1
- package/lib/components/link/link.js +2 -0
- package/lib/components/link/link.js.map +1 -1
- package/lib/components/link-list-item/link-list-item.d.ts +2 -0
- package/lib/components/link-list-item/link-list-item.d.ts.map +1 -1
- package/lib/components/link-list-item/link-list-item.js +2 -0
- package/lib/components/link-list-item/link-list-item.js.map +1 -1
- package/lib/components/modal/modal.d.ts +4 -0
- package/lib/components/modal/modal.d.ts.map +1 -1
- package/lib/components/modal/modal.js +4 -0
- package/lib/components/modal/modal.js.map +1 -1
- package/lib/components/multi-select/multi-select.d.ts +4 -0
- package/lib/components/multi-select/multi-select.d.ts.map +1 -1
- package/lib/components/multi-select/multi-select.js +5 -2
- package/lib/components/multi-select/multi-select.js.map +1 -1
- package/lib/components/page-header/page-header.d.ts +1 -0
- package/lib/components/page-header/page-header.d.ts.map +1 -1
- package/lib/components/page-header/page-header.js +3 -2
- package/lib/components/page-header/page-header.js.map +1 -1
- package/lib/components/pagination/pagination.d.ts +7 -0
- package/lib/components/pagination/pagination.d.ts.map +1 -1
- package/lib/components/pagination/pagination.js +7 -0
- package/lib/components/pagination/pagination.js.map +1 -1
- package/lib/components/percent-bar/percent-bar.d.ts.map +1 -1
- package/lib/components/percent-bar/percent-bar.js +1 -0
- package/lib/components/percent-bar/percent-bar.js.map +1 -1
- package/lib/components/popover/popover.d.ts +6 -0
- package/lib/components/popover/popover.d.ts.map +1 -1
- package/lib/components/popover/popover.js +7 -1
- package/lib/components/popover/popover.js.map +1 -1
- package/lib/components/primary-nav-item/primary-nav-item.d.ts +2 -0
- package/lib/components/primary-nav-item/primary-nav-item.d.ts.map +1 -1
- package/lib/components/primary-nav-item/primary-nav-item.js +2 -0
- package/lib/components/primary-nav-item/primary-nav-item.js.map +1 -1
- package/lib/components/remove-tag/remove-tag.d.ts +2 -0
- package/lib/components/remove-tag/remove-tag.d.ts.map +1 -1
- package/lib/components/remove-tag/remove-tag.js +3 -1
- package/lib/components/remove-tag/remove-tag.js.map +1 -1
- package/lib/components/section/section.d.ts +1 -0
- package/lib/components/section/section.d.ts.map +1 -1
- package/lib/components/section/section.js +1 -0
- package/lib/components/section/section.js.map +1 -1
- package/lib/components/select/select.d.ts +2 -0
- package/lib/components/select/select.d.ts.map +1 -1
- package/lib/components/select/select.js +5 -1
- package/lib/components/select/select.js.map +1 -1
- package/lib/components/split-button/split-button.d.ts +3 -0
- package/lib/components/split-button/split-button.d.ts.map +1 -1
- package/lib/components/split-button/split-button.js.map +1 -1
- package/lib/components/tab/tab.d.ts +2 -0
- package/lib/components/tab/tab.d.ts.map +1 -1
- package/lib/components/tab/tab.js +2 -0
- package/lib/components/tab/tab.js.map +1 -1
- package/lib/components/table-object/table-object.d.ts +2 -0
- package/lib/components/table-object/table-object.d.ts.map +1 -1
- package/lib/components/table-object/table-object.js +2 -0
- package/lib/components/table-object/table-object.js.map +1 -1
- package/lib/components/table-row/table-row.d.ts +1 -0
- package/lib/components/table-row/table-row.d.ts.map +1 -1
- package/lib/components/table-row/table-row.js +1 -0
- package/lib/components/table-row/table-row.js.map +1 -1
- package/lib/components/tag/tag.d.ts +5 -0
- package/lib/components/tag/tag.d.ts.map +1 -1
- package/lib/components/tag/tag.js +2 -0
- package/lib/components/tag/tag.js.map +1 -1
- package/lib/components/tag-list/tag-list.d.ts +2 -0
- package/lib/components/tag-list/tag-list.d.ts.map +1 -1
- package/lib/components/tag-list/tag-list.js +2 -0
- package/lib/components/tag-list/tag-list.js.map +1 -1
- package/lib/components/text-link/text-link.d.ts +1 -0
- package/lib/components/text-link/text-link.d.ts.map +1 -1
- package/lib/components/text-link/text-link.js +1 -0
- package/lib/components/text-link/text-link.js.map +1 -1
- package/lib/components/tooltip/tooltip.d.ts +6 -0
- package/lib/components/tooltip/tooltip.d.ts.map +1 -1
- package/lib/components/tooltip/tooltip.js +3 -0
- package/lib/components/tooltip/tooltip.js.map +1 -1
- package/lib/design-tokens/brands/claude-terracotta/css/tokens_brand.css +85 -0
- package/lib/design-tokens/brands/claude-terracotta/css/tokens_claude-terracotta.css +1 -0
- package/lib/design-tokens/brands/claude-terracotta/css/tokens_claude-terracotta.module.d.ts +3 -0
- package/lib/design-tokens/brands/claude-terracotta/css/tokens_claude-terracotta.module.d.ts.map +1 -0
- package/lib/design-tokens/brands/claude-terracotta/css/tokens_claude-terracotta.module.js +90 -0
- package/lib/design-tokens/brands/claude-terracotta/css/tokens_claude-terracotta.module.js.map +1 -0
- package/lib/design-tokens/brands/cre8-a2ui/css/tokens_brand.css +1 -0
- package/lib/design-tokens/brands/cre8-teal/css/tokens_brand.css +87 -0
- package/lib/design-tokens/brands/cre8-teal/css/tokens_cre8-teal.css +1 -0
- package/lib/design-tokens/brands/cre8-teal/css/tokens_cre8-teal.module.d.ts +3 -0
- package/lib/design-tokens/brands/cre8-teal/css/tokens_cre8-teal.module.d.ts.map +1 -0
- package/lib/design-tokens/brands/cre8-teal/css/tokens_cre8-teal.module.js +90 -0
- package/lib/design-tokens/brands/cre8-teal/css/tokens_cre8-teal.module.js.map +1 -0
- package/lib/scripts/generate-react-manifest.d.ts +20 -0
- package/lib/scripts/generate-react-manifest.d.ts.map +1 -0
- package/lib/scripts/generate-react-manifest.js +154 -0
- package/lib/scripts/generate-react-manifest.js.map +1 -0
- package/mcp-manifest.json +203 -38
- package/package.json +24 -4
- package/react-manifest.json +3594 -0
- package/dist/leaf.png +0 -0
- package/dist/leafDS.png +0 -0
- package/dist/leafLogo.svg +0 -1
|
@@ -43,6 +43,9 @@ import styles from './tooltip.styles.js';
|
|
|
43
43
|
*
|
|
44
44
|
* @slot default - Default, unnamed slot container for Tooltip text
|
|
45
45
|
* @slot trigger - Named slot container for Tooltip element to trigger showing/hiding the Tooltip text
|
|
46
|
+
*
|
|
47
|
+
* @fires open - Fires when the tooltip is shown. `event.detail.isActive` is `true`.
|
|
48
|
+
* @fires close - Fires when the tooltip is hidden. `event.detail.isActive` is `false`.
|
|
46
49
|
*/
|
|
47
50
|
export class Cre8Tooltip extends Cre8Element {
|
|
48
51
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../components/tooltip/tooltip.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,GAAI,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,MAAM,OAAO,WAAY,SAAQ,WAAW;IAA5C;;QAsEE;;WAEG;QAEC,qBAAgB,GAAY,CAAC,CAAC;QAqMlC;;;WAGG;QACH,iBAAY,GAAG,GAAG,EAAE;YAChB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAChB,IAAI,CAAC,YAAY,EAAE,CAAC;YACxB,CAAC;QACL,CAAC,CAAC;IAwCJ,CAAC;IAjOC;;;OAGG;IACH,IAAI,KAAK;QACL,OAAO,QAAQ,CAAC,GAAG,KAAK,KAAK,CAAC;IAClC,CAAC;IAED;;;;;SAKK;IACL,OAAO;QACL,WAAW;QACT,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;aACzD,aAAa,EAAE;aACf,MAAM,CACH,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,EACtE,EA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import { nanoid } from 'nanoid';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { Cre8Element } from '../cre8-element';\nimport styles from './tooltip.styles.js';\n\n/**\n * The purpose of tooltips is to provide a tip or hint about what a tool, icon, link, or other interaction does.\n * If you need to present a call to action with perhaps a button for the user to click, then use\n * [Popover](/docs/cre8-components-popover--docs) instead.\n *\n * ##Tooltip Styles\n * There are 4 alignment options for Tooltips: Top, Bottom, Right, and Left. Default placement is Bottom, below the\n * element it is describing. Top or Bottom alignment are the the preferred placement, particularly on screens that\n * have a more narrow viewport. Tooltips utilize Global styles and are not affected by brand themes.\n *\n * **With icon**\n * - **iconRotateDegree** & **iconFlipDirection** props are optional.\n * - They are used to set up the correct dirrection for icons, for example,\n * arrows, caret up or caret down.\n *\n * ##Usability Considerations\n * With the exception of icons - which should always have alt text at a minimum - the UI should never rely on\n * Tooltips for clarity, especially because they are not always discovered by the user. If the user cannot\n * intuitively understand the interface without Tooltips, the interface should be redesigned.\n *\n * ##How to use\n * - Use Tooltips to clarify the UI element the user is interacting with, not to add additional content on the page.\n * Also, do not simply restate content on the page, for example, the title of the field.\n * - Tooltips should be short and to the point. Example: \"Click X to do X\" or \"Icon Description.\" If a succinct\n * description is not possible, the interaction element should be redesigned.\n * - In a mouse-driven UI, Tooltips are triggered on hover (mouseover) and dismissed (disappear)\n * when the user mouses away from the element. In touch UIs, a Tooltip is triggered by tapping\n * and holding an item. The Tooltip is displayed as long as the user continues to hold the element.\n * Tap and hold is a more advanced user behavior, and further reason for not relying on Tooltips.\n * A novice user may never discover tap and hold for Tooltips.\n *\n * @slot default - Default, unnamed slot container for Tooltip text\n * @slot trigger - Named slot container for Tooltip element to trigger showing/hiding the Tooltip text\n */\n\nexport class Cre8Tooltip extends Cre8Element {\n static styles = [styles];\n\n /**\n * Positions the tooltip panel absolutely to the icon. Position overrides `isDynamic`.\n * @type {\"default\"|\"top\"|\"left\"|\"right\"}\n * @attr {string}\n * - **default** positions the tooltip panel below the trigger element\n * - **top** positions the tooltip panel above the trigger element\n * - **left** positions the tooltip panel left of the trigger element\n * - **right** positions the tooltip panel right of the trigger element\n */\n @property()\n position?: 'top' | 'left' | 'right';\n\n /**\n * The knockout variant for the tooltip\n * @attr {boolean}\n * 1. If is true, the tooltip background is white\n * 2. If is false, the tooltip background is gray\n */\n @property({ type: Boolean, reflect: true })\n knockout?: boolean;\n\n /**\n * The dynamic state for the tooltip. Position overrides isDynamic.\n * @attr {boolean}\n * - If true, the tooltip panel placement is determined by its position in the viewport\n * - If false, the tooltip panel placement will be placed according to the position value\n */\n @property({ type: Boolean, reflect: true })\n isDynamic?: boolean;\n\n /**\n * The dynamic active state\n * @attr {boolean}\n * <br/><br/> _*This property is dynamically set_\n */\n @property({ type: Boolean })\n isActiveDynamic?: boolean;\n\n /**\n * The active state for the tooltip\n * @attr {boolean}\n * - If true, the tooltip panel is visible\n * - If false, the tooltip panel is hidden\n * <br/><br/> _*This property is dynamically set_\n */\n @property({ type: Boolean, reflect: true })\n isActive?: boolean;\n\n /**\n * Accepts the ID string of the item the tooltip is referencing\n * @attr {string}\n * Dynmically appends its own ID to the aria-describedby attribute on the referenced element\n */\n @property({ type: String })\n ariaDescribes?: string;\n\n @property({ type: String })\n _uniqueId?: string;\n\n /**\n * svg as a raw string\n * - The icon is defined by this prop.\n * - Pass in a raw svg as a String for using <cre8-icon>\n */\n @property()\n svg?: string;\n\n /**\n * iconRotateDegree is used for <cre8-icon> to set the arrow in the correct direction\n */\n @property({ type: Number })\n iconRotateDegree?: number = 0;\n\n /**\n * iconFlipDirection is used for <cre8-icon> to set the icon in the correct direction\n */\n @property()\n iconFlipDirection?: string;\n\n /**\n * Query the tooltip panel element\n */\n @query('.cre8-c-tooltip')\n _Cre8Tooltip: HTMLElement;\n\n /**\n * Query the tooltip panel element\n */\n @query('.cre8-c-tooltip__panel')\n _Cre8TooltipPanel: HTMLElement;\n\n /**\n * Query the document direction value\n * <br/><br/> _*This property is dynamically set_\n */\n get isRTL() {\n return document.dir === 'rtl';\n }\n\n /**\n * updated Callback Lifecycle\n * 1. Find the second slot\n * 2. Create a string from joining the textContent of the textnodes\n * 3. Set the textContent of the tip generated in the firstUpdated lifecycle callback\n * */\n updated() {\n /* 1 & 2 */\n const tipContent = this.shadowRoot.querySelectorAll('slot')[1]\n .assignedNodes()\n .reduce(\n ((str, item) => `${str}${item.textContent.replace(/\\n/g, '').trim()}`),\n ''\n );\n /* 3 */\n if (document.getElementById(this._uniqueId)) {\n document.getElementById(this._uniqueId).textContent = tipContent;\n }\n }\n\n /**\n * firstUpdated Callback Lifecycle\n * 1. If ariaDescribes is set\n * a. create an ID and assign it to the property _uniqueId\n * b. Generate an empty div, assign it the _uniqueId and the tooltip role\n * 2. Set the aria-describedby on the ariaDescribes target\n */\n firstUpdated() {\n if (this.ariaDescribes) { /* 1 */\n this._uniqueId = this._uniqueId || nanoid(); /* 1.a */\n const idMatcher = new RegExp(`\\\\b${this._uniqueId}\\\\b`); // prevents dupes from reconnects below\n /* 1.b */\n const a11yProxy = document.createElement('div');\n a11yProxy.setAttribute('role', 'tooltip');\n a11yProxy.setAttribute('style', 'position:fixed; left: -1000px; top: -1000px;');\n a11yProxy.id = this._uniqueId;\n const describedEl = document.getElementById(this.ariaDescribes);\n describedEl.parentNode.insertBefore(a11yProxy, describedEl);\n const idList = describedEl?.getAttribute('aria-describedBy');\n /* 2 */\n describedEl?.setAttribute(\n 'aria-describedby',\n `${idList ? `${idList.replace(idMatcher, '')} ` : ''}${this._uniqueId}`.trim()\n );\n }\n }\n\n /**\n * Connected Callback Lifecycle\n * 1. Add window mouseover event listener\n * 2. Add window mouseout event listener\n * 3. Add mousedown event listener\n * 4. Set the id and aria-describedby\n */\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener('mouseover', this.toggleActive); /* 1 */\n this.addEventListener('mouseout', this.removeActive); /* 2 */\n }\n\n /**\n * Disconnected Callback Lifecycle\n * 1. Remove window mouseover event listener\n * 2. Remove window mouseout event listener\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener('mouseover', this.toggleActive); /* 1 */\n this.removeEventListener('mouseout', this.removeActive); /* 2 */\n }\n\n /**\n * Handle all dynamic placement\n */\n dynamicPosition() {\n // TODO: Temporarily keep eslint complexity as warning. Update during specific story for this rule.\n /* eslint complexity: [\"warn\", 10] */\n if (this.isDynamic && this._Cre8TooltipPanel) {\n const body = document.querySelector('body').getBoundingClientRect();\n const tooltipPanel = this._Cre8TooltipPanel.getBoundingClientRect();\n const tooltipHeight = this._Cre8Tooltip.clientHeight + tooltipPanel.height + tooltipPanel.top;\n\n /**\n * If tooltip panel breaks out the left side of the window, position it to the right\n */\n if (tooltipPanel.left < 0) {\n this.position = this.isRTL ? 'left' : 'right';\n }\n\n /**\n * If tooltip panel breaks out the right side of the window, position it to the left\n */\n if (tooltipPanel.right >= body.width) {\n this.position = this.isRTL ? 'right' : 'left';\n }\n\n /**\n * If tooltip panel breaks out the top side of the window only, position it to the bottom center\n */\n if (tooltipPanel.top < 0 && tooltipPanel.left > 0 && tooltipPanel.right < body.width) {\n this.position = null;\n }\n\n /**\n * If tooltip panel breaks out the bottom side of the window only, position it to the top center\n */\n if (\n tooltipHeight >= window.innerHeight\n && tooltipPanel.bottom >= window.innerHeight\n && tooltipPanel.left >= 0\n && tooltipPanel.right <= body.width\n ) {\n this.position = 'top';\n }\n }\n }\n\n /**\n * Handle Keydown\n * 1. If escape or tab key is struck when the tooltip is active, close it\n * 2. If enter or escape is keyed, toggle the tooltip open or close.\n * We need these since the click event is on a div so that accessibility reads this aloud to a user\n */\n private _handleKeydown(e: KeyboardEvent) {\n if (this.isActive) {\n if (e.code === 'Escape' || e.code === 'Tab') {\n this.toggleActive(); /* 1 */\n }\n }\n if (e.code === 'Enter' || e.code === 'Space') {\n this.toggleActive(); /* 2 */\n }\n }\n\n /**\n * Set Tooltip Active State\n * 1. Toggle the active state between true and false\n * 2. If is active, set the dynamic position and custom event.\n * 3. If is not active, remove fire the close custom event.\n * 4. Toggle the active state for dynamic. This prevents a flash of the tooltip in the orginal position.\n */\n toggleActive() {\n this.isActive = !this.isActive; /* 1 */\n\n if (this.isActive) {\n /* 2 */\n setTimeout(() => {\n this.dynamicPosition();\n }, 1);\n this.dispatchEvent(new CustomEvent('open', {\n detail: { isActive: this.isActive }, bubbles: true, composed: true,\n }));\n } else {\n /* 3 */\n this.dispatchEvent(new CustomEvent('close', {\n detail: { isActive: this.isActive }, bubbles: true, composed: true,\n }));\n }\n\n /* 4 */\n setTimeout(() => {\n if (this.isActive && this.isDynamic) {\n this.isActiveDynamic = true;\n } else {\n this.isActiveDynamic = false;\n }\n }, 2);\n }\n\n /**\n * Remove Active State\n * 1. If a specific event is fired, remove the active state.\n */\n removeActive = () => {\n if (this.isActive) {\n this.toggleActive();\n }\n };\n\n render() {\n const componentClassNames = this.componentClassNames('cre8-c-tooltip', {\n 'cre8-c-tooltip--top': this.position === 'top',\n 'cre8-c-tooltip--left': this.position === 'left',\n 'cre8-c-tooltip--right': this.position === 'right',\n 'cre8-c-tooltip--knockout': this.knockout,\n 'cre8-is-active': this.isActive,\n 'cre8-is-dynamic': this.isDynamic,\n 'cre8-is-dynamic-active': this.isActiveDynamic,\n });\n\n return html`\n <div class=\"${componentClassNames}\">\n <div \n class=\"cre8-c-tooltip__trigger\"\n tabindex=\"0\"\n @focus=${this.toggleActive}\n @keydown=${this._handleKeydown}\n >\n ${this.svg\n ? html`\n <slot name=\"trigger\">\n <cre8-icon svg='${this.svg}' rotate=\"${Number(this.iconRotateDegree)}\" \n flip=\"${this.iconFlipDirection}\" aria-hidden=\"true\"></cre8-icon>\n </slot>`\n : html`<slot name=\"trigger\"></slot>`\n}\n </div>\n <dialog\n id=${ifDefined(this._uniqueId)}\n aria-labelledby=${this.ariaDescribes}\n class=\"cre8-c-tooltip__panel\"\n role=\"tooltip\">\n <slot></slot>\n </dialog>\n </div>\n `;\n }\n}\n\nif (customElements.get('cre8-tooltip') === undefined) {\n customElements.define('cre8-tooltip', Cre8Tooltip);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-tooltip': Cre8Tooltip;\n }\n}\n\nexport default Cre8Tooltip;\n"]}
|
|
1
|
+
{"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../components/tooltip/tooltip.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,GAAI,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAEzC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AAEH,MAAM,OAAO,WAAY,SAAQ,WAAW;IAA5C;;QAyEE;;WAEG;QAEC,qBAAgB,GAAY,CAAC,CAAC;QAqMlC;;;WAGG;QACH,iBAAY,GAAG,GAAG,EAAE;YAChB,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;gBAChB,IAAI,CAAC,YAAY,EAAE,CAAC;YACxB,CAAC;QACL,CAAC,CAAC;IAwCJ,CAAC;IAjOC;;;OAGG;IACH,IAAI,KAAK;QACL,OAAO,QAAQ,CAAC,GAAG,KAAK,KAAK,CAAC;IAClC,CAAC;IAED;;;;;SAKK;IACL,OAAO;QACL,WAAW;QACT,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;aACzD,aAAa,EAAE;aACf,MAAM,CACH,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,EACtE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';\nimport { nanoid } from 'nanoid';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { Cre8Element } from '../cre8-element';\nimport styles from './tooltip.styles.js';\n\n/**\n * The purpose of tooltips is to provide a tip or hint about what a tool, icon, link, or other interaction does.\n * If you need to present a call to action with perhaps a button for the user to click, then use\n * [Popover](/docs/cre8-components-popover--docs) instead.\n *\n * ##Tooltip Styles\n * There are 4 alignment options for Tooltips: Top, Bottom, Right, and Left. Default placement is Bottom, below the\n * element it is describing. Top or Bottom alignment are the the preferred placement, particularly on screens that\n * have a more narrow viewport. Tooltips utilize Global styles and are not affected by brand themes.\n *\n * **With icon**\n * - **iconRotateDegree** & **iconFlipDirection** props are optional.\n * - They are used to set up the correct dirrection for icons, for example,\n * arrows, caret up or caret down.\n *\n * ##Usability Considerations\n * With the exception of icons - which should always have alt text at a minimum - the UI should never rely on\n * Tooltips for clarity, especially because they are not always discovered by the user. If the user cannot\n * intuitively understand the interface without Tooltips, the interface should be redesigned.\n *\n * ##How to use\n * - Use Tooltips to clarify the UI element the user is interacting with, not to add additional content on the page.\n * Also, do not simply restate content on the page, for example, the title of the field.\n * - Tooltips should be short and to the point. Example: \"Click X to do X\" or \"Icon Description.\" If a succinct\n * description is not possible, the interaction element should be redesigned.\n * - In a mouse-driven UI, Tooltips are triggered on hover (mouseover) and dismissed (disappear)\n * when the user mouses away from the element. In touch UIs, a Tooltip is triggered by tapping\n * and holding an item. The Tooltip is displayed as long as the user continues to hold the element.\n * Tap and hold is a more advanced user behavior, and further reason for not relying on Tooltips.\n * A novice user may never discover tap and hold for Tooltips.\n *\n * @slot default - Default, unnamed slot container for Tooltip text\n * @slot trigger - Named slot container for Tooltip element to trigger showing/hiding the Tooltip text\n *\n * @fires open - Fires when the tooltip is shown. `event.detail.isActive` is `true`.\n * @fires close - Fires when the tooltip is hidden. `event.detail.isActive` is `false`.\n */\n\nexport class Cre8Tooltip extends Cre8Element {\n static styles = [styles];\n\n /**\n * Positions the tooltip panel absolutely to the icon. Position overrides `isDynamic`.\n * @type {\"default\"|\"top\"|\"left\"|\"right\"}\n * @attr {string}\n * - **default** positions the tooltip panel below the trigger element\n * - **top** positions the tooltip panel above the trigger element\n * - **left** positions the tooltip panel left of the trigger element\n * - **right** positions the tooltip panel right of the trigger element\n */\n @property()\n position?: 'top' | 'left' | 'right';\n\n /**\n * The knockout variant for the tooltip\n * @attr {boolean}\n * 1. If is true, the tooltip background is white\n * 2. If is false, the tooltip background is gray\n */\n @property({ type: Boolean, reflect: true })\n knockout?: boolean;\n\n /**\n * The dynamic state for the tooltip. Position overrides isDynamic.\n * @attr {boolean}\n * - If true, the tooltip panel placement is determined by its position in the viewport\n * - If false, the tooltip panel placement will be placed according to the position value\n */\n @property({ type: Boolean, reflect: true })\n isDynamic?: boolean;\n\n /**\n * The dynamic active state\n * @attr {boolean}\n * <br/><br/> _*This property is dynamically set_\n */\n @property({ type: Boolean })\n isActiveDynamic?: boolean;\n\n /**\n * The active state for the tooltip\n * @attr {boolean}\n * - If true, the tooltip panel is visible\n * - If false, the tooltip panel is hidden\n * <br/><br/> _*This property is dynamically set_\n */\n @property({ type: Boolean, reflect: true })\n isActive?: boolean;\n\n /**\n * Accepts the ID string of the item the tooltip is referencing\n * @attr {string}\n * Dynmically appends its own ID to the aria-describedby attribute on the referenced element\n */\n @property({ type: String })\n ariaDescribes?: string;\n\n /**\n * Internal unique id used to associate the trigger with the tooltip text. Generated automatically.\n */\n @property({ type: String })\n _uniqueId?: string;\n\n /**\n * svg as a raw string\n * - The icon is defined by this prop.\n * - Pass in a raw svg as a String for using <cre8-icon>\n */\n @property()\n svg?: string;\n\n /**\n * iconRotateDegree is used for <cre8-icon> to set the arrow in the correct direction\n */\n @property({ type: Number })\n iconRotateDegree?: number = 0;\n\n /**\n * iconFlipDirection is used for <cre8-icon> to set the icon in the correct direction\n */\n @property()\n iconFlipDirection?: string;\n\n /**\n * Query the tooltip panel element\n */\n @query('.cre8-c-tooltip')\n _Cre8Tooltip: HTMLElement;\n\n /**\n * Query the tooltip panel element\n */\n @query('.cre8-c-tooltip__panel')\n _Cre8TooltipPanel: HTMLElement;\n\n /**\n * Query the document direction value\n * <br/><br/> _*This property is dynamically set_\n */\n get isRTL() {\n return document.dir === 'rtl';\n }\n\n /**\n * updated Callback Lifecycle\n * 1. Find the second slot\n * 2. Create a string from joining the textContent of the textnodes\n * 3. Set the textContent of the tip generated in the firstUpdated lifecycle callback\n * */\n updated() {\n /* 1 & 2 */\n const tipContent = this.shadowRoot.querySelectorAll('slot')[1]\n .assignedNodes()\n .reduce(\n ((str, item) => `${str}${item.textContent.replace(/\\n/g, '').trim()}`),\n ''\n );\n /* 3 */\n if (document.getElementById(this._uniqueId)) {\n document.getElementById(this._uniqueId).textContent = tipContent;\n }\n }\n\n /**\n * firstUpdated Callback Lifecycle\n * 1. If ariaDescribes is set\n * a. create an ID and assign it to the property _uniqueId\n * b. Generate an empty div, assign it the _uniqueId and the tooltip role\n * 2. Set the aria-describedby on the ariaDescribes target\n */\n firstUpdated() {\n if (this.ariaDescribes) { /* 1 */\n this._uniqueId = this._uniqueId || nanoid(); /* 1.a */\n const idMatcher = new RegExp(`\\\\b${this._uniqueId}\\\\b`); // prevents dupes from reconnects below\n /* 1.b */\n const a11yProxy = document.createElement('div');\n a11yProxy.setAttribute('role', 'tooltip');\n a11yProxy.setAttribute('style', 'position:fixed; left: -1000px; top: -1000px;');\n a11yProxy.id = this._uniqueId;\n const describedEl = document.getElementById(this.ariaDescribes);\n describedEl.parentNode.insertBefore(a11yProxy, describedEl);\n const idList = describedEl?.getAttribute('aria-describedBy');\n /* 2 */\n describedEl?.setAttribute(\n 'aria-describedby',\n `${idList ? `${idList.replace(idMatcher, '')} ` : ''}${this._uniqueId}`.trim()\n );\n }\n }\n\n /**\n * Connected Callback Lifecycle\n * 1. Add window mouseover event listener\n * 2. Add window mouseout event listener\n * 3. Add mousedown event listener\n * 4. Set the id and aria-describedby\n */\n connectedCallback() {\n super.connectedCallback();\n this.addEventListener('mouseover', this.toggleActive); /* 1 */\n this.addEventListener('mouseout', this.removeActive); /* 2 */\n }\n\n /**\n * Disconnected Callback Lifecycle\n * 1. Remove window mouseover event listener\n * 2. Remove window mouseout event listener\n */\n disconnectedCallback() {\n super.disconnectedCallback();\n this.removeEventListener('mouseover', this.toggleActive); /* 1 */\n this.removeEventListener('mouseout', this.removeActive); /* 2 */\n }\n\n /**\n * Handle all dynamic placement\n */\n dynamicPosition() {\n // TODO: Temporarily keep eslint complexity as warning. Update during specific story for this rule.\n /* eslint complexity: [\"warn\", 10] */\n if (this.isDynamic && this._Cre8TooltipPanel) {\n const body = document.querySelector('body').getBoundingClientRect();\n const tooltipPanel = this._Cre8TooltipPanel.getBoundingClientRect();\n const tooltipHeight = this._Cre8Tooltip.clientHeight + tooltipPanel.height + tooltipPanel.top;\n\n /**\n * If tooltip panel breaks out the left side of the window, position it to the right\n */\n if (tooltipPanel.left < 0) {\n this.position = this.isRTL ? 'left' : 'right';\n }\n\n /**\n * If tooltip panel breaks out the right side of the window, position it to the left\n */\n if (tooltipPanel.right >= body.width) {\n this.position = this.isRTL ? 'right' : 'left';\n }\n\n /**\n * If tooltip panel breaks out the top side of the window only, position it to the bottom center\n */\n if (tooltipPanel.top < 0 && tooltipPanel.left > 0 && tooltipPanel.right < body.width) {\n this.position = null;\n }\n\n /**\n * If tooltip panel breaks out the bottom side of the window only, position it to the top center\n */\n if (\n tooltipHeight >= window.innerHeight\n && tooltipPanel.bottom >= window.innerHeight\n && tooltipPanel.left >= 0\n && tooltipPanel.right <= body.width\n ) {\n this.position = 'top';\n }\n }\n }\n\n /**\n * Handle Keydown\n * 1. If escape or tab key is struck when the tooltip is active, close it\n * 2. If enter or escape is keyed, toggle the tooltip open or close.\n * We need these since the click event is on a div so that accessibility reads this aloud to a user\n */\n private _handleKeydown(e: KeyboardEvent) {\n if (this.isActive) {\n if (e.code === 'Escape' || e.code === 'Tab') {\n this.toggleActive(); /* 1 */\n }\n }\n if (e.code === 'Enter' || e.code === 'Space') {\n this.toggleActive(); /* 2 */\n }\n }\n\n /**\n * Set Tooltip Active State\n * 1. Toggle the active state between true and false\n * 2. If is active, set the dynamic position and custom event.\n * 3. If is not active, remove fire the close custom event.\n * 4. Toggle the active state for dynamic. This prevents a flash of the tooltip in the orginal position.\n */\n toggleActive() {\n this.isActive = !this.isActive; /* 1 */\n\n if (this.isActive) {\n /* 2 */\n setTimeout(() => {\n this.dynamicPosition();\n }, 1);\n this.dispatchEvent(new CustomEvent('open', {\n detail: { isActive: this.isActive }, bubbles: true, composed: true,\n }));\n } else {\n /* 3 */\n this.dispatchEvent(new CustomEvent('close', {\n detail: { isActive: this.isActive }, bubbles: true, composed: true,\n }));\n }\n\n /* 4 */\n setTimeout(() => {\n if (this.isActive && this.isDynamic) {\n this.isActiveDynamic = true;\n } else {\n this.isActiveDynamic = false;\n }\n }, 2);\n }\n\n /**\n * Remove Active State\n * 1. If a specific event is fired, remove the active state.\n */\n removeActive = () => {\n if (this.isActive) {\n this.toggleActive();\n }\n };\n\n render() {\n const componentClassNames = this.componentClassNames('cre8-c-tooltip', {\n 'cre8-c-tooltip--top': this.position === 'top',\n 'cre8-c-tooltip--left': this.position === 'left',\n 'cre8-c-tooltip--right': this.position === 'right',\n 'cre8-c-tooltip--knockout': this.knockout,\n 'cre8-is-active': this.isActive,\n 'cre8-is-dynamic': this.isDynamic,\n 'cre8-is-dynamic-active': this.isActiveDynamic,\n });\n\n return html`\n <div class=\"${componentClassNames}\">\n <div \n class=\"cre8-c-tooltip__trigger\"\n tabindex=\"0\"\n @focus=${this.toggleActive}\n @keydown=${this._handleKeydown}\n >\n ${this.svg\n ? html`\n <slot name=\"trigger\">\n <cre8-icon svg='${this.svg}' rotate=\"${Number(this.iconRotateDegree)}\" \n flip=\"${this.iconFlipDirection}\" aria-hidden=\"true\"></cre8-icon>\n </slot>`\n : html`<slot name=\"trigger\"></slot>`\n}\n </div>\n <dialog\n id=${ifDefined(this._uniqueId)}\n aria-labelledby=${this.ariaDescribes}\n class=\"cre8-c-tooltip__panel\"\n role=\"tooltip\">\n <slot></slot>\n </dialog>\n </div>\n `;\n }\n}\n\nif (customElements.get('cre8-tooltip') === undefined) {\n customElements.define('cre8-tooltip', Cre8Tooltip);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'cre8-tooltip': Cre8Tooltip;\n }\n}\n\nexport default Cre8Tooltip;\n"]}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
/* ─── Background & Surface ─────────────────────────────────── */
|
|
3
|
+
--cre8-background-default: #FFFFFF;
|
|
4
|
+
--cre8-background-subtle: #FBF6F3;
|
|
5
|
+
--cre8-background-strong: #F2E8E2;
|
|
6
|
+
--cre8-background-inverse: #1A1208;
|
|
7
|
+
--cre8-surface-default: #FFFFFF;
|
|
8
|
+
--cre8-surface-elevated: #FFFAF8;
|
|
9
|
+
|
|
10
|
+
/* ─── Content (text) ───────────────────────────────────────── */
|
|
11
|
+
--cre8-content-default: #1A1208;
|
|
12
|
+
--cre8-content-muted: #8A7A72;
|
|
13
|
+
--cre8-content-inverse: #FFFFFF;
|
|
14
|
+
--cre8-content-link: #9E3A15;
|
|
15
|
+
|
|
16
|
+
/* ─── Borders ──────────────────────────────────────────────── */
|
|
17
|
+
--cre8-border-subtle: #F0E2D9;
|
|
18
|
+
--cre8-border-default: #D9C4B8;
|
|
19
|
+
--cre8-border-strong: #7A5D52;
|
|
20
|
+
--cre8-border-inverse: #B09080;
|
|
21
|
+
|
|
22
|
+
/* ─── Accent / Brand ───────────────────────────────────────── */
|
|
23
|
+
--cre8-accent-primary: #C85F2F;
|
|
24
|
+
--cre8-accent-primary-hover: #A84D24;
|
|
25
|
+
--cre8-accent-primary-active: #8C3F1C;
|
|
26
|
+
--cre8-accent-primary-subtle: rgba(200, 95, 47, 0.10);
|
|
27
|
+
--cre8-accent-secondary: #1A1208;
|
|
28
|
+
--cre8-focus-ring: #C85F2F;
|
|
29
|
+
|
|
30
|
+
/* ─── Status (brand-neutral, same as cre8-teal) ────────────── */
|
|
31
|
+
--cre8-status-info: #1963E1;
|
|
32
|
+
--cre8-status-success: #1E9E5A;
|
|
33
|
+
--cre8-status-warning: #E08A1F;
|
|
34
|
+
--cre8-status-error: #D02525;
|
|
35
|
+
--cre8-status-error-dark: #AA1313;
|
|
36
|
+
--cre8-status-error-darkest: #7A0000;
|
|
37
|
+
--cre8-overlay: rgba(0, 0, 0, 0.20);
|
|
38
|
+
|
|
39
|
+
/* ─── Spacing (same across all skins) ─────────────────────── */
|
|
40
|
+
--cre8-spacing-2xs: 2px;
|
|
41
|
+
--cre8-spacing-xs: 4px;
|
|
42
|
+
--cre8-spacing-sm: 8px;
|
|
43
|
+
--cre8-spacing-md: 12px;
|
|
44
|
+
--cre8-spacing-lg: 16px;
|
|
45
|
+
--cre8-spacing-xl: 24px;
|
|
46
|
+
--cre8-spacing-2xl: 32px;
|
|
47
|
+
--cre8-spacing-3xl: 48px;
|
|
48
|
+
--cre8-spacing-4xl: 64px;
|
|
49
|
+
--cre8-spacing-5xl: 96px;
|
|
50
|
+
|
|
51
|
+
/* ─── Radius ───────────────────────────────────────────────── */
|
|
52
|
+
--cre8-radius-none: 0px;
|
|
53
|
+
--cre8-radius-sm: 4px;
|
|
54
|
+
--cre8-radius-md: 8px;
|
|
55
|
+
--cre8-radius-lg: 12px;
|
|
56
|
+
--cre8-radius-xl: 16px;
|
|
57
|
+
--cre8-radius-2xl: 24px;
|
|
58
|
+
--cre8-radius-full: 9999px;
|
|
59
|
+
|
|
60
|
+
/* ─── Typography — Font Size ───────────────────────────────── */
|
|
61
|
+
--cre8-font-size-xs: 12px;
|
|
62
|
+
--cre8-font-size-sm: 14px;
|
|
63
|
+
--cre8-font-size-md: 16px;
|
|
64
|
+
--cre8-font-size-lg: 18px;
|
|
65
|
+
--cre8-font-size-xl: 20px;
|
|
66
|
+
--cre8-font-size-2xl: 24px;
|
|
67
|
+
--cre8-font-size-3xl: 32px;
|
|
68
|
+
--cre8-font-size-4xl: 40px;
|
|
69
|
+
--cre8-font-size-5xl: 56px;
|
|
70
|
+
--cre8-font-size-6xl: 72px;
|
|
71
|
+
|
|
72
|
+
/* ─── Typography — Font Weight ─────────────────────────────── */
|
|
73
|
+
--cre8-font-weight-regular: 400;
|
|
74
|
+
--cre8-font-weight-medium: 500;
|
|
75
|
+
--cre8-font-weight-semibold: 600;
|
|
76
|
+
--cre8-font-weight-bold: 700;
|
|
77
|
+
|
|
78
|
+
/* ─── Typography — Font Family ─────────────────────────────── */
|
|
79
|
+
--cre8-font-family-sans: 'Inter', system-ui, sans-serif;
|
|
80
|
+
--cre8-font-family-mono: 'JetBrains Mono', 'Courier New', monospace;
|
|
81
|
+
|
|
82
|
+
/* ─── Typography — Line Height ─────────────────────────────── */
|
|
83
|
+
--cre8-line-height-tight: 1.2;
|
|
84
|
+
--cre8-line-height-normal: 1.5;
|
|
85
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import './tokens_brand.css';
|
package/lib/design-tokens/brands/claude-terracotta/css/tokens_claude-terracotta.module.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens_claude-terracotta.module.d.ts","sourceRoot":"","sources":["../../../../../design-tokens/brands/claude-terracotta/css/tokens_claude-terracotta.module.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,gBAAgB,yBAsFrB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
const claudeTerracotta = css `
|
|
3
|
+
:root {
|
|
4
|
+
/* ─── Background & Surface ─────────────────────────────────── */
|
|
5
|
+
--cre8-background-default: #FFFFFF;
|
|
6
|
+
--cre8-background-subtle: #FBF6F3;
|
|
7
|
+
--cre8-background-strong: #F2E8E2;
|
|
8
|
+
--cre8-background-inverse: #1A1208;
|
|
9
|
+
--cre8-surface-default: #FFFFFF;
|
|
10
|
+
--cre8-surface-elevated: #FFFAF8;
|
|
11
|
+
|
|
12
|
+
/* ─── Content (text) ───────────────────────────────────────── */
|
|
13
|
+
--cre8-content-default: #1A1208;
|
|
14
|
+
--cre8-content-muted: #8A7A72;
|
|
15
|
+
--cre8-content-inverse: #FFFFFF;
|
|
16
|
+
--cre8-content-link: #9E3A15;
|
|
17
|
+
|
|
18
|
+
/* ─── Borders ──────────────────────────────────────────────── */
|
|
19
|
+
--cre8-border-subtle: #F0E2D9;
|
|
20
|
+
--cre8-border-default: #D9C4B8;
|
|
21
|
+
--cre8-border-strong: #7A5D52;
|
|
22
|
+
--cre8-border-inverse: #B09080;
|
|
23
|
+
|
|
24
|
+
/* ─── Accent / Brand ───────────────────────────────────────── */
|
|
25
|
+
--cre8-accent-primary: #C85F2F;
|
|
26
|
+
--cre8-accent-primary-hover: #A84D24;
|
|
27
|
+
--cre8-accent-primary-active: #8C3F1C;
|
|
28
|
+
--cre8-accent-primary-subtle: rgba(200, 95, 47, 0.10);
|
|
29
|
+
--cre8-accent-secondary: #1A1208;
|
|
30
|
+
--cre8-focus-ring: #C85F2F;
|
|
31
|
+
|
|
32
|
+
/* ─── Status (brand-neutral, same as cre8-teal) ────────────── */
|
|
33
|
+
--cre8-status-info: #1963E1;
|
|
34
|
+
--cre8-status-success: #1E9E5A;
|
|
35
|
+
--cre8-status-warning: #E08A1F;
|
|
36
|
+
--cre8-status-error: #D02525;
|
|
37
|
+
--cre8-status-error-dark: #AA1313;
|
|
38
|
+
--cre8-status-error-darkest: #7A0000;
|
|
39
|
+
--cre8-overlay: rgba(0, 0, 0, 0.20);
|
|
40
|
+
|
|
41
|
+
/* ─── Spacing (same across all skins) ─────────────────────── */
|
|
42
|
+
--cre8-spacing-2xs: 2px;
|
|
43
|
+
--cre8-spacing-xs: 4px;
|
|
44
|
+
--cre8-spacing-sm: 8px;
|
|
45
|
+
--cre8-spacing-md: 12px;
|
|
46
|
+
--cre8-spacing-lg: 16px;
|
|
47
|
+
--cre8-spacing-xl: 24px;
|
|
48
|
+
--cre8-spacing-2xl: 32px;
|
|
49
|
+
--cre8-spacing-3xl: 48px;
|
|
50
|
+
--cre8-spacing-4xl: 64px;
|
|
51
|
+
--cre8-spacing-5xl: 96px;
|
|
52
|
+
|
|
53
|
+
/* ─── Radius ───────────────────────────────────────────────── */
|
|
54
|
+
--cre8-radius-none: 0px;
|
|
55
|
+
--cre8-radius-sm: 4px;
|
|
56
|
+
--cre8-radius-md: 8px;
|
|
57
|
+
--cre8-radius-lg: 12px;
|
|
58
|
+
--cre8-radius-xl: 16px;
|
|
59
|
+
--cre8-radius-2xl: 24px;
|
|
60
|
+
--cre8-radius-full: 9999px;
|
|
61
|
+
|
|
62
|
+
/* ─── Typography — Font Size ───────────────────────────────── */
|
|
63
|
+
--cre8-font-size-xs: 12px;
|
|
64
|
+
--cre8-font-size-sm: 14px;
|
|
65
|
+
--cre8-font-size-md: 16px;
|
|
66
|
+
--cre8-font-size-lg: 18px;
|
|
67
|
+
--cre8-font-size-xl: 20px;
|
|
68
|
+
--cre8-font-size-2xl: 24px;
|
|
69
|
+
--cre8-font-size-3xl: 32px;
|
|
70
|
+
--cre8-font-size-4xl: 40px;
|
|
71
|
+
--cre8-font-size-5xl: 56px;
|
|
72
|
+
--cre8-font-size-6xl: 72px;
|
|
73
|
+
|
|
74
|
+
/* ─── Typography — Font Weight ─────────────────────────────── */
|
|
75
|
+
--cre8-font-weight-regular: 400;
|
|
76
|
+
--cre8-font-weight-medium: 500;
|
|
77
|
+
--cre8-font-weight-semibold: 600;
|
|
78
|
+
--cre8-font-weight-bold: 700;
|
|
79
|
+
|
|
80
|
+
/* ─── Typography — Font Family ─────────────────────────────── */
|
|
81
|
+
--cre8-font-family-sans: 'Inter', system-ui, sans-serif;
|
|
82
|
+
--cre8-font-family-mono: 'JetBrains Mono', 'Courier New', monospace;
|
|
83
|
+
|
|
84
|
+
/* ─── Typography — Line Height ─────────────────────────────── */
|
|
85
|
+
--cre8-line-height-tight: 1.2;
|
|
86
|
+
--cre8-line-height-normal: 1.5;
|
|
87
|
+
}
|
|
88
|
+
`;
|
|
89
|
+
export default claudeTerracotta;
|
|
90
|
+
//# sourceMappingURL=tokens_claude-terracotta.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens_claude-terracotta.module.js","sourceRoot":"","sources":["../../../../../design-tokens/brands/claude-terracotta/css/tokens_claude-terracotta.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAExB,MAAM,gBAAgB,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsF3B,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["import {css} from 'lit';\n\nconst claudeTerracotta = css`\n:root {\n /* ─── Background & Surface ─────────────────────────────────── */\n --cre8-background-default: #FFFFFF;\n --cre8-background-subtle: #FBF6F3;\n --cre8-background-strong: #F2E8E2;\n --cre8-background-inverse: #1A1208;\n --cre8-surface-default: #FFFFFF;\n --cre8-surface-elevated: #FFFAF8;\n\n /* ─── Content (text) ───────────────────────────────────────── */\n --cre8-content-default: #1A1208;\n --cre8-content-muted: #8A7A72;\n --cre8-content-inverse: #FFFFFF;\n --cre8-content-link: #9E3A15;\n\n /* ─── Borders ──────────────────────────────────────────────── */\n --cre8-border-subtle: #F0E2D9;\n --cre8-border-default: #D9C4B8;\n --cre8-border-strong: #7A5D52;\n --cre8-border-inverse: #B09080;\n\n /* ─── Accent / Brand ───────────────────────────────────────── */\n --cre8-accent-primary: #C85F2F;\n --cre8-accent-primary-hover: #A84D24;\n --cre8-accent-primary-active: #8C3F1C;\n --cre8-accent-primary-subtle: rgba(200, 95, 47, 0.10);\n --cre8-accent-secondary: #1A1208;\n --cre8-focus-ring: #C85F2F;\n\n /* ─── Status (brand-neutral, same as cre8-teal) ────────────── */\n --cre8-status-info: #1963E1;\n --cre8-status-success: #1E9E5A;\n --cre8-status-warning: #E08A1F;\n --cre8-status-error: #D02525;\n --cre8-status-error-dark: #AA1313;\n --cre8-status-error-darkest: #7A0000;\n --cre8-overlay: rgba(0, 0, 0, 0.20);\n\n /* ─── Spacing (same across all skins) ─────────────────────── */\n --cre8-spacing-2xs: 2px;\n --cre8-spacing-xs: 4px;\n --cre8-spacing-sm: 8px;\n --cre8-spacing-md: 12px;\n --cre8-spacing-lg: 16px;\n --cre8-spacing-xl: 24px;\n --cre8-spacing-2xl: 32px;\n --cre8-spacing-3xl: 48px;\n --cre8-spacing-4xl: 64px;\n --cre8-spacing-5xl: 96px;\n\n /* ─── Radius ───────────────────────────────────────────────── */\n --cre8-radius-none: 0px;\n --cre8-radius-sm: 4px;\n --cre8-radius-md: 8px;\n --cre8-radius-lg: 12px;\n --cre8-radius-xl: 16px;\n --cre8-radius-2xl: 24px;\n --cre8-radius-full: 9999px;\n\n /* ─── Typography — Font Size ───────────────────────────────── */\n --cre8-font-size-xs: 12px;\n --cre8-font-size-sm: 14px;\n --cre8-font-size-md: 16px;\n --cre8-font-size-lg: 18px;\n --cre8-font-size-xl: 20px;\n --cre8-font-size-2xl: 24px;\n --cre8-font-size-3xl: 32px;\n --cre8-font-size-4xl: 40px;\n --cre8-font-size-5xl: 56px;\n --cre8-font-size-6xl: 72px;\n\n /* ─── Typography — Font Weight ─────────────────────────────── */\n --cre8-font-weight-regular: 400;\n --cre8-font-weight-medium: 500;\n --cre8-font-weight-semibold: 600;\n --cre8-font-weight-bold: 700;\n\n /* ─── Typography — Font Family ─────────────────────────────── */\n --cre8-font-family-sans: 'Inter', system-ui, sans-serif;\n --cre8-font-family-mono: 'JetBrains Mono', 'Courier New', monospace;\n\n /* ─── Typography — Line Height ─────────────────────────────── */\n --cre8-line-height-tight: 1.2;\n --cre8-line-height-normal: 1.5;\n}\n`;\n\nexport default claudeTerracotta;\n"]}
|
|
@@ -430,6 +430,7 @@
|
|
|
430
430
|
--cre8-text-decoration-underline: underline;
|
|
431
431
|
--cre8-paragraph-indent-0: 0px;
|
|
432
432
|
--cre8-border-radius-small: 12px;
|
|
433
|
+
--cre8-border-radius-checkbox: 4px;
|
|
433
434
|
--cre8-border-radius-default: 900px;
|
|
434
435
|
--cre8-border-radius-large: 24px;
|
|
435
436
|
--cre8-border-radius-round: 900px;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/* packages/cre8-wc/design-tokens/brands/cre8-teal/css/tokens_brand.css */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
/* ─── Background & Surface ─────────────────────────────────── */
|
|
5
|
+
--cre8-background-default: #FFFFFF;
|
|
6
|
+
--cre8-background-subtle: #F5F5F5;
|
|
7
|
+
--cre8-background-strong: #EAEAEA;
|
|
8
|
+
--cre8-background-inverse: #1A1A1A;
|
|
9
|
+
--cre8-surface-default: #FFFFFF;
|
|
10
|
+
--cre8-surface-elevated: #FFFFFF;
|
|
11
|
+
|
|
12
|
+
/* ─── Content (text) ───────────────────────────────────────── */
|
|
13
|
+
--cre8-content-default: #1A1A1A;
|
|
14
|
+
--cre8-content-muted: #949494;
|
|
15
|
+
--cre8-content-inverse: #FFFFFF;
|
|
16
|
+
--cre8-content-link: #1963E1;
|
|
17
|
+
|
|
18
|
+
/* ─── Borders ──────────────────────────────────────────────── */
|
|
19
|
+
--cre8-border-subtle: #EAEAEA;
|
|
20
|
+
--cre8-border-default: #D5D5D5;
|
|
21
|
+
--cre8-border-strong: #6C6C6C;
|
|
22
|
+
--cre8-border-inverse: #ABABAB;
|
|
23
|
+
|
|
24
|
+
/* ─── Accent / Brand ───────────────────────────────────────── */
|
|
25
|
+
--cre8-accent-primary: #0EA5A8;
|
|
26
|
+
--cre8-accent-primary-hover: #0B8588;
|
|
27
|
+
--cre8-accent-primary-active: #086E70;
|
|
28
|
+
--cre8-accent-primary-subtle: rgba(14, 165, 168, 0.10);
|
|
29
|
+
--cre8-accent-secondary: #1A1A1A;
|
|
30
|
+
--cre8-focus-ring: #0EA5A8;
|
|
31
|
+
|
|
32
|
+
/* ─── Status ───────────────────────────────────────────────── */
|
|
33
|
+
--cre8-status-info: #1963E1;
|
|
34
|
+
--cre8-status-success: #1E9E5A;
|
|
35
|
+
--cre8-status-warning: #E08A1F;
|
|
36
|
+
--cre8-status-error: #D02525;
|
|
37
|
+
--cre8-status-error-dark: #AA1313;
|
|
38
|
+
--cre8-status-error-darkest: #7A0000;
|
|
39
|
+
--cre8-overlay: rgba(0, 0, 0, 0.20);
|
|
40
|
+
|
|
41
|
+
/* ─── Spacing ──────────────────────────────────────────────── */
|
|
42
|
+
--cre8-spacing-2xs: 2px;
|
|
43
|
+
--cre8-spacing-xs: 4px;
|
|
44
|
+
--cre8-spacing-sm: 8px;
|
|
45
|
+
--cre8-spacing-md: 12px;
|
|
46
|
+
--cre8-spacing-lg: 16px;
|
|
47
|
+
--cre8-spacing-xl: 24px;
|
|
48
|
+
--cre8-spacing-2xl: 32px;
|
|
49
|
+
--cre8-spacing-3xl: 48px;
|
|
50
|
+
--cre8-spacing-4xl: 64px;
|
|
51
|
+
--cre8-spacing-5xl: 96px;
|
|
52
|
+
|
|
53
|
+
/* ─── Radius ───────────────────────────────────────────────── */
|
|
54
|
+
--cre8-radius-none: 0px;
|
|
55
|
+
--cre8-radius-sm: 4px;
|
|
56
|
+
--cre8-radius-md: 8px;
|
|
57
|
+
--cre8-radius-lg: 12px;
|
|
58
|
+
--cre8-radius-xl: 16px;
|
|
59
|
+
--cre8-radius-2xl: 24px;
|
|
60
|
+
--cre8-radius-full: 9999px;
|
|
61
|
+
|
|
62
|
+
/* ─── Typography — Font Size ───────────────────────────────── */
|
|
63
|
+
--cre8-font-size-xs: 12px;
|
|
64
|
+
--cre8-font-size-sm: 14px;
|
|
65
|
+
--cre8-font-size-md: 16px;
|
|
66
|
+
--cre8-font-size-lg: 18px;
|
|
67
|
+
--cre8-font-size-xl: 20px;
|
|
68
|
+
--cre8-font-size-2xl: 24px;
|
|
69
|
+
--cre8-font-size-3xl: 32px;
|
|
70
|
+
--cre8-font-size-4xl: 40px;
|
|
71
|
+
--cre8-font-size-5xl: 56px;
|
|
72
|
+
--cre8-font-size-6xl: 72px;
|
|
73
|
+
|
|
74
|
+
/* ─── Typography — Font Weight ─────────────────────────────── */
|
|
75
|
+
--cre8-font-weight-regular: 400;
|
|
76
|
+
--cre8-font-weight-medium: 500;
|
|
77
|
+
--cre8-font-weight-semibold: 600;
|
|
78
|
+
--cre8-font-weight-bold: 700;
|
|
79
|
+
|
|
80
|
+
/* ─── Typography — Font Family ─────────────────────────────── */
|
|
81
|
+
--cre8-font-family-sans: 'Inter', system-ui, sans-serif;
|
|
82
|
+
--cre8-font-family-mono: 'JetBrains Mono', 'Courier New', monospace;
|
|
83
|
+
|
|
84
|
+
/* ─── Typography — Line Height ─────────────────────────────── */
|
|
85
|
+
--cre8-line-height-tight: 1.2;
|
|
86
|
+
--cre8-line-height-normal: 1.5;
|
|
87
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@import './tokens_brand.css';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens_cre8-teal.module.d.ts","sourceRoot":"","sources":["../../../../../design-tokens/brands/cre8-teal/css/tokens_cre8-teal.module.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,QAAQ,yBAsFb,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
const cre8Teal = css `
|
|
3
|
+
:root {
|
|
4
|
+
/* ─── Background & Surface ─────────────────────────────────── */
|
|
5
|
+
--cre8-background-default: #FFFFFF;
|
|
6
|
+
--cre8-background-subtle: #F5F5F5;
|
|
7
|
+
--cre8-background-strong: #EAEAEA;
|
|
8
|
+
--cre8-background-inverse: #1A1A1A;
|
|
9
|
+
--cre8-surface-default: #FFFFFF;
|
|
10
|
+
--cre8-surface-elevated: #FFFFFF;
|
|
11
|
+
|
|
12
|
+
/* ─── Content (text) ───────────────────────────────────────── */
|
|
13
|
+
--cre8-content-default: #1A1A1A;
|
|
14
|
+
--cre8-content-muted: #949494;
|
|
15
|
+
--cre8-content-inverse: #FFFFFF;
|
|
16
|
+
--cre8-content-link: #1963E1;
|
|
17
|
+
|
|
18
|
+
/* ─── Borders ──────────────────────────────────────────────── */
|
|
19
|
+
--cre8-border-subtle: #EAEAEA;
|
|
20
|
+
--cre8-border-default: #D5D5D5;
|
|
21
|
+
--cre8-border-strong: #6C6C6C;
|
|
22
|
+
--cre8-border-inverse: #ABABAB;
|
|
23
|
+
|
|
24
|
+
/* ─── Accent / Brand ───────────────────────────────────────── */
|
|
25
|
+
--cre8-accent-primary: #0EA5A8;
|
|
26
|
+
--cre8-accent-primary-hover: #0B8588;
|
|
27
|
+
--cre8-accent-primary-active: #086E70;
|
|
28
|
+
--cre8-accent-primary-subtle: rgba(14, 165, 168, 0.10);
|
|
29
|
+
--cre8-accent-secondary: #1A1A1A;
|
|
30
|
+
--cre8-focus-ring: #0EA5A8;
|
|
31
|
+
|
|
32
|
+
/* ─── Status ───────────────────────────────────────────────── */
|
|
33
|
+
--cre8-status-info: #1963E1;
|
|
34
|
+
--cre8-status-success: #1E9E5A;
|
|
35
|
+
--cre8-status-warning: #E08A1F;
|
|
36
|
+
--cre8-status-error: #D02525;
|
|
37
|
+
--cre8-status-error-dark: #AA1313;
|
|
38
|
+
--cre8-status-error-darkest: #7A0000;
|
|
39
|
+
--cre8-overlay: rgba(0, 0, 0, 0.20);
|
|
40
|
+
|
|
41
|
+
/* ─── Spacing ──────────────────────────────────────────────── */
|
|
42
|
+
--cre8-spacing-2xs: 2px;
|
|
43
|
+
--cre8-spacing-xs: 4px;
|
|
44
|
+
--cre8-spacing-sm: 8px;
|
|
45
|
+
--cre8-spacing-md: 12px;
|
|
46
|
+
--cre8-spacing-lg: 16px;
|
|
47
|
+
--cre8-spacing-xl: 24px;
|
|
48
|
+
--cre8-spacing-2xl: 32px;
|
|
49
|
+
--cre8-spacing-3xl: 48px;
|
|
50
|
+
--cre8-spacing-4xl: 64px;
|
|
51
|
+
--cre8-spacing-5xl: 96px;
|
|
52
|
+
|
|
53
|
+
/* ─── Radius ───────────────────────────────────────────────── */
|
|
54
|
+
--cre8-radius-none: 0px;
|
|
55
|
+
--cre8-radius-sm: 4px;
|
|
56
|
+
--cre8-radius-md: 8px;
|
|
57
|
+
--cre8-radius-lg: 12px;
|
|
58
|
+
--cre8-radius-xl: 16px;
|
|
59
|
+
--cre8-radius-2xl: 24px;
|
|
60
|
+
--cre8-radius-full: 9999px;
|
|
61
|
+
|
|
62
|
+
/* ─── Typography — Font Size ───────────────────────────────── */
|
|
63
|
+
--cre8-font-size-xs: 12px;
|
|
64
|
+
--cre8-font-size-sm: 14px;
|
|
65
|
+
--cre8-font-size-md: 16px;
|
|
66
|
+
--cre8-font-size-lg: 18px;
|
|
67
|
+
--cre8-font-size-xl: 20px;
|
|
68
|
+
--cre8-font-size-2xl: 24px;
|
|
69
|
+
--cre8-font-size-3xl: 32px;
|
|
70
|
+
--cre8-font-size-4xl: 40px;
|
|
71
|
+
--cre8-font-size-5xl: 56px;
|
|
72
|
+
--cre8-font-size-6xl: 72px;
|
|
73
|
+
|
|
74
|
+
/* ─── Typography — Font Weight ─────────────────────────────── */
|
|
75
|
+
--cre8-font-weight-regular: 400;
|
|
76
|
+
--cre8-font-weight-medium: 500;
|
|
77
|
+
--cre8-font-weight-semibold: 600;
|
|
78
|
+
--cre8-font-weight-bold: 700;
|
|
79
|
+
|
|
80
|
+
/* ─── Typography — Font Family ─────────────────────────────── */
|
|
81
|
+
--cre8-font-family-sans: 'Inter', system-ui, sans-serif;
|
|
82
|
+
--cre8-font-family-mono: 'JetBrains Mono', 'Courier New', monospace;
|
|
83
|
+
|
|
84
|
+
/* ─── Typography — Line Height ─────────────────────────────── */
|
|
85
|
+
--cre8-line-height-tight: 1.2;
|
|
86
|
+
--cre8-line-height-normal: 1.5;
|
|
87
|
+
}
|
|
88
|
+
`;
|
|
89
|
+
export default cre8Teal;
|
|
90
|
+
//# sourceMappingURL=tokens_cre8-teal.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens_cre8-teal.module.js","sourceRoot":"","sources":["../../../../../design-tokens/brands/cre8-teal/css/tokens_cre8-teal.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,GAAG,EAAC,MAAM,KAAK,CAAC;AAExB,MAAM,QAAQ,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsFnB,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import {css} from 'lit';\n\nconst cre8Teal = css`\n:root {\n /* ─── Background & Surface ─────────────────────────────────── */\n --cre8-background-default: #FFFFFF;\n --cre8-background-subtle: #F5F5F5;\n --cre8-background-strong: #EAEAEA;\n --cre8-background-inverse: #1A1A1A;\n --cre8-surface-default: #FFFFFF;\n --cre8-surface-elevated: #FFFFFF;\n\n /* ─── Content (text) ───────────────────────────────────────── */\n --cre8-content-default: #1A1A1A;\n --cre8-content-muted: #949494;\n --cre8-content-inverse: #FFFFFF;\n --cre8-content-link: #1963E1;\n\n /* ─── Borders ──────────────────────────────────────────────── */\n --cre8-border-subtle: #EAEAEA;\n --cre8-border-default: #D5D5D5;\n --cre8-border-strong: #6C6C6C;\n --cre8-border-inverse: #ABABAB;\n\n /* ─── Accent / Brand ───────────────────────────────────────── */\n --cre8-accent-primary: #0EA5A8;\n --cre8-accent-primary-hover: #0B8588;\n --cre8-accent-primary-active: #086E70;\n --cre8-accent-primary-subtle: rgba(14, 165, 168, 0.10);\n --cre8-accent-secondary: #1A1A1A;\n --cre8-focus-ring: #0EA5A8;\n\n /* ─── Status ───────────────────────────────────────────────── */\n --cre8-status-info: #1963E1;\n --cre8-status-success: #1E9E5A;\n --cre8-status-warning: #E08A1F;\n --cre8-status-error: #D02525;\n --cre8-status-error-dark: #AA1313;\n --cre8-status-error-darkest: #7A0000;\n --cre8-overlay: rgba(0, 0, 0, 0.20);\n\n /* ─── Spacing ──────────────────────────────────────────────── */\n --cre8-spacing-2xs: 2px;\n --cre8-spacing-xs: 4px;\n --cre8-spacing-sm: 8px;\n --cre8-spacing-md: 12px;\n --cre8-spacing-lg: 16px;\n --cre8-spacing-xl: 24px;\n --cre8-spacing-2xl: 32px;\n --cre8-spacing-3xl: 48px;\n --cre8-spacing-4xl: 64px;\n --cre8-spacing-5xl: 96px;\n\n /* ─── Radius ───────────────────────────────────────────────── */\n --cre8-radius-none: 0px;\n --cre8-radius-sm: 4px;\n --cre8-radius-md: 8px;\n --cre8-radius-lg: 12px;\n --cre8-radius-xl: 16px;\n --cre8-radius-2xl: 24px;\n --cre8-radius-full: 9999px;\n\n /* ─── Typography — Font Size ───────────────────────────────── */\n --cre8-font-size-xs: 12px;\n --cre8-font-size-sm: 14px;\n --cre8-font-size-md: 16px;\n --cre8-font-size-lg: 18px;\n --cre8-font-size-xl: 20px;\n --cre8-font-size-2xl: 24px;\n --cre8-font-size-3xl: 32px;\n --cre8-font-size-4xl: 40px;\n --cre8-font-size-5xl: 56px;\n --cre8-font-size-6xl: 72px;\n\n /* ─── Typography — Font Weight ─────────────────────────────── */\n --cre8-font-weight-regular: 400;\n --cre8-font-weight-medium: 500;\n --cre8-font-weight-semibold: 600;\n --cre8-font-weight-bold: 700;\n\n /* ─── Typography — Font Family ─────────────────────────────── */\n --cre8-font-family-sans: 'Inter', system-ui, sans-serif;\n --cre8-font-family-mono: 'JetBrains Mono', 'Courier New', monospace;\n\n /* ─── Typography — Line Height ─────────────────────────────── */\n --cre8-line-height-tight: 1.2;\n --cre8-line-height-normal: 1.5;\n}\n`;\n\nexport default cre8Teal;\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate React MCP Manifest from the Web Component MCP manifest.
|
|
3
|
+
*
|
|
4
|
+
* Reads mcp-manifest.json (generated by generate-mcp-manifest.ts) and
|
|
5
|
+
* transforms it into react-manifest.json, which the cre8-mcp server
|
|
6
|
+
* resolves via `@tmorrow/cre8-wc/react-manifest.json` when tools are
|
|
7
|
+
* called with `format: "react"`.
|
|
8
|
+
*
|
|
9
|
+
* Naming rules intentionally mirror scripts/generate-react-wrappers.ts
|
|
10
|
+
* and the cre8-mcp server's own web→react tag conversion:
|
|
11
|
+
* - cre8-button → Cre8Button
|
|
12
|
+
* - kebab-case attrs → camelCase props
|
|
13
|
+
* - events → on<EventName> callback props
|
|
14
|
+
* - slots → children?: React.ReactNode
|
|
15
|
+
*
|
|
16
|
+
* Run after build:mcp-manifest:
|
|
17
|
+
* npx tsx scripts/generate-react-manifest.ts
|
|
18
|
+
*/
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=generate-react-manifest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-react-manifest.d.ts","sourceRoot":"","sources":["../../scripts/generate-react-manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG"}
|