pxd 0.0.3 → 0.0.5
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 +31 -206
- package/dist/Check.js +1 -0
- package/dist/ChevronDown.js +1 -0
- package/dist/code-block.css +1 -0
- package/dist/components/_utils/css.d.ts +9 -0
- package/dist/components/_utils/css.js +1 -0
- package/dist/components/avatar/_.js +1 -0
- package/dist/components/avatar/index.d.ts +6 -0
- package/dist/components/avatar/index.js +1 -0
- package/dist/components/avatar/src/avatar.d.ts +22 -0
- package/dist/components/avatar-group/index.d.ts +7 -0
- package/dist/components/avatar-group/index.js +1 -0
- package/dist/components/avatar-group/src/avatar-group.d.ts +3 -0
- package/dist/components/badge/index.d.ts +1 -0
- package/dist/components/badge/index.js +1 -0
- package/dist/components/badge/src/badge.d.ts +42 -0
- package/dist/components/book/index.d.ts +1 -0
- package/dist/components/book/index.js +1 -0
- package/dist/components/book/src/book.d.ts +8 -0
- package/dist/components/button/index.d.ts +22 -0
- package/dist/components/button/index.js +1 -1
- package/dist/components/button/src/button.d.ts +22 -23
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox/src/checkbox.d.ts +21 -7
- package/dist/components/checkbox-group/index.d.ts +4 -0
- package/dist/components/checkbox-group/index.js +1 -0
- package/dist/components/checkbox-group/src/checkbox-group.d.ts +17 -0
- package/dist/components/choicebox/index.d.ts +1 -0
- package/dist/components/choicebox/index.js +1 -0
- package/dist/components/choicebox/src/choicebox.d.ts +21 -0
- package/dist/components/choicebox-group/index.d.ts +13 -0
- package/dist/components/choicebox-group/index.js +1 -0
- package/dist/components/choicebox-group/src/choicebox-group.d.ts +25 -0
- package/dist/components/code-block/index.d.ts +1 -0
- package/dist/components/code-block/index.js +1 -0
- package/dist/components/code-block/src/code-block.d.ts +8 -0
- package/dist/components/collapse/index.d.ts +1 -0
- package/dist/components/collapse/index.js +1 -0
- package/dist/components/collapse/src/collapse.d.ts +9 -0
- package/dist/components/combobox/index.d.ts +1 -0
- package/dist/components/combobox/index.js +1 -0
- package/dist/components/combobox/src/combobox.d.ts +19 -0
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/dialog/src/dialog.d.ts +24 -42
- package/dist/components/error/index.d.ts +1 -0
- package/dist/components/error/index.js +1 -0
- package/dist/components/error/src/error.d.ts +22 -0
- package/dist/components/input/index.d.ts +3 -0
- package/dist/components/input/index.js +1 -1
- package/dist/components/input/src/input.d.ts +24 -1
- package/dist/components/keyboard-input/index.d.ts +1 -0
- package/dist/components/keyboard-input/index.js +1 -0
- package/dist/components/keyboard-input/src/keyboard-input.d.ts +24 -0
- package/dist/components/link/index.d.ts +1 -0
- package/dist/components/link/index.js +1 -0
- package/dist/components/link/src/link.d.ts +23 -0
- package/dist/components/loading-dots/index.d.ts +1 -0
- package/dist/components/loading-dots/index.js +1 -0
- package/dist/components/loading-dots/src/loading-dots.d.ts +19 -0
- package/dist/components/overlay/index.d.ts +1 -0
- package/dist/components/overlay/index.js +1 -0
- package/dist/components/overlay/src/overlay.d.ts +5 -0
- package/dist/components/progress/index.js +1 -1
- package/dist/components/progress/src/progress.d.ts +14 -35
- package/dist/components/radio/index.d.ts +5 -0
- package/dist/components/radio/index.js +1 -1
- package/dist/components/radio/src/radio.d.ts +16 -64
- package/dist/components/scroller/index.d.ts +1 -0
- package/dist/components/scroller/index.js +1 -0
- package/dist/components/scroller/src/scroller.d.ts +16 -0
- package/dist/components/select/index.js +1 -1
- package/dist/components/select/src/select.d.ts +13 -23
- package/dist/components/show-more/index.d.ts +1 -0
- package/dist/components/show-more/index.js +1 -0
- package/dist/components/show-more/src/show-more.d.ts +16 -0
- package/dist/components/spinner/_.js +1 -0
- package/dist/components/spinner/index.d.ts +1 -0
- package/dist/components/spinner/index.js +1 -0
- package/dist/components/spinner/src/spinner.d.ts +5 -0
- package/dist/components/status-dot/index.d.ts +1 -0
- package/dist/components/status-dot/index.js +1 -0
- package/dist/components/status-dot/src/status-dot.d.ts +6 -0
- package/dist/components/switch/index.js +1 -1
- package/dist/components/switch/src/switch.d.ts +36 -23
- package/dist/components/tabs/index.d.ts +0 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/src/tabs.d.ts +27 -13
- package/dist/components/tabs-item/index.js +1 -1
- package/dist/components/tabs-item/src/tabs-item.d.ts +12 -5
- package/dist/components/textarea/index.js +1 -1
- package/dist/components/textarea/src/textarea.d.ts +15 -5
- package/dist/components/toggle/index.d.ts +1 -0
- package/dist/components/toggle/index.js +1 -0
- package/dist/components/toggle/src/toggle.d.ts +35 -0
- package/dist/error.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/link.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/plugins/resolver.d.ts +2 -10
- package/dist/plugins/resolver.js +1 -1
- package/dist/plugins/tailwind-preset.d.ts +196 -0
- package/dist/plugins/tailwind-preset.js +1 -0
- package/dist/vars.css +1 -1
- package/package.json +35 -24
- package/dist/components/accordion/index.d.ts +0 -1
- package/dist/components/accordion/index.js +0 -1
- package/dist/components/accordion/src/accordion.d.ts +0 -39
- package/dist/components/scrollbar/index.d.ts +0 -1
- package/dist/components/scrollbar/index.js +0 -1
- package/dist/components/scrollbar/src/scrollbar.d.ts +0 -9
- package/dist/components/space/index.d.ts +0 -1
- package/dist/components/space/index.js +0 -1
- package/dist/components/space/src/space.d.ts +0 -32
- package/res/preview.png +0 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { InjectionKey, Ref } from 'vue';
|
|
2
|
+
export interface ChoiceboxProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
multiple?: boolean;
|
|
5
|
+
direction?: 'row' | 'col';
|
|
6
|
+
}
|
|
7
|
+
export interface ChoiceboxProvider {
|
|
8
|
+
multiple: Ref<boolean>;
|
|
9
|
+
modelValue: Ref<string | string[]>;
|
|
10
|
+
onChoiceboxItemChange: (value: string) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const ChoiceboxInjectionKey: InjectionKey<ChoiceboxProvider>;
|
|
13
|
+
export { default } from './src/choicebox-group';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as n,mergeModels as u,useModel as c,provide as m,toRef as s,openBlock as d,createElementBlock as f,normalizeClass as p,unref as b,renderSlot as h}from"vue";import{getFlowDirection as x}from"../_utils/css.js";const g=["aria-label","aria-multiselectable"],B=n({name:"PChoiceboxGroup",__name:"choicebox-group",props:u({title:{},multiple:{type:Boolean,default:!1},direction:{default:"row"}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(o){const l=c(o,"modelValue"),i=x(o.direction);function a(e){if(o.multiple){const t=l.value;t.includes(e)?l.value=t.filter(r=>r!==e):t.push(e);return}l.value=e}return m(C,{multiple:s(()=>o.multiple),modelValue:l,onChoiceboxItemChange:a}),(e,t)=>(d(),f("ul",{class:p(["pxd-choicebox list-none m-0 p-0 flex gap-3",b(i)]),role:"group","aria-label":e.title,"aria-multiselectable":e.multiple},[h(e.$slots,"default")],10,g))}}),C=Symbol("choiceboxProvider");export{C as ChoiceboxInjectionKey,B as default};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ChoiceboxProps } from '../index.js';
|
|
2
|
+
declare let __VLS_typeProps: ChoiceboxProps;
|
|
3
|
+
type __VLS_PublicProps = {
|
|
4
|
+
modelValue: string | string[];
|
|
5
|
+
} & typeof __VLS_typeProps;
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
slots: {
|
|
8
|
+
default?(_: {}): any;
|
|
9
|
+
};
|
|
10
|
+
refs: {};
|
|
11
|
+
attrs: Partial<{}>;
|
|
12
|
+
};
|
|
13
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
14
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
15
|
+
"update:modelValue": (modelValue: string | string[]) => any;
|
|
16
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
17
|
+
"onUpdate:modelValue"?: ((modelValue: string | string[]) => any) | undefined;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './src/code-block';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as k,h as v,shallowRef as u,watch as b,openBlock as o,createElementBlock as m,createElementVNode as a,toDisplayString as H,createVNode as y,unref as e,withCtx as h,createBlock as l,createCommentVNode as f}from"vue";import{i as p}from"../../Check.js";import{codeToHtml as V}from"shiki";import g from"../button/index.js";import"../_utils/css.js";import"../spinner/_.js";const C=k((i,r)=>{const t=v("svg",{innerHTML:'<path fill-rule="evenodd" clip-rule="evenodd" d="M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z" fill="currentColor"></path>',height:"16",strokeLinejoin:"round",style:"color:currentColor",viewBox:"0 0 16 16",width:"16",...r.attrs});return()=>t},{name:"CopyIcon"}),_={class:"pxd-code-block border rounded-lg overflow-hidden"},x={key:0,class:"pxd-code-block--header flex justify-between items-center h-12 pl-4 pr-3 border-b bg-background-200"},w={class:"text-sm text-gray-900"},T={class:"pxd-code-block--body group relative"},M=["innerHTML"],I=k({__name:"code-block",props:{code:{},filename:{},language:{default:"typescript"}},setup(i){const r=u(""),t=u(!1);b(()=>i.code,async n=>{if(!n){r.value="";return}const s=await V(n,{lang:i.language,themes:{light:"github-light",dark:"github-dark"}});r.value=s},{immediate:!0});let c;function d(){navigator.clipboard.writeText(i.code).then(()=>{t.value=!0}).catch(()=>{t.value=!1}).finally(()=>{clearTimeout(c),c=setTimeout(()=>{t.value=!1},1e3)})}return(n,s)=>(o(),m("div",_,[n.filename?(o(),m("div",x,[a("div",w,[a("span",null,H(n.filename),1)]),y(e(g),{variant:"ghost",icon:"",onClick:d},{default:h(()=>[e(t)?(o(),l(e(p),{key:0,class:"text-green-700"})):(o(),l(e(C),{key:1}))]),_:1})])):f("",!0),a("div",T,[n.filename?f("",!0):(o(),l(e(g),{key:0,variant:"outline",class:"absolute right-3 top-3 hidden group-hover:block",icon:"",onClick:d},{default:h(()=>[e(t)?(o(),l(e(p),{key:0,class:"text-green-700"})):(o(),l(e(C),{key:1}))]),_:1})),a("div",{class:"rounded-inherit p-4 bg-background-100 font-mono",innerHTML:e(r)},null,8,M)])]))}});export{I as default};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BundledLanguage } from 'shiki';
|
|
2
|
+
interface CodeBlockProps {
|
|
3
|
+
code: string;
|
|
4
|
+
filename?: string;
|
|
5
|
+
language?: BundledLanguage;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import('vue').DefineComponent<CodeBlockProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CodeBlockProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './src/collapse';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as c,openBlock as r,createBlock as n,unref as e,withCtx as t,createElementBlock as d,Fragment as i,renderList as p,createVNode as a,createTextVNode as u,toDisplayString as s,createElementVNode as f}from"vue";import{i as m}from"../../ChevronDown.js";import{AccordionRoot as b,AccordionItem as g,AccordionHeader as _,AccordionTrigger as v,AccordionContent as h}from"radix-vue";const x={class:"p-4 bg-background-200 border-t border-gray-400"},B=c({name:"PCollapse",__name:"collapse",props:{options:{}},setup(k){return(l,y)=>(r(),n(e(b),{collapsible:"",class:"pxd-collapse bg-background-100","default-value":l.options[0].value},{default:t(()=>[(r(!0),d(i,null,p(l.options,o=>(r(),n(e(g),{key:o.value,value:o.value,class:"[&:not(:last-child)]:border-b border-gray-400"},{default:t(()=>[a(e(_),{class:"flex m-0 cursor-pointer text-4"},{default:t(()=>[a(e(v),{class:"group relative w-full text-inherit font-inherit pl-2 py-3 pr-8 text-left b-0 bg-transparent cursor-pointer"},{default:t(()=>[u(s(o.label)+" ",1),a(e(m),{class:"absolute right-4 top-4 transition-transform group-data-[state=open]:rotate-180"})]),_:2},1024)]),_:2},1024),a(e(h),{class:"overflow-hidden data-[state=open]:animate-collapse-slide-down data-[state=closed]:animate-collapse-slide-up"},{default:t(()=>[f("div",x,s(o.content),1)]),_:2},1024)]),_:2},1032,["value"]))),128))]),_:1},8,["default-value"]))}});export{B as default};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { OptionItem } from '../../../types';
|
|
2
|
+
type CollapseOptionItem = Pick<OptionItem, 'label' | 'value'> & {
|
|
3
|
+
content: string;
|
|
4
|
+
};
|
|
5
|
+
interface CollapseProps {
|
|
6
|
+
options: CollapseOptionItem[];
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import('vue').DefineComponent<CollapseProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CollapseProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './src/combobox';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as c,h,mergeModels as g,useModel as y,shallowRef as w,computed as V,watchEffect as k,openBlock as s,createBlock as u,unref as e,isRef as M,withCtx as n,createVNode as o,normalizeClass as I,createElementVNode as z,createElementBlock as f,withModifiers as B,createCommentVNode as T,createTextVNode as p,toDisplayString as b,Fragment as _,renderList as N}from"vue";import{i as j}from"../../Check.js";import{i as E}from"../../ChevronDown.js";import{ComboboxRoot as S,ComboboxAnchor as R,ComboboxInput as Z,ComboboxTrigger as $,ComboboxContent as H,ComboboxViewport as A,ComboboxEmpty as D,ComboboxItem as F,ComboboxItemIndicator as G}from"radix-vue";import{_ as P}from"../../error.vue_vue_type_script_setup_true_lang.js";import{getInputSizes as U}from"../input/index.js";import"../../link.vue_vue_type_script_setup_true_lang.js";import"../_utils/css.js";const q=c((d,a)=>{const l=h("svg",{innerHTML:'<path fill-rule="evenodd" clip-rule="evenodd" d="M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z" fill="currentColor"></path>',height:"16",strokeLinejoin:"round",style:"color:currentColor",viewBox:"0 0 16 16",width:"16",...a.attrs});return()=>l},{name:"CrossIcon"}),J=c((d,a)=>{const l=h("svg",{innerHTML:'<path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0Z" fill="currentColor"></path>',height:"16",strokeLinejoin:"round",style:"color:currentColor",viewBox:"0 0 16 16",width:"16",...a.attrs});return()=>l},{name:"MagnifyingGlassIcon"}),K={class:"absolute left-0 top-0 text-gray-700 w-8 h-full flex items-center"},oe=c({name:"PCombobox",__name:"combobox",props:g({size:{default:"default"},error:{},disabled:{type:Boolean},placeholder:{default:"Search..."},options:{},emptyText:{default:"Nothing to see here..."}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(d){const a=y(d,"modelValue"),l=w({}),L=V(()=>U(d.size));function C(t){a.value=t.value}function m(){l.value={}}function v(){a.value="",m()}return k(()=>{if(a.value){const t=d.options.find(i=>i.value===a.value);if(t){l.value=t;return}}m()}),(t,i)=>(s(),u(e(S),{modelValue:e(l),"onUpdate:modelValue":[i[0]||(i[0]=r=>M(l)?l.value=r:null),C],disabled:t.disabled,class:"pxd-combobox relative"},{default:n(()=>[o(e(R),{"data-disabled":t.disabled,class:I(["p-focusable rounded-md",[{"p-focusable-error":t.error},e(L)]])},{default:n(()=>{var r;return[z("div",K,[o(e(J),{class:"mx-auto"})]),o(e(Z),{class:"px-8 w-full h-full rounded-inherit p-input",placeholder:t.placeholder,value:(r=e(l))==null?void 0:r.label},null,8,["placeholder","value"]),o(e($),{class:"absolute right-0 top-0 text-gray-700 w-8 h-full flex items-center justify-center transition-transform data-[state=open]:rotate-180"},{default:n(()=>[a.value?(s(),f("span",{key:0,class:"inline-block w-fit h-fit p-0.5 rounded-full transition-colors hover:bg-gray-alpha-300",onClick:B(v,["stop"])},[o(e(q))])):(s(),u(e(E),{key:1}))]),_:1}),t.error?(s(),u(e(P),{key:0,error:t.error,class:"mt-2"},null,8,["error"])):T("",!0)]}),_:1},8,["data-disabled","class"]),o(e(H),{class:"absolute p-shadow-border-large z-10 w-full mt-2 min-w-40 bg-white overflow-hidden rounded-lg data-[state=open]:animate-fade-in data-[state=closed]:animate-fade-out"},{default:n(()=>[o(e(A),{class:"p-select-list p-2 text-sm"},{default:n(()=>[o(e(D),{class:"text-gray-alpha-600 text-xs font-medium text-center py-2 select-none"},{default:n(()=>[p(b(t.emptyText),1)]),_:1}),(s(!0),f(_,null,N(t.options,(r,x)=>(s(),u(e(F),{key:x,value:r,title:r.label,disabled:r.disabled,class:"p-select-item outline-0 flex items-center h-9 pl-7 pr-2 relative select-none rounded-md data-[disabled]:text-gray-alpha-600 data-[disabled]:cursor-not-allowed data-[state=checked]:text-gray-1000"},{default:n(()=>[o(e(G),{class:"absolute left-1 w-6 inline-flex items-center justify-center"},{default:n(()=>[o(e(j))]),_:1}),p(" "+b(r.value),1)]),_:2},1032,["value","title","disabled"]))),128))]),_:1})]),_:1})]),_:1},8,["modelValue","disabled"]))}});export{oe as default};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { OptionItem, StandardError, StandardSize } from '../../../types';
|
|
2
|
+
interface SelectProps {
|
|
3
|
+
size?: StandardSize;
|
|
4
|
+
error?: StandardError;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
options: OptionItem[];
|
|
8
|
+
emptyText?: string;
|
|
9
|
+
}
|
|
10
|
+
declare let __VLS_typeProps: SelectProps;
|
|
11
|
+
type __VLS_PublicProps = {
|
|
12
|
+
modelValue?: string;
|
|
13
|
+
} & typeof __VLS_typeProps;
|
|
14
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
15
|
+
"update:modelValue": (modelValue: string) => any;
|
|
16
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
17
|
+
"onUpdate:modelValue"?: ((modelValue: string) => any) | undefined;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as
|
|
1
|
+
import{defineComponent as h,mergeModels as g,useModel as y,useTemplateRef as b,watchEffect as k,openBlock as a,createBlock as v,Transition as x,withCtx as w,withDirectives as _,createElementBlock as d,createElementVNode as l,toDisplayString as r,renderSlot as c,createCommentVNode as f,vShow as C}from"vue";const D={class:"flex-1 px-6 pb-6 overflow-y-auto max-h-[min(800px,80vh)]"},M={class:"sticky top-0 left-0 bg-background-100"},B={class:"empty:hidden py-6 text-2xl font-semibold tracking-tight"},V={class:"empty:hidden text-sm -mt-6 pb-4 text-gray-900"},R={key:0,class:"flex items-center justify-between border-t border-gray-alpha-400 bg-background-200 p-3.5"},E=h({name:"PDialog",inheritAttrs:!1,__name:"dialog",props:g({title:{},description:{},closeOnClickModal:{type:Boolean}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const u=s,o=y(s,"modelValue"),t=b("dialogRef");function p(){var e;(e=t.value)==null||e.showModal(),document.body.style.overflow="hidden"}function n(){var e;(e=t.value)==null||e.close(),o.value=!1,document.body.style.overflow=""}function m(e){const[i]=e.composedPath();i===t.value&&u.closeOnClickModal&&(e.preventDefault(),n())}return k(()=>{o.value&&p()}),(e,i)=>(a(),v(x,{name:"transition-slide-down"},{default:w(()=>[o.value?_((a(),d("dialog",{key:0,ref_key:"dialogRef",ref:t,class:"pxd-dialog fixed inset-0 m-auto z-50 w-[540px] rounded-xl shadow-sm outline-0 flex flex-col [&::backdrop]:bg-gray-alpha-500 [&::backdrop]:backdrop-blur-sm",onClose:n,onClick:m},[l("div",D,[l("header",M,[l("h3",B,r(e.title),1),l("p",V,r(e.description),1)]),c(e.$slots,"default")]),e.$slots.footer?(a(),d("footer",R,[c(e.$slots,"footer")])):f("",!0)],544)),[[C,o.value]]):f("",!0)]),_:3}))}});export{E as default};
|
|
@@ -1,47 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
interface DialogProps {
|
|
2
|
+
title?: string;
|
|
3
|
+
description?: string;
|
|
4
|
+
closeOnClickModal?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare let __VLS_typeProps: DialogProps;
|
|
7
|
+
type __VLS_PublicProps = {
|
|
8
|
+
modelValue?: boolean;
|
|
9
|
+
} & typeof __VLS_typeProps;
|
|
10
|
+
declare function __VLS_template(): {
|
|
11
|
+
slots: {
|
|
12
|
+
default?(_: {}): any;
|
|
13
|
+
footer?(_: {}): any;
|
|
6
14
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
default: string;
|
|
15
|
+
refs: {
|
|
16
|
+
dialogRef: HTMLDialogElement;
|
|
10
17
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
title: {
|
|
21
|
-
type: StringConstructor;
|
|
22
|
-
default: string;
|
|
23
|
-
};
|
|
24
|
-
description: {
|
|
25
|
-
type: StringConstructor;
|
|
26
|
-
default: string;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Click on the modal to close the dialog.
|
|
30
|
-
*/
|
|
31
|
-
closeOnClickModal: {
|
|
32
|
-
type: BooleanConstructor;
|
|
33
|
-
default: boolean;
|
|
34
|
-
};
|
|
35
|
-
}>>, {
|
|
36
|
-
title: string;
|
|
37
|
-
description: string;
|
|
38
|
-
closeOnClickModal: boolean;
|
|
39
|
-
}, {}>, {
|
|
40
|
-
trigger?(_: {}): any;
|
|
41
|
-
title?(_: {}): any;
|
|
42
|
-
description?(_: {}): any;
|
|
43
|
-
default?(_: {}): any;
|
|
44
|
-
}>;
|
|
18
|
+
attrs: Partial<{}>;
|
|
19
|
+
};
|
|
20
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
21
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
22
|
+
"update:modelValue": (modelValue: boolean) => any;
|
|
23
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
24
|
+
"onUpdate:modelValue"?: ((modelValue: boolean) => any) | undefined;
|
|
25
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
26
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
45
27
|
export default _default;
|
|
46
28
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
47
29
|
new (): {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './src/error';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as p}from"../../error.vue_vue_type_script_setup_true_lang.js";import"vue";import"../../link.vue_vue_type_script_setup_true_lang.js";export{p as default};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { StandardError, StandardSize } from '../../../types';
|
|
2
|
+
interface ErrorProps {
|
|
3
|
+
size?: StandardSize;
|
|
4
|
+
label?: string;
|
|
5
|
+
error?: StandardError;
|
|
6
|
+
}
|
|
7
|
+
declare function __VLS_template(): {
|
|
8
|
+
slots: {
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {};
|
|
12
|
+
attrs: Partial<{}>;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<ErrorProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ErrorProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
16
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as
|
|
1
|
+
import{getStandardSize as u}from"../_utils/css.js";import{defineComponent as f,useId as p,computed as m,openBlock as o,createElementBlock as s,createElementVNode as l,normalizeClass as c,unref as r,renderSlot as a,createCommentVNode as n,mergeProps as y,readonly as b,createBlock as h}from"vue";import{_}from"../../error.vue_vue_type_script_setup_true_lang.js";import"../../link.vue_vue_type_script_setup_true_lang.js";const g={class:"pxd-input"},k=["data-disabled"],z=["for"],$=["id","readonly","disabled"],x=["for"],E=f({name:"PInput",__name:"input",props:{size:{default:"default"},error:{},readonly:{type:Boolean},disabled:{type:Boolean}},setup(d){const t=p(),i=m(()=>B(d.size));return(e,S)=>(o(),s("div",g,[l("div",{class:c(["p-focusable flex items-center justify-center rounded-md transition-shadow",[{"p-focusable-error":e.error},r(i)]]),"data-disabled":e.disabled},[e.$slots.prefix?(o(),s("label",{key:0,for:r(t),class:"px-3 text-sm text-gray-700"},[a(e.$slots,"prefix")],8,z)):n("",!0),l("input",y({id:r(t),class:"w-full h-full px-3 rounded-inherit text-sm p-input outline-none file:border-0 file:bg-transparent file:text-sm file:font-medium",readonly:"readonly"in e?e.readonly:r(b),disabled:e.disabled},e.$attrs),null,16,$),e.$slots.suffix?(o(),s("label",{key:1,for:r(t),class:"px-3 text-sm text-gray-700"},[a(e.$slots,"suffix")],8,x)):n("",!0)],10,k),e.error?(o(),h(r(_),{key:0,class:"mt-1.5",error:e.error},null,8,["error"])):n("",!0)]))}}),B=u();export{E as default,B as getInputSizes};
|
|
@@ -1,2 +1,25 @@
|
|
|
1
|
-
|
|
1
|
+
import { StandardError } from '../../../types';
|
|
2
|
+
import { InputSizes } from '../index.js';
|
|
3
|
+
interface InputProps {
|
|
4
|
+
size?: InputSizes;
|
|
5
|
+
error?: StandardError;
|
|
6
|
+
readonly?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare function __VLS_template(): {
|
|
10
|
+
slots: {
|
|
11
|
+
prefix?(_: {}): any;
|
|
12
|
+
suffix?(_: {}): any;
|
|
13
|
+
};
|
|
14
|
+
refs: {};
|
|
15
|
+
attrs: Partial<{}>;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
18
|
+
declare const __VLS_component: import('vue').DefineComponent<InputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<InputProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
2
20
|
export default _default;
|
|
21
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './src/keyboard-input';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as s,computed as p,openBlock as c,createElementBlock as i,normalizeClass as m,createTextVNode as t,toDisplayString as n,unref as d,renderSlot as u}from"vue";const b=s({name:"PKeyboardInput",__name:"keyboard-input",props:{meta:{type:Boolean},shift:{type:Boolean},alt:{type:Boolean},ctrl:{type:Boolean},small:{type:Boolean},label:{}},setup(o){const a=o,l={meta:"⌘",shift:"⇧",alt:"⌥",ctrl:"⌃"},r=p(()=>Object.entries(l).filter(([e])=>a[e]).map(([,e])=>e).join(""));return(e,f)=>(c(),i("kbd",{class:m(["pxd-keyboard-input p-shadow-border inline-flex px-1.5 items-center bg-background-100 text-gray-1000 text-center rounded font-sans ml-1",[e.small?"h-5 text-xs":"h-6 text-sm"]])},[t(n(d(r))+" ",1),u(e.$slots,"default",{},()=>[t(n(e.label),1)])],2))}});export{b as default};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface KeyboardInputProps {
|
|
2
|
+
meta?: boolean;
|
|
3
|
+
shift?: boolean;
|
|
4
|
+
alt?: boolean;
|
|
5
|
+
ctrl?: boolean;
|
|
6
|
+
small?: boolean;
|
|
7
|
+
label?: string;
|
|
8
|
+
}
|
|
9
|
+
declare function __VLS_template(): {
|
|
10
|
+
slots: {
|
|
11
|
+
default?(_: {}): any;
|
|
12
|
+
};
|
|
13
|
+
refs: {};
|
|
14
|
+
attrs: Partial<{}>;
|
|
15
|
+
};
|
|
16
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
17
|
+
declare const __VLS_component: import('vue').DefineComponent<KeyboardInputProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<KeyboardInputProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './src/link';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as a}from"../../link.vue_vue_type_script_setup_true_lang.js";import"vue";export{a as default};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
interface LinkProps {
|
|
2
|
+
href: string;
|
|
3
|
+
withIcon?: boolean;
|
|
4
|
+
external?: boolean | string;
|
|
5
|
+
underline?: boolean;
|
|
6
|
+
hoverUnderline?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare function __VLS_template(): {
|
|
9
|
+
slots: {
|
|
10
|
+
default?(_: {}): any;
|
|
11
|
+
};
|
|
12
|
+
refs: {};
|
|
13
|
+
attrs: Partial<{}>;
|
|
14
|
+
};
|
|
15
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
16
|
+
declare const __VLS_component: import('vue').DefineComponent<LinkProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<LinkProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
18
|
+
export default _default;
|
|
19
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
20
|
+
new (): {
|
|
21
|
+
$slots: S;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './src/loading-dots';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as t,openBlock as n,createElementBlock as a,normalizeStyle as o,renderSlot as d,createCommentVNode as i,createElementVNode as l}from"vue";const r={key:0,class:"pxd-loading-dots-text mr-3"},u=t({name:"PLoadingDots",__name:"loading-dots",props:{size:{default:4}},setup(m){return(s,e)=>(n(),a("span",{class:"pxd-loading-dots inline-flex items-center",style:o({"--size":`${s.size}px`})},[s.$slots.default?(n(),a("div",r,[d(s.$slots,"default")])):i("",!0),e[0]||(e[0]=l("span",{class:"mx-px w-[--size] h-[--size] animate-fade-loading rounded-full bg-gray-900"},null,-1)),e[1]||(e[1]=l("span",{class:"mx-px w-[--size] h-[--size] animate-fade-loading rounded-full bg-gray-900",style:{"animation-delay":".2s"}},null,-1)),e[2]||(e[2]=l("span",{class:"mx-px w-[--size] h-[--size] animate-fade-loading rounded-full bg-gray-900",style:{"animation-delay":".4s"}},null,-1))],4))}});export{u as default};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface LoadingDotsProps {
|
|
2
|
+
size?: number;
|
|
3
|
+
}
|
|
4
|
+
declare function __VLS_template(): {
|
|
5
|
+
slots: {
|
|
6
|
+
default?(_: {}): any;
|
|
7
|
+
};
|
|
8
|
+
refs: {};
|
|
9
|
+
attrs: Partial<{}>;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
12
|
+
declare const __VLS_component: import('vue').DefineComponent<LoadingDotsProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<LoadingDotsProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './src/overlay';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as o,openBlock as e,createBlock as a,Teleport as r,createVNode as l,Transition as n,withCtx as i,createElementBlock as s,createCommentVNode as c}from"vue";const p={key:0,class:"bg-gray-alpha-500 backdrop-blur-sm fixed left-0 top-0 w-full h-full z-50"},_=o({name:"POverlay",__name:"overlay",props:{visible:{type:Boolean}},setup(d){return(t,m)=>(e(),a(r,{to:"body"},[l(n,{name:"transition-fade"},{default:i(()=>[t.visible?(e(),s("div",p)):c("",!0)]),_:1})]))}});export{_ as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
interface OverlayProps {
|
|
2
|
+
visible: boolean;
|
|
3
|
+
}
|
|
4
|
+
declare const _default: import('vue').DefineComponent<OverlayProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<OverlayProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
5
|
+
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as
|
|
1
|
+
import{defineComponent as n,mergeModels as d,useModel as g,computed as a,openBlock as c,createElementBlock as m,normalizeStyle as i,unref as f}from"vue";const v=["value","max"],p=n({name:"PProgress",__name:"progress",props:d({max:{default:100},type:{default:"default"},colors:{}},{modelValue:{default:50},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const s=g(e,"modelValue"),l={default:"hsl(var(--gray-1000-value))",success:"hsl(var(--blue-700-value))",warning:"hsl(var(--amber-700-value))",secondary:"hsl(var(--gray-700-value))",error:"hsl(var(--red-700-value))"},t=a(()=>e.colors?Object.keys(e.colors).map(Number).sort((r,o)=>r-o):[]),u=a(()=>{if(e.colors){const r=t.value;for(let o=0;o<r.length;o++)if(s.value<r[o])return e.colors[r[o-1]];return e.colors[r[r.length-1]]}return e.type&&l[e.type]?l[e.type]:l.default});return(r,o)=>(c(),m("progress",{class:"pxd-progress block w-full h-2 rounded overflow-hidden appearance-none align-[unset] [&::-webkit-progress-bar]:bg-gray-200 [&::-webkit-progress-bar]:rounded [&::-moz-progress-value]:bg-[--fg] [&::-moz-progress-bar]:rounded [&::-moz-progress-bar]:transition-all [&::-webkit-progress-value]:bg-[--fg] [&::-webkit-progress-value]:rounded [&::-webkit-progress-value]:transition-all",style:i(`--fg: ${f(u)}`),value:s.value,max:r.max},null,12,v))}});export{p as default};
|
|
@@ -1,36 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
default: string;
|
|
16
|
-
};
|
|
17
|
-
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
18
|
-
modelValue: globalThis.PropType<number>;
|
|
19
|
-
size: {
|
|
20
|
-
type: globalThis.PropType<Size>;
|
|
21
|
-
default: string;
|
|
22
|
-
};
|
|
23
|
-
max: {
|
|
24
|
-
type: NumberConstructor;
|
|
25
|
-
default: number;
|
|
26
|
-
};
|
|
27
|
-
direction: {
|
|
28
|
-
type: globalThis.PropType<Direction>;
|
|
29
|
-
default: string;
|
|
30
|
-
};
|
|
31
|
-
}>>, {
|
|
32
|
-
size: Size;
|
|
33
|
-
max: number;
|
|
34
|
-
direction: Direction;
|
|
35
|
-
}, {}>;
|
|
1
|
+
interface ProgressProps {
|
|
2
|
+
max?: number;
|
|
3
|
+
type?: 'default' | 'success' | 'warning' | 'error' | 'secondary';
|
|
4
|
+
colors?: Record<string, string>;
|
|
5
|
+
}
|
|
6
|
+
declare let __VLS_typeProps: ProgressProps;
|
|
7
|
+
type __VLS_PublicProps = {
|
|
8
|
+
modelValue?: number;
|
|
9
|
+
} & typeof __VLS_typeProps;
|
|
10
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (modelValue: number) => any;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((modelValue: number) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
36
15
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as
|
|
1
|
+
import{defineComponent as u,mergeModels as c,useModel as p,openBlock as a,createBlock as g,unref as t,withCtx as d,createElementBlock as n,Fragment as m,renderList as b,createVNode as i,createElementVNode as f,toDisplayString as y}from"vue";import{RadioGroupRoot as h,RadioGroupItem as v,RadioGroupIndicator as k}from"radix-vue";const x={class:"pl-1 pr-1.5 leading-0 active:select-none text-sm text-gray-1000 empty:hidden peer-disabled:text-gray-500"},w=u({__name:"radio",props:c({direction:{default:"horizontal"},options:{}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(s){const o=p(s,"modelValue");return(r,l)=>(a(),g(t(h),{modelValue:o.value,"onUpdate:modelValue":l[0]||(l[0]=e=>o.value=e),orientation:r.direction,class:"pxd-radio flex gap-2 data-[orientation=vertical]:flex-col text-gray-1000"},{default:d(()=>[(a(!0),n(m,null,b(r.options,e=>(a(),n("label",{key:e.value,class:"group inline-flex items-center"},[i(t(v),{value:e.value,class:"p-ring relative w-4 min-w-4 h-4 rounded-full bg-background-100 border border-gray-700 transition-colors cursor-pointer disabled:cursor-not-allowed disabled:bg-gray-100 disabled:border-gray-500 disabled:text-gray-600 group-hover:[&:not(:disabled,[data-state=checked])]:bg-gray-200 group-hover:[&:not(:disabled,[data-state=checked])]:border-gray-700"},{default:d(()=>[i(t(k),{class:"absolute inset-0 m-auto w-1/2 h-1/2 rounded-full bg-background-100 data-[state=checked]:bg-current"})]),_:2},1032,["value"]),f("span",x,y(e.label),1)]))),128))]),_:1},8,["modelValue","orientation"]))}});export{w as default};
|
|
@@ -1,65 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
vertical: {
|
|
18
|
-
type: BooleanConstructor;
|
|
19
|
-
default: boolean;
|
|
20
|
-
};
|
|
21
|
-
options: {
|
|
22
|
-
type: PropType<OptionItem[]>;
|
|
23
|
-
default: () => never[];
|
|
24
|
-
};
|
|
25
|
-
}, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<{
|
|
26
|
-
modelValue: PropType<string>;
|
|
27
|
-
variant: {
|
|
28
|
-
type: PropType<"default" | "button">;
|
|
29
|
-
default: string;
|
|
30
|
-
};
|
|
31
|
-
size: {
|
|
32
|
-
type: PropType<"default" | "lg" | "sm">;
|
|
33
|
-
default: string;
|
|
34
|
-
};
|
|
35
|
-
defaultValue: {
|
|
36
|
-
type: StringConstructor;
|
|
37
|
-
default: string;
|
|
38
|
-
};
|
|
39
|
-
vertical: {
|
|
40
|
-
type: BooleanConstructor;
|
|
41
|
-
default: boolean;
|
|
42
|
-
};
|
|
43
|
-
options: {
|
|
44
|
-
type: PropType<OptionItem[]>;
|
|
45
|
-
default: () => never[];
|
|
46
|
-
};
|
|
47
|
-
}>>, {
|
|
48
|
-
options: OptionItem[];
|
|
49
|
-
size: "default" | "lg" | "sm";
|
|
50
|
-
vertical: boolean;
|
|
51
|
-
defaultValue: string;
|
|
52
|
-
variant: "default" | "button";
|
|
53
|
-
}, {}>, {
|
|
54
|
-
default?(_: {
|
|
55
|
-
label: string;
|
|
56
|
-
value: string;
|
|
57
|
-
disabled?: boolean | undefined;
|
|
58
|
-
}): any;
|
|
59
|
-
}>;
|
|
1
|
+
import { OptionItem } from '../../../types';
|
|
2
|
+
interface RadioOptions extends OptionItem {
|
|
3
|
+
}
|
|
4
|
+
interface RadioProps {
|
|
5
|
+
direction?: 'horizontal' | 'vertical';
|
|
6
|
+
options?: RadioOptions[];
|
|
7
|
+
}
|
|
8
|
+
declare let __VLS_typeProps: RadioProps;
|
|
9
|
+
type __VLS_PublicProps = {
|
|
10
|
+
modelValue?: string;
|
|
11
|
+
} & typeof __VLS_typeProps;
|
|
12
|
+
declare const _default: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
|
+
"update:modelValue": (modelValue: string) => any;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
|
+
"onUpdate:modelValue"?: ((modelValue: string) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
60
17
|
export default _default;
|
|
61
|
-
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
62
|
-
new (): {
|
|
63
|
-
$slots: S;
|
|
64
|
-
};
|
|
65
|
-
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './src/scroller';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{defineComponent as f,openBlock as n,createBlock as u,unref as e,withCtx as o,createVNode as l,renderSlot as c}from"vue";import{ScrollAreaRoot as s,ScrollAreaViewport as b,ScrollAreaScrollbar as r,ScrollAreaThumb as a}from"radix-vue";const m=f({name:"PScrollbar",__name:"scroller",setup(d){return(t,i)=>(n(),u(e(s),{class:"overflow-hidden pr-3 pb-3"},{default:o(()=>[l(e(b),{class:"w-full h-full"},{default:o(()=>[c(t.$slots,"default")]),_:3}),l(e(r),{class:"h-3 w-full p-0.5 box-border select-none touch-none animated data-[state=visible]:animated-fade-in",orientation:"horizontal"},{default:o(()=>[l(e(a),{class:"relative !h-full bg-gray-alpha-300 hover:bg-gray-alpha-500 rounded-md cursor-default before:content-empty before:absolute before:bottom-0 before:left-0 before:w-full before:h-full"})]),_:1}),l(e(r),{class:"w-3 h-full p-0.5 box-border select-none touch-none animated data-[state=visible]:animated-fade-in",orientation:"vertical"},{default:o(()=>[l(e(a),{class:"relative h-full bg-gray-alpha-300 hover:bg-gray-alpha-500 rounded-md cursor-default before:content-empty before:absolute before:right-0 before:left-0 before:w-full before:h-full"})]),_:1})]),_:3}))}});export{m as default};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
slots: {
|
|
3
|
+
default?(_: {}): any;
|
|
4
|
+
};
|
|
5
|
+
refs: {};
|
|
6
|
+
attrs: Partial<{}>;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
9
|
+
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>;
|
|
10
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
11
|
+
export default _default;
|
|
12
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
13
|
+
new (): {
|
|
14
|
+
$slots: S;
|
|
15
|
+
};
|
|
16
|
+
};
|