@scalar/components 0.12.76 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ScalarButton/ScalarButton.stories.d.ts +3 -0
- package/dist/components/ScalarButton/ScalarButton.stories.d.ts.map +1 -1
- package/dist/components/ScalarButton/ScalarButton.test.d.ts +2 -0
- package/dist/components/ScalarButton/ScalarButton.test.d.ts.map +1 -0
- package/dist/components/ScalarButton/ScalarButton.vue.d.ts.map +1 -1
- package/dist/components/ScalarButton/ScalarButton.vue.js +29 -32
- package/dist/components/ScalarCodeBlock/ScalarCodeBlock.test.d.ts +2 -0
- package/dist/components/ScalarCodeBlock/ScalarCodeBlock.test.d.ts.map +1 -0
- package/dist/components/ScalarCombobox/ScalarCombobox.stories.d.ts +30 -5
- package/dist/components/ScalarCombobox/ScalarCombobox.stories.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarCombobox.test.d.ts +2 -0
- package/dist/components/ScalarCombobox/ScalarCombobox.test.d.ts.map +1 -0
- package/dist/components/ScalarCombobox/ScalarCombobox.vue.d.ts +24 -7
- package/dist/components/ScalarCombobox/ScalarCombobox.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarCombobox.vue.js +34 -18
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.d.ts +16 -82
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarComboboxMultiselect.vue.js +23 -22
- package/dist/components/ScalarCombobox/ScalarComboboxOption.vue.d.ts +7 -2
- package/dist/components/ScalarCombobox/ScalarComboboxOption.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarComboboxOption.vue.js +23 -28
- package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.d.ts +25 -1
- package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarComboboxOptions.vue.js +58 -56
- package/dist/components/ScalarCombobox/ScalarComboboxPopover.vue.d.ts +5 -11
- package/dist/components/ScalarCombobox/ScalarComboboxPopover.vue.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/ScalarComboboxPopover.vue.js +43 -43
- package/dist/components/ScalarCombobox/types.d.ts +4 -2
- package/dist/components/ScalarCombobox/types.d.ts.map +1 -1
- package/dist/components/ScalarCombobox/types.js +8 -3
- package/dist/components/ScalarContextMenu/ScalarContextMenu.test.d.ts +2 -0
- package/dist/components/ScalarContextMenu/ScalarContextMenu.test.d.ts.map +1 -0
- package/dist/components/ScalarDropdown/ScalarDropdown.stories.d.ts +73 -105
- package/dist/components/ScalarDropdown/ScalarDropdown.stories.d.ts.map +1 -1
- package/dist/components/ScalarDropdown/ScalarDropdown.test.d.ts +2 -0
- package/dist/components/ScalarDropdown/ScalarDropdown.test.d.ts.map +1 -0
- package/dist/components/ScalarDropdown/ScalarDropdown.vue.d.ts +40 -22
- package/dist/components/ScalarDropdown/ScalarDropdown.vue.d.ts.map +1 -1
- package/dist/components/ScalarDropdown/ScalarDropdown.vue.js +32 -42
- package/dist/components/ScalarDropdown/ScalarDropdownButton.vue.d.ts +35 -0
- package/dist/components/ScalarDropdown/ScalarDropdownButton.vue.d.ts.map +1 -0
- package/dist/components/ScalarDropdown/ScalarDropdownButton.vue.js +7 -0
- package/dist/components/ScalarDropdown/ScalarDropdownButton.vue2.js +37 -0
- package/dist/components/ScalarDropdown/ScalarDropdownDivider.vue.d.ts +17 -1
- package/dist/components/ScalarDropdown/ScalarDropdownDivider.vue.d.ts.map +1 -1
- package/dist/components/ScalarDropdown/ScalarDropdownDivider.vue.js +7 -6
- package/dist/components/ScalarDropdown/ScalarDropdownDivider.vue2.js +4 -0
- package/dist/components/ScalarDropdown/ScalarDropdownItem.vue.d.ts +18 -15
- package/dist/components/ScalarDropdown/ScalarDropdownItem.vue.d.ts.map +1 -1
- package/dist/components/ScalarDropdown/ScalarDropdownItem.vue.js +2 -2
- package/dist/components/ScalarDropdown/ScalarDropdownItem.vue2.js +19 -29
- package/dist/components/ScalarDropdown/ScalarDropdownMenu.vue.d.ts +32 -0
- package/dist/components/ScalarDropdown/ScalarDropdownMenu.vue.d.ts.map +1 -0
- package/dist/components/ScalarDropdown/ScalarDropdownMenu.vue.js +28 -0
- package/dist/components/ScalarDropdown/ScalarDropdownMenu.vue2.js +4 -0
- package/dist/components/ScalarDropdown/index.d.ts +2 -0
- package/dist/components/ScalarDropdown/index.d.ts.map +1 -1
- package/dist/components/ScalarErrorBoundary/ScalarErrorBoundary.stories.d.ts +6 -0
- package/dist/components/ScalarErrorBoundary/ScalarErrorBoundary.stories.d.ts.map +1 -0
- package/dist/components/ScalarErrorBoundary/ScalarErrorBoundary.test.d.ts +2 -0
- package/dist/components/ScalarErrorBoundary/ScalarErrorBoundary.test.d.ts.map +1 -0
- package/dist/components/ScalarErrorBoundary/ScalarErrorBoundary.vue.d.ts +18 -0
- package/dist/components/ScalarErrorBoundary/ScalarErrorBoundary.vue.d.ts.map +1 -0
- package/dist/components/ScalarErrorBoundary/ScalarErrorBoundary.vue.js +23 -0
- package/dist/components/ScalarErrorBoundary/ScalarErrorBoundary.vue2.js +4 -0
- package/dist/components/ScalarErrorBoundary/index.d.ts +2 -0
- package/dist/components/ScalarErrorBoundary/index.d.ts.map +1 -0
- package/dist/components/ScalarFloating/ScalarFloating.stories.d.ts +4 -0
- package/dist/components/ScalarFloating/ScalarFloating.stories.d.ts.map +1 -1
- package/dist/components/ScalarFloating/ScalarFloating.test.d.ts +2 -0
- package/dist/components/ScalarFloating/ScalarFloating.test.d.ts.map +1 -0
- package/dist/components/ScalarFloating/ScalarFloating.vue.d.ts +5 -4
- package/dist/components/ScalarFloating/ScalarFloating.vue.d.ts.map +1 -1
- package/dist/components/ScalarFloating/ScalarFloating.vue.js +32 -29
- package/dist/components/ScalarFloating/index.d.ts +1 -1
- package/dist/components/ScalarFloating/index.d.ts.map +1 -1
- package/dist/components/ScalarFloating/types.d.ts +15 -7
- package/dist/components/ScalarFloating/types.d.ts.map +1 -1
- package/dist/components/ScalarFloating/useResizeWithTarget.d.ts +3 -0
- package/dist/components/ScalarFloating/useResizeWithTarget.d.ts.map +1 -1
- package/dist/components/ScalarFloating/useResizeWithTarget.test.d.ts +2 -0
- package/dist/components/ScalarFloating/useResizeWithTarget.test.d.ts.map +1 -0
- package/dist/components/ScalarHeaderButton/ScalarHeaderButton.test.d.ts +2 -0
- package/dist/components/ScalarHeaderButton/ScalarHeaderButton.test.d.ts.map +1 -0
- package/dist/components/ScalarIcon/ScalarIcon.stories.d.ts +9 -8
- package/dist/components/ScalarIcon/ScalarIcon.stories.d.ts.map +1 -1
- package/dist/components/ScalarIcon/ScalarIcon.test.d.ts +2 -0
- package/dist/components/ScalarIcon/ScalarIcon.test.d.ts.map +1 -0
- package/dist/components/ScalarIcon/ScalarIcon.vue.d.ts +1 -1
- package/dist/components/ScalarIcon/ScalarIcon.vue.d.ts.map +1 -1
- package/dist/components/ScalarIcon/ScalarIcon.vue.js +2 -2
- package/dist/components/ScalarIcon/ScalarIcon.vue2.js +18 -15
- package/dist/components/ScalarIcon/icons/Add.svg.js +2 -2
- package/dist/components/ScalarIcon/icons/ChevronDown.svg.js +1 -1
- package/dist/components/ScalarIcon/icons/ChevronRight.svg.js +1 -1
- package/dist/components/ScalarIcon/icons/ChevronUp.svg.js +1 -1
- package/dist/components/ScalarIcon/icons/Hide.svg.js +10 -9
- package/dist/components/ScalarIcon/icons/Show.svg.js +7 -8
- package/dist/components/ScalarIconButton/ScalarIconButton.stories.d.ts +13 -10
- package/dist/components/ScalarIconButton/ScalarIconButton.stories.d.ts.map +1 -1
- package/dist/components/ScalarIconButton/ScalarIconButton.test.d.ts +2 -0
- package/dist/components/ScalarIconButton/ScalarIconButton.test.d.ts.map +1 -0
- package/dist/components/ScalarIconButton/ScalarIconButton.vue.d.ts +3 -3
- package/dist/components/ScalarIconButton/ScalarIconButton.vue.d.ts.map +1 -1
- package/dist/components/ScalarIconButton/ScalarIconButton.vue.js +19 -21
- package/dist/components/ScalarListbox/ScalarListbox.stories.d.ts +52 -25
- package/dist/components/ScalarListbox/ScalarListbox.stories.d.ts.map +1 -1
- package/dist/components/ScalarListbox/ScalarListbox.test.d.ts +2 -0
- package/dist/components/ScalarListbox/ScalarListbox.test.d.ts.map +1 -0
- package/dist/components/ScalarListbox/ScalarListbox.vue.d.ts +41 -22
- package/dist/components/ScalarListbox/ScalarListbox.vue.d.ts.map +1 -1
- package/dist/components/ScalarListbox/ScalarListbox.vue.js +46 -85
- package/dist/components/ScalarListbox/ScalarListboxCheckbox.vue.d.ts +8 -0
- package/dist/components/ScalarListbox/ScalarListboxCheckbox.vue.d.ts.map +1 -0
- package/dist/components/ScalarListbox/ScalarListboxCheckbox.vue.js +26 -0
- package/dist/components/ScalarListbox/ScalarListboxCheckbox.vue2.js +4 -0
- package/dist/components/ScalarListbox/ScalarListboxItem.vue.d.ts +8 -0
- package/dist/components/ScalarListbox/ScalarListboxItem.vue.d.ts.map +1 -0
- package/dist/components/ScalarListbox/ScalarListboxItem.vue.js +53 -0
- package/dist/components/ScalarListbox/ScalarListboxItem.vue2.js +4 -0
- package/dist/components/ScalarListbox/index.d.ts +3 -1
- package/dist/components/ScalarListbox/index.d.ts.map +1 -1
- package/dist/components/ScalarListbox/types.d.ts +1 -0
- package/dist/components/ScalarListbox/types.d.ts.map +1 -1
- package/dist/components/ScalarLoading/ScalarLoading.stories.d.ts +32 -10
- package/dist/components/ScalarLoading/ScalarLoading.stories.d.ts.map +1 -1
- package/dist/components/ScalarLoading/ScalarLoading.test.d.ts +2 -0
- package/dist/components/ScalarLoading/ScalarLoading.test.d.ts.map +1 -0
- package/dist/components/ScalarLoading/ScalarLoading.vue.d.ts +4 -4
- package/dist/components/ScalarLoading/ScalarLoading.vue.d.ts.map +1 -1
- package/dist/components/ScalarLoading/ScalarLoading.vue.js +3 -3
- package/dist/components/ScalarLoading/ScalarLoading.vue2.js +29 -30
- package/dist/components/ScalarMenu/ScalarMenu.stories.d.ts +133 -108
- package/dist/components/ScalarMenu/ScalarMenu.stories.d.ts.map +1 -1
- package/dist/components/ScalarMenu/ScalarMenu.test.d.ts +2 -0
- package/dist/components/ScalarMenu/ScalarMenu.test.d.ts.map +1 -0
- package/dist/components/ScalarMenu/ScalarMenu.vue.d.ts +34 -18
- package/dist/components/ScalarMenu/ScalarMenu.vue.d.ts.map +1 -1
- package/dist/components/ScalarMenu/ScalarMenu.vue.js +22 -20
- package/dist/components/ScalarMenu/ScalarMenuButton.vue.d.ts +2 -2
- package/dist/components/ScalarMenu/ScalarMenuButton.vue.d.ts.map +1 -1
- package/dist/components/ScalarMenu/ScalarMenuButton.vue.js +26 -19
- package/dist/components/ScalarMenu/ScalarMenuLink.vue.d.ts.map +1 -1
- package/dist/components/ScalarMenu/ScalarMenuLink.vue.js +17 -10
- package/dist/components/ScalarMenu/ScalarMenuProduct.vue.d.ts +2 -2
- package/dist/components/ScalarMenu/ScalarMenuProduct.vue.d.ts.map +1 -1
- package/dist/components/ScalarMenu/ScalarMenuProduct.vue.js +22 -16
- package/dist/components/ScalarMenu/ScalarMenuProducts.vue.d.ts +1 -1
- package/dist/components/ScalarMenu/ScalarMenuProducts.vue.d.ts.map +1 -1
- package/dist/components/ScalarMenu/ScalarMenuProducts.vue.js +25 -22
- package/dist/components/ScalarMenu/ScalarMenuResources.vue.d.ts +1 -1
- package/dist/components/ScalarMenu/ScalarMenuResources.vue.js +3 -3
- package/dist/components/ScalarMenu/ScalarMenuSection.vue.d.ts +2 -2
- package/dist/components/ScalarMenu/ScalarMenuSection.vue.d.ts.map +1 -1
- package/dist/components/ScalarMenu/ScalarMenuSection.vue.js +18 -15
- package/dist/components/ScalarMenu/ScalarMenuSection.vue2.js +4 -0
- package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.d.ts +1 -1
- package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.d.ts.map +1 -1
- package/dist/components/ScalarMenu/ScalarMenuTeamPicker.vue.js +23 -22
- package/dist/components/ScalarModal/ScalarModal.stories.d.ts +9 -9
- package/dist/components/ScalarModal/ScalarModal.test.d.ts +2 -0
- package/dist/components/ScalarModal/ScalarModal.test.d.ts.map +1 -0
- package/dist/components/ScalarModal/ScalarModal.vue.d.ts +5 -5
- package/dist/components/ScalarPopover/ScalarPopover.stories.d.ts +20 -116
- package/dist/components/ScalarPopover/ScalarPopover.stories.d.ts.map +1 -1
- package/dist/components/ScalarPopover/ScalarPopover.test.d.ts +2 -0
- package/dist/components/ScalarPopover/ScalarPopover.test.d.ts.map +1 -0
- package/dist/components/ScalarPopover/ScalarPopover.vue.d.ts +4 -11
- package/dist/components/ScalarPopover/ScalarPopover.vue.d.ts.map +1 -1
- package/dist/components/ScalarPopover/ScalarPopover.vue.js +23 -24
- package/dist/components/ScalarPopover/index.d.ts +1 -0
- package/dist/components/ScalarPopover/index.d.ts.map +1 -1
- package/dist/components/ScalarPopover/types.d.ts +15 -0
- package/dist/components/ScalarPopover/types.d.ts.map +1 -0
- package/dist/components/ScalarSearchInput/ScalarSearchInput.stories.d.ts +6 -1
- package/dist/components/ScalarSearchInput/ScalarSearchInput.stories.d.ts.map +1 -1
- package/dist/components/ScalarSearchInput/ScalarSearchInput.test.d.ts +2 -0
- package/dist/components/ScalarSearchInput/ScalarSearchInput.test.d.ts.map +1 -0
- package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.js +3 -3
- package/dist/components/ScalarSearchInput/ScalarSearchInput.vue2.js +10 -10
- package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue.d.ts.map +1 -1
- package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue.js +31 -35
- package/dist/components/ScalarSearchResults/ScalarSearchResultList.vue.d.ts.map +1 -1
- package/dist/components/ScalarSearchResults/ScalarSearchResultList.vue.js +12 -18
- package/dist/components/ScalarSearchResults/ScalarSearchResults.test.d.ts +2 -0
- package/dist/components/ScalarSearchResults/ScalarSearchResults.test.d.ts.map +1 -0
- package/dist/components/ScalarTextField/ScalarTextField.test.d.ts +2 -0
- package/dist/components/ScalarTextField/ScalarTextField.test.d.ts.map +1 -0
- package/dist/components/ScalarToggle/ScalarToggle.stories.d.ts +26 -39
- package/dist/components/ScalarToggle/ScalarToggle.stories.d.ts.map +1 -1
- package/dist/components/ScalarToggle/ScalarToggle.test.d.ts +2 -0
- package/dist/components/ScalarToggle/ScalarToggle.test.d.ts.map +1 -0
- package/dist/components/ScalarToggle/ScalarToggle.vue.d.ts +3 -5
- package/dist/components/ScalarToggle/ScalarToggle.vue.d.ts.map +1 -1
- package/dist/components/ScalarToggle/ScalarToggle.vue.js +24 -35
- package/dist/components/ScalarTooltip/ScalarTooltip.test.d.ts +2 -0
- package/dist/components/ScalarTooltip/ScalarTooltip.test.d.ts.map +1 -0
- package/dist/components/ScalarVirtualText/ScalarVirtualText.test.d.ts +2 -0
- package/dist/components/ScalarVirtualText/ScalarVirtualText.test.d.ts.map +1 -0
- package/dist/cva.js +7 -7
- package/dist/cva.test.d.ts +2 -0
- package/dist/cva.test.d.ts.map +1 -0
- package/dist/hooks/useBindCx.d.ts +51 -0
- package/dist/hooks/useBindCx.d.ts.map +1 -0
- package/dist/hooks/useBindCx.js +34 -0
- package/dist/hooks/useBindCx.stories.d.ts +430 -0
- package/dist/hooks/useBindCx.stories.d.ts.map +1 -0
- package/dist/hooks/useBindCx.test.d.ts +2 -0
- package/dist/hooks/useBindCx.test.d.ts.map +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +85 -68
- package/dist/style.css +1 -1
- package/package.json +6 -6
- package/dist/components/ScalarButton/ScalarButton.spec.d.ts +0 -2
- package/dist/components/ScalarButton/ScalarButton.spec.d.ts.map +0 -1
- package/dist/components/ScalarCodeBlock/ScalarCodeBlock.spec.d.ts +0 -2
- package/dist/components/ScalarCodeBlock/ScalarCodeBlock.spec.d.ts.map +0 -1
- package/dist/components/ScalarCombobox/ScalarCombobox.spec.d.ts +0 -2
- package/dist/components/ScalarCombobox/ScalarCombobox.spec.d.ts.map +0 -1
- package/dist/components/ScalarContextMenu/ScalarContextMenu.spec.d.ts +0 -2
- package/dist/components/ScalarContextMenu/ScalarContextMenu.spec.d.ts.map +0 -1
- package/dist/components/ScalarDropdown/ScalarDropdown.spec.d.ts +0 -2
- package/dist/components/ScalarDropdown/ScalarDropdown.spec.d.ts.map +0 -1
- package/dist/components/ScalarFloating/ScalarFloating.spec.d.ts +0 -2
- package/dist/components/ScalarFloating/ScalarFloating.spec.d.ts.map +0 -1
- package/dist/components/ScalarFloating/useResizeWithTarget.spec.d.ts +0 -2
- package/dist/components/ScalarFloating/useResizeWithTarget.spec.d.ts.map +0 -1
- package/dist/components/ScalarHeaderButton/ScalarHeaderButton.spec.d.ts +0 -2
- package/dist/components/ScalarHeaderButton/ScalarHeaderButton.spec.d.ts.map +0 -1
- package/dist/components/ScalarIcon/ScalarIcon.spec.d.ts +0 -2
- package/dist/components/ScalarIcon/ScalarIcon.spec.d.ts.map +0 -1
- package/dist/components/ScalarIconButton/ScalarIconButton.spec.d.ts +0 -2
- package/dist/components/ScalarIconButton/ScalarIconButton.spec.d.ts.map +0 -1
- package/dist/components/ScalarListbox/ScalarListbox.spec.d.ts +0 -2
- package/dist/components/ScalarListbox/ScalarListbox.spec.d.ts.map +0 -1
- package/dist/components/ScalarLoading/ScalarLoading.spec.d.ts +0 -2
- package/dist/components/ScalarLoading/ScalarLoading.spec.d.ts.map +0 -1
- package/dist/components/ScalarMenu/ScalarMenu.spec.d.ts +0 -2
- package/dist/components/ScalarMenu/ScalarMenu.spec.d.ts.map +0 -1
- package/dist/components/ScalarModal/ScalarModal.spec.d.ts +0 -2
- package/dist/components/ScalarModal/ScalarModal.spec.d.ts.map +0 -1
- package/dist/components/ScalarPopover/ScalarPopover.spec.d.ts +0 -2
- package/dist/components/ScalarPopover/ScalarPopover.spec.d.ts.map +0 -1
- package/dist/components/ScalarSearchInput/ScalarSearchInput.spec.d.ts +0 -2
- package/dist/components/ScalarSearchInput/ScalarSearchInput.spec.d.ts.map +0 -1
- package/dist/components/ScalarSearchResults/ScalarSearchResults.spec.d.ts +0 -2
- package/dist/components/ScalarSearchResults/ScalarSearchResults.spec.d.ts.map +0 -1
- package/dist/components/ScalarTextField/ScalarTextField.spec.d.ts +0 -2
- package/dist/components/ScalarTextField/ScalarTextField.spec.d.ts.map +0 -1
- package/dist/components/ScalarToggle/ScalarToggle.spec.d.ts +0 -2
- package/dist/components/ScalarToggle/ScalarToggle.spec.d.ts.map +0 -1
- package/dist/components/ScalarTooltip/ScalarTooltip.spec.d.ts +0 -2
- package/dist/components/ScalarTooltip/ScalarTooltip.spec.d.ts.map +0 -1
- package/dist/components/ScalarVirtualText/ScalarVirtualText.spec.d.ts +0 -2
- package/dist/components/ScalarVirtualText/ScalarVirtualText.spec.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarDropdownItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarDropdown/ScalarDropdownItem.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarDropdownItem.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarDropdown/ScalarDropdownItem.vue"],"names":[],"mappings":"AAmDA;;;;;;;;;GASG;;eAIU,OAAO;;;;eAAP,OAAO;;;;qBA+EU,GAAG;;AAlFjC,wBAsHC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./ScalarDropdownItem.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-457c1cd3"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,41 +1,31 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { MenuItem as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as a, openBlock as l, createBlock as i, unref as n, withCtx as t, createVNode as s, renderSlot as p } from "vue";
|
|
2
|
+
import { MenuItem as m } from "@headlessui/vue";
|
|
3
|
+
import u from "./ScalarDropdownButton.vue.js";
|
|
4
|
+
const f = {}, B = /* @__PURE__ */ a({
|
|
5
|
+
...f,
|
|
5
6
|
__name: "ScalarDropdownItem",
|
|
6
7
|
props: {
|
|
7
8
|
disabled: { type: Boolean }
|
|
8
9
|
},
|
|
9
10
|
emits: ["click"],
|
|
10
|
-
setup(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
return (e, o) => (s(), d(t(u), { disabled: e.disabled }, {
|
|
26
|
-
default: l(({ active: n }) => [
|
|
27
|
-
c("button", {
|
|
28
|
-
class: m(["item", t(f)("scalar-dropdown-item", t(r)({ active: n, disabled: e.disabled }))]),
|
|
29
|
-
type: "button",
|
|
30
|
-
onClick: o[0] || (o[0] = (a) => e.$emit("click", a))
|
|
31
|
-
}, [
|
|
32
|
-
p(e.$slots, "default", {}, void 0, !0)
|
|
33
|
-
], 2)
|
|
11
|
+
setup(c) {
|
|
12
|
+
return (e, o) => (l(), i(n(m), { disabled: e.disabled }, {
|
|
13
|
+
default: t(({ active: d }) => [
|
|
14
|
+
s(u, {
|
|
15
|
+
active: d,
|
|
16
|
+
disabled: e.disabled,
|
|
17
|
+
onClick: o[0] || (o[0] = (r) => e.$emit("click", r))
|
|
18
|
+
}, {
|
|
19
|
+
default: t(() => [
|
|
20
|
+
p(e.$slots, "default", {}, void 0, !0)
|
|
21
|
+
]),
|
|
22
|
+
_: 2
|
|
23
|
+
}, 1032, ["active", "disabled"])
|
|
34
24
|
]),
|
|
35
25
|
_: 3
|
|
36
26
|
}, 8, ["disabled"]));
|
|
37
27
|
}
|
|
38
28
|
});
|
|
39
29
|
export {
|
|
40
|
-
|
|
30
|
+
B as default
|
|
41
31
|
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Component } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Scalar dropdown menu component
|
|
4
|
+
*
|
|
5
|
+
* Provides a scrollable container for dropdown items
|
|
6
|
+
* This is used internally by the ScalarDropdown component
|
|
7
|
+
*
|
|
8
|
+
* If you're looking to create a dropdown menu with a trigger
|
|
9
|
+
* button you probably want the ScalarDropdown component
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* <ScalarDropdownMenu>
|
|
13
|
+
* <ScalarDropdownItem>Item 1</ScalarDropdownItem>
|
|
14
|
+
* <ScalarDropdownItem>Item 2</ScalarDropdownItem>
|
|
15
|
+
* </ScalarDropdownMenu>
|
|
16
|
+
*/
|
|
17
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
18
|
+
/** The component to render */
|
|
19
|
+
is?: string | Component;
|
|
20
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
21
|
+
/** The component to render */
|
|
22
|
+
is?: string | Component;
|
|
23
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
24
|
+
default?(_: {}): any;
|
|
25
|
+
}>;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=ScalarDropdownMenu.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarDropdownMenu.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarDropdown/ScalarDropdownMenu.vue"],"names":[],"mappings":"AA8CA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAIpC;;;;;;;;;;;;;;GAcG;;IAID,8BAA8B;SACzB,MAAM,GAAG,SAAS;;IADvB,8BAA8B;SACzB,MAAM,GAAG,SAAS;;qBA6DI,GAAG;;AAjEhC,wBAgGC;AAWD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineComponent as t, openBlock as l, createBlock as n, resolveDynamicComponent as r, withCtx as d, createElementVNode as e, renderSlot as a } from "vue";
|
|
2
|
+
const i = { class: "custom-scroll min-h-0 flex-1" }, c = { class: "flex flex-col p-0.75" }, u = {}, p = /* @__PURE__ */ t({
|
|
3
|
+
...u,
|
|
4
|
+
__name: "ScalarDropdownMenu",
|
|
5
|
+
props: {
|
|
6
|
+
is: {}
|
|
7
|
+
},
|
|
8
|
+
setup(_) {
|
|
9
|
+
return (o, s) => (l(), n(r(o.is ?? "div"), {
|
|
10
|
+
class: "relative flex w-56 rounded border",
|
|
11
|
+
role: "menu",
|
|
12
|
+
tabindex: "0"
|
|
13
|
+
}, {
|
|
14
|
+
default: d(() => [
|
|
15
|
+
e("div", i, [
|
|
16
|
+
e("div", c, [
|
|
17
|
+
a(o.$slots, "default")
|
|
18
|
+
]),
|
|
19
|
+
s[0] || (s[0] = e("div", { class: "absolute inset-0 -z-1 rounded bg-b-1 shadow-lg brightness-lifted" }, null, -1))
|
|
20
|
+
])
|
|
21
|
+
]),
|
|
22
|
+
_: 3
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
export {
|
|
27
|
+
p as default
|
|
28
|
+
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { default as ScalarDropdown } from './ScalarDropdown.vue.js';
|
|
2
2
|
export { default as ScalarDropdownDivider } from './ScalarDropdownDivider.vue.js';
|
|
3
|
+
export { default as ScalarDropdownButton } from './ScalarDropdownButton.vue.js';
|
|
3
4
|
export { default as ScalarDropdownItem } from './ScalarDropdownItem.vue.js';
|
|
5
|
+
export { default as ScalarDropdownMenu } from './ScalarDropdownMenu.vue.js';
|
|
4
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarDropdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAC9E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarDropdown/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,6BAA6B,CAAA;AAC9E,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAC5E,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AACxE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarErrorBoundary.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarErrorBoundary/ScalarErrorBoundary.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAKrD,QAAA,MAAM,IAAI,EAAE,IAkBgC,CAAA;AAE5C,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,IAAI,EAAE,KAAU,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarErrorBoundary.test.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarErrorBoundary/ScalarErrorBoundary.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
attrs: Partial<{}>;
|
|
3
|
+
slots: {
|
|
4
|
+
default?(_: {}): any;
|
|
5
|
+
};
|
|
6
|
+
refs: {};
|
|
7
|
+
rootEl: any;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
10
|
+
declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
11
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=ScalarErrorBoundary.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarErrorBoundary.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarErrorBoundary/ScalarErrorBoundary.vue"],"names":[],"mappings":"AAsDA,iBAAS,cAAc;WAyDT,OAAO,IAA6B;;yBARrB,GAAG;;;;EAa/B;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,+QAKnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAKpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineComponent as c, ref as a, onErrorCaptured as m, renderSlot as p, openBlock as l, createElementBlock as d, createElementVNode as i, toDisplayString as u, createCommentVNode as _ } from "vue";
|
|
2
|
+
const f = {
|
|
3
|
+
key: 1,
|
|
4
|
+
class: "rounded border bg-b-2 p-3 text-sm"
|
|
5
|
+
}, v = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "mt-2 rounded border bg-b-1 p-2 font-code text-c-2"
|
|
8
|
+
}, E = /* @__PURE__ */ c({
|
|
9
|
+
__name: "ScalarErrorBoundary",
|
|
10
|
+
setup(b) {
|
|
11
|
+
const n = a(!1), e = a();
|
|
12
|
+
return m((r, t, o) => (console.error("[ERROR]", r, o), n.value = !0, e.value = r, !1)), (r, t) => {
|
|
13
|
+
var o, s;
|
|
14
|
+
return n.value ? (l(), d("div", f, [
|
|
15
|
+
t[0] || (t[0] = i("div", { class: "p-2" }, "Oops, something went wrong here.", -1)),
|
|
16
|
+
e.value ? (l(), d("div", v, u((o = e.value) == null ? void 0 : o.name) + ": " + u((s = e.value) == null ? void 0 : s.message), 1)) : _("", !0)
|
|
17
|
+
])) : p(r.$slots, "default", { key: 0 });
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
export {
|
|
22
|
+
E as default
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarErrorBoundary/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,2BAA2B,CAAA"}
|
|
@@ -3,4 +3,8 @@ declare const meta: Meta;
|
|
|
3
3
|
export default meta;
|
|
4
4
|
type Story = StoryObj<typeof meta>;
|
|
5
5
|
export declare const Base: Story;
|
|
6
|
+
/**
|
|
7
|
+
* You can override the offset (or other middleware) by passing a custom middleware array
|
|
8
|
+
*/
|
|
9
|
+
export declare const CustomOffset: Story;
|
|
6
10
|
//# sourceMappingURL=ScalarFloating.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarFloating.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarFloating/ScalarFloating.stories.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarFloating.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarFloating/ScalarFloating.stories.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAIrD,QAAA,MAAM,IAAI,EAAE,IA6B2B,CAAA;AAEvC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,IAAI,EAAE,KAAU,CAAA;AAE7B;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAsB1B,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarFloating.test.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarFloating/ScalarFloating.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { type MiddlewareData } from '@floating-ui/vue';
|
|
2
|
+
import { type Slot } from 'vue';
|
|
2
3
|
import type { FloatingOptions } from './types';
|
|
3
4
|
declare function __VLS_template(): {
|
|
4
5
|
attrs: Partial<{}>;
|
|
5
6
|
slots: Readonly<{
|
|
6
7
|
/** The reference element for the element in the #floating slot */
|
|
7
|
-
default():
|
|
8
|
+
default(): Slot;
|
|
8
9
|
/** The floating element */
|
|
9
10
|
floating(props: {
|
|
10
11
|
/** The width of the reference element if `resize` is true and placement is on the y axis */
|
|
@@ -13,10 +14,10 @@ declare function __VLS_template(): {
|
|
|
13
14
|
height?: string;
|
|
14
15
|
/** The middleware data return by Floating UI */
|
|
15
16
|
data?: MiddlewareData;
|
|
16
|
-
}):
|
|
17
|
+
}): Slot;
|
|
17
18
|
}> & {
|
|
18
19
|
/** The reference element for the element in the #floating slot */
|
|
19
|
-
default():
|
|
20
|
+
default(): Slot;
|
|
20
21
|
/** The floating element */
|
|
21
22
|
floating(props: {
|
|
22
23
|
/** The width of the reference element if `resize` is true and placement is on the y axis */
|
|
@@ -25,7 +26,7 @@ declare function __VLS_template(): {
|
|
|
25
26
|
height?: string;
|
|
26
27
|
/** The middleware data return by Floating UI */
|
|
27
28
|
data?: MiddlewareData;
|
|
28
|
-
}):
|
|
29
|
+
}): Slot;
|
|
29
30
|
};
|
|
30
31
|
refs: {
|
|
31
32
|
wrapperRef: HTMLDivElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarFloating.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarFloating/ScalarFloating.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarFloating.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarFloating/ScalarFloating.vue"],"names":[],"mappings":"AAsHA,OAAO,EACL,KAAK,cAAc,EAOpB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAY,KAAK,IAAI,EAAiB,MAAM,KAAK,CAAA;AAExD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAsF9C,iBAAS,cAAc;WAuDT,OAAO,IAA6B;;QApIhD,kEAAkE;mBACvD,IAAI;QACf,2BAA2B;wBACX;YACd,4FAA4F;YAC5F,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,6FAA6F;YAC7F,MAAM,CAAC,EAAE,MAAM,CAAA;YACf,gDAAgD;YAChD,IAAI,CAAC,EAAE,cAAc,CAAA;SACtB,GAAG,IAAI;;QAVR,kEAAkE;mBACvD,IAAI;QACf,2BAA2B;wBACX;YACd,4FAA4F;YAC5F,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,6FAA6F;YAC7F,MAAM,CAAC,EAAE,MAAM,CAAA;YACf,gDAAgD;YAChD,IAAI,CAAC,EAAE,cAAc,CAAA;SACtB,GAAG,IAAI;;;;;;;EA+HT;AAcD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,0SAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAWpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,38 +1,41 @@
|
|
|
1
|
-
import { defineComponent as z, ref as
|
|
1
|
+
import { defineComponent as z, ref as d, computed as a, openBlock as f, createElementBlock as S, Fragment as b, createElementVNode as r, normalizeClass as $, renderSlot as p, createBlock as k, Teleport as B, normalizeStyle as R, unref as m, createCommentVNode as E } from "vue";
|
|
2
2
|
import { getSideAxis as c } from "@floating-ui/utils";
|
|
3
|
-
import { useFloating as
|
|
4
|
-
import { useResizeWithTarget as
|
|
5
|
-
const
|
|
3
|
+
import { useFloating as F, autoUpdate as M, offset as T, flip as x, shift as C, size as H } from "@floating-ui/vue";
|
|
4
|
+
import { useResizeWithTarget as W } from "./useResizeWithTarget.js";
|
|
5
|
+
const _ = { class: "scalar-app" }, D = /* @__PURE__ */ z({
|
|
6
6
|
inheritAttrs: !1,
|
|
7
7
|
__name: "ScalarFloating",
|
|
8
8
|
props: {
|
|
9
9
|
placement: {},
|
|
10
10
|
resize: { type: Boolean },
|
|
11
|
-
|
|
11
|
+
target: {},
|
|
12
12
|
middleware: {},
|
|
13
|
-
isOpen: { type: Boolean },
|
|
14
13
|
teleport: { type: [Boolean, String] }
|
|
15
14
|
},
|
|
16
15
|
setup(g) {
|
|
17
|
-
const t = g,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
const t = g, n = d(null), l = d(null), i = a(() => {
|
|
17
|
+
var e;
|
|
18
|
+
if (typeof t.target == "string") {
|
|
19
|
+
const o = document.getElementById(t.target);
|
|
20
|
+
if (o) return o;
|
|
21
|
+
console.warn(`ScalarFloating: Target with id="${t.target}" not found`);
|
|
22
|
+
} else if (t.target instanceof HTMLElement) return t.target;
|
|
23
|
+
if (l.value)
|
|
24
|
+
return ((e = l.value.children) == null ? void 0 : e[0]) || l.value;
|
|
25
|
+
}), s = W(i, {
|
|
23
26
|
enabled: a(() => t.resize)
|
|
24
27
|
}), u = a(
|
|
25
28
|
() => c(t.placement || "bottom") === "y" ? s.width.value : void 0
|
|
26
29
|
), h = a(
|
|
27
30
|
() => c(t.placement || "bottom") === "x" ? s.height.value : void 0
|
|
28
|
-
), { floatingStyles: y, middlewareData: v } =
|
|
31
|
+
), { floatingStyles: y, middlewareData: v } = F(i, n, {
|
|
29
32
|
placement: a(() => t.placement),
|
|
30
|
-
whileElementsMounted:
|
|
33
|
+
whileElementsMounted: M,
|
|
31
34
|
middleware: a(() => [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
T(5),
|
|
36
|
+
x(),
|
|
37
|
+
C(),
|
|
38
|
+
H({
|
|
36
39
|
apply({ availableWidth: e, availableHeight: o, elements: w }) {
|
|
37
40
|
Object.assign(w.floating.style, {
|
|
38
41
|
maxWidth: `${Math.max(0, e) - 25}px`,
|
|
@@ -43,37 +46,37 @@ const A = { class: "scalar-app" }, j = /* @__PURE__ */ z({
|
|
|
43
46
|
...t.middleware ?? []
|
|
44
47
|
])
|
|
45
48
|
});
|
|
46
|
-
return (e, o) => (
|
|
49
|
+
return (e, o) => (f(), S(b, null, [
|
|
47
50
|
r("div", {
|
|
48
51
|
ref_key: "wrapperRef",
|
|
49
52
|
ref: l,
|
|
50
|
-
class:
|
|
53
|
+
class: $({ contents: !!e.$slots.default })
|
|
51
54
|
}, [
|
|
52
|
-
|
|
55
|
+
p(e.$slots, "default")
|
|
53
56
|
], 2),
|
|
54
|
-
e.
|
|
57
|
+
e.$slots.floating ? (f(), k(B, {
|
|
55
58
|
key: 0,
|
|
56
59
|
disabled: !e.teleport,
|
|
57
60
|
to: typeof e.teleport == "string" ? e.teleport : "body"
|
|
58
61
|
}, [
|
|
59
|
-
r("div",
|
|
62
|
+
r("div", _, [
|
|
60
63
|
r("div", {
|
|
61
64
|
ref_key: "floatingRef",
|
|
62
|
-
ref:
|
|
65
|
+
ref: n,
|
|
63
66
|
class: "relative z-overlay",
|
|
64
|
-
style:
|
|
67
|
+
style: R(m(y))
|
|
65
68
|
}, [
|
|
66
|
-
|
|
67
|
-
data:
|
|
69
|
+
p(e.$slots, "floating", {
|
|
70
|
+
data: m(v),
|
|
68
71
|
height: h.value,
|
|
69
72
|
width: u.value
|
|
70
73
|
})
|
|
71
74
|
], 4)
|
|
72
75
|
])
|
|
73
|
-
], 8, ["disabled", "to"])) :
|
|
76
|
+
], 8, ["disabled", "to"])) : E("", !0)
|
|
74
77
|
], 64));
|
|
75
78
|
}
|
|
76
79
|
});
|
|
77
80
|
export {
|
|
78
|
-
|
|
81
|
+
D as default
|
|
79
82
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarFloating/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAEhE,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarFloating/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAEhE,YAAY,EAAE,eAAe,IAAI,qBAAqB,EAAE,MAAM,SAAS,CAAA"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { Middleware, Placement } from '@floating-ui/vue';
|
|
2
|
+
/** The props for the ScalarFloating component */
|
|
2
3
|
export type FloatingOptions = {
|
|
3
4
|
/**
|
|
4
5
|
* Where to place the floating element relative to its reference element.
|
|
5
6
|
* @default 'bottom'
|
|
7
|
+
*
|
|
8
|
+
* @see https://floating-ui.com/docs/computePosition#placement
|
|
6
9
|
*/
|
|
7
10
|
placement?: Placement;
|
|
8
11
|
/**
|
|
@@ -11,20 +14,25 @@ export type FloatingOptions = {
|
|
|
11
14
|
*/
|
|
12
15
|
resize?: boolean;
|
|
13
16
|
/**
|
|
14
|
-
* Override the
|
|
17
|
+
* Override the target, useful if we are not passing a button
|
|
15
18
|
* into the slot but is controlled from an external button
|
|
19
|
+
*
|
|
20
|
+
* Can be a string id or a reference to an element
|
|
16
21
|
*/
|
|
17
|
-
|
|
22
|
+
target?: string | HTMLElement;
|
|
18
23
|
/**
|
|
19
24
|
* Floating UI Middleware to be passed to Floating UI
|
|
25
|
+
*
|
|
26
|
+
* Overrides the default middleware
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* // change the offset to 10px
|
|
31
|
+
* middleware: [offset(10)]
|
|
32
|
+
* ```
|
|
20
33
|
* @see https://floating-ui.com/docs/computePosition#middleware
|
|
21
34
|
*/
|
|
22
35
|
middleware?: Middleware[];
|
|
23
|
-
/**
|
|
24
|
-
* Whether the floating element is open or not.
|
|
25
|
-
* @default false
|
|
26
|
-
*/
|
|
27
|
-
isOpen?: boolean;
|
|
28
36
|
/**
|
|
29
37
|
* Whether to teleport the floating element.
|
|
30
38
|
* Can be an `id` to teleport to or `true` to teleport to the `<body>`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarFloating/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarFloating/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAE7D,iDAAiD;AACjD,MAAM,MAAM,eAAe,GAAG;IAC5B;;;;;OAKG;IACH,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,WAAW,CAAA;IAC7B;;;;;;;;;;;OAWG;IACH,UAAU,CAAC,EAAE,UAAU,EAAE,CAAA;IACzB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;CAC5B,CAAA"}
|
|
@@ -2,6 +2,9 @@ import { type MaybeRefOrGetter } from 'vue';
|
|
|
2
2
|
type ResizeOptions = {
|
|
3
3
|
enabled?: MaybeRefOrGetter<boolean>;
|
|
4
4
|
};
|
|
5
|
+
/**
|
|
6
|
+
* Resize a floating element to match a target element
|
|
7
|
+
*/
|
|
5
8
|
export declare function useResizeWithTarget(target: MaybeRefOrGetter<Element | undefined>, opts?: ResizeOptions): {
|
|
6
9
|
width: import("vue").ComputedRef<string | undefined>;
|
|
7
10
|
height: import("vue").ComputedRef<string | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useResizeWithTarget.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarFloating/useResizeWithTarget.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAiC,MAAM,KAAK,CAAA;AAE1E,KAAK,aAAa,GAAG;IACnB,OAAO,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;CACpC,CAAA;AAED,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,gBAAgB,CAAC,OAAO,GAAG,SAAS,CAAC,EAC7C,IAAI,GAAE,aAAsC;;;EA+B7C"}
|
|
1
|
+
{"version":3,"file":"useResizeWithTarget.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarFloating/useResizeWithTarget.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,gBAAgB,EAAiC,MAAM,KAAK,CAAA;AAE1E,KAAK,aAAa,GAAG;IACnB,OAAO,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAA;CACpC,CAAA;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,MAAM,EAAE,gBAAgB,CAAC,OAAO,GAAG,SAAS,CAAC,EAC7C,IAAI,GAAE,aAAsC;;;EA+B7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useResizeWithTarget.test.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarFloating/useResizeWithTarget.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarHeaderButton.test.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarHeaderButton/ScalarHeaderButton.test.ts"],"names":[],"mappings":""}
|
|
@@ -3,13 +3,13 @@ declare const meta: {
|
|
|
3
3
|
component: import("vue").DefineComponent<{
|
|
4
4
|
icon?: import("./index.js").Icon;
|
|
5
5
|
logo?: import("./utils/index.js").Logo;
|
|
6
|
-
size?: "
|
|
6
|
+
size?: "sm" | "lg" | "xs" | "md" | "xl" | "2xl" | "3xl" | "full" | undefined;
|
|
7
7
|
thickness?: string;
|
|
8
8
|
label?: string;
|
|
9
9
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
10
10
|
icon?: import("./index.js").Icon;
|
|
11
11
|
logo?: import("./utils/index.js").Logo;
|
|
12
|
-
size?: "
|
|
12
|
+
size?: "sm" | "lg" | "xs" | "md" | "xl" | "2xl" | "3xl" | "full" | undefined;
|
|
13
13
|
thickness?: string;
|
|
14
14
|
label?: string;
|
|
15
15
|
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -48,13 +48,13 @@ declare const meta: {
|
|
|
48
48
|
render: (args: import("@storybook/vue3").ComponentPropsAndSlots<import("vue").DefineComponent<{
|
|
49
49
|
icon?: import("./index.js").Icon;
|
|
50
50
|
logo?: import("./utils/index.js").Logo;
|
|
51
|
-
size?: "
|
|
51
|
+
size?: "sm" | "lg" | "xs" | "md" | "xl" | "2xl" | "3xl" | "full" | undefined;
|
|
52
52
|
thickness?: string;
|
|
53
53
|
label?: string;
|
|
54
54
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
55
55
|
icon?: import("./index.js").Icon;
|
|
56
56
|
logo?: import("./utils/index.js").Logo;
|
|
57
|
-
size?: "
|
|
57
|
+
size?: "sm" | "lg" | "xs" | "md" | "xl" | "2xl" | "3xl" | "full" | undefined;
|
|
58
58
|
thickness?: string;
|
|
59
59
|
label?: string;
|
|
60
60
|
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>>) => {
|
|
@@ -62,13 +62,13 @@ declare const meta: {
|
|
|
62
62
|
ScalarIcon: import("vue").DefineComponent<{
|
|
63
63
|
icon?: import("./index.js").Icon;
|
|
64
64
|
logo?: import("./utils/index.js").Logo;
|
|
65
|
-
size?: "
|
|
65
|
+
size?: "sm" | "lg" | "xs" | "md" | "xl" | "2xl" | "3xl" | "full" | undefined;
|
|
66
66
|
thickness?: string;
|
|
67
67
|
label?: string;
|
|
68
68
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
69
69
|
icon?: import("./index.js").Icon;
|
|
70
70
|
logo?: import("./utils/index.js").Logo;
|
|
71
|
-
size?: "
|
|
71
|
+
size?: "sm" | "lg" | "xs" | "md" | "xl" | "2xl" | "3xl" | "full" | undefined;
|
|
72
72
|
thickness?: string;
|
|
73
73
|
label?: string;
|
|
74
74
|
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -77,13 +77,13 @@ declare const meta: {
|
|
|
77
77
|
args: import("@storybook/vue3").ComponentPropsAndSlots<import("vue").DefineComponent<{
|
|
78
78
|
icon?: import("./index.js").Icon;
|
|
79
79
|
logo?: import("./utils/index.js").Logo;
|
|
80
|
-
size?: "
|
|
80
|
+
size?: "sm" | "lg" | "xs" | "md" | "xl" | "2xl" | "3xl" | "full" | undefined;
|
|
81
81
|
thickness?: string;
|
|
82
82
|
label?: string;
|
|
83
83
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{
|
|
84
84
|
icon?: import("./index.js").Icon;
|
|
85
85
|
logo?: import("./utils/index.js").Logo;
|
|
86
|
-
size?: "
|
|
86
|
+
size?: "sm" | "lg" | "xs" | "md" | "xl" | "2xl" | "3xl" | "full" | undefined;
|
|
87
87
|
thickness?: string;
|
|
88
88
|
label?: string;
|
|
89
89
|
}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>>;
|
|
@@ -94,6 +94,7 @@ declare const meta: {
|
|
|
94
94
|
export default meta;
|
|
95
95
|
type Story = StoryObj<typeof meta>;
|
|
96
96
|
export declare const Base: Story;
|
|
97
|
+
export declare const CustomClasses: Story;
|
|
97
98
|
export declare const AllSizes: Story;
|
|
98
99
|
export declare const AllIcons: StoryObj;
|
|
99
100
|
//# sourceMappingURL=ScalarIcon.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarIcon.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarIcon/ScalarIcon.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"ScalarIcon.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarIcon/ScalarIcon.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAMrD,QAAA,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4ByB,CAAA;AAEnC,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAA;AAElC,eAAO,MAAM,IAAI,EAAE,KAElB,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,KAE3B,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAmBtB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,QAQtB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarIcon.test.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarIcon/ScalarIcon.test.ts"],"names":[],"mappings":""}
|
|
@@ -12,7 +12,7 @@ type __VLS_Props = {
|
|
|
12
12
|
label?: string;
|
|
13
13
|
};
|
|
14
14
|
declare const iconProps: (props?: ({
|
|
15
|
-
size?: "
|
|
15
|
+
size?: "sm" | "lg" | "xs" | "md" | "xl" | "2xl" | "3xl" | "full" | undefined;
|
|
16
16
|
} & ({
|
|
17
17
|
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 | any | {
|
|
18
18
|
[x: string]: any;
|