@scalar/components 0.21.3 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/components/ScalarCard/ScalarCard.vue.d.ts.map +1 -1
  2. package/dist/components/ScalarCard/ScalarCard.vue.js.map +1 -1
  3. package/dist/components/ScalarCard/ScalarCard.vue.script.js +1 -1
  4. package/dist/components/ScalarCard/ScalarCard.vue.script.js.map +1 -1
  5. package/dist/components/ScalarCard/ScalarCardSection.vue.d.ts.map +1 -1
  6. package/dist/components/ScalarCard/ScalarCardSection.vue.js.map +1 -1
  7. package/dist/components/ScalarCard/ScalarCardSection.vue.script.js +1 -1
  8. package/dist/components/ScalarCard/ScalarCardSection.vue.script.js.map +1 -1
  9. package/dist/components/ScalarIcon/variants.d.ts +2 -50
  10. package/dist/components/ScalarIcon/variants.d.ts.map +1 -1
  11. package/dist/components/ScalarMarkdown/ScalarMarkdownSummary.vue.d.ts +6 -0
  12. package/dist/components/ScalarMarkdown/ScalarMarkdownSummary.vue.d.ts.map +1 -1
  13. package/dist/components/ScalarMarkdown/ScalarMarkdownSummary.vue.js.map +1 -1
  14. package/dist/components/ScalarMarkdown/ScalarMarkdownSummary.vue.script.js +12 -7
  15. package/dist/components/ScalarMarkdown/ScalarMarkdownSummary.vue.script.js.map +1 -1
  16. package/dist/components/ScalarMenu/ScalarMenuLink.vue.d.ts +2 -0
  17. package/dist/components/ScalarMenu/ScalarMenuLink.vue.d.ts.map +1 -1
  18. package/dist/components/ScalarMenu/ScalarMenuLink.vue.js.map +1 -1
  19. package/dist/components/ScalarMenu/ScalarMenuLink.vue.script.js +7 -6
  20. package/dist/components/ScalarMenu/ScalarMenuLink.vue.script.js.map +1 -1
  21. package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.js.map +1 -1
  22. package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.script.js +4 -4
  23. package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.script.js.map +1 -1
  24. package/dist/components/ScalarMenu/ScalarMenuWorkspacePicker.vue.js.map +1 -1
  25. package/dist/components/ScalarMenu/ScalarMenuWorkspacePicker.vue.script.js +4 -4
  26. package/dist/components/ScalarMenu/ScalarMenuWorkspacePicker.vue.script.js.map +1 -1
  27. package/dist/components/ScalarSidebar/ScalarSidebarFooter.vue.js.map +1 -1
  28. package/dist/components/ScalarSidebar/ScalarSidebarFooter.vue.script.js +1 -1
  29. package/dist/components/ScalarSidebar/ScalarSidebarFooter.vue.script.js.map +1 -1
  30. package/dist/components/ScalarSidebar/ScalarSidebarItems.vue.js.map +1 -1
  31. package/dist/components/ScalarSidebar/ScalarSidebarItems.vue.script.js +1 -1
  32. package/dist/components/ScalarSidebar/ScalarSidebarItems.vue.script.js.map +1 -1
  33. package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue.d.ts.map +1 -1
  34. package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue.js +1 -0
  35. package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue.js.map +1 -1
  36. package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue.script.js +11 -14
  37. package/dist/components/ScalarSidebar/ScalarSidebarNestedItems.vue.script.js.map +1 -1
  38. package/dist/components/ScalarSidebar/ScalarSidebarPlayground.vue.d.ts +20 -0
  39. package/dist/components/ScalarSidebar/ScalarSidebarPlayground.vue.d.ts.map +1 -1
  40. package/dist/components/ScalarVirtualText/ScalarVirtualText.vue.d.ts +10 -1
  41. package/dist/components/ScalarVirtualText/ScalarVirtualText.vue.d.ts.map +1 -1
  42. package/dist/components/ScalarVirtualText/ScalarVirtualText.vue.js +3 -1
  43. package/dist/components/ScalarVirtualText/ScalarVirtualText.vue.js.map +1 -1
  44. package/dist/components/ScalarVirtualText/ScalarVirtualText.vue.script.js +183 -37
  45. package/dist/components/ScalarVirtualText/ScalarVirtualText.vue.script.js.map +1 -1
  46. package/dist/components/ScalarVirtualText/ScalarVirtualTextSearch.vue.d.ts +45 -0
  47. package/dist/components/ScalarVirtualText/ScalarVirtualTextSearch.vue.d.ts.map +1 -0
  48. package/dist/components/ScalarVirtualText/ScalarVirtualTextSearch.vue.js +9 -0
  49. package/dist/components/ScalarVirtualText/ScalarVirtualTextSearch.vue.js.map +1 -0
  50. package/dist/components/ScalarVirtualText/ScalarVirtualTextSearch.vue.script.js +101 -0
  51. package/dist/components/ScalarVirtualText/ScalarVirtualTextSearch.vue.script.js.map +1 -0
  52. package/dist/components/ScalarWrappingText/ScalarWrappingText.vue.d.ts.map +1 -1
  53. package/dist/components/ScalarWrappingText/ScalarWrappingText.vue.js.map +1 -1
  54. package/dist/components/ScalarWrappingText/ScalarWrappingText.vue.script.js +4 -2
  55. package/dist/components/ScalarWrappingText/ScalarWrappingText.vue.script.js.map +1 -1
  56. package/dist/docs/useBindCx/MockComponents.d.ts +4 -100
  57. package/dist/docs/useBindCx/MockComponents.d.ts.map +1 -1
  58. package/dist/style.css +137 -11
  59. package/package.json +14 -14
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarCard.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCard/ScalarCard.vue"],"names":[],"mappings":"AAoEA;;;;;;;;;;;;;GAaG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;IAEhB,yCAAyC;YACjC,MAAM;;IADd,yCAAyC;YACjC,MAAM;;cAwDF,CAAC,KAAK,IAAgB,KAAK,GAAG;EASxC,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":"ScalarCard.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCard/ScalarCard.vue"],"names":[],"mappings":"AAkEA;;;;;;;;;;;;;GAaG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;IAEhB,yCAAyC;YACjC,MAAM;;IADd,yCAAyC;YACjC,MAAM;;cAsDF,CAAC,KAAK,IAAgB,KAAK,GAAG;EASxC,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":"ScalarCard.vue.js","names":[],"sources":["../../../src/components/ScalarCard/ScalarCard.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar card component\n *\n * Creates an aria region using the nearest ScalarCardHeader as the label\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/region_role\n *\n * @example\n * <ScalarCard>\n * <ScalarCardHeader>Header</ScalarCardHeader>\n * <ScalarCardSection>Content</ScalarCardSection>\n * <ScalarCardFooter>Footer</ScalarCardFooter>\n * </ScalarCard>\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport { computed } from 'vue'\n\nimport { useCardRegion } from './useCardHeading'\n\nconst { label } = defineProps<{\n /** The a11y label for the card region */\n label?: string\n}>()\n\n// Get the id for the nearest ScalarCardHeader if it exists\nconst { id } = useCardRegion()\n\nconst labelAttrs = computed(() => {\n if (label) {\n // If a label is provided, use it\n return { 'aria-label': label }\n }\n if (id.value) {\n // If no label is provided, use the heading id\n return { 'aria-labelledby': id.value }\n }\n // If no label or heading id is provided, don't add any aria attributes\n return {}\n})\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <div\n role=\"group\"\n v-bind=\"{\n ...labelAttrs,\n ...cx(\n 'scalar-card bg-b-2 flex flex-col divide-y rounded-xl border *:first:rounded-t-[inherit] *:last:rounded-b-[inherit]',\n ),\n }\">\n <slot />\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ScalarCard.vue.js","names":[],"sources":["../../../src/components/ScalarCard/ScalarCard.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar card component\n *\n * Creates an aria region using the nearest ScalarCardHeader as the label\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/region_role\n *\n * @example\n * <ScalarCard>\n * <ScalarCardHeader>Header</ScalarCardHeader>\n * <ScalarCardSection>Content</ScalarCardSection>\n * <ScalarCardFooter>Footer</ScalarCardFooter>\n * </ScalarCard>\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport { computed } from 'vue'\n\nimport { useCardRegion } from './useCardHeading'\n\nconst { label } = defineProps<{\n /** The a11y label for the card region */\n label?: string\n}>()\n\n// Get the id for the nearest ScalarCardHeader if it exists\nconst { id } = useCardRegion()\n\nconst labelAttrs = computed(() => {\n if (label) {\n // If a label is provided, use it\n return { 'aria-label': label }\n }\n if (id.value) {\n // If no label is provided, use the heading id\n return { 'aria-labelledby': id.value }\n }\n // If no label or heading id is provided, don't add any aria attributes\n return {}\n})\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <div\n role=\"group\"\n v-bind=\"{\n ...labelAttrs,\n ...cx('scalar-card bg-b-2 flex flex-col divide-y rounded-xl border'),\n }\">\n <slot />\n </div>\n</template>\n"],"mappings":""}
@@ -16,7 +16,7 @@ var ScalarCard_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ def
16
16
  return (_ctx, _cache) => {
17
17
  return openBlock(), createElementBlock("div", mergeProps({ role: "group" }, {
18
18
  ...labelAttrs.value,
19
- ...unref(cx)("scalar-card bg-b-2 flex flex-col divide-y rounded-xl border *:first:rounded-t-[inherit] *:last:rounded-b-[inherit]")
19
+ ...unref(cx)("scalar-card bg-b-2 flex flex-col divide-y rounded-xl border")
20
20
  }), [renderSlot(_ctx.$slots, "default")], 16);
21
21
  };
