@scalar/components 0.10.0 → 0.11.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.
- package/README.md +2 -76
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/components/ScalarButton/ScalarButton.vue.js +51 -0
- package/dist/components/ScalarButton/ScalarButton.vue2.js +4 -0
- package/dist/components/ScalarButton/variants.js +40 -0
- package/dist/components/ScalarCodeBlock/ScalarCodeBlock.vue.js +28 -0
- package/dist/components/ScalarCodeBlock/ScalarCodeBlock.vue2.js +4 -0
- package/dist/components/ScalarCodeBlock/ScalarCodeBlock.vue3.js +5 -0
- package/dist/components/ScalarCodeBlock/utils/prettyPrintString.js +15 -0
- package/dist/components/ScalarCodeBlock/utils/replaceCircularReferences.js +18 -0
- package/dist/components/ScalarDropdown/ScalarDropdown.vue.js +51 -0
- package/dist/components/ScalarDropdown/ScalarDropdown.vue2.js +4 -0
- package/dist/components/ScalarDropdown/ScalarDropdownDivider.vue.js +10 -0
- package/dist/components/ScalarDropdown/ScalarDropdownItem.vue.js +42 -0
- package/dist/components/ScalarDropdown/ScalarDropdownItem.vue2.js +4 -0
- package/dist/components/ScalarFloating/ScalarFloating.vue.js +68 -0
- package/dist/components/ScalarFloating/ScalarFloating.vue2.js +4 -0
- package/dist/components/ScalarFloating/useResizeWithTarget.js +24 -0
- package/dist/components/ScalarIcon/ScalarIcon.vue.js +39 -0
- package/dist/components/ScalarIcon/ScalarIcon.vue2.js +4 -0
- package/dist/components/ScalarIcon/icons/Info.svg.js +16 -0
- package/dist/components/ScalarIcon/icons/index.js +8 -0
- package/dist/components/ScalarIconButton/ScalarIconButton.vue.js +46 -0
- package/dist/components/ScalarIconButton/ScalarIconButton.vue2.js +4 -0
- package/dist/components/ScalarListbox/ScalarListbox.vue.js +102 -0
- package/dist/components/ScalarListbox/ScalarListbox.vue2.js +4 -0
- package/dist/components/ScalarLoading/ScalarLoading.vue.js +9 -0
- package/dist/components/ScalarLoading/ScalarLoading.vue2.js +83 -0
- package/dist/components/ScalarLoading/ScalarLoading.vue3.js +4 -0
- package/dist/components/ScalarMarkdown/ScalarMarkdown.vue.js +25 -0
- package/dist/components/ScalarMarkdown/ScalarMarkdown.vue2.js +4 -0
- package/dist/components/ScalarModal/ScalarModal.vue.js +9 -0
- package/dist/components/ScalarModal/ScalarModal.vue2.js +108 -0
- package/dist/components/ScalarModal/ScalarModal.vue3.js +4 -0
- package/dist/components/ScalarPopover/ScalarPopover.vue.js +49 -0
- package/dist/components/ScalarPopover/ScalarPopover.vue2.js +4 -0
- package/dist/components/ScalarSearchInput/ScalarSearchInput.vue.js +62 -0
- package/dist/components/ScalarSearchInput/ScalarSearchInput.vue2.js +4 -0
- package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue.js +57 -0
- package/dist/components/ScalarSearchResults/ScalarSearchResultItem.vue2.js +4 -0
- package/dist/components/ScalarSearchResults/ScalarSearchResultList.vue.js +29 -0
- package/dist/components/ScalarSearchResults/ScalarSearchResultList.vue2.js +4 -0
- package/dist/components/ScalarTextField/ScalarTextField.vue.js +7 -0
- package/dist/components/ScalarTextField/ScalarTextField.vue2.js +107 -0
- package/dist/components/ScalarTextField/ScalarTextField.vue3.js +4 -0
- package/dist/cva.js +19 -0
- package/dist/helpers/sleep.js +4 -0
- package/dist/index.d.ts +114 -29
- package/dist/index.js +40 -1226
- package/dist/style.css +1 -1
- package/dist/tailwind/tailwind.css.js +4 -0
- package/package.json +16 -16
- package/dist/Add-BHOyatcf.cjs +0 -1
- package/dist/ArrowLeft-D0Lenmyx.cjs +0 -1
- package/dist/ArrowRight-CtFXKmN-.cjs +0 -1
- package/dist/Background-CC9MR0o5.cjs +0 -1
- package/dist/Brackets-BH2hJOrC.cjs +0 -1
- package/dist/Branch-DscqPJxw.cjs +0 -1
- package/dist/CallToAction-CH2urf5-.cjs +0 -1
- package/dist/Checkmark-zGf1EnxZ.cjs +0 -1
- package/dist/ChevronDown-BB1ECzOu.cjs +0 -1
- package/dist/ChevronLeft-B1fJRTS6.cjs +0 -1
- package/dist/ChevronRight-67haRaE0.cjs +0 -1
- package/dist/ChevronUp-DZmVf1ZI.cjs +0 -1
- package/dist/Clipboard-CMP6ZrLh.cjs +0 -1
- package/dist/Close-DqX2BfNh.cjs +0 -1
- package/dist/CodeFolder-1sbKUi4C.cjs +0 -1
- package/dist/Cookie-Dai0Vq-L.cjs +0 -1
- package/dist/DarkMode-YTngOyuf.cjs +0 -1
- package/dist/Delete-C5KJApGv.cjs +0 -1
- package/dist/Discord-bYns0mfM.cjs +0 -1
- package/dist/DocsPage-BUQM1ZP5.cjs +0 -1
- package/dist/Duplicate-BcpwaK9W.cjs +0 -1
- package/dist/Edit-B2Dib3l9.cjs +0 -1
- package/dist/Ellipses-lwFMwsvO.cjs +0 -1
- package/dist/Error-BEEilYrB.cjs +0 -1
- package/dist/ExternalLink-Cdev1TTT.cjs +0 -1
- package/dist/FilterList-Ch3lrlmt.cjs +0 -1
- package/dist/Folder-BDWpN5FK.cjs +0 -1
- package/dist/GitHub-DgVS74mp.cjs +0 -1
- package/dist/Hide-BpM8svWr.cjs +0 -1
- package/dist/History-CIjAbmel.cjs +0 -1
- package/dist/JsonObject-D-pZ81gx.cjs +0 -1
- package/dist/Key-C9vNtSgp.cjs +0 -1
- package/dist/Leave-DNKXl2pb.cjs +0 -1
- package/dist/LightDarkModeToggle-CK1SiK6S.cjs +0 -1
- package/dist/LightMode-CbktVjW4.cjs +0 -1
- package/dist/Link-NVOZGmsH.cjs +0 -1
- package/dist/Lock-CEwhrvWA.cjs +0 -1
- package/dist/Logo-CPK0sTGo.cjs +0 -1
- package/dist/LogoAPI-auvrtupZ.cjs +0 -1
- package/dist/LogoClient-DrkORYwm.cjs +0 -1
- package/dist/LogoMarket-Bpc5LKT8.cjs +0 -1
- package/dist/LogoSwagger-DezmPG0T.cjs +0 -1
- package/dist/Magic-D_nChUbo.cjs +0 -1
- package/dist/Menu-BMIM0ijJ.cjs +0 -1
- package/dist/Page-vHFXthOd.cjs +0 -1
- package/dist/PaperAirplane-CCHkYifV.cjs +0 -1
- package/dist/Payment-D0GqQgZi.cjs +0 -1
- package/dist/Play-D-MVpYlN.cjs +0 -1
- package/dist/Refresh-BW_PXJVB.cjs +0 -1
- package/dist/Response-kwZlQMN4.cjs +0 -1
- package/dist/Search-Bd6LPK9x.cjs +0 -1
- package/dist/Show-CGQdMeuP.cjs +0 -1
- package/dist/SideBarClosed-DvogXH7H.cjs +0 -1
- package/dist/SideBarOpen-C4lWzbws.cjs +0 -1
- package/dist/Sort-ownhPFMM.cjs +0 -1
- package/dist/Terminal-32pUnEJb.cjs +0 -1
- package/dist/ThumbsDown-CaDWC79Q.cjs +0 -1
- package/dist/ThumbsUp-2Uv5cZwr.cjs +0 -1
- package/dist/Trash-Cu7tKxXp.cjs +0 -1
- package/dist/Unlock-CNorWYJe.cjs +0 -1
- package/dist/Upload-jkvbAI71.cjs +0 -1
- package/dist/User-CTJkuv9t.cjs +0 -1
- package/dist/index.cjs +0 -1
- package/dist/prism-autoloader-Dlh8Vzlw.js +0 -370
- package/dist/prism-autoloader-hGN9n4IP.cjs +0 -1
- package/dist/programming-framework-angular-Cb3hOem2.cjs +0 -1
- package/dist/programming-framework-astro-CqzXmk7-.cjs +0 -1
- package/dist/programming-framework-laravel-DPR0ohMY.cjs +0 -1
- package/dist/programming-framework-nextdotjs-CEJkEXh_.cjs +0 -1
- package/dist/programming-framework-react-C8QbUlg2.cjs +0 -1
- package/dist/programming-framework-vuedotjs-CfbQc23o.cjs +0 -1
- package/dist/programming-language-c-D_xNi2oU.cjs +0 -1
- package/dist/programming-language-clojure-C5dOsI4K.cjs +0 -1
- package/dist/programming-language-csharp-BHivZJkg.cjs +0 -1
- package/dist/programming-language-css3-wgDmqbZB.cjs +0 -1
- package/dist/programming-language-go-BjshiBx9.cjs +0 -1
- package/dist/programming-language-html5-CtUUccLl.cjs +0 -1
- package/dist/programming-language-http-Dz4cvjKh.cjs +0 -1
- package/dist/programming-language-java-d4f1Y0fu.cjs +0 -1
- package/dist/programming-language-javascript-BV0cufZy.cjs +0 -1
- package/dist/programming-language-json-D4cFxPs5.cjs +0 -1
- package/dist/programming-language-kotlin-eKkN_tOl.cjs +0 -1
- package/dist/programming-language-node-CFlS5cG5.cjs +0 -1
- package/dist/programming-language-objc-B5s5jkUH.cjs +0 -1
- package/dist/programming-language-ocaml-COhyM4XA.cjs +0 -1
- package/dist/programming-language-php-L-yPjdeD.cjs +0 -1
- package/dist/programming-language-powershell-CETg5mF_.cjs +0 -1
- package/dist/programming-language-python-D81TlBUm.cjs +0 -1
- package/dist/programming-language-r-BA21GfCv.cjs +0 -1
- package/dist/programming-language-ruby-CZdOfp80.cjs +0 -1
- package/dist/programming-language-scala-DXPi3PgB.cjs +0 -1
- package/dist/programming-language-shell-C5XFKH1k.cjs +0 -1
- package/dist/programming-language-swift-ARCBHgkE.cjs +0 -1
- package/dist/programming-language-typescript-DCLuAk73.cjs +0 -1
- package/dist/programming-script-code-DbeLXUtP.cjs +0 -1
- package/dist/programming-tool-git-D92HKo9l.cjs +0 -1
- package/dist/programming-tool-tailwindcss-Cog36cMC.cjs +0 -1
- package/src/tailwind/index.ts +0 -1
- package/src/tailwind/tailwind.theme.ts +0 -82
- /package/dist/{Add-yNxGpRcH.js → components/ScalarIcon/icons/Add.svg.js} +0 -0
- /package/dist/{ArrowLeft-D7tW1xQo.js → components/ScalarIcon/icons/ArrowLeft.svg.js} +0 -0
- /package/dist/{ArrowRight-DmO-sdb2.js → components/ScalarIcon/icons/ArrowRight.svg.js} +0 -0
- /package/dist/{Background-CU9VIbfN.js → components/ScalarIcon/icons/Background.svg.js} +0 -0
- /package/dist/{Brackets-CI207-BL.js → components/ScalarIcon/icons/Brackets.svg.js} +0 -0
- /package/dist/{Branch-CXwj8YuG.js → components/ScalarIcon/icons/Branch.svg.js} +0 -0
- /package/dist/{CallToAction-XLYRSI1h.js → components/ScalarIcon/icons/CallToAction.svg.js} +0 -0
- /package/dist/{Checkmark-DhbrPM0P.js → components/ScalarIcon/icons/Checkmark.svg.js} +0 -0
- /package/dist/{ChevronDown-Co7EAKAv.js → components/ScalarIcon/icons/ChevronDown.svg.js} +0 -0
- /package/dist/{ChevronLeft-DYt0idAu.js → components/ScalarIcon/icons/ChevronLeft.svg.js} +0 -0
- /package/dist/{ChevronRight-ylxToVWl.js → components/ScalarIcon/icons/ChevronRight.svg.js} +0 -0
- /package/dist/{ChevronUp-xAnukIfj.js → components/ScalarIcon/icons/ChevronUp.svg.js} +0 -0
- /package/dist/{Clipboard-CU_KxGEv.js → components/ScalarIcon/icons/Clipboard.svg.js} +0 -0
- /package/dist/{Close-xHiYwS8Q.js → components/ScalarIcon/icons/Close.svg.js} +0 -0
- /package/dist/{CodeFolder-Cv_igzJE.js → components/ScalarIcon/icons/CodeFolder.svg.js} +0 -0
- /package/dist/{Cookie-CEHvXpqB.js → components/ScalarIcon/icons/Cookie.svg.js} +0 -0
- /package/dist/{DarkMode-BMR457PH.js → components/ScalarIcon/icons/DarkMode.svg.js} +0 -0
- /package/dist/{Delete-BCZmxrDD.js → components/ScalarIcon/icons/Delete.svg.js} +0 -0
- /package/dist/{Discord-BHYOFBB2.js → components/ScalarIcon/icons/Discord.svg.js} +0 -0
- /package/dist/{DocsPage-Dwx7ZMU9.js → components/ScalarIcon/icons/DocsPage.svg.js} +0 -0
- /package/dist/{Duplicate-DRWEv4R_.js → components/ScalarIcon/icons/Duplicate.svg.js} +0 -0
- /package/dist/{Edit-Br04RNYb.js → components/ScalarIcon/icons/Edit.svg.js} +0 -0
- /package/dist/{Ellipses-Bo_X36Hx.js → components/ScalarIcon/icons/Ellipses.svg.js} +0 -0
- /package/dist/{Error-C5LiISnw.js → components/ScalarIcon/icons/Error.svg.js} +0 -0
- /package/dist/{ExternalLink-DK8L-EH7.js → components/ScalarIcon/icons/ExternalLink.svg.js} +0 -0
- /package/dist/{FilterList-CS8Il7NE.js → components/ScalarIcon/icons/FilterList.svg.js} +0 -0
- /package/dist/{Folder-CTvnVSEo.js → components/ScalarIcon/icons/Folder.svg.js} +0 -0
- /package/dist/{GitHub-NdE6Zs9k.js → components/ScalarIcon/icons/GitHub.svg.js} +0 -0
- /package/dist/{Hide-BgcCtErz.js → components/ScalarIcon/icons/Hide.svg.js} +0 -0
- /package/dist/{History-D9nmhNIn.js → components/ScalarIcon/icons/History.svg.js} +0 -0
- /package/dist/{JsonObject-hGdHUQ4M.js → components/ScalarIcon/icons/JsonObject.svg.js} +0 -0
- /package/dist/{Key-CWXJqX28.js → components/ScalarIcon/icons/Key.svg.js} +0 -0
- /package/dist/{Leave-K1J3uwoG.js → components/ScalarIcon/icons/Leave.svg.js} +0 -0
- /package/dist/{LightDarkModeToggle-De3vO47x.js → components/ScalarIcon/icons/LightDarkModeToggle.svg.js} +0 -0
- /package/dist/{LightMode-BeoMphBY.js → components/ScalarIcon/icons/LightMode.svg.js} +0 -0
- /package/dist/{Link-Bzuc__Nc.js → components/ScalarIcon/icons/Link.svg.js} +0 -0
- /package/dist/{Lock-xhiH1mKz.js → components/ScalarIcon/icons/Lock.svg.js} +0 -0
- /package/dist/{Logo-DwEDtgj-.js → components/ScalarIcon/icons/Logo.svg.js} +0 -0
- /package/dist/{LogoAPI-CohCfL3L.js → components/ScalarIcon/icons/LogoAPI.svg.js} +0 -0
- /package/dist/{LogoClient-Bq5O2QL2.js → components/ScalarIcon/icons/LogoClient.svg.js} +0 -0
- /package/dist/{LogoMarket-DwlApcab.js → components/ScalarIcon/icons/LogoMarket.svg.js} +0 -0
- /package/dist/{LogoSwagger-CH60H5qW.js → components/ScalarIcon/icons/LogoSwagger.svg.js} +0 -0
- /package/dist/{Magic-Dsi9_bEc.js → components/ScalarIcon/icons/Magic.svg.js} +0 -0
- /package/dist/{Menu-CFK5cOsm.js → components/ScalarIcon/icons/Menu.svg.js} +0 -0
- /package/dist/{Page-DA7CO5gc.js → components/ScalarIcon/icons/Page.svg.js} +0 -0
- /package/dist/{PaperAirplane-BC-4mGEB.js → components/ScalarIcon/icons/PaperAirplane.svg.js} +0 -0
- /package/dist/{Payment-hzcXP1Xb.js → components/ScalarIcon/icons/Payment.svg.js} +0 -0
- /package/dist/{Play-Cd4-o7Ji.js → components/ScalarIcon/icons/Play.svg.js} +0 -0
- /package/dist/{Refresh-BHRzzQ8P.js → components/ScalarIcon/icons/Refresh.svg.js} +0 -0
- /package/dist/{Response-DsTlT4S-.js → components/ScalarIcon/icons/Response.svg.js} +0 -0
- /package/dist/{Search-DqtlswRG.js → components/ScalarIcon/icons/Search.svg.js} +0 -0
- /package/dist/{Show-CbiiMLUa.js → components/ScalarIcon/icons/Show.svg.js} +0 -0
- /package/dist/{SideBarClosed-K53-CtXh.js → components/ScalarIcon/icons/SideBarClosed.svg.js} +0 -0
- /package/dist/{SideBarOpen-C7UgT82P.js → components/ScalarIcon/icons/SideBarOpen.svg.js} +0 -0
- /package/dist/{Sort-CaVMT7jM.js → components/ScalarIcon/icons/Sort.svg.js} +0 -0
- /package/dist/{Terminal-DJ7x2McL.js → components/ScalarIcon/icons/Terminal.svg.js} +0 -0
- /package/dist/{ThumbsDown-BMgnsASL.js → components/ScalarIcon/icons/ThumbsDown.svg.js} +0 -0
- /package/dist/{ThumbsUp-C1j6zY2j.js → components/ScalarIcon/icons/ThumbsUp.svg.js} +0 -0
- /package/dist/{Trash-BpA3zWPD.js → components/ScalarIcon/icons/Trash.svg.js} +0 -0
- /package/dist/{Unlock-HVYHMLxl.js → components/ScalarIcon/icons/Unlock.svg.js} +0 -0
- /package/dist/{Upload-D_pwqBDY.js → components/ScalarIcon/icons/Upload.svg.js} +0 -0
- /package/dist/{User-BLGkPc5I.js → components/ScalarIcon/icons/User.svg.js} +0 -0
- /package/dist/{programming-framework-angular-DD4Vjgbk.js → components/ScalarIcon/icons/programming-framework-angular.svg.js} +0 -0
- /package/dist/{programming-framework-astro-CLfrRt19.js → components/ScalarIcon/icons/programming-framework-astro.svg.js} +0 -0
- /package/dist/{programming-framework-laravel-kAy2wVLy.js → components/ScalarIcon/icons/programming-framework-laravel.svg.js} +0 -0
- /package/dist/{programming-framework-nextdotjs-BKdd_DY_.js → components/ScalarIcon/icons/programming-framework-nextdotjs.svg.js} +0 -0
- /package/dist/{programming-framework-react-PDgmtZuN.js → components/ScalarIcon/icons/programming-framework-react.svg.js} +0 -0
- /package/dist/{programming-framework-vuedotjs-Cim7D5tw.js → components/ScalarIcon/icons/programming-framework-vuedotjs.svg.js} +0 -0
- /package/dist/{programming-language-c-hPGu2Zvg.js → components/ScalarIcon/icons/programming-language-c.svg.js} +0 -0
- /package/dist/{programming-language-clojure-uqYXn7U6.js → components/ScalarIcon/icons/programming-language-clojure.svg.js} +0 -0
- /package/dist/{programming-language-csharp-CGxYkVA6.js → components/ScalarIcon/icons/programming-language-csharp.svg.js} +0 -0
- /package/dist/{programming-language-css3-Dpp4Cr6b.js → components/ScalarIcon/icons/programming-language-css3.svg.js} +0 -0
- /package/dist/{programming-language-go-CuKo8iD9.js → components/ScalarIcon/icons/programming-language-go.svg.js} +0 -0
- /package/dist/{programming-language-html5-DlqJK4EL.js → components/ScalarIcon/icons/programming-language-html5.svg.js} +0 -0
- /package/dist/{programming-language-http-f3NXC-Ae.js → components/ScalarIcon/icons/programming-language-http.svg.js} +0 -0
- /package/dist/{programming-language-java-BBodetdf.js → components/ScalarIcon/icons/programming-language-java.svg.js} +0 -0
- /package/dist/{programming-language-javascript-VxLvi1QG.js → components/ScalarIcon/icons/programming-language-javascript.svg.js} +0 -0
- /package/dist/{programming-language-json-Dq_K-q5f.js → components/ScalarIcon/icons/programming-language-json.svg.js} +0 -0
- /package/dist/{programming-language-kotlin-eTASnmL3.js → components/ScalarIcon/icons/programming-language-kotlin.svg.js} +0 -0
- /package/dist/{programming-language-node-oucaVOgY.js → components/ScalarIcon/icons/programming-language-node.svg.js} +0 -0
- /package/dist/{programming-language-objc-CPgQxmNi.js → components/ScalarIcon/icons/programming-language-objc.svg.js} +0 -0
- /package/dist/{programming-language-ocaml-Q1-Jv5Q5.js → components/ScalarIcon/icons/programming-language-ocaml.svg.js} +0 -0
- /package/dist/{programming-language-php-GY38f8r4.js → components/ScalarIcon/icons/programming-language-php.svg.js} +0 -0
- /package/dist/{programming-language-powershell-xLOxAYP_.js → components/ScalarIcon/icons/programming-language-powershell.svg.js} +0 -0
- /package/dist/{programming-language-python-Ct-_kNjo.js → components/ScalarIcon/icons/programming-language-python.svg.js} +0 -0
- /package/dist/{programming-language-r-Ch3T1qiC.js → components/ScalarIcon/icons/programming-language-r.svg.js} +0 -0
- /package/dist/{programming-language-ruby-DhdM4d7g.js → components/ScalarIcon/icons/programming-language-ruby.svg.js} +0 -0
- /package/dist/{programming-language-scala-BVg0dToJ.js → components/ScalarIcon/icons/programming-language-scala.svg.js} +0 -0
- /package/dist/{programming-language-shell-uj1zoCVW.js → components/ScalarIcon/icons/programming-language-shell.svg.js} +0 -0
- /package/dist/{programming-language-swift-Dn72xPjg.js → components/ScalarIcon/icons/programming-language-swift.svg.js} +0 -0
- /package/dist/{programming-language-typescript-CdF-HuRi.js → components/ScalarIcon/icons/programming-language-typescript.svg.js} +0 -0
- /package/dist/{programming-script-code-CUHv6qR8.js → components/ScalarIcon/icons/programming-script-code.svg.js} +0 -0
- /package/dist/{programming-tool-git-C-BMJCAo.js → components/ScalarIcon/icons/programming-tool-git.svg.js} +0 -0
- /package/dist/{programming-tool-tailwindcss-xjXi0E6g.js → components/ScalarIcon/icons/programming-tool-tailwindcss.svg.js} +0 -0
package/README.md
CHANGED
|
@@ -13,8 +13,8 @@ pnpm i @scalar/theme @scalar/components
|
|
|
13
13
|
In your main setup file (main.ts etc)
|
|
14
14
|
|
|
15
15
|
```ts
|
|
16
|
-
import '@scalar/themes/fonts.css'
|
|
17
16
|
import '@scalar/themes/base.css'
|
|
17
|
+
import '@scalar/themes/fonts.css'
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
Then to use the components
|
|
@@ -27,7 +27,7 @@ import { ScalarButton, ScalarTextField } from '@scalar/components'
|
|
|
27
27
|
<template>
|
|
28
28
|
<main class="col-1 items-center justify-center">
|
|
29
29
|
<div
|
|
30
|
-
class="col w-full max-w-md items-center gap-4 rounded-lg bg-
|
|
30
|
+
class="col w-full max-w-md items-center gap-4 rounded-lg bg-b-3 p-8 shadow">
|
|
31
31
|
<h1 className="text-lg font-bold">Sign in to your account</h1>
|
|
32
32
|
|
|
33
33
|
<ScalarTextField
|
|
@@ -39,80 +39,6 @@ import { ScalarButton, ScalarTextField } from '@scalar/components'
|
|
|
39
39
|
</template>
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
## Theme variables
|
|
43
|
-
|
|
44
|
-
To override the theme, feel free to set the `--scalar-x` versions of these variables.
|
|
45
|
-
|
|
46
|
-
```ts
|
|
47
|
-
export const theme = {
|
|
48
|
-
boxShadow: {
|
|
49
|
-
label:
|
|
50
|
-
'0 0 2px 2px var(--scalar-background-1)',
|
|
51
|
-
DEFAULT: 'var(--scalar-shadow-1)',
|
|
52
|
-
md: 'var(--scalar-shadow-2)',
|
|
53
|
-
sm: 'rgba(0, 0, 0, 0.09) 0px 1px 4px',
|
|
54
|
-
none: '0 0 #0000',
|
|
55
|
-
},
|
|
56
|
-
colors: {
|
|
57
|
-
'fore-1': 'var(--scalar-color-1)',
|
|
58
|
-
'fore-2': 'var(--scalar-color-2)',
|
|
59
|
-
'fore-3': 'var(--scalar-color-3)',
|
|
60
|
-
'accent': 'var(--scalar-color-accent)',
|
|
61
|
-
'back-1': 'var(--scalar-background-1)',
|
|
62
|
-
'back-2': 'var(--scalar-background-2)',
|
|
63
|
-
'back-3': 'var(--scalar-background-3)',
|
|
64
|
-
'back-accent':
|
|
65
|
-
'var(--scalar-background-accent)',
|
|
66
|
-
|
|
67
|
-
'backdrop': 'rgba(0, 0, 0, 0.44)',
|
|
68
|
-
'border': 'var(--scalar-border-color)',
|
|
69
|
-
|
|
70
|
-
'back-btn-1': 'var(--scalar-button-1)',
|
|
71
|
-
'fore-btn-1':
|
|
72
|
-
'var(--scalar-button-1-color)',
|
|
73
|
-
'hover-btn-1':
|
|
74
|
-
'var(--scalar-button-1-hover)',
|
|
75
|
-
|
|
76
|
-
'white': '#FFF',
|
|
77
|
-
'green': 'var(--scalar-color-green)',
|
|
78
|
-
'red': 'var(--scalar-color-red)',
|
|
79
|
-
'yellow': 'var(--scalar-color-yellow)',
|
|
80
|
-
'blue': 'var(--scalar-color-blue)',
|
|
81
|
-
'orange': 'var(--scalar-color-orange)',
|
|
82
|
-
'purple': 'var(--scalar-color-purple)',
|
|
83
|
-
'error': 'var(--scalar-error-color)',
|
|
84
|
-
'ghost': 'var(--scalar-color-ghost)',
|
|
85
|
-
'transparent': 'transparent',
|
|
86
|
-
},
|
|
87
|
-
fontSize: {
|
|
88
|
-
xxs: 'var(--scalar-micro, var(--scalar-font-size-5))',
|
|
89
|
-
xs: 'var(--scalar-mini, var(--scalar-font-size-4))',
|
|
90
|
-
sm: 'var(--scalar-small, var(--scalar-font-size-3))',
|
|
91
|
-
base: 'var(--scalar-paragraph, var(--scalar-font-size-2))',
|
|
92
|
-
lg: 'var(--scalar-font-size-1)',
|
|
93
|
-
},
|
|
94
|
-
} as const
|
|
95
|
-
|
|
96
|
-
export const extend = {
|
|
97
|
-
borderRadius: {
|
|
98
|
-
DEFAULT: 'var(--scalar-radius)',
|
|
99
|
-
md: 'var(--scalar-radius)',
|
|
100
|
-
lg: 'var(--scalar-radius-lg)',
|
|
101
|
-
xl: 'var(--scalar-radius-xl)',
|
|
102
|
-
},
|
|
103
|
-
fontWeight: {
|
|
104
|
-
medium: 'var(--scalar-font-medium)',
|
|
105
|
-
bold: 'var(-scalar-font-bold)',
|
|
106
|
-
},
|
|
107
|
-
maxWidth: {
|
|
108
|
-
'screen-xs': '480px',
|
|
109
|
-
'screen-sm': '540px',
|
|
110
|
-
'screen-md': '640px',
|
|
111
|
-
'screen-lg': '800px',
|
|
112
|
-
},
|
|
113
|
-
} as const
|
|
114
|
-
```
|
|
115
|
-
|
|
116
42
|
## CSS Layers
|
|
117
43
|
|
|
118
44
|
This package exports its' tailwind styles in the following CSS cascade layers to make them easy to overwrite.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { defineComponent as d, computed as n, useAttrs as u, openBlock as a, createElementBlock as t, mergeProps as p, unref as s, renderSlot as i, createCommentVNode as r, createVNode as m } from "vue";
|
|
2
|
+
import { cx as f } from "../../cva.js";
|
|
3
|
+
import { variants as c } from "./variants.js";
|
|
4
|
+
import h from "../ScalarLoading/ScalarLoading.vue.js";
|
|
5
|
+
const v = ["ariaDisabled", "type"], b = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "mr-2 h-4 w-4"
|
|
8
|
+
}, g = {
|
|
9
|
+
key: 1,
|
|
10
|
+
class: "ml-2"
|
|
11
|
+
}, $ = /* @__PURE__ */ d({
|
|
12
|
+
inheritAttrs: !1,
|
|
13
|
+
__name: "ScalarButton",
|
|
14
|
+
props: {
|
|
15
|
+
disabled: { type: Boolean },
|
|
16
|
+
fullWidth: { type: Boolean, default: !1 },
|
|
17
|
+
loading: {},
|
|
18
|
+
size: { default: "md" },
|
|
19
|
+
variant: { default: "solid" },
|
|
20
|
+
type: { default: "button" }
|
|
21
|
+
},
|
|
22
|
+
setup(y) {
|
|
23
|
+
const o = n(() => {
|
|
24
|
+
const { class: e, ...l } = u();
|
|
25
|
+
return { class: e || "", rest: l };
|
|
26
|
+
});
|
|
27
|
+
return (e, l) => (a(), t("button", p(o.value.rest, {
|
|
28
|
+
ariaDisabled: e.disabled || void 0,
|
|
29
|
+
class: s(f)(
|
|
30
|
+
s(c)({ fullWidth: e.fullWidth, disabled: e.disabled, size: e.size, variant: e.variant }),
|
|
31
|
+
{ "pl-9 pr-3": e.loading },
|
|
32
|
+
`${o.value.class}`
|
|
33
|
+
),
|
|
34
|
+
type: e.type
|
|
35
|
+
}), [
|
|
36
|
+
e.$slots.icon ? (a(), t("div", b, [
|
|
37
|
+
i(e.$slots, "icon")
|
|
38
|
+
])) : r("", !0),
|
|
39
|
+
i(e.$slots, "default"),
|
|
40
|
+
e.loading ? (a(), t("div", g, [
|
|
41
|
+
m(s(h), {
|
|
42
|
+
loadingState: e.loading,
|
|
43
|
+
size: "20px"
|
|
44
|
+
}, null, 8, ["loadingState"])
|
|
45
|
+
])) : r("", !0)
|
|
46
|
+
], 16, v));
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export {
|
|
50
|
+
$ as default
|
|
51
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { cva as t } from "../../cva.js";
|
|
2
|
+
const r = {
|
|
3
|
+
solid: [
|
|
4
|
+
"scalar-button-solid",
|
|
5
|
+
"bg-b-btn text-c-btn shadow-sm active:bg-b-btn active:shadow-none hocus:bg-h-btn"
|
|
6
|
+
],
|
|
7
|
+
outlined: [
|
|
8
|
+
"scalar-button-outlined",
|
|
9
|
+
"active:bg-btn-1 border border-solid border-border bg-transparent text-c-1 hocus:bg-border"
|
|
10
|
+
],
|
|
11
|
+
ghost: [
|
|
12
|
+
"scalar-button-ghost",
|
|
13
|
+
"bg-transparent text-c-3 transition-colors active:text-c-1 hocus:text-c-1"
|
|
14
|
+
],
|
|
15
|
+
danger: [
|
|
16
|
+
"scalar-button-danger",
|
|
17
|
+
"bg-error text-white active:brightness-90 hocus:brightness-90"
|
|
18
|
+
]
|
|
19
|
+
}, o = t({
|
|
20
|
+
base: "scalar-button row cursor-pointer items-center justify-center rounded font-medium",
|
|
21
|
+
variants: {
|
|
22
|
+
disabled: {
|
|
23
|
+
true: "bg-background-2 text-color-3 cursor-not-allowed shadow-none"
|
|
24
|
+
},
|
|
25
|
+
fullWidth: { true: "w-full" },
|
|
26
|
+
size: { sm: "px-2 py-1 text-xs", md: "h-10 px-6 text-sm" },
|
|
27
|
+
variant: r
|
|
28
|
+
},
|
|
29
|
+
compoundVariants: [
|
|
30
|
+
{
|
|
31
|
+
disabled: !0,
|
|
32
|
+
variant: "ghost",
|
|
33
|
+
class: "text-ghost bg-transparent"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
export {
|
|
38
|
+
r as styles,
|
|
39
|
+
o as variants
|
|
40
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineComponent as a, computed as l, openBlock as o, createElementBlock as s, normalizeClass as i } from "vue";
|
|
2
|
+
import { syntaxHighlight as c, standardLanguages as m } from "@scalar/code-highlight";
|
|
3
|
+
import "@scalar/code-highlight/css/code.css";
|
|
4
|
+
import { prettyPrintString as p } from "./utils/prettyPrintString.js";
|
|
5
|
+
const d = ["innerHTML"], C = /* @__PURE__ */ a({
|
|
6
|
+
__name: "ScalarCodeBlock",
|
|
7
|
+
props: {
|
|
8
|
+
content: {},
|
|
9
|
+
lang: { default: "plaintext" },
|
|
10
|
+
lineNumbers: { type: Boolean, default: !1 },
|
|
11
|
+
hideCredentials: {}
|
|
12
|
+
},
|
|
13
|
+
setup(t) {
|
|
14
|
+
const e = t, n = l(() => c(p(e.content), {
|
|
15
|
+
lang: e.lang.trim(),
|
|
16
|
+
languages: m,
|
|
17
|
+
lineNumbers: e.lineNumbers,
|
|
18
|
+
maskCredentials: e.hideCredentials
|
|
19
|
+
}).slice(5, -6));
|
|
20
|
+
return (r, u) => (o(), s("pre", {
|
|
21
|
+
class: i("scalar-component scalar-codeblock-pre"),
|
|
22
|
+
innerHTML: n.value
|
|
23
|
+
}, null, 8, d));
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
export {
|
|
27
|
+
C as default
|
|
28
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { replaceCircularDependencies as e } from "./replaceCircularReferences.js";
|
|
2
|
+
function f(r) {
|
|
3
|
+
if (typeof r == "string")
|
|
4
|
+
return r;
|
|
5
|
+
if (typeof r == "object")
|
|
6
|
+
try {
|
|
7
|
+
return JSON.stringify(r, null, 2);
|
|
8
|
+
} catch {
|
|
9
|
+
return e(r);
|
|
10
|
+
}
|
|
11
|
+
return r;
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
f as prettyPrintString
|
|
15
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
function c(n) {
|
|
2
|
+
const e = /* @__PURE__ */ new Set();
|
|
3
|
+
return JSON.stringify(
|
|
4
|
+
n,
|
|
5
|
+
(t, r) => {
|
|
6
|
+
if (typeof r == "object" && r !== null) {
|
|
7
|
+
if (e.has(r))
|
|
8
|
+
return "[Circular]";
|
|
9
|
+
e.add(r);
|
|
10
|
+
}
|
|
11
|
+
return r;
|
|
12
|
+
},
|
|
13
|
+
2
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
c as replaceCircularDependencies
|
|
18
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { defineComponent as a, openBlock as p, createBlock as i, unref as o, withCtx as t, createVNode as l, mergeProps as m, renderSlot as s, createElementVNode as f } from "vue";
|
|
2
|
+
import { Menu as u, MenuItems as d, MenuButton as c } from "@headlessui/vue";
|
|
3
|
+
import _ from "../ScalarFloating/ScalarFloating.vue.js";
|
|
4
|
+
const h = /* @__PURE__ */ f("div", { class: "absolute inset-0 -z-1 rounded bg-b-1 shadow-lg brightness-lifted" }, null, -1), w = /* @__PURE__ */ a({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "ScalarDropdown",
|
|
7
|
+
props: {
|
|
8
|
+
placement: {},
|
|
9
|
+
resize: { type: Boolean },
|
|
10
|
+
isOpen: { type: Boolean },
|
|
11
|
+
teleport: { type: Boolean }
|
|
12
|
+
},
|
|
13
|
+
setup(B) {
|
|
14
|
+
return (e, b) => (p(), i(o(u), null, {
|
|
15
|
+
default: t(({ open: r }) => [
|
|
16
|
+
l(o(_), {
|
|
17
|
+
isOpen: r ?? e.isOpen,
|
|
18
|
+
placement: e.placement ?? "bottom-start",
|
|
19
|
+
resize: e.resize,
|
|
20
|
+
teleport: e.teleport
|
|
21
|
+
}, {
|
|
22
|
+
floating: t(({ width: n }) => [
|
|
23
|
+
l(o(d), m({
|
|
24
|
+
class: "relative flex w-56 flex-col p-0.75",
|
|
25
|
+
style: { width: n }
|
|
26
|
+
}, e.$attrs), {
|
|
27
|
+
default: t(() => [
|
|
28
|
+
s(e.$slots, "items"),
|
|
29
|
+
h
|
|
30
|
+
]),
|
|
31
|
+
_: 2
|
|
32
|
+
}, 1040, ["style"])
|
|
33
|
+
]),
|
|
34
|
+
default: t(() => [
|
|
35
|
+
l(o(c), { as: "template" }, {
|
|
36
|
+
default: t(() => [
|
|
37
|
+
s(e.$slots, "default")
|
|
38
|
+
]),
|
|
39
|
+
_: 3
|
|
40
|
+
})
|
|
41
|
+
]),
|
|
42
|
+
_: 2
|
|
43
|
+
}, 1032, ["isOpen", "placement", "resize", "teleport"])
|
|
44
|
+
]),
|
|
45
|
+
_: 3
|
|
46
|
+
}));
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export {
|
|
50
|
+
w as default
|
|
51
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { openBlock as r, createElementBlock as e } from "vue";
|
|
2
|
+
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
3
|
+
const c = {}, t = { class: "-mx-0.75 my-0.75 h-px bg-border" };
|
|
4
|
+
function n(s, _) {
|
|
5
|
+
return r(), e("div", t);
|
|
6
|
+
}
|
|
7
|
+
const i = /* @__PURE__ */ o(c, [["render", n]]);
|
|
8
|
+
export {
|
|
9
|
+
i as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { defineComponent as s, openBlock as i, createBlock as l, unref as t, withCtx as d, createElementVNode as p, normalizeClass as m, renderSlot as c } from "vue";
|
|
2
|
+
import { MenuItem as b } from "@headlessui/vue";
|
|
3
|
+
import { cva as u, cx as f } from "../../cva.js";
|
|
4
|
+
const g = /* @__PURE__ */ s({
|
|
5
|
+
__name: "ScalarDropdownItem",
|
|
6
|
+
props: {
|
|
7
|
+
disabled: { type: Boolean }
|
|
8
|
+
},
|
|
9
|
+
emits: ["click"],
|
|
10
|
+
setup(x) {
|
|
11
|
+
const o = u({
|
|
12
|
+
base: [
|
|
13
|
+
// Layout
|
|
14
|
+
"min-w-0 items-center gap-3 rounded px-2.5 py-1.5 text-left",
|
|
15
|
+
"first-of-type:mt-0.75 last-of-type:mb-0.75",
|
|
16
|
+
// Text / background style
|
|
17
|
+
"truncate bg-transparent text-xs text-c-1",
|
|
18
|
+
// Interaction
|
|
19
|
+
"cursor-pointer hover:bg-b-2 hover:text-c-1"
|
|
20
|
+
],
|
|
21
|
+
variants: {
|
|
22
|
+
disabled: { true: "pointer-events-none text-c-3" },
|
|
23
|
+
active: { true: "bg-b-2 text-c-1" }
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
return (e, r) => (i(), l(t(b), { disabled: e.disabled }, {
|
|
27
|
+
default: d(({ active: a }) => [
|
|
28
|
+
p("button", {
|
|
29
|
+
class: m(["item", t(f)("scalar-dropdown-item", t(o)({ active: a, disabled: e.disabled }))]),
|
|
30
|
+
type: "button",
|
|
31
|
+
onClick: r[0] || (r[0] = (n) => e.$emit("click", n))
|
|
32
|
+
}, [
|
|
33
|
+
c(e.$slots, "default")
|
|
34
|
+
], 2)
|
|
35
|
+
]),
|
|
36
|
+
_: 3
|
|
37
|
+
}, 8, ["disabled"]));
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
export {
|
|
41
|
+
g as default
|
|
42
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { defineComponent as w, ref as s, computed as t, openBlock as d, createElementBlock as z, Fragment as b, createElementVNode as p, normalizeClass as k, renderSlot as m, createBlock as B, Teleport as R, normalizeStyle as S, unref as f, createCommentVNode as C } from "vue";
|
|
2
|
+
import { getSideAxis as c } from "@floating-ui/utils";
|
|
3
|
+
import { useFloating as E, autoUpdate as F, offset as _, flip as $, shift as A } from "@floating-ui/vue";
|
|
4
|
+
import { useResizeWithTarget as N } from "./useResizeWithTarget.js";
|
|
5
|
+
const D = /* @__PURE__ */ w({
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "ScalarFloating",
|
|
8
|
+
props: {
|
|
9
|
+
placement: {},
|
|
10
|
+
resize: { type: Boolean },
|
|
11
|
+
middleware: {},
|
|
12
|
+
isOpen: { type: Boolean },
|
|
13
|
+
teleport: { type: Boolean }
|
|
14
|
+
},
|
|
15
|
+
setup(u) {
|
|
16
|
+
const o = u, r = s(null), l = s(null), n = t(
|
|
17
|
+
() => {
|
|
18
|
+
var e, a;
|
|
19
|
+
return (((a = (e = l.value) == null ? void 0 : e.children) == null ? void 0 : a[0]) || l.value) ?? void 0;
|
|
20
|
+
}
|
|
21
|
+
), i = N(n, {
|
|
22
|
+
enabled: t(() => o.resize)
|
|
23
|
+
}), g = t(
|
|
24
|
+
() => c(o.placement || "bottom") === "y" ? i.width.value : void 0
|
|
25
|
+
), h = t(
|
|
26
|
+
() => c(o.placement || "bottom") === "x" ? i.height.value : void 0
|
|
27
|
+
), { floatingStyles: v, middlewareData: y } = E(n, r, {
|
|
28
|
+
placement: t(() => o.placement),
|
|
29
|
+
whileElementsMounted: F,
|
|
30
|
+
middleware: t(() => [
|
|
31
|
+
_(5),
|
|
32
|
+
$(),
|
|
33
|
+
A(),
|
|
34
|
+
...o.middleware ?? []
|
|
35
|
+
])
|
|
36
|
+
});
|
|
37
|
+
return (e, a) => (d(), z(b, null, [
|
|
38
|
+
p("div", {
|
|
39
|
+
ref_key: "wrapperRef",
|
|
40
|
+
ref: l,
|
|
41
|
+
class: k({ contents: !!e.$slots.default })
|
|
42
|
+
}, [
|
|
43
|
+
m(e.$slots, "default")
|
|
44
|
+
], 2),
|
|
45
|
+
e.isOpen ? (d(), B(R, {
|
|
46
|
+
key: 0,
|
|
47
|
+
disabled: !e.teleport,
|
|
48
|
+
to: "body"
|
|
49
|
+
}, [
|
|
50
|
+
p("div", {
|
|
51
|
+
ref_key: "floatingRef",
|
|
52
|
+
ref: r,
|
|
53
|
+
class: "relative z-overlay",
|
|
54
|
+
style: S(f(v))
|
|
55
|
+
}, [
|
|
56
|
+
m(e.$slots, "floating", {
|
|
57
|
+
data: f(y),
|
|
58
|
+
height: h.value,
|
|
59
|
+
width: g.value
|
|
60
|
+
})
|
|
61
|
+
], 4)
|
|
62
|
+
], 8, ["disabled"])) : C("", !0)
|
|
63
|
+
], 64));
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
export {
|
|
67
|
+
D as default
|
|
68
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ref as t, watch as b, toValue as a, computed as l } from "vue";
|
|
2
|
+
function c(v, o = { enabled: t(!0) }) {
|
|
3
|
+
const u = t(0), n = t(0), r = t();
|
|
4
|
+
return typeof ResizeObserver < "u" && (r.value = new ResizeObserver(([e]) => {
|
|
5
|
+
var i, d;
|
|
6
|
+
e && (u.value = ((i = e.borderBoxSize[0]) == null ? void 0 : i.inlineSize) ?? 0, n.value = ((d = e.borderBoxSize[0]) == null ? void 0 : d.blockSize) ?? 0);
|
|
7
|
+
})), b(
|
|
8
|
+
[() => a(o.enabled), () => a(v)],
|
|
9
|
+
([e, i]) => {
|
|
10
|
+
!i || !r.value || (e ? r.value.observe(i) : r.value.disconnect());
|
|
11
|
+
},
|
|
12
|
+
{ immediate: !0 }
|
|
13
|
+
), {
|
|
14
|
+
width: l(
|
|
15
|
+
() => a(o.enabled) ? `${u.value}px` : void 0
|
|
16
|
+
),
|
|
17
|
+
height: l(
|
|
18
|
+
() => a(o.enabled) ? `${n.value}px` : void 0
|
|
19
|
+
)
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
c as useResizeWithTarget
|
|
24
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineComponent as t, unref as e, openBlock as o, createBlock as a, resolveDynamicComponent as m, normalizeClass as p, createElementBlock as z } from "vue";
|
|
2
|
+
import { cva as f, cx as k } from "../../cva.js";
|
|
3
|
+
import { getIcon as n } from "./icons/index.js";
|
|
4
|
+
const u = ["src"], g = /* @__PURE__ */ t({
|
|
5
|
+
__name: "ScalarIcon",
|
|
6
|
+
props: {
|
|
7
|
+
icon: {},
|
|
8
|
+
size: {}
|
|
9
|
+
},
|
|
10
|
+
setup(i) {
|
|
11
|
+
const r = i, c = f({
|
|
12
|
+
variants: {
|
|
13
|
+
size: {
|
|
14
|
+
xs: "size-3 stroke-[1.4]",
|
|
15
|
+
sm: "size-3.5 stroke-[1.2]",
|
|
16
|
+
md: "size-4 stroke-[1.1]",
|
|
17
|
+
lg: "size-5",
|
|
18
|
+
xl: "size-6 stroke-[0.96]",
|
|
19
|
+
"2xl": "size-8 stroke-[0.92]",
|
|
20
|
+
"3xl": "size-10 stroke-[0.9]",
|
|
21
|
+
full: "size-full"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
size: "full"
|
|
26
|
+
}
|
|
27
|
+
}), l = n(r.icon);
|
|
28
|
+
return (s, d) => e(l) ? (o(), a(m(e(n)(s.icon)), {
|
|
29
|
+
key: 0,
|
|
30
|
+
class: p(e(k)("scalar-icon", e(c)({ size: s.size })))
|
|
31
|
+
}, null, 8, ["class"])) : (o(), z("img", {
|
|
32
|
+
key: 1,
|
|
33
|
+
src: s.icon
|
|
34
|
+
}, null, 8, u));
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
export {
|
|
38
|
+
g as default
|
|
39
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { openBlock as t, createElementBlock as e, createStaticVNode as o } from "vue";
|
|
2
|
+
const r = {
|
|
3
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4
|
+
fill: "none",
|
|
5
|
+
viewBox: "0 0 24 24"
|
|
6
|
+
}, a = /* @__PURE__ */ o('<g clip-path="url(#a)"><g stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" clip-path="url(#b)"><path d="M11.94 17.32V11.2a.88.88 0 0 0-.87-.87h-.88m1.31-2.6a.44.44 0 1 1 0-.88m0 .88a.44.44 0 1 0 0-.88"></path><path d="M12 23.23A11.23 11.23 0 1 0 12 .77a11.23 11.23 0 0 0 0 22.46"></path><path stroke-miterlimit="10" d="M10.2 17.32h3.61"></path></g></g><defs><clipPath id="a"><path fill="currentColor" d="M0 0h24v24H0z"></path></clipPath><clipPath id="b"><path fill="currentColor" d="M0 0h24v24H0z"></path></clipPath></defs>', 2), h = [
|
|
7
|
+
a
|
|
8
|
+
];
|
|
9
|
+
function i(l, c) {
|
|
10
|
+
return t(), e("svg", r, [...h]);
|
|
11
|
+
}
|
|
12
|
+
const p = { render: i };
|
|
13
|
+
export {
|
|
14
|
+
p as default,
|
|
15
|
+
i as render
|
|
16
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { defineAsyncComponent as m } from "vue";
|
|
2
|
+
const o = /* @__PURE__ */ Object.assign({ "./Add.svg": () => import("./Add.svg.js"), "./ArrowLeft.svg": () => import("./ArrowLeft.svg.js"), "./ArrowRight.svg": () => import("./ArrowRight.svg.js"), "./Background.svg": () => import("./Background.svg.js"), "./Brackets.svg": () => import("./Brackets.svg.js"), "./Branch.svg": () => import("./Branch.svg.js"), "./CallToAction.svg": () => import("./CallToAction.svg.js"), "./Checkmark.svg": () => import("./Checkmark.svg.js"), "./ChevronDown.svg": () => import("./ChevronDown.svg.js"), "./ChevronLeft.svg": () => import("./ChevronLeft.svg.js"), "./ChevronRight.svg": () => import("./ChevronRight.svg.js"), "./ChevronUp.svg": () => import("./ChevronUp.svg.js"), "./Clipboard.svg": () => import("./Clipboard.svg.js"), "./Close.svg": () => import("./Close.svg.js"), "./CodeFolder.svg": () => import("./CodeFolder.svg.js"), "./Cookie.svg": () => import("./Cookie.svg.js"), "./DarkMode.svg": () => import("./DarkMode.svg.js"), "./Delete.svg": () => import("./Delete.svg.js"), "./Discord.svg": () => import("./Discord.svg.js"), "./DocsPage.svg": () => import("./DocsPage.svg.js"), "./Duplicate.svg": () => import("./Duplicate.svg.js"), "./Edit.svg": () => import("./Edit.svg.js"), "./Ellipses.svg": () => import("./Ellipses.svg.js"), "./Error.svg": () => import("./Error.svg.js"), "./ExternalLink.svg": () => import("./ExternalLink.svg.js"), "./FilterList.svg": () => import("./FilterList.svg.js"), "./Folder.svg": () => import("./Folder.svg.js"), "./GitHub.svg": () => import("./GitHub.svg.js"), "./Hide.svg": () => import("./Hide.svg.js"), "./History.svg": () => import("./History.svg.js"), "./Info.svg": () => import("./Info.svg.js"), "./JsonObject.svg": () => import("./JsonObject.svg.js"), "./Key.svg": () => import("./Key.svg.js"), "./Leave.svg": () => import("./Leave.svg.js"), "./LightDarkModeToggle.svg": () => import("./LightDarkModeToggle.svg.js"), "./LightMode.svg": () => import("./LightMode.svg.js"), "./Link.svg": () => import("./Link.svg.js"), "./Lock.svg": () => import("./Lock.svg.js"), "./Logo.svg": () => import("./Logo.svg.js"), "./LogoAPI.svg": () => import("./LogoAPI.svg.js"), "./LogoClient.svg": () => import("./LogoClient.svg.js"), "./LogoMarket.svg": () => import("./LogoMarket.svg.js"), "./LogoSwagger.svg": () => import("./LogoSwagger.svg.js"), "./Magic.svg": () => import("./Magic.svg.js"), "./Menu.svg": () => import("./Menu.svg.js"), "./Page.svg": () => import("./Page.svg.js"), "./PaperAirplane.svg": () => import("./PaperAirplane.svg.js"), "./Payment.svg": () => import("./Payment.svg.js"), "./Play.svg": () => import("./Play.svg.js"), "./Refresh.svg": () => import("./Refresh.svg.js"), "./Response.svg": () => import("./Response.svg.js"), "./Search.svg": () => import("./Search.svg.js"), "./Show.svg": () => import("./Show.svg.js"), "./SideBarClosed.svg": () => import("./SideBarClosed.svg.js"), "./SideBarOpen.svg": () => import("./SideBarOpen.svg.js"), "./Sort.svg": () => import("./Sort.svg.js"), "./Terminal.svg": () => import("./Terminal.svg.js"), "./ThumbsDown.svg": () => import("./ThumbsDown.svg.js"), "./ThumbsUp.svg": () => import("./ThumbsUp.svg.js"), "./Trash.svg": () => import("./Trash.svg.js"), "./Unlock.svg": () => import("./Unlock.svg.js"), "./Upload.svg": () => import("./Upload.svg.js"), "./User.svg": () => import("./User.svg.js"), "./programming-framework-angular.svg": () => import("./programming-framework-angular.svg.js"), "./programming-framework-astro.svg": () => import("./programming-framework-astro.svg.js"), "./programming-framework-laravel.svg": () => import("./programming-framework-laravel.svg.js"), "./programming-framework-nextdotjs.svg": () => import("./programming-framework-nextdotjs.svg.js"), "./programming-framework-react.svg": () => import("./programming-framework-react.svg.js"), "./programming-framework-vuedotjs.svg": () => import("./programming-framework-vuedotjs.svg.js"), "./programming-language-c.svg": () => import("./programming-language-c.svg.js"), "./programming-language-clojure.svg": () => import("./programming-language-clojure.svg.js"), "./programming-language-csharp.svg": () => import("./programming-language-csharp.svg.js"), "./programming-language-css3.svg": () => import("./programming-language-css3.svg.js"), "./programming-language-go.svg": () => import("./programming-language-go.svg.js"), "./programming-language-html5.svg": () => import("./programming-language-html5.svg.js"), "./programming-language-http.svg": () => import("./programming-language-http.svg.js"), "./programming-language-java.svg": () => import("./programming-language-java.svg.js"), "./programming-language-javascript.svg": () => import("./programming-language-javascript.svg.js"), "./programming-language-json.svg": () => import("./programming-language-json.svg.js"), "./programming-language-kotlin.svg": () => import("./programming-language-kotlin.svg.js"), "./programming-language-node.svg": () => import("./programming-language-node.svg.js"), "./programming-language-objc.svg": () => import("./programming-language-objc.svg.js"), "./programming-language-ocaml.svg": () => import("./programming-language-ocaml.svg.js"), "./programming-language-php.svg": () => import("./programming-language-php.svg.js"), "./programming-language-powershell.svg": () => import("./programming-language-powershell.svg.js"), "./programming-language-python.svg": () => import("./programming-language-python.svg.js"), "./programming-language-r.svg": () => import("./programming-language-r.svg.js"), "./programming-language-ruby.svg": () => import("./programming-language-ruby.svg.js"), "./programming-language-scala.svg": () => import("./programming-language-scala.svg.js"), "./programming-language-shell.svg": () => import("./programming-language-shell.svg.js"), "./programming-language-swift.svg": () => import("./programming-language-swift.svg.js"), "./programming-language-typescript.svg": () => import("./programming-language-typescript.svg.js"), "./programming-script-code.svg": () => import("./programming-script-code.svg.js"), "./programming-tool-git.svg": () => import("./programming-tool-git.svg.js"), "./programming-tool-tailwindcss.svg": () => import("./programming-tool-tailwindcss.svg.js") }), p = (g) => {
|
|
3
|
+
const r = `./${g}.svg`;
|
|
4
|
+
return o[r] ? m(o[r]) : (console.warn(`Could not find icon: ${g}`), null);
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
p as getIcon
|
|
8
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { defineComponent as r, computed as n, useAttrs as i, openBlock as l, createElementBlock as c, mergeProps as d, unref as s, createVNode as u, createElementVNode as p, toDisplayString as m } from "vue";
|
|
2
|
+
import { cva as f, cx as b } from "../../cva.js";
|
|
3
|
+
import { styles as v } from "../ScalarButton/variants.js";
|
|
4
|
+
import z from "../ScalarIcon/ScalarIcon.vue.js";
|
|
5
|
+
const _ = ["ariaDisabled"], h = { class: "sr-only" }, N = /* @__PURE__ */ r({
|
|
6
|
+
__name: "ScalarIconButton",
|
|
7
|
+
props: {
|
|
8
|
+
label: {},
|
|
9
|
+
icon: {},
|
|
10
|
+
disabled: { type: Boolean },
|
|
11
|
+
variant: { default: "ghost" },
|
|
12
|
+
size: { default: "md" }
|
|
13
|
+
},
|
|
14
|
+
setup(y) {
|
|
15
|
+
const t = f({
|
|
16
|
+
base: "scalar-icon-button grid aspect-square cursor-pointer rounded",
|
|
17
|
+
variants: {
|
|
18
|
+
size: {
|
|
19
|
+
xxs: "size-3.5 p-0.5",
|
|
20
|
+
xs: "size-5 p-1",
|
|
21
|
+
sm: "size-6 p-1",
|
|
22
|
+
md: "size-10 p-3",
|
|
23
|
+
full: "h-full w-full"
|
|
24
|
+
},
|
|
25
|
+
disabled: {
|
|
26
|
+
true: "cursor-not-allowed shadow-none"
|
|
27
|
+
},
|
|
28
|
+
variant: v
|
|
29
|
+
}
|
|
30
|
+
}), a = n(() => {
|
|
31
|
+
const { class: e, ...o } = i();
|
|
32
|
+
return { class: e || "", rest: o };
|
|
33
|
+
});
|
|
34
|
+
return (e, o) => (l(), c("button", d(a.value.rest, {
|
|
35
|
+
ariaDisabled: e.disabled || void 0,
|
|
36
|
+
class: s(b)(s(t)({ size: e.size, variant: e.variant, disabled: e.disabled }), a.value.class),
|
|
37
|
+
type: "button"
|
|
38
|
+
}), [
|
|
39
|
+
u(s(z), { icon: e.icon }, null, 8, ["icon"]),
|
|
40
|
+
p("span", h, m(e.label), 1)
|
|
41
|
+
], 16, _));
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
export {
|
|
45
|
+
N as default
|
|
46
|
+
};
|