@scalar/components 0.22.0 → 0.22.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.
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarHeader/ScalarHeader.vue"],"names":[],"mappings":"AA0DA;;;;;;;;;;;;;;;;;;;;;GAqBG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;IAIhB,6DAA6D;cACnD,OAAO;IACjB,uCAAuC;gBAC3B,OAAO;IACnB,6DAA6D;YACrD,OAAO;EAmDb,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ScalarHeader.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarHeader/ScalarHeader.vue"],"names":[],"mappings":"AA+DA;;;;;;;;;;;;;;;;;;;;;GAqBG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;IAIhB,6DAA6D;cACnD,OAAO;IACjB,uCAAuC;gBAC3B,OAAO;IACnB,6DAA6D;YACrD,OAAO;EAsDb,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarHeader.vue.js","names":[],"sources":["../../../src/components/ScalarHeader/ScalarHeader.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar header component\n *\n * Used to create a standardized header for Scalar applications\n *\n * @example\n * ```html\n * <ScalarHeader>\n * <template #start>\n * <ScalarMenu />\n * <ScalarHeaderButton>Login</ScalarHeaderButton>\n * <ScalarHeaderButton>Register</ScalarHeaderButton>\n * </template>\n * <template #default>\n * <ScalarHeaderButton>Middle thing</ScalarHeaderButton>\n * </template>\n * <template #end>\n * <ScalarHeaderButton>Call to Action</ScalarHeaderButton>\n * </template>\n * </ScalarHeader>\n * ```\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\n\nconst { cx } = useBindCx()\n\ndefineSlots<{\n /** The first section of the header, typically on the left */\n start?(): unknown\n /** The middle section of the header */\n default?(): unknown\n /** The last section of the header, typically on the right */\n end?(): unknown\n}>()\n</script>\n<template>\n <header\n v-bind=\"\n cx(\n 'flex min-h-header items-center justify-between gap-2 bg-b-2 border-b px-2 text-sm min-w-min',\n '*:flex *:flex-1 *:items-center *:gap-px',\n )\n \">\n <div class=\"justify-start\"><slot name=\"start\" /></div>\n <div class=\"justify-center\"><slot /></div>\n <div class=\"justify-end\"><slot name=\"end\" /></div>\n </header>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ScalarHeader.vue.js","names":[],"sources":["../../../src/components/ScalarHeader/ScalarHeader.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar header component\n *\n * Used to create a standardized header for Scalar applications\n *\n * @example\n * ```html\n * <ScalarHeader>\n * <template #start>\n * <ScalarMenu />\n * <ScalarHeaderButton>Login</ScalarHeaderButton>\n * <ScalarHeaderButton>Register</ScalarHeaderButton>\n * </template>\n * <template #default>\n * <ScalarHeaderButton>Middle thing</ScalarHeaderButton>\n * </template>\n * <template #end>\n * <ScalarHeaderButton>Call to Action</ScalarHeaderButton>\n * </template>\n * </ScalarHeader>\n * ```\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\n\nconst { cx } = useBindCx()\n\ndefineSlots<{\n /** The first section of the header, typically on the left */\n start?(): unknown\n /** The middle section of the header */\n default?(): unknown\n /** The last section of the header, typically on the right */\n end?(): unknown\n}>()\n</script>\n<template>\n <header\n v-bind=\"\n cx(\n 'flex min-h-header items-center justify-between gap-2 border-b px-3 min-w-min',\n '*:flex *:flex-1 *:items-center *:gap-1',\n 'bg-b-header-1 text-c-header border-border-header',\n )\n \">\n <div class=\"justify-start\"><slot name=\"start\" /></div>\n <div\n v-if=\"$slots.default\"\n class=\"justify-center\">\n <slot />\n </div>\n <div class=\"justify-end\"><slot name=\"end\" /></div>\n </header>\n</template>\n"],"mappings":""}
@@ -1,17 +1,20 @@
1
1
  import { useBindCx } from "@scalar/use-hooks/useBindCx";
2
- import { createElementBlock, createElementVNode, defineComponent, guardReactiveProps, normalizeProps, openBlock, renderSlot, unref } from "vue";
2
+ import { createCommentVNode, createElementBlock, createElementVNode, defineComponent, guardReactiveProps, normalizeProps, openBlock, renderSlot, unref } from "vue";
3
3
  //#region src/components/ScalarHeader/ScalarHeader.vue?vue&type=script&setup=true&lang.ts
4
4
  var _hoisted_1 = { class: "justify-start" };