22
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarCard.vue.script.js","names":[],"sources":["../../../src/components/ScalarCard/ScalarCard.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar card component\n *\n * Creates an aria region using the nearest ScalarCardHeader as the label\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/region_role\n *\n * @example\n * <ScalarCard>\n * <ScalarCardHeader>Header</ScalarCardHeader>\n * <ScalarCardSection>Content</ScalarCardSection>\n * <ScalarCardFooter>Footer</ScalarCardFooter>\n * </ScalarCard>\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport { computed } from 'vue'\n\nimport { useCardRegion } from './useCardHeading'\n\nconst { label } = defineProps<{\n /** The a11y label for the card region */\n label?: string\n}>()\n\n// Get the id for the nearest ScalarCardHeader if it exists\nconst { id } = useCardRegion()\n\nconst labelAttrs = computed(() => {\n if (label) {\n // If a label is provided, use it\n return { 'aria-label': label }\n }\n if (id.value) {\n // If no label is provided, use the heading id\n return { 'aria-labelledby': id.value }\n }\n // If no label or heading id is provided, don't add any aria attributes\n return {}\n})\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <div\n role=\"group\"\n v-bind=\"{\n ...labelAttrs,\n ...cx(\n 'scalar-card bg-b-2 flex flex-col divide-y rounded-xl border *:first:rounded-t-[inherit] *:last:rounded-b-[inherit]',\n ),\n }\">\n <slot />\n </div>\n</template>\n"],"mappings":";;;;;;;;EA6BA,MAAM,EAAE,OAAO,eAAc;EAE7B,MAAM,aAAa,eAAe;AAChC,OAAI,QAAA,MAEF,QAAO,EAAE,cAAc,QAAA,OAAM;AAE/B,OAAI,GAAG,MAEL,QAAO,EAAE,mBAAmB,GAAG,OAAM;AAGvC,UAAO,EAAC;IACT;EAGD,MAAM,EAAE,OAAO,WAAU;;uBAGvB,mBASM,OATN,WASM,EARJ,MAAK,SAAO,EAAA;OACO,WAAA;OAAqB,MAAA,GAAE,CAAA,qHAAA;QAM1C,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,GAAA"}
1
+ {"version":3,"file":"ScalarCard.vue.script.js","names":[],"sources":["../../../src/components/ScalarCard/ScalarCard.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar card component\n *\n * Creates an aria region using the nearest ScalarCardHeader as the label\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference/Roles/region_role\n *\n * @example\n * <ScalarCard>\n * <ScalarCardHeader>Header</ScalarCardHeader>\n * <ScalarCardSection>Content</ScalarCardSection>\n * <ScalarCardFooter>Footer</ScalarCardFooter>\n * </ScalarCard>\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport { computed } from 'vue'\n\nimport { useCardRegion } from './useCardHeading'\n\nconst { label } = defineProps<{\n /** The a11y label for the card region */\n label?: string\n}>()\n\n// Get the id for the nearest ScalarCardHeader if it exists\nconst { id } = useCardRegion()\n\nconst labelAttrs = computed(() => {\n if (label) {\n // If a label is provided, use it\n return { 'aria-label': label }\n }\n if (id.value) {\n // If no label is provided, use the heading id\n return { 'aria-labelledby': id.value }\n }\n // If no label or heading id is provided, don't add any aria attributes\n return {}\n})\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <div\n role=\"group\"\n v-bind=\"{\n ...labelAttrs,\n ...cx('scalar-card bg-b-2 flex flex-col divide-y rounded-xl border'),\n }\">\n <slot />\n </div>\n</template>\n"],"mappings":";;;;;;;;EA6BA,MAAM,EAAE,OAAO,eAAc;EAE7B,MAAM,aAAa,eAAe;AAChC,OAAI,QAAA,MAEF,QAAO,EAAE,cAAc,QAAA,OAAM;AAE/B,OAAI,GAAG,MAEL,QAAO,EAAE,mBAAmB,GAAG,OAAM;AAGvC,UAAO,EAAC;IACT;EAGD,MAAM,EAAE,OAAO,WAAU;;uBAGvB,mBAOM,OAPN,WAOM,EANJ,MAAK,SAAO,EAAA;OACO,WAAA;OAAqB,MAAA,GAAE,CAAA,8DAAA;QAI1C,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,GAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarCardSection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCard/ScalarCardSection.vue"],"names":[],"mappings":"AAgCA;;;;;;;;;;;GAWG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;cA0BJ,CAAC,KAAK,IAAgB,KAAK,GAAG;EAQxC,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":"ScalarCardSection.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarCard/ScalarCardSection.vue"],"names":[],"mappings":"AAqCA;;;;;;;;;;;GAWG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;cA8BJ,CAAC,KAAK,IAAgB,KAAK,GAAG;EAQxC,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":"ScalarCardSection.vue.js","names":[],"sources":["../../../src/components/ScalarCard/ScalarCardSection.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar card section component\n *\n * A generic section of a ScalarCard component, provides the base for ScalarCardHeader and ScalarCardFooter\n *\n * @example\n * <ScalarCard>\n * ...\n * <ScalarCardSection>Content</ScalarCardSection>\n * ...\n * </ScalarCard>\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <div v-bind=\"cx('scalar-card-content flex overflow-auto')\">\n <slot />\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ScalarCardSection.vue.js","names":[],"sources":["../../../src/components/ScalarCard/ScalarCardSection.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar card section component\n *\n * A generic section of a ScalarCard component, provides the base for ScalarCardHeader and ScalarCardFooter\n *\n * @example\n * <ScalarCard>\n * ...\n * <ScalarCardSection>Content</ScalarCardSection>\n * ...\n * </ScalarCard>\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <div\n v-bind=\"\n cx(\n 'scalar-card-content flex overflow-auto first:rounded-t-[inherit] last:rounded-b-[inherit]',\n )\n \">\n <slot />\n </div>\n</template>\n"],"mappings":""}
@@ -6,7 +6,7 @@ var ScalarCardSection_vue_vue_type_script_setup_true_lang_default = /* @__PURE__
6
6
  setup(__props) {
7
7
  const { cx } = useBindCx();
8
8
  return (_ctx, _cache) => {
9
- return openBlock(), createElementBlock("div", normalizeProps(guardReactiveProps(unref(cx)("scalar-card-content flex overflow-auto"))), [renderSlot(_ctx.$slots, "default")], 16);
9
+ return openBlock(), createElementBlock("div", normalizeProps(guardReactiveProps(unref(cx)("scalar-card-content flex overflow-auto first:rounded-t-[inherit] last:rounded-b-[inherit]"))), [renderSlot(_ctx.$slots, "default")], 16);
10
10
  };
11
11
  }
12
12
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarCardSection.vue.script.js","names":[],"sources":["../../../src/components/ScalarCard/ScalarCardSection.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar card section component\n *\n * A generic section of a ScalarCard component, provides the base for ScalarCardHeader and ScalarCardFooter\n *\n * @example\n * <ScalarCard>\n * ...\n * <ScalarCardSection>Content</ScalarCardSection>\n * ...\n * </ScalarCard>\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <div v-bind=\"cx('scalar-card-content flex overflow-auto')\">\n <slot />\n </div>\n</template>\n"],"mappings":";;;;;;EAmBA,MAAM,EAAE,OAAO,WAAU;;uBAGvB,mBAEM,OAAA,eAAA,mBAFO,MAAA,GAAE,CAAA,yCAAA,CAAA,CAAA,EAAA,CACb,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,GAAA"}
1
+ {"version":3,"file":"ScalarCardSection.vue.script.js","names":[],"sources":["../../../src/components/ScalarCard/ScalarCardSection.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar card section component\n *\n * A generic section of a ScalarCard component, provides the base for ScalarCardHeader and ScalarCardFooter\n *\n * @example\n * <ScalarCard>\n * ...\n * <ScalarCardSection>Content</ScalarCardSection>\n * ...\n * </ScalarCard>\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <div\n v-bind=\"\n cx(\n 'scalar-card-content flex overflow-auto first:rounded-t-[inherit] last:rounded-b-[inherit]',\n )\n \">\n <slot />\n </div>\n</template>\n"],"mappings":";;;;;;EAmBA,MAAM,EAAE,OAAO,WAAU;;uBAGvB,mBAOM,OAAA,eAAA,mBANW,MAAA,GAAE,CAAA,4FAAA,CAAA,CAAA,EAAA,CAKjB,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,GAAA"}
@@ -4,58 +4,10 @@
4
4
  export declare const variants: (props?: ({
5
5
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full" | undefined;
6
6
  } & ({
7
- class?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
8
- [x: string]: any;
9
- } | null | undefined)[] | {
10
- [x: string]: any;
11
- } | null | undefined)[] | {
12
- [x: string]: any;
13
- } | null | undefined)[] | {
14
- [x: string]: any;
15
- } | null | undefined)[] | {
16
- [x: string]: any;
17
- } | null | undefined)[] | {
18
- [x: string]: any;
19
- } | null | undefined)[] | {
20
- [x: string]: any;
21
- } | null | undefined)[] | {
22
- [x: string]: any;
23
- } | null | undefined)[] | {
24
- [x: string]: any;
25
- } | null | undefined)[] | {
26
- [x: string]: any;
27
- } | null | undefined)[] | {
28
- [x: string]: any;
29
- } | null | undefined)[] | {
30
- [x: string]: any;
31
- } | null | undefined;
7
+ class?: import("cva").ClassValue;
32
8
  className?: never;
33
9
  } | {
34
10
  class?: never;
35
- className?: string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | (string | number | boolean | /*elided*/ any | {
36
- [x: string]: any;
37
- } | null | undefined)[] | {
38
- [x: string]: any;
39
- } | null | undefined)[] | {
40
- [x: string]: any;
41
- } | null | undefined)[] | {
42
- [x: string]: any;
43
- } | null | undefined)[] | {
44
- [x: string]: any;
45
- } | null | undefined)[] | {
46
- [x: string]: any;
47
- } | null | undefined)[] | {
48
- [x: string]: any;
49
- } | null | undefined)[] | {
50
- [x: string]: any;
51
- } | null | undefined)[] | {
52
- [x: string]: any;
53
- } | null | undefined)[] | {
54
- [x: string]: any;
55
- } | null | undefined)[] | {
56
- [x: string]: any;
57
- } | null | undefined)[] | {
58
- [x: string]: any;
59
- } | null | undefined;
11
+ className?: import("cva").ClassValue;
60
12
  })) | undefined) => string;
61
13
  //# sourceMappingURL=variants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarIcon/variants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAgBnB,CAAA"}
