@scalar/components 0.13.49 → 0.13.51

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 (106) hide show
  1. package/README.md +1 -1
  2. package/dist/components/ScalarButton/ScalarButton.vue.d.ts.map +1 -1
  3. package/dist/components/ScalarButton/ScalarButton.vue.js +1 -1
  4. package/dist/components/ScalarButton/variants.js +1 -1
  5. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleButton.vue.d.ts.map +1 -1
  6. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleButton.vue.js +1 -1
  7. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue.d.ts.map +1 -1
  8. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue.js +2 -2
  9. package/dist/components/ScalarColorModeToggle/ScalarColorModeToggleIcon.vue2.js +1 -1
  10. package/dist/components/ScalarCombobox/ScalarComboboxOption.vue.d.ts.map +1 -1
  11. package/dist/components/ScalarCombobox/ScalarComboboxOption.vue.js +1 -1
  12. package/dist/components/ScalarCombobox/ScalarComboboxPopover.vue.d.ts.map +1 -1
  13. package/dist/components/ScalarCombobox/ScalarComboboxPopover.vue.js +1 -1
  14. package/dist/components/ScalarDropdown/ScalarDropdown.vue.js +1 -1
  15. package/dist/components/ScalarDropdown/ScalarDropdownButton.vue.d.ts.map +1 -1
  16. package/dist/components/ScalarDropdown/ScalarDropdownButton.vue.js +2 -2
  17. package/dist/components/ScalarDropdown/ScalarDropdownButton.vue2.js +1 -1
  18. package/dist/components/ScalarDropdown/ScalarDropdownMenu.vue.d.ts.map +1 -1
  19. package/dist/components/ScalarDropdown/ScalarDropdownMenu.vue.js +1 -1
  20. package/dist/components/ScalarFileUpload/ScalarFileUploadDropTarget.vue.d.ts.map +1 -1
  21. package/dist/components/ScalarFileUpload/ScalarFileUploadError.vue.d.ts.map +1 -1
  22. package/dist/components/ScalarFileUpload/ScalarFileUploadInput.vue.d.ts.map +1 -1
  23. package/dist/components/ScalarFileUpload/ScalarFileUploadInputCompact.vue.d.ts.map +1 -1
  24. package/dist/components/ScalarFileUpload/ScalarFileUploadLoading.vue.d.ts.map +1 -1
  25. package/dist/components/ScalarFloating/ScalarFloatingBackdrop.vue.js +1 -1
  26. package/dist/components/ScalarForm/ScalarForm.vue.js +1 -1
  27. package/dist/components/ScalarForm/ScalarFormField.vue.d.ts.map +1 -1
  28. package/dist/components/ScalarForm/ScalarFormField.vue.js +1 -1
  29. package/dist/components/ScalarHeader/ScalarHeader.vue.js +1 -1
  30. package/dist/components/ScalarHeader/ScalarHeaderButton.vue.d.ts.map +1 -1
  31. package/dist/components/ScalarHeader/ScalarHeaderButton.vue.js +6 -7
  32. package/dist/components/ScalarIcon/ScalarIcon.stories.d.ts +8 -8
  33. package/dist/components/ScalarIcon/ScalarIcon.vue.d.ts +1 -1
  34. package/dist/components/ScalarIcon/ScalarIcon.vue.d.ts.map +1 -1
  35. package/dist/components/ScalarIcon/ScalarIcon.vue.js +2 -2
  36. package/dist/components/ScalarIcon/ScalarIcon.vue2.js +10 -11
  37. package/dist/components/ScalarIconButton/ScalarIconButton.stories.d.ts +3 -3
  38. package/dist/components/ScalarIconButton/ScalarIconButton.vue.d.ts +2 -2
  39. package/dist/components/ScalarIconButton/ScalarIconButton.vue.d.ts.map +1 -1
  40. package/dist/components/ScalarIconButton/ScalarIconButton.vue.js +7 -8
  41. package/dist/components/ScalarListbox/ScalarListbox.vue.js +1 -1
  42. package/dist/components/ScalarListbox/ScalarListboxItem.vue.js +1 -1
  43. package/dist/components/ScalarLoading/ScalarLoading.stories.d.ts +8 -8
  44. package/dist/components/ScalarLoading/ScalarLoading.vue.d.ts +2 -2
  45. package/dist/components/ScalarLoading/ScalarLoading.vue.d.ts.map +1 -1
  46. package/dist/components/ScalarLoading/ScalarLoading.vue.js +4 -4
  47. package/dist/components/ScalarLoading/ScalarLoading.vue2.js +22 -23
  48. package/dist/components/ScalarMenu/ScalarMenuProduct.vue.d.ts.map +1 -1
  49. package/dist/components/ScalarMenu/ScalarMenuProduct.vue.js +7 -8
  50. package/dist/components/ScalarMenu/ScalarMenuProducts.vue.d.ts.map +1 -1
  51. package/dist/components/ScalarMenu/ScalarMenuProducts.vue.js +1 -1
  52. package/dist/components/ScalarMenu/ScalarMenuTeamProfile.vue.js +4 -4
  53. package/dist/components/ScalarModal/ScalarModal.stories.d.ts +3 -3
  54. package/dist/components/ScalarModal/ScalarModal.vue.d.ts +2 -2
  55. package/dist/components/ScalarModal/ScalarModal.vue.js +5 -5
  56. package/dist/components/ScalarModal/ScalarModal.vue2.js +1 -1
  57. package/dist/components/ScalarPopover/ScalarPopover.vue.js +1 -1
  58. package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.js +4 -4
  59. package/dist/components/ScalarSearchInput/ScalarSearchInput.vue2.js +1 -1
  60. package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue.d.ts.map +1 -1
  61. package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue.js +16 -16
  62. package/dist/components/ScalarSearchResults/ScalarSearchResultList.vue.js +1 -1
  63. package/dist/components/ScalarSidebar/ScalarSidebar.vue.js +1 -1
  64. package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.d.ts.map +1 -1
  65. package/dist/components/ScalarSidebar/ScalarSidebarButton.vue.js +6 -7
  66. package/dist/components/ScalarSidebar/ScalarSidebarFooter.vue.d.ts.map +1 -1
  67. package/dist/components/ScalarSidebar/ScalarSidebarFooter.vue.js +1 -1
  68. package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.d.ts.map +1 -1
  69. package/dist/components/ScalarSidebar/ScalarSidebarGroup.vue.js +1 -1
  70. package/dist/components/ScalarSidebar/ScalarSidebarGroupToggle.vue.d.ts.map +1 -1
  71. package/dist/components/ScalarSidebar/ScalarSidebarGroupToggle.vue.js +6 -7
  72. package/dist/components/ScalarSidebar/ScalarSidebarIndent.vue.js +3 -3
  73. package/dist/components/ScalarSidebar/ScalarSidebarIndent.vue2.js +1 -1
  74. package/dist/components/ScalarSidebar/ScalarSidebarItems.vue.d.ts.map +1 -1
  75. package/dist/components/ScalarSidebar/ScalarSidebarItems.vue.js +1 -1
  76. package/dist/components/ScalarTextArea/ScalarTextArea.vue.d.ts.map +1 -1
  77. package/dist/components/ScalarTextArea/ScalarTextArea.vue.js +4 -4
  78. package/dist/components/ScalarTextInput/ScalarTextInput.vue.d.ts.map +1 -1
  79. package/dist/components/ScalarTextInput/ScalarTextInput.vue.js +1 -1
  80. package/dist/components/ScalarToggle/ScalarToggle.vue.js +1 -1
  81. package/dist/components/ScalarTooltip/ScalarTooltip.stories.d.ts +24 -0
  82. package/dist/components/ScalarTooltip/ScalarTooltip.stories.d.ts.map +1 -1
  83. package/dist/components/ScalarTooltip/ScalarTooltip.vue.d.ts +2 -0
  84. package/dist/components/ScalarTooltip/ScalarTooltip.vue.d.ts.map +1 -1
  85. package/dist/components/ScalarTooltip/ScalarTooltip.vue.js +30 -19
  86. package/dist/docs/icons/ScalarIcons.stories.d.ts +63 -0
  87. package/dist/docs/icons/ScalarIcons.stories.d.ts.map +1 -0
  88. package/dist/docs/useBindCx/MockComponent.d.ts +76 -0
  89. package/dist/docs/useBindCx/MockComponent.d.ts.map +1 -0
  90. package/dist/{hooks → docs/useBindCx}/useBindCx.stories.d.ts +29 -33
  91. package/dist/{hooks → docs/useBindCx}/useBindCx.stories.d.ts.map +1 -1
  92. package/dist/index.d.ts +1 -2
  93. package/dist/index.d.ts.map +1 -1
  94. package/dist/index.js +130 -131
  95. package/dist/style.css +1 -1
  96. package/package.json +4 -4
  97. package/dist/cva.d.ts +0 -18
  98. package/dist/cva.d.ts.map +0 -1
  99. package/dist/cva.js +0 -19
  100. package/dist/cva.test.d.ts +0 -2
  101. package/dist/cva.test.d.ts.map +0 -1
  102. package/dist/hooks/useBindCx.d.ts +0 -64
  103. package/dist/hooks/useBindCx.d.ts.map +0 -1
  104. package/dist/hooks/useBindCx.js +0 -45
  105. package/dist/hooks/useBindCx.test.d.ts +0 -2
  106. package/dist/hooks/useBindCx.test.d.ts.map +0 -1