5
- var _hoisted_2 = { class: "justify-center" };
5
+ var _hoisted_2 = {
6
+ key: 0,
7
+ class: "justify-center"
8
+ };
6
9
  var _hoisted_3 = { class: "justify-end" };
7
10
  var ScalarHeader_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
8
11
  __name: "ScalarHeader",
9
12
  setup(__props) {
10
13
  const { cx } = useBindCx();
11
14
  return (_ctx, _cache) => {
12
- return openBlock(), createElementBlock("header", normalizeProps(guardReactiveProps(unref(cx)("flex min-h-header items-center justify-between gap-2 bg-b-2 border-b px-2 text-sm min-w-min", "*:flex *:flex-1 *:items-center *:gap-px"))), [
15
+ return openBlock(), createElementBlock("header", normalizeProps(guardReactiveProps(unref(cx)("flex min-h-header items-center justify-between gap-2 border-b px-3 min-w-min", "*:flex *:flex-1 *:items-center *:gap-1", "bg-b-header-1 text-c-header border-border-header"))), [
13
16
  createElementVNode("div", _hoisted_1, [renderSlot(_ctx.$slots, "start")]),
14
- createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "default")]),
17
+ _ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_2, [renderSlot(_ctx.$slots, "default")])) : createCommentVNode("", true),
15
18
  createElementVNode("div", _hoisted_3, [renderSlot(_ctx.$slots, "end")])
16
19
  ], 16);
17
20
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarHeader.vue.script.js","names":[],"sources":["../../../src/components/ScalarHeader/ScalarHeader.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar header component\n *\n * Used to create a standardized header for Scalar applications\n *\n * @example\n * ```html\n * <ScalarHeader>\n * <template #start>\n * <ScalarMenu />\n * <ScalarHeaderButton>Login</ScalarHeaderButton>\n * <ScalarHeaderButton>Register</ScalarHeaderButton>\n * </template>\n * <template #default>\n * <ScalarHeaderButton>Middle thing</ScalarHeaderButton>\n * </template>\n * <template #end>\n * <ScalarHeaderButton>Call to Action</ScalarHeaderButton>\n * </template>\n * </ScalarHeader>\n * ```\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\n\nconst { cx } = useBindCx()\n\ndefineSlots<{\n /** The first section of the header, typically on the left */\n start?(): unknown\n /** The middle section of the header */\n default?(): unknown\n /** The last section of the header, typically on the right */\n end?(): unknown\n}>()\n</script>\n<template>\n <header\n v-bind=\"\n cx(\n 'flex min-h-header items-center justify-between gap-2 bg-b-2 border-b px-2 text-sm min-w-min',\n '*:flex *:flex-1 *:items-center *:gap-px',\n )\n \">\n <div class=\"justify-start\"><slot name=\"start\" /></div>\n <div class=\"justify-center\"><slot /></div>\n <div class=\"justify-end\"><slot name=\"end\" /></div>\n </header>\n</template>\n"],"mappings":";;;;;;;;;EA4BA,MAAM,EAAE,OAAO,WAAU;;uBAYvB,mBAUS,UAAA,eAAA,mBATQ,MAAA,GAAE,CAAA,+FAAA,0CAAA,CAAA,CAAA,EAAA;IAMjB,mBAAsD,OAAtD,YAAsD,CAA3B,WAAqB,KAAA,QAAA,QAAA,CAAA,CAAA;IAChD,mBAA0C,OAA1C,YAA0C,CAAd,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA;IACpC,mBAAkD,OAAlD,YAAkD,CAAzB,WAAmB,KAAA,QAAA,MAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"ScalarHeader.vue.script.js","names":["$slots"],"sources":["../../../src/components/ScalarHeader/ScalarHeader.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar header component\n *\n * Used to create a standardized header for Scalar applications\n *\n * @example\n * ```html\n * <ScalarHeader>\n * <template #start>\n * <ScalarMenu />\n * <ScalarHeaderButton>Login</ScalarHeaderButton>\n * <ScalarHeaderButton>Register</ScalarHeaderButton>\n * </template>\n * <template #default>\n * <ScalarHeaderButton>Middle thing</ScalarHeaderButton>\n * </template>\n * <template #end>\n * <ScalarHeaderButton>Call to Action</ScalarHeaderButton>\n * </template>\n * </ScalarHeader>\n * ```\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\n\nconst { cx } = useBindCx()\n\ndefineSlots<{\n /** The first section of the header, typically on the left */\n start?(): unknown\n /** The middle section of the header */\n default?(): unknown\n /** The last section of the header, typically on the right */\n end?(): unknown\n}>()\n</script>\n<template>\n <header\n v-bind=\"\n cx(\n 'flex min-h-header items-center justify-between gap-2 border-b px-3 min-w-min',\n '*:flex *:flex-1 *:items-center *:gap-1',\n 'bg-b-header-1 text-c-header border-border-header',\n )\n \">\n <div class=\"justify-start\"><slot name=\"start\" /></div>\n <div\n v-if=\"$slots.default\"\n class=\"justify-center\">\n <slot />\n </div>\n <div class=\"justify-end\"><slot name=\"end\" /></div>\n </header>\n</template>\n"],"mappings":";;;;;;;;;;;;EA4BA,MAAM,EAAE,OAAO,WAAU;;uBAYvB,mBAeS,UAAA,eAAA,mBAdQ,MAAA,GAAE,CAAA,gFAAA,0CAAA,mDAAA,CAAA,CAAA,EAAA;IAOjB,mBAAsD,OAAtD,YAAsD,CAA3B,WAAqB,KAAA,QAAA,QAAA,CAAA,CAAA;IAExCA,KAAAA,OAAO,WAAA,WAAA,EADf,mBAIM,OAJN,YAIM,CADJ,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA,IAAA,mBAAA,IAAA,KAAA;IAEV,mBAAkD,OAAlD,YAAkD,CAAzB,WAAmB,KAAA,QAAA,MAAA,CAAA,CAAA"}
@@ -15,10 +15,10 @@ declare const _default: typeof __VLS_export;
15
15
  export default _default;