1
+ {"version":3,"file":"variants.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarIcon/variants.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;;;;;0BAgBnB,CAAA"}
@@ -14,15 +14,21 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<import
14
14
  } & {
15
15
  /** * Whether the summary is open. */
16
16
  modelValue?: boolean;
17
+ /** Whether the markdown is being truncated */
18
+ truncated?: boolean;
17
19
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
20
  "update:modelValue": (value: boolean) => any;
21
+ "update:truncated": (value: boolean) => any;
19
22
  }, string, import("vue").PublicProps, Readonly<import("./types").ScalarMarkdownProps & {
20
23
  controlled?: boolean;
21
24
  } & {
22
25
  /** * Whether the summary is open. */
23
26
  modelValue?: boolean;
27
+ /** Whether the markdown is being truncated */
28
+ truncated?: boolean;
24
29
  }> & Readonly<{
25
30
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
31
+ "onUpdate:truncated"?: ((value: boolean) => any) | undefined;
26
32
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
27
33
  button?: (props: {
28
34
  open: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMarkdownSummary.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMarkdown/ScalarMarkdownSummary.vue"],"names":[],"mappings":"AA0HA;;;;;;;;GAQG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;;;IAqClB,qCAAqC;iBACxB,OAAO;;;;;;IADpB,qCAAqC;iBACxB,OAAO;;;;aAiFP,CAAC,KAAK;;KAAgB,KAAK,GAAG;EAYvC,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":"ScalarMarkdownSummary.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMarkdown/ScalarMarkdownSummary.vue"],"names":[],"mappings":"AA0HA;;;;;;;;GAQG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;;;IAsClB,qCAAqC;iBACxB,OAAO;IACpB,8CAA8C;gBAChC,OAAO;;;;;;;IAHrB,qCAAqC;iBACxB,OAAO;IACpB,8CAA8C;gBAChC,OAAO;;;;;aAkFR,CAAC,KAAK;;KAAgB,KAAK,GAAG;EAYvC,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":"ScalarMarkdownSummary.vue.js","names":[],"sources":["../../../src/components/ScalarMarkdown/ScalarMarkdownSummary.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Markdown Summary component\n *\n * Displays a truncated preview of markdown content with\n * a \"More\" / \"Show Less\" toggle to expand and collapse.\n *\n * @example\n * <ScalarMarkdownSummary value=\"Long markdown text...\" :clamp=\"2\" />\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport { useResizeObserver } from '@vueuse/core'\nimport { onMounted, ref, useId, useTemplateRef } from 'vue'\n\nimport ScalarMarkdown from './ScalarMarkdown.vue'\nimport type { ScalarMarkdownSummaryProps } from './types'\n\nconst { clamp = 1, ...props } = defineProps<ScalarMarkdownSummaryProps>()\n\nconst id = useId()\n\n/** * Whether the summary is open. */\nconst open = defineModel<boolean>({ default: false })\n\nconst markdown = useTemplateRef('scalar-markdown')\n\n/** Whether the markdown is being truncated */\nconst isTruncated = ref(false)\n\nuseResizeObserver(() => markdown.value?.el, checkTruncation)\n\n/** Check if the markdown is being truncated */\nfunction checkTruncation() {\n const el = markdown.value?.el\n if (!el) {\n return\n }\n isTruncated.value =\n el.scrollHeight > el.clientHeight || el.scrollWidth > el.clientWidth\n}\n\nonMounted(checkTruncation)\n\nconst { cx } = useBindCx()\ndefineOptions({ inheritAttrs: false })\n</script>\n<template>\n <div\n v-bind=\"\n cx(\n 'group/summary flex gap-0.5',\n open ? 'flex-col' : 'flex-row items-baseline',\n )\n \">\n <ScalarMarkdown\n v-bind=\"props\"\n :id=\"id\"\n ref=\"scalar-markdown\"\n :clamp=\"open ? undefined : clamp\"\n :class=\"{ 'markdown-summary truncate': !open }\" />\n <button\n v-if=\"!controlled && (isTruncated || open)\"\n :aria-controls=\"id\"\n :aria-expanded=\"open\"\n class=\"whitespace-nowrap font-medium hover:underline\"\n :class=\"{ 'self-end': open }\"\n type=\"button\"\n @click=\"open = !open\">\n <slot\n name=\"button\"\n :open=\"open\">\n {{ open ? ' Show Less' : 'More' }}\n </slot>\n </button>\n </div>\n</template>\n<style>\n.scalar-app {\n /*\n Summarized markdown styles\n Doubled up to bump specificity\n */\n .markdown.markdown-summary.markdown-summary {\n /* Hide the before and after pseudo-elements for all elements */\n *:before,\n *:after {\n content: none;\n }\n\n *:not(strong, em, a) {\n /* Disable formatting for non-inline elements */\n display: contents;\n font-size: inherit;\n font-weight: inherit;\n line-height: var(--markdown-line-height);\n }\n\n /* Hide elements that don't make sense in the summary */\n img,\n svg,\n hr,\n pre {\n display: none;\n }\n }\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"ScalarMarkdownSummary.vue.js","names":[],"sources":["../../../src/components/ScalarMarkdown/ScalarMarkdownSummary.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Markdown Summary component\n *\n * Displays a truncated preview of markdown content with\n * a \"More\" / \"Show Less\" toggle to expand and collapse.\n *\n * @example\n * <ScalarMarkdownSummary value=\"Long markdown text...\" :clamp=\"2\" />\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport { useResizeObserver } from '@vueuse/core'\nimport { onMounted, useId, useTemplateRef } from 'vue'\n\nimport ScalarMarkdown from './ScalarMarkdown.vue'\nimport type { ScalarMarkdownSummaryProps } from './types'\n\nconst { clamp = 1, ...props } = defineProps<ScalarMarkdownSummaryProps>()\n\nconst id = useId()\n\n/** * Whether the summary is open. */\nconst open = defineModel<boolean>({ default: false })\n\n/** Whether the markdown is being truncated */\nconst truncated = defineModel<boolean>('truncated', { default: false })\n\nconst markdown = useTemplateRef('scalar-markdown')\n\nuseResizeObserver(() => markdown.value?.el, checkTruncation)\n\n/** Check if the markdown is being truncated */\nfunction checkTruncation() {\n const el = markdown.value?.el\n if (!el) {\n return\n }\n truncated.value =\n el.scrollHeight > el.clientHeight || el.scrollWidth > el.clientWidth\n}\n\nonMounted(checkTruncation)\n\nconst { cx } = useBindCx()\ndefineOptions({ inheritAttrs: false })\n</script>\n<template>\n <div\n v-bind=\"\n cx(\n 'group/summary flex gap-0.5',\n open ? 'flex-col' : 'flex-row items-baseline',\n )\n \">\n <ScalarMarkdown\n v-bind=\"props\"\n :id=\"id\"\n ref=\"scalar-markdown\"\n :clamp=\"open ? undefined : clamp\"\n :class=\"{ 'markdown-summary truncate': !open }\" />\n <button\n v-if=\"!controlled && (truncated || open)\"\n :aria-controls=\"id\"\n :aria-expanded=\"open\"\n class=\"whitespace-nowrap font-medium hover:underline\"\n :class=\"{ 'self-end': open }\"\n type=\"button\"\n @click=\"open = !open\">\n <slot\n name=\"button\"\n :open=\"open\">\n {{ open ? ' Show Less' : 'More' }}\n </slot>\n </button>\n </div>\n</template>\n<style>\n.scalar-app {\n /*\n Summarized markdown styles\n Doubled up to bump specificity\n */\n .markdown.markdown-summary.markdown-summary {\n /* Hide the before and after pseudo-elements for all elements */\n *:before,\n *:after {\n content: none;\n }\n\n *:not(strong, em, a) {\n /* Disable formatting for non-inline elements */\n display: contents;\n font-size: inherit;\n font-weight: inherit;\n line-height: var(--markdown-line-height);\n }\n\n /* Hide elements that don't make sense in the summary */\n img,\n svg,\n hr,\n pre {\n display: none;\n }\n }\n}\n</style>\n"],"mappings":""}
@@ -1,6 +1,6 @@
1
1
  import ScalarMarkdown_default from "./ScalarMarkdown.vue.js";
2
2
  import { useBindCx } from "@scalar/use-hooks/useBindCx";
3
- import { createCommentVNode, createElementBlock, createPropsRestProxy, createTextVNode, createVNode, defineComponent, guardReactiveProps, mergeModels, mergeProps, normalizeClass, normalizeProps, onMounted, openBlock, ref, renderSlot, toDisplayString, unref, useId, useModel, useTemplateRef } from "vue";
3
+ import { createCommentVNode, createElementBlock, createPropsRestProxy, createTextVNode, createVNode, defineComponent, guardReactiveProps, mergeModels, mergeProps, normalizeClass, normalizeProps, onMounted, openBlock, renderSlot, toDisplayString, unref, useId, useModel, useTemplateRef } from "vue";
4
4
  import { useResizeObserver } from "@vueuse/core";
5
5
  //#region src/components/ScalarMarkdown/ScalarMarkdownSummary.vue?vue&type=script&setup=true&lang.ts
6
6
  var _hoisted_1 = ["aria-controls", "aria-expanded"];
@@ -21,23 +21,28 @@ var ScalarMarkdownSummary_vue_vue_type_script_setup_true_lang_default = /* @__PU
21
21
  type: Boolean,
22
22
  default: false
23
23
  },
24
- "modelModifiers": {}
24
+ "modelModifiers": {},
25
+ "truncated": {
26
+ type: Boolean,
27
+ default: false
28
+ },
29
+ "truncatedModifiers": {}
25
30
  }),
26
- emits: ["update:modelValue"],
31
+ emits: ["update:modelValue", "update:truncated"],
27
32
  setup(__props) {
28
33
  const props = createPropsRestProxy(__props, ["clamp"]);
29
34
  const id = useId();
30
35
  /** * Whether the summary is open. */
31
36
  const open = useModel(__props, "modelValue");
32
- const markdown = useTemplateRef("scalar-markdown");
33
37
  /** Whether the markdown is being truncated */
34
- const isTruncated = ref(false);
38
+ const truncated = useModel(__props, "truncated");
39
+ const markdown = useTemplateRef("scalar-markdown");
35
40
  useResizeObserver(() => markdown.value?.el, checkTruncation);
36
41
  /** Check if the markdown is being truncated */
37
42
  function checkTruncation() {
38
43
  const el = markdown.value?.el;
39
44
  if (!el) return;
40
- isTruncated.value = el.scrollHeight > el.clientHeight || el.scrollWidth > el.clientWidth;
45
+ truncated.value = el.scrollHeight > el.clientHeight || el.scrollWidth > el.clientWidth;
41
46
  }
42
47
  onMounted(checkTruncation);
43
48
  const { cx } = useBindCx();
@@ -51,7 +56,7 @@ var ScalarMarkdownSummary_vue_vue_type_script_setup_true_lang_default = /* @__PU
51
56
  "id",
52
57
  "clamp",
53
58
  "class"
54
- ]), !__props.controlled && (isTruncated.value || open.value) ? (openBlock(), createElementBlock("button", {
59
+ ]), !__props.controlled && (truncated.value || open.value) ? (openBlock(), createElementBlock("button", {
55
60
  key: 0,
56
61
  "aria-controls": unref(id),
57
62
  "aria-expanded": open.value,
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMarkdownSummary.vue.script.js","names":[],"sources":["../../../src/components/ScalarMarkdown/ScalarMarkdownSummary.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Markdown Summary component\n *\n * Displays a truncated preview of markdown content with\n * a \"More\" / \"Show Less\" toggle to expand and collapse.\n *\n * @example\n * <ScalarMarkdownSummary value=\"Long markdown text...\" :clamp=\"2\" />\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport { useResizeObserver } from '@vueuse/core'\nimport { onMounted, ref, useId, useTemplateRef } from 'vue'\n\nimport ScalarMarkdown from './ScalarMarkdown.vue'\nimport type { ScalarMarkdownSummaryProps } from './types'\n\nconst { clamp = 1, ...props } = defineProps<ScalarMarkdownSummaryProps>()\n\nconst id = useId()\n\n/** * Whether the summary is open. */\nconst open = defineModel<boolean>({ default: false })\n\nconst markdown = useTemplateRef('scalar-markdown')\n\n/** Whether the markdown is being truncated */\nconst isTruncated = ref(false)\n\nuseResizeObserver(() => markdown.value?.el, checkTruncation)\n\n/** Check if the markdown is being truncated */\nfunction checkTruncation() {\n const el = markdown.value?.el\n if (!el) {\n return\n }\n isTruncated.value =\n el.scrollHeight > el.clientHeight || el.scrollWidth > el.clientWidth\n}\n\nonMounted(checkTruncation)\n\nconst { cx } = useBindCx()\ndefineOptions({ inheritAttrs: false })\n</script>\n<template>\n <div\n v-bind=\"\n cx(\n 'group/summary flex gap-0.5',\n open ? 'flex-col' : 'flex-row items-baseline',\n )\n \">\n <ScalarMarkdown\n v-bind=\"props\"\n :id=\"id\"\n ref=\"scalar-markdown\"\n :clamp=\"open ? undefined : clamp\"\n :class=\"{ 'markdown-summary truncate': !open }\" />\n <button\n v-if=\"!controlled && (isTruncated || open)\"\n :aria-controls=\"id\"\n :aria-expanded=\"open\"\n class=\"whitespace-nowrap font-medium hover:underline\"\n :class=\"{ 'self-end': open }\"\n type=\"button\"\n @click=\"open = !open\">\n <slot\n name=\"button\"\n :open=\"open\">\n {{ open ? ' Show Less' : 'More' }}\n </slot>\n </button>\n </div>\n</template>\n<style>\n.scalar-app {\n /*\n Summarized markdown styles\n Doubled up to bump specificity\n */\n .markdown.markdown-summary.markdown-summary {\n /* Hide the before and after pseudo-elements for all elements */\n *:before,\n *:after {\n content: none;\n }\n\n *:not(strong, em, a) {\n /* Disable formatting for non-inline elements */\n display: contents;\n font-size: inherit;\n font-weight: inherit;\n line-height: var(--markdown-line-height);\n }\n\n /* Hide elements that don't make sense in the summary */\n img,\n svg,\n hr,\n pre {\n display: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBA,MAAM,QAA0B,qBAAA,SAAA,CAAA,QAAA,CAAA;EAEhC,MAAM,KAAK,OAAM;;EAGjB,MAAM,OAAO,SAAoB,SAAA,aAAmB;EAEpD,MAAM,WAAW,eAAe,kBAAiB;;EAGjD,MAAM,cAAc,IAAI,MAAK;AAE7B,0BAAwB,SAAS,OAAO,IAAI,gBAAe;;EAG3D,SAAS,kBAAkB;GACzB,MAAM,KAAK,SAAS,OAAO;AAC3B,OAAI,CAAC,GACH;AAEF,eAAY,QACV,GAAG,eAAe,GAAG,gBAAgB,GAAG,cAAc,GAAG;;AAG7D,YAAU,gBAAe;EAEzB,MAAM,EAAE,OAAO,WAAU;;uBAIvB,mBA2BM,OAAA,eAAA,mBA1BW,MAAA,GAAE,CAAA,8BAAgD,KAAA,QAAI,aAAA,0BAAA,CAAA,CAAA,EAAA,CAMrE,YAKoD,wBALpD,WACU,OAAK;IACZ,IAAI,MAAA,GAAE;IACP,KAAI;IACH,OAAO,KAAA,QAAO,KAAA,IAAY,QAAA;IAC1B,OAAK,EAAA,6BAAA,CAAkC,KAAA,OAAI;;;;;QAErC,QAAA,eAAe,YAAA,SAAe,KAAA,UAAA,WAAA,EADvC,mBAaS,UAAA;;IAXN,iBAAe,MAAA,GAAE;IACjB,iBAAe,KAAA;IAChB,OAAK,eAAA,CAAC,iDAA+C,EAAA,YAC/B,KAAA,OAAI,CAAA,CAAA;IAC1B,MAAK;IACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAA,QAAI,CAAI,KAAA;OAChB,WAIO,KAAA,QAAA,UAAA,EAFJ,MAAM,KAAA,OAAI,QAEN,CAAA,gBAAA,gBADF,KAAA,QAAI,eAAA,OAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAA,IAAA,WAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,EAAA,GAAA"}
1
+ {"version":3,"file":"ScalarMarkdownSummary.vue.script.js","names":[],"sources":["../../../src/components/ScalarMarkdown/ScalarMarkdownSummary.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Markdown Summary component\n *\n * Displays a truncated preview of markdown content with\n * a \"More\" / \"Show Less\" toggle to expand and collapse.\n *\n * @example\n * <ScalarMarkdownSummary value=\"Long markdown text...\" :clamp=\"2\" />\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport { useResizeObserver } from '@vueuse/core'\nimport { onMounted, useId, useTemplateRef } from 'vue'\n\nimport ScalarMarkdown from './ScalarMarkdown.vue'\nimport type { ScalarMarkdownSummaryProps } from './types'\n\nconst { clamp = 1, ...props } = defineProps<ScalarMarkdownSummaryProps>()\n\nconst id = useId()\n\n/** * Whether the summary is open. */\nconst open = defineModel<boolean>({ default: false })\n\n/** Whether the markdown is being truncated */\nconst truncated = defineModel<boolean>('truncated', { default: false })\n\nconst markdown = useTemplateRef('scalar-markdown')\n\nuseResizeObserver(() => markdown.value?.el, checkTruncation)\n\n/** Check if the markdown is being truncated */\nfunction checkTruncation() {\n const el = markdown.value?.el\n if (!el) {\n return\n }\n truncated.value =\n el.scrollHeight > el.clientHeight || el.scrollWidth > el.clientWidth\n}\n\nonMounted(checkTruncation)\n\nconst { cx } = useBindCx()\ndefineOptions({ inheritAttrs: false })\n</script>\n<template>\n <div\n v-bind=\"\n cx(\n 'group/summary flex gap-0.5',\n open ? 'flex-col' : 'flex-row items-baseline',\n )\n \">\n <ScalarMarkdown\n v-bind=\"props\"\n :id=\"id\"\n ref=\"scalar-markdown\"\n :clamp=\"open ? undefined : clamp\"\n :class=\"{ 'markdown-summary truncate': !open }\" />\n <button\n v-if=\"!controlled && (truncated || open)\"\n :aria-controls=\"id\"\n :aria-expanded=\"open\"\n class=\"whitespace-nowrap font-medium hover:underline\"\n :class=\"{ 'self-end': open }\"\n type=\"button\"\n @click=\"open = !open\">\n <slot\n name=\"button\"\n :open=\"open\">\n {{ open ? ' Show Less' : 'More' }}\n </slot>\n </button>\n </div>\n</template>\n<style>\n.scalar-app {\n /*\n Summarized markdown styles\n Doubled up to bump specificity\n */\n .markdown.markdown-summary.markdown-summary {\n /* Hide the before and after pseudo-elements for all elements */\n *:before,\n *:after {\n content: none;\n }\n\n *:not(strong, em, a) {\n /* Disable formatting for non-inline elements */\n display: contents;\n font-size: inherit;\n font-weight: inherit;\n line-height: var(--markdown-line-height);\n }\n\n /* Hide elements that don't make sense in the summary */\n img,\n svg,\n hr,\n pre {\n display: none;\n }\n }\n}\n</style>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqBA,MAAM,QAA0B,qBAAA,SAAA,CAAA,QAAA,CAAA;EAEhC,MAAM,KAAK,OAAM;;EAGjB,MAAM,OAAO,SAAoB,SAAA,aAAmB;;EAGpD,MAAM,YAAY,SAAoB,SAAC,YAA+B;EAEtE,MAAM,WAAW,eAAe,kBAAiB;AAEjD,0BAAwB,SAAS,OAAO,IAAI,gBAAe;;EAG3D,SAAS,kBAAkB;GACzB,MAAM,KAAK,SAAS,OAAO;AAC3B,OAAI,CAAC,GACH;AAEF,aAAU,QACR,GAAG,eAAe,GAAG,gBAAgB,GAAG,cAAc,GAAG;;AAG7D,YAAU,gBAAe;EAEzB,MAAM,EAAE,OAAO,WAAU;;uBAIvB,mBA2BM,OAAA,eAAA,mBA1BW,MAAA,GAAE,CAAA,8BAAgD,KAAA,QAAI,aAAA,0BAAA,CAAA,CAAA,EAAA,CAMrE,YAKoD,wBALpD,WACU,OAAK;IACZ,IAAI,MAAA,GAAE;IACP,KAAI;IACH,OAAO,KAAA,QAAO,KAAA,IAAY,QAAA;IAC1B,OAAK,EAAA,6BAAA,CAAkC,KAAA,OAAI;;;;;QAErC,QAAA,eAAe,UAAA,SAAa,KAAA,UAAA,WAAA,EADrC,mBAaS,UAAA;;IAXN,iBAAe,MAAA,GAAE;IACjB,iBAAe,KAAA;IAChB,OAAK,eAAA,CAAC,iDAA+C,EAAA,YAC/B,KAAA,OAAI,CAAA,CAAA;IAC1B,MAAK;IACJ,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAA,QAAI,CAAI,KAAA;OAChB,WAIO,KAAA,QAAA,UAAA,EAFJ,MAAM,KAAA,OAAI,QAEN,CAAA,gBAAA,gBADF,KAAA,QAAI,eAAA,OAAA,EAAA,EAAA,CAAA,CAAA,CAAA,EAAA,IAAA,WAAA,IAAA,mBAAA,IAAA,KAAA,CAAA,EAAA,GAAA"}
@@ -18,10 +18,12 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
18
18
  is?: string | Component;
19
19
  icon?: Icon | ScalarIconComponent;
20
20
  strong?: boolean;
21
+ submenu?: boolean;
21
22
  }, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
22
23
  is?: string | Component;
23
24
  icon?: Icon | ScalarIconComponent;
24
25
  strong?: boolean;
26
+ submenu?: boolean;
25
27
  }> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
26
28
  default?: (props: {}) => any;