package/dist/cva.d.ts DELETED
@@ -1,18 +0,0 @@
1
- /**
2
- * Tailwind Merge Config
3
- *
4
- * By default tailwind merge only knows about the default tailwind classes
5
- * this is because it does not load in the tailwind config at runtime (perf reasons)
6
- * we must specify any custom classes if they are getting overwritten
7
- *
8
- * https://github.com/dcastil/tailwind-merge/blob/v2.0.0/docs/configuration.md#class-groups
9
- */
10
- declare const tw: (...classLists: import("tailwind-merge").ClassNameValue[]) => string;
11
- /**
12
- * CVA Config
13
- *
14
- * https://beta.cva.style/api-reference/#defineconfig
15
- */
16
- declare const cva: import("cva").CVA, cx: import("cva").CX, compose: import("cva").Compose;
17
- export { cva, cx, compose, tw };
18
- //# sourceMappingURL=cva.d.ts.map
package/dist/cva.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"cva.d.ts","sourceRoot":"","sources":["../src/cva.ts"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,QAAA,MAAM,EAAE,sEAMN,CAAA;AAEF;;;;GAIG;AACH,QAAA,MAAQ,GAAG,qBAAE,EAAE,oBAAE,OAAO,uBAItB,CAAA;AAEF,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,CAAA"}
package/dist/cva.js DELETED
@@ -1,19 +0,0 @@
1
- import { defineConfig as e } from "cva";
2
- import { extendTailwindMerge as t } from "tailwind-merge";
3
- const s = t({
4
- extend: {
5
- classGroups: {
6
- "font-size": ["text-3xs", "text-xxs"]
7
- }
8
- }
9
- }), { cva: i, cx: r, compose: c } = e({
10
- hooks: {
11
- onComplete: (o) => s(o)
12
- }
13
- });
14
- export {
15
- c as compose,
16
- i as cva,
17
- r as cx,
18
- s as tw
19
- };
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=cva.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cva.test.d.ts","sourceRoot":"","sources":["../src/cva.test.ts"],"names":[],"mappings":""}
@@ -1,64 +0,0 @@
1
- import type { CXOptions } from 'cva';
2
- /**
3
- * Provides a wrapper around the `cx` function that merges the
4
- * component's class attribute with the provided classes and binds the
5
- * remaining attributes
6
- *
7
- * @see https://beta.cva.style/api-reference#cx
8
- *
9
- * @example
10
- * <script setup>
11
- * import { useBindCx, cva } from '@scalar/components'
12
- *
13
- * defineProps<{ active?: boolean }>()
14
- *
15
- * // Important: disable inheritance of attributes
16
- * defineOptions({ inheritAttrs: false })
17
- *
18
- * const { cx } = useBindCx()
19
- *
20
- * const variants = cva({
21
- * base: 'border rounded p-2 bg-b-1',
22
- * variants: { active: { true: 'bg-b-2' } },
23
- * })
24
- * </script>
25
- * <template>
26
- * <div v-bind="cx(variants({ active }))">MockComponent</div>
27
- * </template>
28
- */
29
- export declare function useBindCx(): {
30
- /**
31
- * Provides a wrapper around the `cx` function that merges the
32
- * component's class attribute with the provided classes and binds the
33
- * remaining attributes
34
- *
35
- * @example
36
- * <script setup>
37
- * ...
38
- * const { cx } = useBindCx()
39
- * </script>
40
- * <template>
41
- * <div v-bind="cx(...)">...</div>
42
- * </template>
43
- */
44
- cx: (...args: CXOptions) => {
45
- /** The merged class attribute */
46
- class: string;
47
- /** The remaining attributes */
48
- [key: string]: any;
49
- };
50
- /**
51
- * Provides a wrapper around the `cx` function that merges the
52
- * component's class attribute with the provided classes and but **does
53
- * not** bind the remaining attributes
54
- */
55
- classCx: (...args: CXOptions) => {
56
- /** The merged class attribute */
57
- class: string;
58
- };
59
- /** The remaining attributes that are not class attributes */
60
- otherAttrs: import("vue").ComputedRef<{
61
- [x: string]: unknown;
62
- }>;
63
- };
64
- //# sourceMappingURL=useBindCx.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useBindCx.d.ts","sourceRoot":"","sources":["../../src/hooks/useBindCx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAKpC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,SAAS;IA4BrB;;;;;;;;;;;;;OAaG;kBAjCoB,SAAS,KAAG;QACnC,iCAAiC;QACjC,KAAK,EAAE,MAAM,CAAA;QACb,+BAA+B;QAC/B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KACnB;IA8BC;;;;OAIG;uBA3BuB,SAAS,KAAG;QACtC,iCAAiC;QACjC,KAAK,EAAE,MAAM,CAAA;KACd;IA0BC,6DAA6D;;;;EAGhE"}
@@ -1,45 +0,0 @@
1
- import { useAttrs as l, computed as r } from "vue";
2
- import { cx as e } from "../cva.js";
3
- function d() {
4
- const c = l(), t = r(() => {
5
- const { class: s, ...a } = c;
6
- return { class: s || "", rest: a };
7
- });
8
- function n(...s) {
9
- return {
10
- class: e(...s, t.value.class),
11
- ...t.value.rest
12
- };
13
- }
14
- function u(...s) {
15
- return { class: e(...s, t.value.class) };
16
- }
17
- return {
18
- /**
19
- * Provides a wrapper around the `cx` function that merges the
20
- * component's class attribute with the provided classes and binds the
21
- * remaining attributes
22
- *
23
- * @example
24
- * <script setup>
25
- * ...
26
- * const { cx } = useBindCx()
27
- * <\/script>
28
- * <template>
29
- * <div v-bind="cx(...)">...</div>
30
- * </template>
31
- */
32
- cx: n,
33
- /**
34
- * Provides a wrapper around the `cx` function that merges the
35
- * component's class attribute with the provided classes and but **does
36
- * not** bind the remaining attributes
37
- */
38
- classCx: u,
39
- /** The remaining attributes that are not class attributes */
40
- otherAttrs: r(() => t.value.rest)
41
- };
42
- }
43
- export {
44
- d as useBindCx
45
- };
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=useBindCx.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useBindCx.test.d.ts","sourceRoot":"","sources":["../../src/hooks/useBindCx.test.ts"],"names":[],"mappings":""}