16
16
  declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
17
17
  is?: string | Component;
18
- active?: boolean;
18
+ cta?: boolean;
19
19
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
20
20
  is?: string | Component;
21
- active?: boolean;
21
+ cta?: boolean;
22
22
  }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
23
23
  /** The contents of the button */
24
24
  default?(): unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarHeaderButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarHeader/ScalarHeaderButton.vue"],"names":[],"mappings":"AAsDA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAGpC;;;;;;;;;;;GAWG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;SAEX,MAAM,GAAG,SAAS;aACd,OAAO;;SADX,MAAM,GAAG,SAAS;aACd,OAAO;;IAMhB,iCAAiC;gBACrB,OAAO;EA4DjB,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ScalarHeaderButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarHeader/ScalarHeaderButton.vue"],"names":[],"mappings":"AAsDA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAGpC;;;;;;;;;;;GAWG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;SAEX,MAAM,GAAG,SAAS;UACjB,OAAO;;SADR,MAAM,GAAG,SAAS;UACjB,OAAO;;IAMb,iCAAiC;gBACrB,OAAO;EA4DjB,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarHeaderButton.vue.js","names":[],"sources":["../../../src/components/ScalarHeader/ScalarHeaderButton.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar header button component\n *\n * Used within the ScalarHeader component\n *\n * @example\n * ```html\n * <ScalarHeaderButton>\n * Login\n * </ScalarHeaderButton>\n * ```\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { cva, useBindCx } from '@scalar/use-hooks/useBindCx'\nimport type { Component } from 'vue'\n\nconst { is = 'button' } = defineProps<{\n is?: string | Component\n active?: boolean\n}>()\n\ndefineSlots<{\n /** The contents of the button */\n default?(): unknown\n}>()\n\nconst variants = cva({\n base: 'group/button flex items-center rounded px-2.5 py-1.5 font-medium no-underline leading-5 ',\n variants: {\n active: {\n true: 'bg-b-3 cursor-default',\n false: 'bg-transparent hover:bg-b-3 cursor-pointer',\n },\n },\n})\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <component\n :is=\"is\"\n :type=\"is === 'button' ? 'button' : undefined\"\n v-bind=\"cx(variants({ active }))\">\n <slot />\n </component>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ScalarHeaderButton.vue.js","names":[],"sources":["../../../src/components/ScalarHeader/ScalarHeaderButton.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar header button component\n *\n * Used within the ScalarHeader component\n *\n * @example\n * ```html\n * <ScalarHeaderButton>\n * Login\n * </ScalarHeaderButton>\n * ```\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { cva, useBindCx } from '@scalar/use-hooks/useBindCx'\nimport type { Component } from 'vue'\n\nconst { is = 'button' } = defineProps<{\n is?: string | Component\n cta?: boolean\n}>()\n\ndefineSlots<{\n /** The contents of the button */\n default?(): unknown\n}>()\n\nconst variants = cva({\n base: 'group/button flex items-center rounded px-3 py-2 text-base/4 no-underline',\n variants: {\n cta: {\n true: 'font-bold bg-b-header-cta text-sm/4 text-c-header-cta hover:bg-h-header-cta',\n false: 'text-c-header-2 hover:text-c-header-1',\n },\n },\n})\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <component\n :is=\"is\"\n :type=\"is === 'button' ? 'button' : undefined\"\n v-bind=\"cx(variants({ cta }))\">\n <slot />\n </component>\n</template>\n"],"mappings":""}