27
29
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMenuLink.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuLink.vue"],"names":[],"mappings":"AA4DA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAG9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAGpC,OAAO,EAAE,KAAK,IAAI,EAA2B,MAAM,eAAe,CAAA;AAGlE;;;;;;;;;;GAUG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;SAEX,MAAM,GAAG,SAAS;WAChB,IAAI,GAAG,mBAAmB;aACxB,OAAO;;SAFX,MAAM,GAAG,SAAS;WAChB,IAAI,GAAG,mBAAmB;aACxB,OAAO;;cA0FJ,CAAC,KAAK,IAAiB,KAAK,GAAG;EASzC,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":"ScalarMenuLink.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarMenu/ScalarMenuLink.vue"],"names":[],"mappings":"AA6DA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAG9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAGpC,OAAO,EAAE,KAAK,IAAI,EAA2B,MAAM,eAAe,CAAA;AAGlE;;;;;;;;;;GAUG;wBACkB,OAAO,YAAY;AAAxC,wBAAyC;AAGzC,QAAA,MAAM,YAAY;SAEX,MAAM,GAAG,SAAS;WAChB,IAAI,GAAG,mBAAmB;aACxB,OAAO;cACN,OAAO;;SAHZ,MAAM,GAAG,SAAS;WAChB,IAAI,GAAG,mBAAmB;aACxB,OAAO;cACN,OAAO;;cA2FL,CAAC,KAAK,IAAiB,KAAK,GAAG;EASzC,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":"ScalarMenuLink.vue.js","names":[],"sources":["../../../src/components/ScalarMenu/ScalarMenuLink.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Menu Link component\n *\n * A menu item that renders as a link with an optional icon.\n * Used within ScalarMenu sections.\n *\n * @example\n * <ScalarMenuLink href=\"https://example.com\" :icon=\"ScalarIconBook\">\n * Documentation\n * </ScalarMenuLink>\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { ScalarIconComponent } from '@scalar/icons/types'\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport { DropdownMenu } from 'radix-vue/namespaced'\nimport type { Component } from 'vue'\n\nimport { ScalarDropdownButton } from '../ScalarDropdown'\nimport { type Icon, ScalarIconLegacyAdapter } from '../ScalarIcon'\n\nconst { is = DropdownMenu.Item } = defineProps<{\n is?: string | Component\n icon?: Icon | ScalarIconComponent\n strong?: boolean\n}>()\n\nconst { cx } = useBindCx()\ndefineOptions({ inheritAttrs: false })\n</script>\n<template>\n <ScalarDropdownButton\n v-bind=\"cx('flex items-center')\"\n :is=\"is\"\n as=\"a\">\n <ScalarIconLegacyAdapter\n v-if=\"icon\"\n :class=\"[\n strong ? 'text-c-1' : 'text-c-2',\n typeof icon === 'string' ? 'size-3' : 'size-3.5 -mx-0.25',\n ]\"\n :icon=\"icon\"\n :thickness=\"strong ? '2.5' : '2'\"\n :weight=\"strong ? 'bold' : 'regular'\" />\n <div\n v-else\n class=\"size-3\" />\n <div\n class=\"flex items-center flex-1 min-w-0 truncate\"\n :class=\"strong ? 'font-medium' : 'font-normal'\">\n <slot />\n </div>\n </ScalarDropdownButton>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ScalarMenuLink.vue.js","names":[],"sources":["../../../src/components/ScalarMenu/ScalarMenuLink.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Menu Link component\n *\n * A menu item that renders as a link with an optional icon.\n * Used within ScalarMenu sections.\n *\n * @example\n * <ScalarMenuLink href=\"https://example.com\" :icon=\"ScalarIconBook\">\n * Documentation\n * </ScalarMenuLink>\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { ScalarIconComponent } from '@scalar/icons/types'\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport { DropdownMenu } from 'radix-vue/namespaced'\nimport type { Component } from 'vue'\n\nimport { ScalarDropdownButton } from '../ScalarDropdown'\nimport { type Icon, ScalarIconLegacyAdapter } from '../ScalarIcon'\n\nconst { is = 'a' } = defineProps<{\n is?: string | Component\n icon?: Icon | ScalarIconComponent\n strong?: boolean\n submenu?: boolean\n}>()\n\nconst { cx } = useBindCx()\ndefineOptions({ inheritAttrs: false })\n</script>\n<template>\n <ScalarDropdownButton\n v-bind=\"cx('flex items-center')\"\n :is=\"submenu ? DropdownMenu.SubTrigger : DropdownMenu.Item\"\n :as=\"is\">\n <ScalarIconLegacyAdapter\n v-if=\"icon\"\n :class=\"[\n strong ? 'text-c-1' : 'text-c-2',\n typeof icon === 'string' ? 'size-3' : 'size-3.5 -mx-px',\n ]\"\n :icon=\"icon\"\n :thickness=\"strong ? '2.5' : '2'\"\n :weight=\"strong ? 'bold' : 'regular'\" />\n <div\n v-else\n class=\"size-3\" />\n <div\n class=\"flex items-center flex-1 min-w-0 truncate\"\n :class=\"strong ? 'font-medium' : 'font-normal'\">\n <slot />\n </div>\n </ScalarDropdownButton>\n</template>\n"],"mappings":""}
@@ -12,20 +12,21 @@ var ScalarMenuLink_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
12
12
  inheritAttrs: false,
13
13
  __name: "ScalarMenuLink",
14
14
  props: {
15
- is: { default: () => DropdownMenu.Item },
15
+ is: { default: "a" },
16
16
  icon: { type: [Object, Function] },
17
- strong: { type: Boolean }
17
+ strong: { type: Boolean },
18
+ submenu: { type: Boolean }
18
19
  },
19
20
  setup(__props) {
20
21
  const { cx } = useBindCx();
21
22
  return (_ctx, _cache) => {
22
23
  return openBlock(), createBlock(unref(ScalarDropdownButton_default), mergeProps(unref(cx)("flex items-center"), {
23
- is: __props.is,
24
- as: "a"
24
+ is: __props.submenu ? unref(DropdownMenu).SubTrigger : unref(DropdownMenu).Item,
25
+ as: __props.is
25
26
  }), {
26
27
  default: withCtx(() => [__props.icon ? (openBlock(), createBlock(unref(ScalarIconLegacyAdapter_default), {
27
28
  key: 0,
28
- class: normalizeClass([__props.strong ? "text-c-1" : "text-c-2", typeof __props.icon === "string" ? "size-3" : "size-3.5 -mx-0.25"]),
29
+ class: normalizeClass([__props.strong ? "text-c-1" : "text-c-2", typeof __props.icon === "string" ? "size-3" : "size-3.5 -mx-px"]),
29
30
  icon: __props.icon,
30
31
  thickness: __props.strong ? "2.5" : "2",
31
32
  weight: __props.strong ? "bold" : "regular"
@@ -36,7 +37,7 @@ var ScalarMenuLink_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
36
37
  "weight"
37
38
  ])) : (openBlock(), createElementBlock("div", _hoisted_1)), createElementVNode("div", { class: normalizeClass(["flex items-center flex-1 min-w-0 truncate", __props.strong ? "font-medium" : "font-normal"]) }, [renderSlot(_ctx.$slots, "default")], 2)]),
38
39
  _: 3
39
- }, 16, ["is"]);
40
+ }, 16, ["is", "as"]);
40
41
  };
41
42
  }