@@ -5,19 +5,19 @@ var ScalarHeaderButton_vue_vue_type_script_setup_true_lang_default = /* @__PURE_
5
5
  __name: "ScalarHeaderButton",
6
6
  props: {
7
7
  is: { default: "button" },
8
- active: { type: Boolean }
8
+ cta: { type: Boolean }
9
9
  },
10
10
  setup(__props) {
11
11
  const variants = cva({
12
- base: "group/button flex items-center rounded px-2.5 py-1.5 font-medium no-underline leading-5 ",
13
- variants: { active: {
14
- true: "bg-b-3 cursor-default",
15
- false: "bg-transparent hover:bg-b-3 cursor-pointer"
12
+ base: "group/button flex items-center rounded px-3 py-2 text-base/4 no-underline",
13
+ variants: { cta: {
14
+ true: "font-bold bg-b-header-cta text-sm/4 text-c-header-cta hover:bg-h-header-cta",
15
+ false: "text-c-header-2 hover:text-c-header-1"
16
16
  } }
17
17
  });
18
18
  const { cx } = useBindCx();
19
19
  return (_ctx, _cache) => {
20
- return openBlock(), createBlock(resolveDynamicComponent(__props.is), mergeProps({ type: __props.is === "button" ? "button" : void 0 }, unref(cx)(unref(variants)({ active: __props.active }))), {
20
+ return openBlock(), createBlock(resolveDynamicComponent(__props.is), mergeProps({ type: __props.is === "button" ? "button" : void 0 }, unref(cx)(unref(variants)({ cta: __props.cta }))), {
21
21
  default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
22
22
  _: 3
23
23
  }, 16, ["type"]);
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarHeaderButton.vue.script.js","names":[],"sources":["../../../src/components/ScalarHeader/ScalarHeaderButton.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar header button component\n *\n * Used within the ScalarHeader component\n *\n * @example\n * ```html\n * <ScalarHeaderButton>\n * Login\n * </ScalarHeaderButton>\n * ```\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { cva, useBindCx } from '@scalar/use-hooks/useBindCx'\nimport type { Component } from 'vue'\n\nconst { is = 'button' } = defineProps<{\n is?: string | Component\n active?: boolean\n}>()\n\ndefineSlots<{\n /** The contents of the button */\n default?(): unknown\n}>()\n\nconst variants = cva({\n base: 'group/button flex items-center rounded px-2.5 py-1.5 font-medium no-underline leading-5 ',\n variants: {\n active: {\n true: 'bg-b-3 cursor-default',\n false: 'bg-transparent hover:bg-b-3 cursor-pointer',\n },\n },\n})\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <component\n :is=\"is\"\n :type=\"is === 'button' ? 'button' : undefined\"\n v-bind=\"cx(variants({ active }))\">\n <slot />\n </component>\n</template>\n"],"mappings":";;;;;;;;;;EA6BA,MAAM,WAAW,IAAI;GACnB,MAAM;GACN,UAAU,EACR,QAAQ;IACN,MAAM;IACN,OAAO;IACR,EACF;GACF,CAAA;EAGD,MAAM,EAAE,OAAO,WAAU;;uBAGvB,YAKY,wBAJL,QAAA,GAAE,EADT,WAKY,EAHT,MAAM,QAAA,OAAE,WAAA,WAA2B,KAAA,GAAA,EAC5B,MAAA,GAAE,CAAC,MAAA,SAAQ,CAAA,EAAA,QAAG,QAAA,QAAM,CAAA,CAAA,CAAA,EAAA;2BACpB,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"ScalarHeaderButton.vue.script.js","names":[],"sources":["../../../src/components/ScalarHeader/ScalarHeaderButton.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar header button component\n *\n * Used within the ScalarHeader component\n *\n * @example\n * ```html\n * <ScalarHeaderButton>\n * Login\n * </ScalarHeaderButton>\n * ```\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { cva, useBindCx } from '@scalar/use-hooks/useBindCx'\nimport type { Component } from 'vue'\n\nconst { is = 'button' } = defineProps<{\n is?: string | Component\n cta?: boolean\n}>()\n\ndefineSlots<{\n /** The contents of the button */\n default?(): unknown\n}>()\n\nconst variants = cva({\n base: 'group/button flex items-center rounded px-3 py-2 text-base/4 no-underline',\n variants: {\n cta: {\n true: 'font-bold bg-b-header-cta text-sm/4 text-c-header-cta hover:bg-h-header-cta',\n false: 'text-c-header-2 hover:text-c-header-1',\n },\n },\n})\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <component\n :is=\"is\"\n :type=\"is === 'button' ? 'button' : undefined\"\n v-bind=\"cx(variants({ cta }))\">\n <slot />\n </component>\n</template>\n"],"mappings":";;;;;;;;;;EA6BA,MAAM,WAAW,IAAI;GACnB,MAAM;GACN,UAAU,EACR,KAAK;IACH,MAAM;IACN,OAAO;IACR,EACF;GACF,CAAA;EAGD,MAAM,EAAE,OAAO,WAAU;;uBAGvB,YAKY,wBAJL,QAAA,GAAE,EADT,WAKY,EAHT,MAAM,QAAA,OAAE,WAAA,WAA2B,KAAA,GAAA,EAC5B,MAAA,GAAE,CAAC,MAAA,SAAQ,CAAA,EAAA,KAAG,QAAA,KAAG,CAAA,CAAA,CAAA,EAAA;2BACjB,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMenuButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuButton.vue"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAG3E;;;;;;;;GAQG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY,8VA6Fd,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"ScalarMenuButton.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuButton.vue"],"names":[],"mappings":"AAgDA,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAG3E;;;;;;;;GAQG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY,8VAgGd,CAAC;AACL,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMenuButton.vue.js","names":[],"sources":["../../../src/components/ScalarMenu/ScalarMenuButton.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Menu Button component\n *\n * The trigger button for the ScalarMenu dropdown.\n * Displays a logo icon and a caret indicator.\n *\n * @example\n * <ScalarMenuButton :open=\"false\" />\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ScalarIconCaretDown } from '@scalar/icons'\n\nimport { ScalarHeaderButton } from '../ScalarHeader'\nimport { ScalarIcon } from '../ScalarIcon'\nimport type { ScalarMenuButtonProps, ScalarMenuButtonSlots } from './types'\n\ndefineProps<ScalarMenuButtonProps>()\n\ndefineSlots<ScalarMenuButtonSlots>()\n</script>\n<template>\n <ScalarHeaderButton class=\"gap-0.75 px-2\">\n <div class=\"h-5 w-auto\">\n <slot name=\"logo\">\n <ScalarIcon icon=\"Logo\" />\n </slot>\n </div>\n <span class=\"sr-only\">\n <slot name=\"label\">{{ open ? 'Close Menu' : 'Open Menu' }}</slot>\n </span>\n <ScalarIconCaretDown\n class=\"shrink-0 text-c-3 group-hover/button:text-c-1 size-3.5\"\n :class=\"open ? 'rotate-180' : ''\"\n weight=\"bold\" />\n </ScalarHeaderButton>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ScalarMenuButton.vue.js","names":[],"sources":["../../../src/components/ScalarMenu/ScalarMenuButton.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Menu Button component\n *\n * The trigger button for the ScalarMenu dropdown.\n * Displays a logo icon and a caret indicator.\n *\n * @example\n * <ScalarMenuButton :open=\"false\" />\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ScalarIconCaretDown } from '@scalar/icons'\n\nimport { ScalarHeaderButton } from '../ScalarHeader'\nimport { ScalarIcon } from '../ScalarIcon'\nimport type { ScalarMenuButtonProps, ScalarMenuButtonSlots } from './types'\n\ndefineProps<ScalarMenuButtonProps>()\n\ndefineSlots<ScalarMenuButtonSlots>()\n</script>\n<template>\n <ScalarHeaderButton\n class=\"gap-0.75 px-2 py-1.5 text-c-header-1 hover:bg-b-header-2\">\n <div class=\"h-5 w-auto\">\n <slot name=\"logo\">\n <ScalarIcon icon=\"Logo\" />\n </slot>\n </div>\n <span class=\"sr-only\">\n <slot name=\"label\">{{ open ? 'Close Menu' : 'Open Menu' }}</slot>\n </span>\n <ScalarIconCaretDown\n class=\"shrink-0 text-c-header-2 group-hover/button:text-c-header-1 size-3.5\"\n :class=\"open ? 'rotate-180' : ''\"\n weight=\"bold\" />\n </ScalarHeaderButton>\n</template>\n"],"mappings":""}
@@ -10,12 +10,12 @@ var ScalarMenuButton_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
10
10
  props: { open: { type: Boolean } },
11
11
  setup(__props) {
12
12
  return (_ctx, _cache) => {
13
- return openBlock(), createBlock(unref(ScalarHeaderButton_default), { class: "gap-0.75 px-2" }, {
13
+ return openBlock(), createBlock(unref(ScalarHeaderButton_default), { class: "gap-0.75 px-2 py-1.5 text-c-header-1 hover:bg-b-header-2" }, {
14
14
  default: withCtx(() => [
15
15
  createElementVNode("div", _hoisted_1, [renderSlot(_ctx.$slots, "logo", {}, () => [createVNode(unref(ScalarIcon_default), { icon: "Logo" })])]),
16
16
  createElementVNode("span", _hoisted_2, [renderSlot(_ctx.$slots, "label", {}, () => [createTextVNode(toDisplayString(__props.open ? "Close Menu" : "Open Menu"), 1)])]),
17
17
  createVNode(unref(ScalarIconCaretDown), {
18
- class: normalizeClass(["shrink-0 text-c-3 group-hover/button:text-c-1 size-3.5", __props.open ? "rotate-180" : ""]),
18
+ class: normalizeClass(["shrink-0 text-c-header-2 group-hover/button:text-c-header-1 size-3.5", __props.open ? "rotate-180" : ""]),
19
19
  weight: "bold"
20
20
  }, null, 8, ["class"])
21
21
  ]),
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMenuButton.vue.script.js","names":[],"sources":["../../../src/components/ScalarMenu/ScalarMenuButton.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Menu Button component\n *\n * The trigger button for the ScalarMenu dropdown.\n * Displays a logo icon and a caret indicator.\n *\n * @example\n * <ScalarMenuButton :open=\"false\" />\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ScalarIconCaretDown } from '@scalar/icons'\n\nimport { ScalarHeaderButton } from '../ScalarHeader'\nimport { ScalarIcon } from '../ScalarIcon'\nimport type { ScalarMenuButtonProps, ScalarMenuButtonSlots } from './types'\n\ndefineProps<ScalarMenuButtonProps>()\n\ndefineSlots<ScalarMenuButtonSlots>()\n</script>\n<template>\n <ScalarHeaderButton class=\"gap-0.75 px-2\">\n <div class=\"h-5 w-auto\">\n <slot name=\"logo\">\n <ScalarIcon icon=\"Logo\" />\n </slot>\n </div>\n <span class=\"sr-only\">\n <slot name=\"label\">{{ open ? 'Close Menu' : 'Open Menu' }}</slot>\n </span>\n <ScalarIconCaretDown\n class=\"shrink-0 text-c-3 group-hover/button:text-c-1 size-3.5\"\n :class=\"open ? 'rotate-180' : ''\"\n weight=\"bold\" />\n </ScalarHeaderButton>\n</template>\n"],"mappings":";;;;;;;;;;;;uBAyBE,YAaqB,MAAA,2BAAA,EAAA,EAbD,OAAM,iBAAe,EAAA;2BAKjC;KAJN,mBAIM,OAJN,YAIM,CAHJ,WAEO,KAAA,QAAA,QAAA,EAAA,QAAA,CADL,YAA0B,MAAA,mBAAA,EAAA,EAAd,MAAK,QAAM,CAAA,CAAA,CAAA,CAAA,CAAA;KAG3B,mBAEO,QAFP,YAEO,CADL,WAAiE,KAAA,QAAA,SAAA,EAAA,QAAA,CAAA,gBAAA,gBAA3C,QAAA,OAAI,eAAA,YAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA;KAE5B,YAGkB,MAAA,oBAAA,EAAA;MAFhB,OAAK,eAAA,CAAC,0DACE,QAAA,OAAI,eAAA,GAAA,CAAA;MACZ,QAAO"}
1
+ {"version":3,"file":"ScalarMenuButton.vue.script.js","names":[],"sources":["../../../src/components/ScalarMenu/ScalarMenuButton.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Menu Button component\n *\n * The trigger button for the ScalarMenu dropdown.\n * Displays a logo icon and a caret indicator.\n *\n * @example\n * <ScalarMenuButton :open=\"false\" />\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport { ScalarIconCaretDown } from '@scalar/icons'\n\nimport { ScalarHeaderButton } from '../ScalarHeader'\nimport { ScalarIcon } from '../ScalarIcon'\nimport type { ScalarMenuButtonProps, ScalarMenuButtonSlots } from './types'\n\ndefineProps<ScalarMenuButtonProps>()\n\ndefineSlots<ScalarMenuButtonSlots>()\n</script>\n<template>\n <ScalarHeaderButton\n class=\"gap-0.75 px-2 py-1.5 text-c-header-1 hover:bg-b-header-2\">\n <div class=\"h-5 w-auto\">\n <slot name=\"logo\">\n <ScalarIcon icon=\"Logo\" />\n </slot>\n </div>\n <span class=\"sr-only\">\n <slot name=\"label\">{{ open ? 'Close Menu' : 'Open Menu' }}</slot>\n </span>\n <ScalarIconCaretDown\n class=\"shrink-0 text-c-header-2 group-hover/button:text-c-header-1 size-3.5\"\n :class=\"open ? 'rotate-180' : ''\"\n weight=\"bold\" />\n </ScalarHeaderButton>\n</template>\n"],"mappings":";;;;;;;;;;;;uBAyBE,YAcqB,MAAA,2BAAA,EAAA,EAbnB,OAAM,4DAA0D,EAAA;2BAK1D;KAJN,mBAIM,OAJN,YAIM,CAHJ,WAEO,KAAA,QAAA,QAAA,EAAA,QAAA,CADL,YAA0B,MAAA,mBAAA,EAAA,EAAd,MAAK,QAAM,CAAA,CAAA,CAAA,CAAA,CAAA;KAG3B,mBAEO,QAFP,YAEO,CADL,WAAiE,KAAA,QAAA,SAAA,EAAA,QAAA,CAAA,gBAAA,gBAA3C,QAAA,OAAI,eAAA,YAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA;KAE5B,YAGkB,MAAA,oBAAA,EAAA;MAFhB,OAAK,eAAA,CAAC,wEACE,QAAA,OAAI,eAAA,GAAA,CAAA;MACZ,QAAO"}
package/dist/style.css CHANGED
@@ -2786,10 +2786,6 @@ to {
2786
2786
  cursor: auto;
2787
2787
  }
2788
2788
 
2789
- .scalar-app .cursor-default {
2790
- cursor: default;
2791
- }
2792
-
2793
2789
  .scalar-app .cursor-not-allowed {
2794
2790
  cursor: not-allowed;
2795
2791
  }
@@ -3065,6 +3061,10 @@ to {
3065
3061
  border-color: var(--scalar-background-3);
3066
3062
  }
3067
3063
 
3064
+ .scalar-app .border-border-header {
3065
+ border-color: var(--scalar-header-border-color, var(--scalar-border-color));
3066
+ }
3067
+
3068
3068
  .scalar-app .border-c-1 {
3069
3069
  border-color: var(--scalar-color-1);
3070
3070
  }
@@ -3127,6 +3127,14 @@ to {
3127
3127
  background-color: var(--scalar-background-danger);
3128
3128
  }
3129
3129
 
3130
+ .scalar-app .bg-b-header-1 {
3131
+ background-color: var(--scalar-header-background-1, var(--scalar-background-1));
3132
+ }
3133
+
3134
+ .scalar-app .bg-b-header-cta {
3135
+ background-color: var(--scalar-header-call-to-action-color, var(--scalar-button-1));
3136
+ }
3137
+
3130
3138
  .scalar-app .bg-b-tooltip {
3131
3139
  background-color: var(--scalar-tooltip-background);
3132
3140
  }
@@ -3481,11 +3489,6 @@ to {
3481
3489
  font-size: var(--scalar-font-size-6);
3482
3490
  }
3483
3491
 
3484
- .scalar-app .leading-5 {
3485
- --tw-leading: calc(4px * 5);
3486
- line-height: 20px;
3487
- }
3488
-
3489
3492
  .scalar-app .leading-\[22px\] {
3490
3493
  --tw-leading: 22px;
3491
3494
  line-height: 22px;
@@ -3574,6 +3577,18 @@ to {
3574
3577
  color: var(--scalar-color-danger);
3575
3578
  }
3576
3579
 
3580
+ .scalar-app .text-c-header-1 {
3581
+ color: var(--scalar-header-color-1, var(--scalar-color-1));
3582
+ }
3583
+
3584
+ .scalar-app .text-c-header-2 {
3585
+ color: var(--scalar-header-color-2, var(--scalar-color-2));
3586
+ }
3587
+
3588
+ .scalar-app .text-c-header-cta {
3589
+ color: var(--scalar-button-1-color);
3590
+ }
3591
+
3577
3592
  .scalar-app .text-c-tooltip {
3578
3593
  color: var(--scalar-tooltip-color);
3579
3594
  }
@@ -3842,8 +3857,8 @@ to {
3842
3857
  justify-content: center;
3843
3858
  }
3844
3859
 
3845
- :is(.scalar-app .\*\:gap-px > *) {
3846
- gap: 1px;
3860
+ :is(.scalar-app .\*\:gap-1 > *) {
3861
+ gap: 4px;
3847
3862
  }
3848
3863
 
3849
3864
  :is(.scalar-app .\*\:rounded > *) {
@@ -3882,8 +3897,8 @@ to {
3882
3897
  background-color: var(--scalar-sidebar-indent-border-hover, var(--scalar-border-color));
3883
3898
  }
3884
3899
 
3885
- .scalar-app .group-hover\/button\:text-c-1:is(:where(.group\/button):hover *) {
3886
- color: var(--scalar-color-1);
3900
+ .scalar-app .group-hover\/button\:text-c-header-1:is(:where(.group\/button):hover *) {
3901
+ color: var(--scalar-header-color-1, var(--scalar-color-1));
3887
3902
  }
3888
3903
  }
3889
3904
 
@@ -3963,10 +3978,26 @@ to {
3963
3978
  background-color: var(--scalar-background-3);
3964
3979
  }
3965
3980
 
3981
+ .scalar-app .hover\:bg-b-header-2:hover {
3982
+ background-color: var(--scalar-header-background-2, var(--scalar-background-2));
3983
+ }
3984
+
3966
3985
  .scalar-app .hover\:bg-h-btn:hover {
3967
3986
  background-color: var(--scalar-button-1-hover);
3968
3987
  }
3969
3988
 
3989
+ .scalar-app .hover\:bg-h-header-cta:hover {
3990
+ background-color: var(--scalar-header-call-to-action-color, var(--scalar-button-1));
3991
+ }
3992
+
3993
+ @supports (color: color-mix(in lab, red, red)) {
3994
+ .scalar-app .hover\:bg-h-header-cta:hover {
3995
+ background-color: color-mix(in srgb,
3996
+ var(--scalar-header-call-to-action-color, var(--scalar-button-1)),
3997
+ var(--scalar-header-background-1, var(--scalar-background-1)) 15%);
3998
+ }
3999
+ }
4000
+
3970
4001
  .scalar-app .hover\:bg-sidebar-b-1:hover {
3971
4002
  background-color: var(--scalar-sidebar-background-1, var(--scalar-background-1));
3972
4003
  }
@@ -4007,6 +4038,10 @@ to {
4007
4038
  color: var(--scalar-color-1);
4008
4039
  }
4009
4040
 
4041
+ .scalar-app .hover\:text-c-header-1:hover {
4042
+ color: var(--scalar-header-color-1, var(--scalar-color-1));
4043
+ }
4044
+
4010
4045
  .scalar-app .hover\:text-sidebar-c-1:hover {
4011
4046
  color: var(--scalar-sidebar-color-1, var(--scalar-color-1));
4012
4047
  }
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "url": "git+https://github.com/scalar/scalar.git",
11
11
  "directory": "packages/components"
12
12
  },
13
- "version": "0.22.0",
13
+ "version": "0.22.1",
14
14
  "engines": {
15
15
  "node": ">=22"
16
16
  },
@@ -40,10 +40,10 @@
40
40
  "vue": "^3.5.30",
41
41
  "vue-component-type-helpers": "^3.2.6",
42
42
  "@scalar/code-highlight": "0.3.3",
43
- "@scalar/helpers": "0.5.0",
44
- "@scalar/themes": "0.15.3",
43
+ "@scalar/helpers": "0.5.1",
45
44
  "@scalar/icons": "0.7.2",
46
- "@scalar/use-hooks": "0.4.2"
45
+ "@scalar/use-hooks": "0.4.2",
46
+ "@scalar/themes": "0.15.3"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@headlessui/tailwindcss": "^0.2.2",