42
43
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMenuLink.vue.script.js","names":[],"sources":["../../../src/components/ScalarMenu/ScalarMenuLink.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Menu Link component\n *\n * A menu item that renders as a link with an optional icon.\n * Used within ScalarMenu sections.\n *\n * @example\n * <ScalarMenuLink href=\"https://example.com\" :icon=\"ScalarIconBook\">\n * Documentation\n * </ScalarMenuLink>\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { ScalarIconComponent } from '@scalar/icons/types'\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport { DropdownMenu } from 'radix-vue/namespaced'\nimport type { Component } from 'vue'\n\nimport { ScalarDropdownButton } from '../ScalarDropdown'\nimport { type Icon, ScalarIconLegacyAdapter } from '../ScalarIcon'\n\nconst { is = DropdownMenu.Item } = defineProps<{\n is?: string | Component\n icon?: Icon | ScalarIconComponent\n strong?: boolean\n}>()\n\nconst { cx } = useBindCx()\ndefineOptions({ inheritAttrs: false })\n</script>\n<template>\n <ScalarDropdownButton\n v-bind=\"cx('flex items-center')\"\n :is=\"is\"\n as=\"a\">\n <ScalarIconLegacyAdapter\n v-if=\"icon\"\n :class=\"[\n strong ? 'text-c-1' : 'text-c-2',\n typeof icon === 'string' ? 'size-3' : 'size-3.5 -mx-0.25',\n ]\"\n :icon=\"icon\"\n :thickness=\"strong ? '2.5' : '2'\"\n :weight=\"strong ? 'bold' : 'regular'\" />\n <div\n v-else\n class=\"size-3\" />\n <div\n class=\"flex items-center flex-1 min-w-0 truncate\"\n :class=\"strong ? 'font-medium' : 'font-normal'\">\n <slot />\n </div>\n </ScalarDropdownButton>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;EA8BA,MAAM,EAAE,OAAO,WAAU;;uBAIvB,YAqBuB,MAAA,6BAAA,EArBvB,WACU,MAoBa,GApBX,CAAA,oBAAA,EAAA;IACT,IAAI,QAAA;IACL,IAAG;;2BASuC,CAPlC,QAAA,QAAA,WAAA,EADR,YAQ0C,MAAA,gCAAA,EAAA;;KANvC,OAAK,eAAA,CAAY,QAAA,SAAM,aAAA,YAAA,OAA2C,QAAA,SAAI,WAAA,WAAA,oBAAA,CAAA;KAItE,MAAM,QAAA;KACN,WAAW,QAAA,SAAM,QAAA;KACjB,QAAQ,QAAA,SAAM,SAAA;;;;;;wBACjB,mBAEmB,OAFnB,WAEmB,GACnB,mBAIM,OAAA,EAHJ,OAAK,eAAA,CAAC,6CACE,QAAA,SAAM,gBAAA,cAAA,CAAA,EAAA,EAAA,CACd,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"ScalarMenuLink.vue.script.js","names":[],"sources":["../../../src/components/ScalarMenu/ScalarMenuLink.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Menu Link component\n *\n * A menu item that renders as a link with an optional icon.\n * Used within ScalarMenu sections.\n *\n * @example\n * <ScalarMenuLink href=\"https://example.com\" :icon=\"ScalarIconBook\">\n * Documentation\n * </ScalarMenuLink>\n */\nexport default {}\n</script>\n\n<script setup lang=\"ts\">\nimport type { ScalarIconComponent } from '@scalar/icons/types'\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport { DropdownMenu } from 'radix-vue/namespaced'\nimport type { Component } from 'vue'\n\nimport { ScalarDropdownButton } from '../ScalarDropdown'\nimport { type Icon, ScalarIconLegacyAdapter } from '../ScalarIcon'\n\nconst { is = 'a' } = defineProps<{\n is?: string | Component\n icon?: Icon | ScalarIconComponent\n strong?: boolean\n submenu?: boolean\n}>()\n\nconst { cx } = useBindCx()\ndefineOptions({ inheritAttrs: false })\n</script>\n<template>\n <ScalarDropdownButton\n v-bind=\"cx('flex items-center')\"\n :is=\"submenu ? DropdownMenu.SubTrigger : DropdownMenu.Item\"\n :as=\"is\">\n <ScalarIconLegacyAdapter\n v-if=\"icon\"\n :class=\"[\n strong ? 'text-c-1' : 'text-c-2',\n typeof icon === 'string' ? 'size-3' : 'size-3.5 -mx-px',\n ]\"\n :icon=\"icon\"\n :thickness=\"strong ? '2.5' : '2'\"\n :weight=\"strong ? 'bold' : 'regular'\" />\n <div\n v-else\n class=\"size-3\" />\n <div\n class=\"flex items-center flex-1 min-w-0 truncate\"\n :class=\"strong ? 'font-medium' : 'font-normal'\">\n <slot />\n </div>\n </ScalarDropdownButton>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;EA+BA,MAAM,EAAE,OAAO,WAAU;;uBAIvB,YAqBuB,MAAA,6BAAA,EArBvB,WACU,MAoBa,GApBX,CAAA,oBAAA,EAAA;IACT,IAAI,QAAA,UAAU,MAAA,aAAY,CAAC,aAAa,MAAA,aAAY,CAAC;IACrD,IAAI,QAAA;;2BASqC,CAPlC,QAAA,QAAA,WAAA,EADR,YAQ0C,MAAA,gCAAA,EAAA;;KANvC,OAAK,eAAA,CAAY,QAAA,SAAM,aAAA,YAAA,OAA2C,QAAA,SAAI,WAAA,WAAA,kBAAA,CAAA;KAItE,MAAM,QAAA;KACN,WAAW,QAAA,SAAM,QAAA;KACjB,QAAQ,QAAA,SAAM,SAAA;;;;;;wBACjB,mBAEmB,OAFnB,WAEmB,GACnB,mBAIM,OAAA,EAHJ,OAAK,eAAA,CAAC,6CACE,QAAA,SAAM,gBAAA,cAAA,CAAA,EAAA,EAAA,CACd,WAAQ,KAAA,QAAA,UAAA,CAAA,EAAA,EAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMenuTeamPicker.vue.js","names":[],"sources":["../../../src/components/ScalarMenu/ScalarMenuTeamPicker.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Menu Team Picker component\n *\n * A sub-menu within ScalarMenu that lets users switch between teams\n * or create a new team.\n *\n * @example\n * <ScalarMenuTeamPicker :teams=\"teams\" :team=\"currentTeam\" @update:team=\"setTeam\" />\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport {\n ScalarIconCaretRight,\n ScalarIconPlus,\n ScalarIconUserSwitch,\n} from '@scalar/icons'\nimport { DropdownMenu } from 'radix-vue/namespaced'\nimport { computed } from 'vue'\n\nimport {\n ScalarDropdownButton,\n ScalarDropdownMenu,\n ScalarListboxCheckbox,\n} from '../..'\nimport { ScalarMenuLink, type ScalarMenuTeamOption } from './'\nimport ScalarMenuTeamProfile from './ScalarMenuTeamProfile.vue'\n\nconst props = defineProps<{\n /** The currently selected team */\n team?: ScalarMenuTeamOption | undefined\n /** The list of teams to choose from */\n teams: ScalarMenuTeamOption[]\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the selected team changes */\n (e: 'update:team', value: ScalarMenuTeamOption | undefined): void\n /** Emitted when the user clicks the \"Create new team\" button */\n (e: 'add'): void\n}>()\n\n/** A model that tracks the team id */\nconst model = computed<string | undefined>({\n get: () => props.team?.id,\n set: (v) =>\n emit(\n 'update:team',\n props.teams.find((t) => t.id === v),\n ),\n})\n\ndefineOptions({ inheritAttrs: false })\n</script>\n<template>\n <DropdownMenu.Sub>\n <ScalarMenuLink\n :is=\"DropdownMenu.SubTrigger\"\n :icon=\"ScalarIconUserSwitch\"\n v-bind=\"$attrs\">\n <div>Change team</div>\n <ScalarIconCaretRight\n class=\"ml-auto text-c-2 -mr-0.25 size-3\"\n weight=\"bold\" />\n </ScalarMenuLink>\n <DropdownMenu.Portal>\n <DropdownMenu.SubContent\n :as=\"ScalarDropdownMenu\"\n class=\"max-h-radix-popper z-context-plus\"\n :sideOffset=\"3\">\n <DropdownMenu.RadioGroup\n v-model=\"model\"\n class=\"contents\">\n <DropdownMenu.RadioItem\n v-for=\"t in teams\"\n :key=\"t.id\"\n :as=\"ScalarDropdownButton\"\n class=\"group/item flex items-center\"\n :value=\"t.id\">\n <ScalarMenuTeamProfile\n class=\"-ml-0.75 flex-1 min-w-0\"\n :label=\"t.label\"\n :src=\"t.src\" />\n <ScalarListboxCheckbox\n class=\"ml-auto\"\n :selected=\"t.id === model\" />\n </DropdownMenu.RadioItem>\n </DropdownMenu.RadioGroup>\n <DropdownMenu.Item\n :as=\"ScalarDropdownButton\"\n class=\"flex items-center\"\n @click=\"emit('add')\">\n <ScalarIconPlus\n class=\"bg-b-3 -ml-0.75 rounded p-1 size-5 text-c-3\"\n weight=\"bold\" />\n Create new team\n </DropdownMenu.Item>\n </DropdownMenu.SubContent>\n </DropdownMenu.Portal>\n </DropdownMenu.Sub>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ScalarMenuTeamPicker.vue.js","names":[],"sources":["../../../src/components/ScalarMenu/ScalarMenuTeamPicker.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Menu Team Picker component\n *\n * A sub-menu within ScalarMenu that lets users switch between teams\n * or create a new team.\n *\n * @example\n * <ScalarMenuTeamPicker :teams=\"teams\" :team=\"currentTeam\" @update:team=\"setTeam\" />\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport {\n ScalarIconCaretRight,\n ScalarIconPlus,\n ScalarIconUserSwitch,\n} from '@scalar/icons'\nimport { DropdownMenu } from 'radix-vue/namespaced'\nimport { computed } from 'vue'\n\nimport {\n ScalarDropdownButton,\n ScalarDropdownMenu,\n ScalarListboxCheckbox,\n} from '../..'\nimport { ScalarMenuLink, type ScalarMenuTeamOption } from './'\nimport ScalarMenuTeamProfile from './ScalarMenuTeamProfile.vue'\n\nconst props = defineProps<{\n /** The currently selected team */\n team?: ScalarMenuTeamOption | undefined\n /** The list of teams to choose from */\n teams: ScalarMenuTeamOption[]\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the selected team changes */\n (e: 'update:team', value: ScalarMenuTeamOption | undefined): void\n /** Emitted when the user clicks the \"Create new team\" button */\n (e: 'add'): void\n}>()\n\n/** A model that tracks the team id */\nconst model = computed<string | undefined>({\n get: () => props.team?.id,\n set: (v) =>\n emit(\n 'update:team',\n props.teams.find((t) => t.id === v),\n ),\n})\n\ndefineOptions({ inheritAttrs: false })\n</script>\n<template>\n <DropdownMenu.Sub>\n <ScalarMenuLink\n :icon=\"ScalarIconUserSwitch\"\n submenu\n v-bind=\"$attrs\">\n <div>Change team</div>\n <ScalarIconCaretRight\n class=\"ml-auto text-c-2 -mr-px size-3\"\n weight=\"bold\" />\n </ScalarMenuLink>\n <DropdownMenu.Portal>\n <DropdownMenu.SubContent\n :as=\"ScalarDropdownMenu\"\n class=\"max-h-radix-popper z-context-plus\"\n :sideOffset=\"3\">\n <DropdownMenu.RadioGroup\n v-model=\"model\"\n class=\"contents\">\n <DropdownMenu.RadioItem\n v-for=\"t in teams\"\n :key=\"t.id\"\n :as=\"ScalarDropdownButton\"\n class=\"group/item flex items-center\"\n :value=\"t.id\">\n <ScalarMenuTeamProfile\n class=\"-ml-0.75 flex-1 min-w-0\"\n :label=\"t.label\"\n :src=\"t.src\" />\n <ScalarListboxCheckbox\n class=\"ml-auto\"\n :selected=\"t.id === model\" />\n </DropdownMenu.RadioItem>\n </DropdownMenu.RadioGroup>\n <DropdownMenu.Item\n :as=\"ScalarDropdownButton\"\n class=\"flex items-center\"\n @click=\"emit('add')\">\n <ScalarIconPlus\n class=\"bg-b-3 -ml-0.75 rounded p-1 size-5 text-c-3\"\n weight=\"bold\" />\n Create new team\n </DropdownMenu.Item>\n </DropdownMenu.SubContent>\n </DropdownMenu.Portal>\n </DropdownMenu.Sub>\n</template>\n"],"mappings":""}
@@ -25,15 +25,15 @@ var ScalarMenuTeamPicker_vue_vue_type_script_setup_true_lang_default = /* @__PUR
25
25
  return (_ctx, _cache) => {
26
26
  return openBlock(), createBlock(unref(DropdownMenu).Sub, null, {
27
27
  default: withCtx(() => [createVNode(unref(ScalarMenuLink_default), mergeProps({
28
- is: unref(DropdownMenu).SubTrigger,
29
- icon: unref(ScalarIconUserSwitch)
28
+ icon: unref(ScalarIconUserSwitch),
29
+ submenu: ""
30
30
  }, _ctx.$attrs), {
31
31
  default: withCtx(() => [_cache[2] || (_cache[2] = createElementVNode("div", null, "Change team", -1)), createVNode(unref(ScalarIconCaretRight), {
32
- class: "ml-auto text-c-2 -mr-0.25 size-3",
32
+ class: "ml-auto text-c-2 -mr-px size-3",
33
33
  weight: "bold"
34
34
  })]),
35
35
  _: 1
36
- }, 16, ["is", "icon"]), createVNode(unref(DropdownMenu).Portal, null, {
36
+ }, 16, ["icon"]), createVNode(unref(DropdownMenu).Portal, null, {
37
37
  default: withCtx(() => [createVNode(unref(DropdownMenu).SubContent, {
38
38
  as: unref(ScalarDropdownMenu_default),
39
39
  class: "max-h-radix-popper z-context-plus",
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMenuTeamPicker.vue.script.js","names":["$attrs"],"sources":["../../../src/components/ScalarMenu/ScalarMenuTeamPicker.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Menu Team Picker component\n *\n * A sub-menu within ScalarMenu that lets users switch between teams\n * or create a new team.\n *\n * @example\n * <ScalarMenuTeamPicker :teams=\"teams\" :team=\"currentTeam\" @update:team=\"setTeam\" />\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport {\n ScalarIconCaretRight,\n ScalarIconPlus,\n ScalarIconUserSwitch,\n} from '@scalar/icons'\nimport { DropdownMenu } from 'radix-vue/namespaced'\nimport { computed } from 'vue'\n\nimport {\n ScalarDropdownButton,\n ScalarDropdownMenu,\n ScalarListboxCheckbox,\n} from '../..'\nimport { ScalarMenuLink, type ScalarMenuTeamOption } from './'\nimport ScalarMenuTeamProfile from './ScalarMenuTeamProfile.vue'\n\nconst props = defineProps<{\n /** The currently selected team */\n team?: ScalarMenuTeamOption | undefined\n /** The list of teams to choose from */\n teams: ScalarMenuTeamOption[]\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the selected team changes */\n (e: 'update:team', value: ScalarMenuTeamOption | undefined): void\n /** Emitted when the user clicks the \"Create new team\" button */\n (e: 'add'): void\n}>()\n\n/** A model that tracks the team id */\nconst model = computed<string | undefined>({\n get: () => props.team?.id,\n set: (v) =>\n emit(\n 'update:team',\n props.teams.find((t) => t.id === v),\n ),\n})\n\ndefineOptions({ inheritAttrs: false })\n</script>\n<template>\n <DropdownMenu.Sub>\n <ScalarMenuLink\n :is=\"DropdownMenu.SubTrigger\"\n :icon=\"ScalarIconUserSwitch\"\n v-bind=\"$attrs\">\n <div>Change team</div>\n <ScalarIconCaretRight\n class=\"ml-auto text-c-2 -mr-0.25 size-3\"\n weight=\"bold\" />\n </ScalarMenuLink>\n <DropdownMenu.Portal>\n <DropdownMenu.SubContent\n :as=\"ScalarDropdownMenu\"\n class=\"max-h-radix-popper z-context-plus\"\n :sideOffset=\"3\">\n <DropdownMenu.RadioGroup\n v-model=\"model\"\n class=\"contents\">\n <DropdownMenu.RadioItem\n v-for=\"t in teams\"\n :key=\"t.id\"\n :as=\"ScalarDropdownButton\"\n class=\"group/item flex items-center\"\n :value=\"t.id\">\n <ScalarMenuTeamProfile\n class=\"-ml-0.75 flex-1 min-w-0\"\n :label=\"t.label\"\n :src=\"t.src\" />\n <ScalarListboxCheckbox\n class=\"ml-auto\"\n :selected=\"t.id === model\" />\n </DropdownMenu.RadioItem>\n </DropdownMenu.RadioGroup>\n <DropdownMenu.Item\n :as=\"ScalarDropdownButton\"\n class=\"flex items-center\"\n @click=\"emit('add')\">\n <ScalarIconPlus\n class=\"bg-b-3 -ml-0.75 rounded p-1 size-5 text-c-3\"\n weight=\"bold\" />\n Create new team\n </DropdownMenu.Item>\n </DropdownMenu.SubContent>\n </DropdownMenu.Portal>\n </DropdownMenu.Sub>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;EA6BA,MAAM,QAAQ;EAOd,MAAM,OAAO;;EAQb,MAAM,QAAQ,SAA6B;GACzC,WAAW,MAAM,MAAM;GACvB,MAAM,MACJ,KACE,eACA,MAAM,MAAM,MAAM,MAAM,EAAE,OAAO,EAAE,CACpC;GACJ,CAAA;;uBAKC,YA4CmB,MAAA,aAAA,CAAA,KAAA,MAAA;2BAnCA,CARjB,YAQiB,MAAA,uBAAA,EARjB,WAQiB;KAPd,IAAI,MAAA,aAAY,CAAC;KACjB,MAAM,MAAA,qBAAoB;OACnBA,KAAAA,OAAM,EAAA;4BACQ,CAAA,OAAA,OAAA,OAAA,KAAtB,mBAAsB,OAAA,MAAjB,eAAW,GAAA,GAChB,YAEkB,MAAA,qBAAA,EAAA;MADhB,OAAM;MACN,QAAO;;;4BAEX,YAiCsB,MAAA,aAAA,CAAA,QAAA,MAAA;4BADM,CA/B1B,YA+B0B,MAAA,aAAA,CAAA,YAAA;MA9BvB,IAAI,MAAA,2BAAkB;MACvB,OAAM;MACL,YAAY;;6BAkBa,CAjB1B,YAiB0B,MAAA,aAAA,CAAA,YAAA;mBAhBf,MAAA;0EAAK,QAAA;OACd,OAAM;;8BAEc,EAAA,UAAA,KAAA,EADpB,mBAayB,UAAA,MAAA,WAZX,QAAA,QAAL,MAAC;4BADV,YAayB,MAAA,aAAA,CAAA,WAAA;SAXtB,KAAK,EAAE;SACP,IAAI,MAAA,6BAAoB;SACzB,OAAM;SACL,OAAO,EAAE;;gCAIO,CAHjB,YAGiB,+BAAA;UAFf,OAAM;UACL,OAAO,EAAE;UACT,KAAK,EAAE;wCACV,YAE+B,MAAA,8BAAA,EAAA;UAD7B,OAAM;UACL,UAAU,EAAE,OAAO,MAAA;;;;;;6BAG1B,YAQoB,MAAA,aAAA,CAAA,MAAA;OAPjB,IAAI,MAAA,6BAAoB;OACzB,OAAM;OACL,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,MAAA;;8BAGM,CAFlB,YAEkB,MAAA,eAAA,EAAA;QADhB,OAAM;QACN,QAAO;qDAAS,qBAEpB,GAAA,EAAA,CAAA"}
1
+ {"version":3,"file":"ScalarMenuTeamPicker.vue.script.js","names":["$attrs"],"sources":["../../../src/components/ScalarMenu/ScalarMenuTeamPicker.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Menu Team Picker component\n *\n * A sub-menu within ScalarMenu that lets users switch between teams\n * or create a new team.\n *\n * @example\n * <ScalarMenuTeamPicker :teams=\"teams\" :team=\"currentTeam\" @update:team=\"setTeam\" />\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport {\n ScalarIconCaretRight,\n ScalarIconPlus,\n ScalarIconUserSwitch,\n} from '@scalar/icons'\nimport { DropdownMenu } from 'radix-vue/namespaced'\nimport { computed } from 'vue'\n\nimport {\n ScalarDropdownButton,\n ScalarDropdownMenu,\n ScalarListboxCheckbox,\n} from '../..'\nimport { ScalarMenuLink, type ScalarMenuTeamOption } from './'\nimport ScalarMenuTeamProfile from './ScalarMenuTeamProfile.vue'\n\nconst props = defineProps<{\n /** The currently selected team */\n team?: ScalarMenuTeamOption | undefined\n /** The list of teams to choose from */\n teams: ScalarMenuTeamOption[]\n}>()\n\nconst emit = defineEmits<{\n /** Emitted when the selected team changes */\n (e: 'update:team', value: ScalarMenuTeamOption | undefined): void\n /** Emitted when the user clicks the \"Create new team\" button */\n (e: 'add'): void\n}>()\n\n/** A model that tracks the team id */\nconst model = computed<string | undefined>({\n get: () => props.team?.id,\n set: (v) =>\n emit(\n 'update:team',\n props.teams.find((t) => t.id === v),\n ),\n})\n\ndefineOptions({ inheritAttrs: false })\n</script>\n<template>\n <DropdownMenu.Sub>\n <ScalarMenuLink\n :icon=\"ScalarIconUserSwitch\"\n submenu\n v-bind=\"$attrs\">\n <div>Change team</div>\n <ScalarIconCaretRight\n class=\"ml-auto text-c-2 -mr-px size-3\"\n weight=\"bold\" />\n </ScalarMenuLink>\n <DropdownMenu.Portal>\n <DropdownMenu.SubContent\n :as=\"ScalarDropdownMenu\"\n class=\"max-h-radix-popper z-context-plus\"\n :sideOffset=\"3\">\n <DropdownMenu.RadioGroup\n v-model=\"model\"\n class=\"contents\">\n <DropdownMenu.RadioItem\n v-for=\"t in teams\"\n :key=\"t.id\"\n :as=\"ScalarDropdownButton\"\n class=\"group/item flex items-center\"\n :value=\"t.id\">\n <ScalarMenuTeamProfile\n class=\"-ml-0.75 flex-1 min-w-0\"\n :label=\"t.label\"\n :src=\"t.src\" />\n <ScalarListboxCheckbox\n class=\"ml-auto\"\n :selected=\"t.id === model\" />\n </DropdownMenu.RadioItem>\n </DropdownMenu.RadioGroup>\n <DropdownMenu.Item\n :as=\"ScalarDropdownButton\"\n class=\"flex items-center\"\n @click=\"emit('add')\">\n <ScalarIconPlus\n class=\"bg-b-3 -ml-0.75 rounded p-1 size-5 text-c-3\"\n weight=\"bold\" />\n Create new team\n </DropdownMenu.Item>\n </DropdownMenu.SubContent>\n </DropdownMenu.Portal>\n </DropdownMenu.Sub>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;EA6BA,MAAM,QAAQ;EAOd,MAAM,OAAO;;EAQb,MAAM,QAAQ,SAA6B;GACzC,WAAW,MAAM,MAAM;GACvB,MAAM,MACJ,KACE,eACA,MAAM,MAAM,MAAM,MAAM,EAAE,OAAO,EAAE,CACpC;GACJ,CAAA;;uBAKC,YA4CmB,MAAA,aAAA,CAAA,KAAA,MAAA;2BAnCA,CARjB,YAQiB,MAAA,uBAAA,EARjB,WAQiB;KAPd,MAAM,MAAA,qBAAoB;KAC3B,SAAA;OACQA,KAAAA,OAAM,EAAA;4BACQ,CAAA,OAAA,OAAA,OAAA,KAAtB,mBAAsB,OAAA,MAAjB,eAAW,GAAA,GAChB,YAEkB,MAAA,qBAAA,EAAA;MADhB,OAAM;MACN,QAAO;;;sBAEX,YAiCsB,MAAA,aAAA,CAAA,QAAA,MAAA;4BADM,CA/B1B,YA+B0B,MAAA,aAAA,CAAA,YAAA;MA9BvB,IAAI,MAAA,2BAAkB;MACvB,OAAM;MACL,YAAY;;6BAkBa,CAjB1B,YAiB0B,MAAA,aAAA,CAAA,YAAA;mBAhBf,MAAA;0EAAK,QAAA;OACd,OAAM;;8BAEc,EAAA,UAAA,KAAA,EADpB,mBAayB,UAAA,MAAA,WAZX,QAAA,QAAL,MAAC;4BADV,YAayB,MAAA,aAAA,CAAA,WAAA;SAXtB,KAAK,EAAE;SACP,IAAI,MAAA,6BAAoB;SACzB,OAAM;SACL,OAAO,EAAE;;gCAIO,CAHjB,YAGiB,+BAAA;UAFf,OAAM;UACL,OAAO,EAAE;UACT,KAAK,EAAE;wCACV,YAE+B,MAAA,8BAAA,EAAA;UAD7B,OAAM;UACL,UAAU,EAAE,OAAO,MAAA;;;;;;6BAG1B,YAQoB,MAAA,aAAA,CAAA,MAAA;OAPjB,IAAI,MAAA,6BAAoB;OACzB,OAAM;OACL,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,MAAA;;8BAGM,CAFlB,YAEkB,MAAA,eAAA,EAAA;QADhB,OAAM;QACN,QAAO;qDAAS,qBAEpB,GAAA,EAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMenuWorkspacePicker.vue.js","names":[],"sources":["../../../src/components/ScalarMenu/ScalarMenuWorkspacePicker.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Menu Workspace Picker component\n *\n * A sub-menu within ScalarMenu that lets users switch between\n * workspaces or create a new one.\n *\n * @example\n * <ScalarMenuWorkspacePicker v-model=\"workspaceId\" :workspaceOptions=\"groups\" />\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport {\n ScalarIconCaretRight,\n ScalarIconPlus,\n ScalarIconSwap,\n} from '@scalar/icons'\nimport { DropdownMenu } from 'radix-vue/namespaced'\n\nimport { ScalarDropdownButton, ScalarDropdownMenu } from '../ScalarDropdown'\nimport {\n ScalarListboxCheckbox,\n type ScalarListboxOption,\n} from '../ScalarListbox'\nimport ScalarMenuLink from './ScalarMenuLink.vue'\n\nexport type WorkspaceGroup = {\n /** Label for the group */\n label?: string\n /** Options within the group */\n options: ScalarListboxOption[]\n}\n\nconst { workspaceOptions } = defineProps<{\n /** The list of workspaces to choose from */\n workspaceOptions: WorkspaceGroup[]\n}>()\n\nconst emit = defineEmits<{\n /** Create a new workspace */\n (e: 'createWorkspace'): void\n}>()\n\nconst model = defineModel<string | undefined>()\n\ndefineOptions({ inheritAttrs: false })\n</script>\n<template>\n <DropdownMenu.Sub>\n <ScalarMenuLink\n :is=\"DropdownMenu.SubTrigger\"\n :icon=\"ScalarIconSwap\"\n v-bind=\"$attrs\">\n <div>Change workspace</div>\n <ScalarIconCaretRight\n class=\"ml-auto text-c-2 -mr-0.25 size-3\"\n weight=\"bold\" />\n </ScalarMenuLink>\n\n <DropdownMenu.Portal>\n <DropdownMenu.SubContent\n :as=\"ScalarDropdownMenu\"\n class=\"max-h-radix-popper z-context-plus\"\n :sideOffset=\"3\">\n <DropdownMenu.RadioGroup\n v-model=\"model\"\n class=\"contents\">\n <template\n v-for=\"(group, groupIndex) in workspaceOptions\"\n :key=\"groupIndex\">\n <!-- Group label (only shown if there's a label) -->\n <DropdownMenu.Label\n v-if=\"group.label\"\n class=\"px-3 py-1.5 text-xs font-medium text-c-3 select-none\">\n {{ group.label }}\n </DropdownMenu.Label>\n\n <!-- Group items -->\n <DropdownMenu.RadioItem\n v-for=\"w in group.options\"\n :key=\"w.id\"\n :as=\"ScalarDropdownButton\"\n class=\"group/item flex items-center\"\n :value=\"w.id\">\n <div class=\"flex h-full items-center gap-1 flex-1 truncate\">\n {{ w.label }}\n </div>\n <ScalarListboxCheckbox\n class=\"ml-auto\"\n :selected=\"w.id === model\" />\n </DropdownMenu.RadioItem>\n\n <!-- Group separator (only between groups, not after the last one) -->\n <DropdownMenu.Separator\n v-if=\"groupIndex < workspaceOptions.length - 1\"\n class=\"h-px bg-b-3 my-1.5\" />\n </template>\n </DropdownMenu.RadioGroup>\n\n <DropdownMenu.Item\n :as=\"ScalarDropdownButton\"\n class=\"flex items-center\"\n @click=\"emit('createWorkspace')\">\n <ScalarIconPlus\n class=\"bg-b-3 -ml-0.75 rounded p-1 size-5 text-c-3\"\n weight=\"bold\" />\n Create workspace\n </DropdownMenu.Item>\n </DropdownMenu.SubContent>\n </DropdownMenu.Portal>\n </DropdownMenu.Sub>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ScalarMenuWorkspacePicker.vue.js","names":[],"sources":["../../../src/components/ScalarMenu/ScalarMenuWorkspacePicker.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Menu Workspace Picker component\n *\n * A sub-menu within ScalarMenu that lets users switch between\n * workspaces or create a new one.\n *\n * @example\n * <ScalarMenuWorkspacePicker v-model=\"workspaceId\" :workspaceOptions=\"groups\" />\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport {\n ScalarIconCaretRight,\n ScalarIconPlus,\n ScalarIconSwap,\n} from '@scalar/icons'\nimport { DropdownMenu } from 'radix-vue/namespaced'\n\nimport { ScalarDropdownButton, ScalarDropdownMenu } from '../ScalarDropdown'\nimport {\n ScalarListboxCheckbox,\n type ScalarListboxOption,\n} from '../ScalarListbox'\nimport ScalarMenuLink from './ScalarMenuLink.vue'\n\nexport type WorkspaceGroup = {\n /** Label for the group */\n label?: string\n /** Options within the group */\n options: ScalarListboxOption[]\n}\n\nconst { workspaceOptions } = defineProps<{\n /** The list of workspaces to choose from */\n workspaceOptions: WorkspaceGroup[]\n}>()\n\nconst emit = defineEmits<{\n /** Create a new workspace */\n (e: 'createWorkspace'): void\n}>()\n\nconst model = defineModel<string | undefined>()\n\ndefineOptions({ inheritAttrs: false })\n</script>\n<template>\n <DropdownMenu.Sub>\n <ScalarMenuLink\n :icon=\"ScalarIconSwap\"\n submenu\n v-bind=\"$attrs\">\n <div>Change workspace</div>\n <ScalarIconCaretRight\n class=\"ml-auto text-c-2 -mr-px size-3\"\n weight=\"bold\" />\n </ScalarMenuLink>\n\n <DropdownMenu.Portal>\n <DropdownMenu.SubContent\n :as=\"ScalarDropdownMenu\"\n class=\"max-h-radix-popper z-context-plus\"\n :sideOffset=\"3\">\n <DropdownMenu.RadioGroup\n v-model=\"model\"\n class=\"contents\">\n <template\n v-for=\"(group, groupIndex) in workspaceOptions\"\n :key=\"groupIndex\">\n <!-- Group label (only shown if there's a label) -->\n <DropdownMenu.Label\n v-if=\"group.label\"\n class=\"px-3 py-1.5 text-xs font-medium text-c-3 select-none\">\n {{ group.label }}\n </DropdownMenu.Label>\n\n <!-- Group items -->\n <DropdownMenu.RadioItem\n v-for=\"w in group.options\"\n :key=\"w.id\"\n :as=\"ScalarDropdownButton\"\n class=\"group/item flex items-center\"\n :value=\"w.id\">\n <div class=\"flex h-full items-center gap-1 flex-1 truncate\">\n {{ w.label }}\n </div>\n <ScalarListboxCheckbox\n class=\"ml-auto\"\n :selected=\"w.id === model\" />\n </DropdownMenu.RadioItem>\n\n <!-- Group separator (only between groups, not after the last one) -->\n <DropdownMenu.Separator\n v-if=\"groupIndex < workspaceOptions.length - 1\"\n class=\"h-px bg-b-3 my-1.5\" />\n </template>\n </DropdownMenu.RadioGroup>\n\n <DropdownMenu.Item\n :as=\"ScalarDropdownButton\"\n class=\"flex items-center\"\n @click=\"emit('createWorkspace')\">\n <ScalarIconPlus\n class=\"bg-b-3 -ml-0.75 rounded p-1 size-5 text-c-3\"\n weight=\"bold\" />\n Create workspace\n </DropdownMenu.Item>\n </DropdownMenu.SubContent>\n </DropdownMenu.Portal>\n </DropdownMenu.Sub>\n</template>\n"],"mappings":""}
@@ -21,15 +21,15 @@ var ScalarMenuWorkspacePicker_vue_vue_type_script_setup_true_lang_default = /* @
21
21
  return (_ctx, _cache) => {
22
22
  return openBlock(), createBlock(unref(DropdownMenu).Sub, null, {
23
23
  default: withCtx(() => [createVNode(ScalarMenuLink_default, mergeProps({
24
- is: unref(DropdownMenu).SubTrigger,
25
- icon: unref(ScalarIconSwap)
24
+ icon: unref(ScalarIconSwap),
25
+ submenu: ""
26
26
  }, _ctx.$attrs), {
27
27
  default: withCtx(() => [_cache[2] || (_cache[2] = createElementVNode("div", null, "Change workspace", -1)), createVNode(unref(ScalarIconCaretRight), {
28
- class: "ml-auto text-c-2 -mr-0.25 size-3",
28
+ class: "ml-auto text-c-2 -mr-px size-3",
29
29
  weight: "bold"
30
30
  })]),
31
31
  _: 1
32
- }, 16, ["is", "icon"]), createVNode(unref(DropdownMenu).Portal, null, {
32
+ }, 16, ["icon"]), createVNode(unref(DropdownMenu).Portal, null, {
33
33
  default: withCtx(() => [createVNode(unref(DropdownMenu).SubContent, {
34
34
  as: unref(ScalarDropdownMenu_default),
35
35
  class: "max-h-radix-popper z-context-plus",
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarMenuWorkspacePicker.vue.script.js","names":["$attrs"],"sources":["../../../src/components/ScalarMenu/ScalarMenuWorkspacePicker.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Menu Workspace Picker component\n *\n * A sub-menu within ScalarMenu that lets users switch between\n * workspaces or create a new one.\n *\n * @example\n * <ScalarMenuWorkspacePicker v-model=\"workspaceId\" :workspaceOptions=\"groups\" />\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport {\n ScalarIconCaretRight,\n ScalarIconPlus,\n ScalarIconSwap,\n} from '@scalar/icons'\nimport { DropdownMenu } from 'radix-vue/namespaced'\n\nimport { ScalarDropdownButton, ScalarDropdownMenu } from '../ScalarDropdown'\nimport {\n ScalarListboxCheckbox,\n type ScalarListboxOption,\n} from '../ScalarListbox'\nimport ScalarMenuLink from './ScalarMenuLink.vue'\n\nexport type WorkspaceGroup = {\n /** Label for the group */\n label?: string\n /** Options within the group */\n options: ScalarListboxOption[]\n}\n\nconst { workspaceOptions } = defineProps<{\n /** The list of workspaces to choose from */\n workspaceOptions: WorkspaceGroup[]\n}>()\n\nconst emit = defineEmits<{\n /** Create a new workspace */\n (e: 'createWorkspace'): void\n}>()\n\nconst model = defineModel<string | undefined>()\n\ndefineOptions({ inheritAttrs: false })\n</script>\n<template>\n <DropdownMenu.Sub>\n <ScalarMenuLink\n :is=\"DropdownMenu.SubTrigger\"\n :icon=\"ScalarIconSwap\"\n v-bind=\"$attrs\">\n <div>Change workspace</div>\n <ScalarIconCaretRight\n class=\"ml-auto text-c-2 -mr-0.25 size-3\"\n weight=\"bold\" />\n </ScalarMenuLink>\n\n <DropdownMenu.Portal>\n <DropdownMenu.SubContent\n :as=\"ScalarDropdownMenu\"\n class=\"max-h-radix-popper z-context-plus\"\n :sideOffset=\"3\">\n <DropdownMenu.RadioGroup\n v-model=\"model\"\n class=\"contents\">\n <template\n v-for=\"(group, groupIndex) in workspaceOptions\"\n :key=\"groupIndex\">\n <!-- Group label (only shown if there's a label) -->\n <DropdownMenu.Label\n v-if=\"group.label\"\n class=\"px-3 py-1.5 text-xs font-medium text-c-3 select-none\">\n {{ group.label }}\n </DropdownMenu.Label>\n\n <!-- Group items -->\n <DropdownMenu.RadioItem\n v-for=\"w in group.options\"\n :key=\"w.id\"\n :as=\"ScalarDropdownButton\"\n class=\"group/item flex items-center\"\n :value=\"w.id\">\n <div class=\"flex h-full items-center gap-1 flex-1 truncate\">\n {{ w.label }}\n </div>\n <ScalarListboxCheckbox\n class=\"ml-auto\"\n :selected=\"w.id === model\" />\n </DropdownMenu.RadioItem>\n\n <!-- Group separator (only between groups, not after the last one) -->\n <DropdownMenu.Separator\n v-if=\"groupIndex < workspaceOptions.length - 1\"\n class=\"h-px bg-b-3 my-1.5\" />\n </template>\n </DropdownMenu.RadioGroup>\n\n <DropdownMenu.Item\n :as=\"ScalarDropdownButton\"\n class=\"flex items-center\"\n @click=\"emit('createWorkspace')\">\n <ScalarIconPlus\n class=\"bg-b-3 -ml-0.75 rounded p-1 size-5 text-c-3\"\n weight=\"bold\" />\n Create workspace\n </DropdownMenu.Item>\n </DropdownMenu.SubContent>\n </DropdownMenu.Portal>\n </DropdownMenu.Sub>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAuCA,MAAM,OAAO;EAKb,MAAM,QAAQ,SAA+B,SAAA,aAAC;;uBAK5C,YA8DmB,MAAA,aAAA,CAAA,KAAA,MAAA;2BArDA,CARjB,YAQiB,wBARjB,WAQiB;KAPd,IAAI,MAAA,aAAY,CAAC;KACjB,MAAM,MAAA,eAAc;OACbA,KAAAA,OAAM,EAAA;4BACa,CAAA,OAAA,OAAA,OAAA,KAA3B,mBAA2B,OAAA,MAAtB,oBAAgB,GAAA,GACrB,YAEkB,MAAA,qBAAA,EAAA;MADhB,OAAM;MACN,QAAO;;;4BAGX,YAkDsB,MAAA,aAAA,CAAA,QAAA,MAAA;4BADM,CAhD1B,YAgD0B,MAAA,aAAA,CAAA,YAAA;MA/CvB,IAAI,MAAA,2BAAkB;MACvB,OAAM;MACL,YAAY;;6BAkCa,CAjC1B,YAiC0B,MAAA,aAAA,CAAA,YAAA;mBAhCf,MAAA;0EAAK,QAAA;OACd,OAAM;;8BAE2C,EAAA,UAAA,KAAA,EADjD,mBA6BW,UAAA,MAAA,WA5BqB,QAAA,mBAAtB,OAAO,eAAU;gEACnB,YAAU,EAAA;SAGR,MAAM,SAAA,WAAA,EADd,YAIqB,MAAA,aAAA,CAAA,OAAA;;UAFnB,OAAM;;iCACW,CAAA,gBAAA,gBAAd,MAAM,MAAK,EAAA,EAAA,CAAA,CAAA;;;2BAIhB,mBAYyB,UAAA,MAAA,WAXX,MAAM,UAAX,MAAC;8BADV,YAYyB,MAAA,aAAA,CAAA,WAAA;WAVtB,KAAK,EAAE;WACP,IAAI,MAAA,6BAAoB;WACzB,OAAM;WACL,OAAO,EAAE;;kCAGJ,CAFN,mBAEM,OAFN,YAEM,gBADD,EAAE,MAAK,EAAA,EAAA,EAEZ,YAE+B,MAAA,8BAAA,EAAA;YAD7B,OAAM;YACL,UAAU,EAAE,OAAO,MAAA;;;;;SAKhB,aAAa,QAAA,iBAAiB,SAAM,KAAA,WAAA,EAD5C,YAE+B,MAAA,aAAA,CAAA,WAAA;;UAA7B,OAAM;;;;;6BAIZ,YAQoB,MAAA,aAAA,CAAA,MAAA;OAPjB,IAAI,MAAA,6BAAoB;OACzB,OAAM;OACL,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,kBAAA;;8BAGM,CAFlB,YAEkB,MAAA,eAAA,EAAA;QADhB,OAAM;QACN,QAAO;qDAAS,sBAEpB,GAAA,EAAA,CAAA"}
1
+ {"version":3,"file":"ScalarMenuWorkspacePicker.vue.script.js","names":["$attrs"],"sources":["../../../src/components/ScalarMenu/ScalarMenuWorkspacePicker.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Menu Workspace Picker component\n *\n * A sub-menu within ScalarMenu that lets users switch between\n * workspaces or create a new one.\n *\n * @example\n * <ScalarMenuWorkspacePicker v-model=\"workspaceId\" :workspaceOptions=\"groups\" />\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport {\n ScalarIconCaretRight,\n ScalarIconPlus,\n ScalarIconSwap,\n} from '@scalar/icons'\nimport { DropdownMenu } from 'radix-vue/namespaced'\n\nimport { ScalarDropdownButton, ScalarDropdownMenu } from '../ScalarDropdown'\nimport {\n ScalarListboxCheckbox,\n type ScalarListboxOption,\n} from '../ScalarListbox'\nimport ScalarMenuLink from './ScalarMenuLink.vue'\n\nexport type WorkspaceGroup = {\n /** Label for the group */\n label?: string\n /** Options within the group */\n options: ScalarListboxOption[]\n}\n\nconst { workspaceOptions } = defineProps<{\n /** The list of workspaces to choose from */\n workspaceOptions: WorkspaceGroup[]\n}>()\n\nconst emit = defineEmits<{\n /** Create a new workspace */\n (e: 'createWorkspace'): void\n}>()\n\nconst model = defineModel<string | undefined>()\n\ndefineOptions({ inheritAttrs: false })\n</script>\n<template>\n <DropdownMenu.Sub>\n <ScalarMenuLink\n :icon=\"ScalarIconSwap\"\n submenu\n v-bind=\"$attrs\">\n <div>Change workspace</div>\n <ScalarIconCaretRight\n class=\"ml-auto text-c-2 -mr-px size-3\"\n weight=\"bold\" />\n </ScalarMenuLink>\n\n <DropdownMenu.Portal>\n <DropdownMenu.SubContent\n :as=\"ScalarDropdownMenu\"\n class=\"max-h-radix-popper z-context-plus\"\n :sideOffset=\"3\">\n <DropdownMenu.RadioGroup\n v-model=\"model\"\n class=\"contents\">\n <template\n v-for=\"(group, groupIndex) in workspaceOptions\"\n :key=\"groupIndex\">\n <!-- Group label (only shown if there's a label) -->\n <DropdownMenu.Label\n v-if=\"group.label\"\n class=\"px-3 py-1.5 text-xs font-medium text-c-3 select-none\">\n {{ group.label }}\n </DropdownMenu.Label>\n\n <!-- Group items -->\n <DropdownMenu.RadioItem\n v-for=\"w in group.options\"\n :key=\"w.id\"\n :as=\"ScalarDropdownButton\"\n class=\"group/item flex items-center\"\n :value=\"w.id\">\n <div class=\"flex h-full items-center gap-1 flex-1 truncate\">\n {{ w.label }}\n </div>\n <ScalarListboxCheckbox\n class=\"ml-auto\"\n :selected=\"w.id === model\" />\n </DropdownMenu.RadioItem>\n\n <!-- Group separator (only between groups, not after the last one) -->\n <DropdownMenu.Separator\n v-if=\"groupIndex < workspaceOptions.length - 1\"\n class=\"h-px bg-b-3 my-1.5\" />\n </template>\n </DropdownMenu.RadioGroup>\n\n <DropdownMenu.Item\n :as=\"ScalarDropdownButton\"\n class=\"flex items-center\"\n @click=\"emit('createWorkspace')\">\n <ScalarIconPlus\n class=\"bg-b-3 -ml-0.75 rounded p-1 size-5 text-c-3\"\n weight=\"bold\" />\n Create workspace\n </DropdownMenu.Item>\n </DropdownMenu.SubContent>\n </DropdownMenu.Portal>\n </DropdownMenu.Sub>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;EAuCA,MAAM,OAAO;EAKb,MAAM,QAAQ,SAA+B,SAAA,aAAC;;uBAK5C,YA8DmB,MAAA,aAAA,CAAA,KAAA,MAAA;2BArDA,CARjB,YAQiB,wBARjB,WAQiB;KAPd,MAAM,MAAA,eAAc;KACrB,SAAA;OACQA,KAAAA,OAAM,EAAA;4BACa,CAAA,OAAA,OAAA,OAAA,KAA3B,mBAA2B,OAAA,MAAtB,oBAAgB,GAAA,GACrB,YAEkB,MAAA,qBAAA,EAAA;MADhB,OAAM;MACN,QAAO;;;sBAGX,YAkDsB,MAAA,aAAA,CAAA,QAAA,MAAA;4BADM,CAhD1B,YAgD0B,MAAA,aAAA,CAAA,YAAA;MA/CvB,IAAI,MAAA,2BAAkB;MACvB,OAAM;MACL,YAAY;;6BAkCa,CAjC1B,YAiC0B,MAAA,aAAA,CAAA,YAAA;mBAhCf,MAAA;0EAAK,QAAA;OACd,OAAM;;8BAE2C,EAAA,UAAA,KAAA,EADjD,mBA6BW,UAAA,MAAA,WA5BqB,QAAA,mBAAtB,OAAO,eAAU;gEACnB,YAAU,EAAA;SAGR,MAAM,SAAA,WAAA,EADd,YAIqB,MAAA,aAAA,CAAA,OAAA;;UAFnB,OAAM;;iCACW,CAAA,gBAAA,gBAAd,MAAM,MAAK,EAAA,EAAA,CAAA,CAAA;;;2BAIhB,mBAYyB,UAAA,MAAA,WAXX,MAAM,UAAX,MAAC;8BADV,YAYyB,MAAA,aAAA,CAAA,WAAA;WAVtB,KAAK,EAAE;WACP,IAAI,MAAA,6BAAoB;WACzB,OAAM;WACL,OAAO,EAAE;;kCAGJ,CAFN,mBAEM,OAFN,YAEM,gBADD,EAAE,MAAK,EAAA,EAAA,EAEZ,YAE+B,MAAA,8BAAA,EAAA;YAD7B,OAAM;YACL,UAAU,EAAE,OAAO,MAAA;;;;;SAKhB,aAAa,QAAA,iBAAiB,SAAM,KAAA,WAAA,EAD5C,YAE+B,MAAA,aAAA,CAAA,WAAA;;UAA7B,OAAM;;;;;6BAIZ,YAQoB,MAAA,aAAA,CAAA,MAAA;OAPjB,IAAI,MAAA,6BAAoB;OACzB,OAAM;OACL,SAAK,OAAA,OAAA,OAAA,MAAA,WAAE,KAAI,kBAAA;;8BAGM,CAFlB,YAEkB,MAAA,eAAA,EAAA;QADhB,OAAM;QACN,QAAO;qDAAS,sBAEpB,GAAA,EAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarSidebarFooter.vue.js","names":[],"sources":["../../../src/components/ScalarSidebar/ScalarSidebarFooter.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Sidebar Footer component\n *\n * A footer for the sidebar, be default it contains a\n * \"Powered by Scalar\" link and a {@link ScalarColorModeToggle} toggle.\n *\n * @example\n * <ScalarSidebarFooter>\n * <!-- Footer content at the top of the footer -->\n * <template #description>\n * <!-- Replaces the Powered by Scalar link -->\n * </template>\n * <template #toggle>\n * <!-- Replaces the color mode toggle -->\n * </template>\n * </ScalarSidebarFooter>\n */\nexport default {}\n</script>\n<script lang=\"ts\" setup>\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\n\nimport { ScalarColorModeToggle } from '../ScalarColorModeToggle'\n\ndefineSlots<{\n /** Footer content at the top of the footer */\n default?(): unknown\n /** Replaces the Powered by Scalar link */\n description?(): unknown\n /** Replaces the color mode toggle */\n toggle?(): unknown\n}>()\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <div v-bind=\"cx('flex flex-col gap-3 p-3 pt-0 border-sidebar-border')\">\n <slot />\n <div class=\"flex items-center\">\n <div class=\"flex-1 min-w-0 flex items-center text-sm text-sidebar-c-2\">\n <slot name=\"description\">\n <a\n class=\"no-underline hover:underline\"\n href=\"https://www.scalar.com\"\n target=\"_blank\">\n Powered by Scalar\n </a>\n </slot>\n </div>\n <slot name=\"toggle\">\n <ScalarColorModeToggle />\n </slot>\n </div>\n </div>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"ScalarSidebarFooter.vue.js","names":[],"sources":["../../../src/components/ScalarSidebar/ScalarSidebarFooter.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Sidebar Footer component\n *\n * A footer for the sidebar, be default it contains a\n * \"Powered by Scalar\" link and a {@link ScalarColorModeToggle} toggle.\n *\n * @example\n * <ScalarSidebarFooter>\n * <!-- Footer content at the top of the footer -->\n * <template #description>\n * <!-- Replaces the Powered by Scalar link -->\n * </template>\n * <template #toggle>\n * <!-- Replaces the color mode toggle -->\n * </template>\n * </ScalarSidebarFooter>\n */\nexport default {}\n</script>\n<script lang=\"ts\" setup>\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\n\nimport { ScalarColorModeToggle } from '../ScalarColorModeToggle'\n\ndefineSlots<{\n /** Footer content at the top of the footer */\n default?(): unknown\n /** Replaces the Powered by Scalar link */\n description?(): unknown\n /** Replaces the color mode toggle */\n toggle?(): unknown\n}>()\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <div v-bind=\"cx('flex flex-col gap-3 px-3 pb-3 border-sidebar-border')\">\n <slot />\n <div class=\"flex items-center\">\n <div class=\"flex-1 min-w-0 flex items-center text-sm text-sidebar-c-2\">\n <slot name=\"description\">\n <a\n class=\"no-underline hover:underline\"\n href=\"https://www.scalar.com\"\n target=\"_blank\">\n Powered by Scalar\n </a>\n </slot>\n </div>\n <slot name=\"toggle\">\n <ScalarColorModeToggle />\n </slot>\n </div>\n </div>\n</template>\n"],"mappings":""}
@@ -10,7 +10,7 @@ var ScalarSidebarFooter_vue_vue_type_script_setup_true_lang_default = /* @__PURE
10
10
  setup(__props) {
11
11
  const { cx } = useBindCx();
12
12
  return (_ctx, _cache) => {
13
- return openBlock(), createElementBlock("div", normalizeProps(guardReactiveProps(unref(cx)("flex flex-col gap-3 p-3 pt-0 border-sidebar-border"))), [renderSlot(_ctx.$slots, "default"), createElementVNode("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "description", {}, () => [_cache[0] || (_cache[0] = createElementVNode("a", {
13
+ return openBlock(), createElementBlock("div", normalizeProps(guardReactiveProps(unref(cx)("flex flex-col gap-3 px-3 pb-3 border-sidebar-border"))), [renderSlot(_ctx.$slots, "default"), createElementVNode("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [renderSlot(_ctx.$slots, "description", {}, () => [_cache[0] || (_cache[0] = createElementVNode("a", {
14
14
  class: "no-underline hover:underline",
15
15
  href: "https://www.scalar.com",
16
16
  target: "_blank"
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarSidebarFooter.vue.script.js","names":[],"sources":["../../../src/components/ScalarSidebar/ScalarSidebarFooter.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Sidebar Footer component\n *\n * A footer for the sidebar, be default it contains a\n * \"Powered by Scalar\" link and a {@link ScalarColorModeToggle} toggle.\n *\n * @example\n * <ScalarSidebarFooter>\n * <!-- Footer content at the top of the footer -->\n * <template #description>\n * <!-- Replaces the Powered by Scalar link -->\n * </template>\n * <template #toggle>\n * <!-- Replaces the color mode toggle -->\n * </template>\n * </ScalarSidebarFooter>\n */\nexport default {}\n</script>\n<script lang=\"ts\" setup>\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\n\nimport { ScalarColorModeToggle } from '../ScalarColorModeToggle'\n\ndefineSlots<{\n /** Footer content at the top of the footer */\n default?(): unknown\n /** Replaces the Powered by Scalar link */\n description?(): unknown\n /** Replaces the color mode toggle */\n toggle?(): unknown\n}>()\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <div v-bind=\"cx('flex flex-col gap-3 p-3 pt-0 border-sidebar-border')\">\n <slot />\n <div class=\"flex items-center\">\n <div class=\"flex-1 min-w-0 flex items-center text-sm text-sidebar-c-2\">\n <slot name=\"description\">\n <a\n class=\"no-underline hover:underline\"\n href=\"https://www.scalar.com\"\n target=\"_blank\">\n Powered by Scalar\n </a>\n </slot>\n </div>\n <slot name=\"toggle\">\n <ScalarColorModeToggle />\n </slot>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;EAmCA,MAAM,EAAE,OAAO,WAAU;;uBAGvB,mBAiBM,OAAA,eAAA,mBAjBO,MAAA,GAAE,CAAA,qDAAA,CAAA,CAAA,EAAA,CACb,WAAQ,KAAA,QAAA,UAAA,EACR,mBAcM,OAdN,YAcM,CAbJ,mBASM,OATN,YASM,CARJ,WAOO,KAAA,QAAA,eAAA,EAAA,QAAA,CAAA,OAAA,OAAA,OAAA,KANL,mBAKI,KAAA;IAJF,OAAM;IACN,MAAK;IACL,QAAO;MAAS,uBAElB,GAAA,EAAA,CAAA,CAAA,CAAA,EAGJ,WAEO,KAAA,QAAA,UAAA,EAAA,QAAA,CADL,YAAyB,MAAA,8BAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,GAAA"}
1
+ {"version":3,"file":"ScalarSidebarFooter.vue.script.js","names":[],"sources":["../../../src/components/ScalarSidebar/ScalarSidebarFooter.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Sidebar Footer component\n *\n * A footer for the sidebar, be default it contains a\n * \"Powered by Scalar\" link and a {@link ScalarColorModeToggle} toggle.\n *\n * @example\n * <ScalarSidebarFooter>\n * <!-- Footer content at the top of the footer -->\n * <template #description>\n * <!-- Replaces the Powered by Scalar link -->\n * </template>\n * <template #toggle>\n * <!-- Replaces the color mode toggle -->\n * </template>\n * </ScalarSidebarFooter>\n */\nexport default {}\n</script>\n<script lang=\"ts\" setup>\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\n\nimport { ScalarColorModeToggle } from '../ScalarColorModeToggle'\n\ndefineSlots<{\n /** Footer content at the top of the footer */\n default?(): unknown\n /** Replaces the Powered by Scalar link */\n description?(): unknown\n /** Replaces the color mode toggle */\n toggle?(): unknown\n}>()\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <div v-bind=\"cx('flex flex-col gap-3 px-3 pb-3 border-sidebar-border')\">\n <slot />\n <div class=\"flex items-center\">\n <div class=\"flex-1 min-w-0 flex items-center text-sm text-sidebar-c-2\">\n <slot name=\"description\">\n <a\n class=\"no-underline hover:underline\"\n href=\"https://www.scalar.com\"\n target=\"_blank\">\n Powered by Scalar\n </a>\n </slot>\n </div>\n <slot name=\"toggle\">\n <ScalarColorModeToggle />\n </slot>\n </div>\n </div>\n</template>\n"],"mappings":";;;;;;;;;;EAmCA,MAAM,EAAE,OAAO,WAAU;;uBAGvB,mBAiBM,OAAA,eAAA,mBAjBO,MAAA,GAAE,CAAA,sDAAA,CAAA,CAAA,EAAA,CACb,WAAQ,KAAA,QAAA,UAAA,EACR,mBAcM,OAdN,YAcM,CAbJ,mBASM,OATN,YASM,CARJ,WAOO,KAAA,QAAA,eAAA,EAAA,QAAA,CAAA,OAAA,OAAA,OAAA,KANL,mBAKI,KAAA;IAJF,OAAM;IACN,MAAK;IACL,QAAO;MAAS,uBAElB,GAAA,EAAA,CAAA,CAAA,CAAA,EAGJ,WAEO,KAAA,QAAA,UAAA,EAAA,QAAA,CADL,YAAyB,MAAA,8BAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,GAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarSidebarItems.vue.js","names":[],"sources":["../../../src/components/ScalarSidebar/ScalarSidebarItems.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Sidebar Items component\n *\n * A base container for ScalarSidebarItem(s), renders as\n * a `<ul>` by default to meet accessibility requirements\n *\n * @example\n * <ScalarSidebarItems>\n * <ScalarSidebarItem>...</ScalarSidebarItem>\n * <ScalarSidebarItem>...</ScalarSidebarItem>\n * <ScalarSidebarItem>...</ScalarSidebarItem>\n * </ScalarSidebarItems>\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport type { Component } from 'vue'\n\nimport { useSidebarNestedItems } from './useSidebarNestedItems'\n\nconst { is = 'ul' } = defineProps<{\n is?: Component | string\n}>()\n\nconst { open } = useSidebarNestedItems()\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <component\n :is=\"is\"\n v-bind=\"\n cx(\n 'group/items relative flex flex-col p-3 gap-px transition-transform duration-300',\n open ? '-translate-x-full' : 'translate-x-0',\n )\n \">\n <slot />\n </component>\n</template>\n<style>\n@reference \"../../style.css\";\n\n/* Hide the buttons from the keyboard when a nested item is open */\n.group\\/items.-translate-x-full .group\\/button {\n /* Required to prevent the button from being focused */\n display: none;\n /* Required to prevent the button from taking up scroll space */\n max-height: 0;\n\n transition-property: display, max-height;\n transition-behavior: allow-discrete;\n transition-duration: 0s;\n transition-delay: 300ms;\n}\n\n/* Show the buttons within a nested item when it is open */\n.group\\/item.group\\/nested-items-open\n > *\n > .group\\/items.translate-x-0\n .group\\/button {\n max-height: calc(infinity * 1px);\n display: flex;\n}\n</style>\n"],"mappings":""}
1
+ {"version":3,"file":"ScalarSidebarItems.vue.js","names":[],"sources":["../../../src/components/ScalarSidebar/ScalarSidebarItems.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Sidebar Items component\n *\n * A base container for ScalarSidebarItem(s), renders as\n * a `<ul>` by default to meet accessibility requirements\n *\n * @example\n * <ScalarSidebarItems>\n * <ScalarSidebarItem>...</ScalarSidebarItem>\n * <ScalarSidebarItem>...</ScalarSidebarItem>\n * <ScalarSidebarItem>...</ScalarSidebarItem>\n * </ScalarSidebarItems>\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport type { Component } from 'vue'\n\nimport { useSidebarNestedItems } from './useSidebarNestedItems'\n\nconst { is = 'ul' } = defineProps<{\n is?: Component | string\n}>()\n\nconst { open } = useSidebarNestedItems()\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <component\n :is=\"is\"\n v-bind=\"\n cx(\n 'group/items relative flex flex-col p-(--scalar-sidebar-padding) gap-px transition-transform duration-300',\n open ? '-translate-x-full' : 'translate-x-0',\n )\n \">\n <slot />\n </component>\n</template>\n<style>\n@reference \"../../style.css\";\n\n/* Hide the buttons from the keyboard when a nested item is open */\n.group\\/items.-translate-x-full .group\\/button {\n /* Required to prevent the button from being focused */\n display: none;\n /* Required to prevent the button from taking up scroll space */\n max-height: 0;\n\n transition-property: display, max-height;\n transition-behavior: allow-discrete;\n transition-duration: 0s;\n transition-delay: 300ms;\n}\n\n/* Show the buttons within a nested item when it is open */\n.group\\/item.group\\/nested-items-open\n > *\n > .group\\/items.translate-x-0\n .group\\/button {\n max-height: calc(infinity * 1px);\n display: flex;\n}\n</style>\n"],"mappings":""}
@@ -9,7 +9,7 @@ var ScalarSidebarItems_vue_vue_type_script_setup_true_lang_default = /* @__PURE_
9
9
  const { open } = useSidebarNestedItems();
10
10
  const { cx } = useBindCx();
11
11
  return (_ctx, _cache) => {
12
- return openBlock(), createBlock(resolveDynamicComponent(__props.is), normalizeProps(guardReactiveProps(unref(cx)("group/items relative flex flex-col p-3 gap-px transition-transform duration-300", unref(open) ? "-translate-x-full" : "translate-x-0"))), {
12
+ return openBlock(), createBlock(resolveDynamicComponent(__props.is), normalizeProps(guardReactiveProps(unref(cx)("group/items relative flex flex-col p-(--scalar-sidebar-padding) gap-px transition-transform duration-300", unref(open) ? "-translate-x-full" : "translate-x-0"))), {
13
13
  default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
14
14
  _: 3
15
15
  }, 16);
@@ -1 +1 @@
1
- {"version":3,"file":"ScalarSidebarItems.vue.script.js","names":[],"sources":["../../../src/components/ScalarSidebar/ScalarSidebarItems.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Sidebar Items component\n *\n * A base container for ScalarSidebarItem(s), renders as\n * a `<ul>` by default to meet accessibility requirements\n *\n * @example\n * <ScalarSidebarItems>\n * <ScalarSidebarItem>...</ScalarSidebarItem>\n * <ScalarSidebarItem>...</ScalarSidebarItem>\n * <ScalarSidebarItem>...</ScalarSidebarItem>\n * </ScalarSidebarItems>\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport type { Component } from 'vue'\n\nimport { useSidebarNestedItems } from './useSidebarNestedItems'\n\nconst { is = 'ul' } = defineProps<{\n is?: Component | string\n}>()\n\nconst { open } = useSidebarNestedItems()\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <component\n :is=\"is\"\n v-bind=\"\n cx(\n 'group/items relative flex flex-col p-3 gap-px transition-transform duration-300',\n open ? '-translate-x-full' : 'translate-x-0',\n )\n \">\n <slot />\n </component>\n</template>\n<style>\n@reference \"../../style.css\";\n\n/* Hide the buttons from the keyboard when a nested item is open */\n.group\\/items.-translate-x-full .group\\/button {\n /* Required to prevent the button from being focused */\n display: none;\n /* Required to prevent the button from taking up scroll space */\n max-height: 0;\n\n transition-property: display, max-height;\n transition-behavior: allow-discrete;\n transition-duration: 0s;\n transition-delay: 300ms;\n}\n\n/* Show the buttons within a nested item when it is open */\n.group\\/item.group\\/nested-items-open\n > *\n > .group\\/items.translate-x-0\n .group\\/button {\n max-height: calc(infinity * 1px);\n display: flex;\n}\n</style>\n"],"mappings":";;;;;;;;EA0BA,MAAM,EAAE,SAAS,uBAAsB;EAGvC,MAAM,EAAE,OAAO,WAAU;;uBAGvB,YASY,wBARL,QAAA,GAAE,EAAA,eAAA,mBACQ,MAAA,GAAE,CAAA,mFAAqG,MAAA,KAAI,GAAA,sBAAA,gBAAA,CAAA,CAAA,EAAA;2BAMlH,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"ScalarSidebarItems.vue.script.js","names":[],"sources":["../../../src/components/ScalarSidebar/ScalarSidebarItems.vue"],"sourcesContent":["<script lang=\"ts\">\n/**\n * Scalar Sidebar Items component\n *\n * A base container for ScalarSidebarItem(s), renders as\n * a `<ul>` by default to meet accessibility requirements\n *\n * @example\n * <ScalarSidebarItems>\n * <ScalarSidebarItem>...</ScalarSidebarItem>\n * <ScalarSidebarItem>...</ScalarSidebarItem>\n * <ScalarSidebarItem>...</ScalarSidebarItem>\n * </ScalarSidebarItems>\n */\nexport default {}\n</script>\n<script setup lang=\"ts\">\nimport { useBindCx } from '@scalar/use-hooks/useBindCx'\nimport type { Component } from 'vue'\n\nimport { useSidebarNestedItems } from './useSidebarNestedItems'\n\nconst { is = 'ul' } = defineProps<{\n is?: Component | string\n}>()\n\nconst { open } = useSidebarNestedItems()\n\ndefineOptions({ inheritAttrs: false })\nconst { cx } = useBindCx()\n</script>\n<template>\n <component\n :is=\"is\"\n v-bind=\"\n cx(\n 'group/items relative flex flex-col p-(--scalar-sidebar-padding) gap-px transition-transform duration-300',\n open ? '-translate-x-full' : 'translate-x-0',\n )\n \">\n <slot />\n </component>\n</template>\n<style>\n@reference \"../../style.css\";\n\n/* Hide the buttons from the keyboard when a nested item is open */\n.group\\/items.-translate-x-full .group\\/button {\n /* Required to prevent the button from being focused */\n display: none;\n /* Required to prevent the button from taking up scroll space */\n max-height: 0;\n\n transition-property: display, max-height;\n transition-behavior: allow-discrete;\n transition-duration: 0s;\n transition-delay: 300ms;\n}\n\n/* Show the buttons within a nested item when it is open */\n.group\\/item.group\\/nested-items-open\n > *\n > .group\\/items.translate-x-0\n .group\\/button {\n max-height: calc(infinity * 1px);\n display: flex;\n}\n</style>\n"],"mappings":";;;;;;;;EA0BA,MAAM,EAAE,SAAS,uBAAsB;EAGvC,MAAM,EAAE,OAAO,WAAU;;uBAGvB,YASY,wBARL,QAAA,GAAE,EAAA,eAAA,mBACQ,MAAA,GAAE,CAAA,4GAA8H,MAAA,KAAI,GAAA,sBAAA,gBAAA,CAAA,CAAA,EAAA;2BAM3I,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA"}