pxd 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. package/README.md +10 -76
  2. package/dist/components/button/index.vue +84 -0
  3. package/dist/components/config-provider/index.vue +26 -0
  4. package/dist/composables/useConfigProvider.d.ts +8 -0
  5. package/dist/composables/useConfigProvider.js +11 -0
  6. package/dist/index.d.ts +5 -0
  7. package/dist/index.js +12 -0
  8. package/dist/plugins/nuxt.d.ts +5 -0
  9. package/dist/plugins/nuxt.js +24 -0
  10. package/dist/plugins/resolver.d.ts +3 -3
  11. package/dist/plugins/resolver.js +19 -1
  12. package/dist/tokens.css +378 -0
  13. package/package.json +54 -41
  14. package/dist/Check.js +0 -1
  15. package/dist/ChevronDown.js +0 -1
  16. package/dist/code-block.css +0 -1
  17. package/dist/components/_utils/css.d.ts +0 -9
  18. package/dist/components/_utils/css.js +0 -1
  19. package/dist/components/avatar/_.js +0 -1
  20. package/dist/components/avatar/index.d.ts +0 -6
  21. package/dist/components/avatar/index.js +0 -1
  22. package/dist/components/avatar/src/avatar.d.ts +0 -22
  23. package/dist/components/avatar-group/index.d.ts +0 -7
  24. package/dist/components/avatar-group/index.js +0 -1
  25. package/dist/components/avatar-group/src/avatar-group.d.ts +0 -3
  26. package/dist/components/badge/index.d.ts +0 -1
  27. package/dist/components/badge/index.js +0 -1
  28. package/dist/components/badge/src/badge.d.ts +0 -42
  29. package/dist/components/book/index.d.ts +0 -1
  30. package/dist/components/book/index.js +0 -1
  31. package/dist/components/book/src/book.d.ts +0 -8
  32. package/dist/components/button/index.d.ts +0 -23
  33. package/dist/components/button/index.js +0 -1
  34. package/dist/components/button/src/button.d.ts +0 -29
  35. package/dist/components/checkbox/index.d.ts +0 -1
  36. package/dist/components/checkbox/index.js +0 -1
  37. package/dist/components/checkbox/src/checkbox.d.ts +0 -27
  38. package/dist/components/checkbox-group/index.d.ts +0 -4
  39. package/dist/components/checkbox-group/index.js +0 -1
  40. package/dist/components/checkbox-group/src/checkbox-group.d.ts +0 -17
  41. package/dist/components/choicebox/index.d.ts +0 -1
  42. package/dist/components/choicebox/index.js +0 -1
  43. package/dist/components/choicebox/src/choicebox.d.ts +0 -21
  44. package/dist/components/choicebox-group/index.d.ts +0 -13
  45. package/dist/components/choicebox-group/index.js +0 -1
  46. package/dist/components/choicebox-group/src/choicebox-group.d.ts +0 -25
  47. package/dist/components/code-block/index.d.ts +0 -1
  48. package/dist/components/code-block/index.js +0 -1
  49. package/dist/components/code-block/src/code-block.d.ts +0 -8
  50. package/dist/components/collapse/index.d.ts +0 -1
  51. package/dist/components/collapse/index.js +0 -1
  52. package/dist/components/collapse/src/collapse.d.ts +0 -9
  53. package/dist/components/combobox/index.d.ts +0 -1
  54. package/dist/components/combobox/index.js +0 -1
  55. package/dist/components/combobox/src/combobox.d.ts +0 -19
  56. package/dist/components/dialog/index.d.ts +0 -1
  57. package/dist/components/dialog/index.js +0 -1
  58. package/dist/components/dialog/src/dialog.d.ts +0 -32
  59. package/dist/components/error/index.d.ts +0 -1
  60. package/dist/components/error/index.js +0 -1
  61. package/dist/components/error/src/error.d.ts +0 -22
  62. package/dist/components/input/index.d.ts +0 -4
  63. package/dist/components/input/index.js +0 -1
  64. package/dist/components/input/src/input.d.ts +0 -25
  65. package/dist/components/keyboard-input/index.d.ts +0 -1
  66. package/dist/components/keyboard-input/index.js +0 -1
  67. package/dist/components/keyboard-input/src/keyboard-input.d.ts +0 -24
  68. package/dist/components/link/index.d.ts +0 -1
  69. package/dist/components/link/index.js +0 -1
  70. package/dist/components/link/src/link.d.ts +0 -23
  71. package/dist/components/loading-dots/index.d.ts +0 -1
  72. package/dist/components/loading-dots/index.js +0 -1
  73. package/dist/components/loading-dots/src/loading-dots.d.ts +0 -19
  74. package/dist/components/overlay/index.d.ts +0 -1
  75. package/dist/components/overlay/index.js +0 -1
  76. package/dist/components/overlay/src/overlay.d.ts +0 -5
  77. package/dist/components/progress/index.d.ts +0 -1
  78. package/dist/components/progress/index.js +0 -1
  79. package/dist/components/progress/src/progress.d.ts +0 -15
  80. package/dist/components/radio/index.d.ts +0 -6
  81. package/dist/components/radio/index.js +0 -1
  82. package/dist/components/radio/src/radio.d.ts +0 -17
  83. package/dist/components/scroller/index.d.ts +0 -1
  84. package/dist/components/scroller/index.js +0 -1
  85. package/dist/components/scroller/src/scroller.d.ts +0 -16
  86. package/dist/components/select/index.d.ts +0 -1
  87. package/dist/components/select/index.js +0 -1
  88. package/dist/components/select/src/select.d.ts +0 -15
  89. package/dist/components/show-more/index.d.ts +0 -1
  90. package/dist/components/show-more/index.js +0 -1
  91. package/dist/components/show-more/src/show-more.d.ts +0 -16
  92. package/dist/components/spinner/_.js +0 -1
  93. package/dist/components/spinner/index.d.ts +0 -1
  94. package/dist/components/spinner/index.js +0 -1
  95. package/dist/components/spinner/src/spinner.d.ts +0 -5
  96. package/dist/components/status-dot/index.d.ts +0 -1
  97. package/dist/components/status-dot/index.js +0 -1
  98. package/dist/components/status-dot/src/status-dot.d.ts +0 -6
  99. package/dist/components/switch/index.d.ts +0 -1
  100. package/dist/components/switch/index.js +0 -1
  101. package/dist/components/switch/src/switch.d.ts +0 -38
  102. package/dist/components/tabs/index.d.ts +0 -8
  103. package/dist/components/tabs/index.js +0 -1
  104. package/dist/components/tabs/src/tabs.d.ts +0 -48
  105. package/dist/components/tabs-item/index.d.ts +0 -1
  106. package/dist/components/tabs-item/index.js +0 -1
  107. package/dist/components/tabs-item/src/tabs-item.d.ts +0 -34
  108. package/dist/components/textarea/index.d.ts +0 -1
  109. package/dist/components/textarea/index.js +0 -1
  110. package/dist/components/textarea/src/textarea.d.ts +0 -16
  111. package/dist/components/toggle/index.d.ts +0 -1
  112. package/dist/components/toggle/index.js +0 -1
  113. package/dist/components/toggle/src/toggle.d.ts +0 -35
  114. package/dist/error.vue_vue_type_script_setup_true_lang.js +0 -1
  115. package/dist/link.vue_vue_type_script_setup_true_lang.js +0 -1
  116. package/dist/plugins/tailwind-preset.d.ts +0 -196
  117. package/dist/plugins/tailwind-preset.js +0 -1
  118. package/dist/vars.css +0 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pxd",
3
3
  "type": "module",
4
- "version": "0.0.5",
4
+ "version": "0.0.6",
5
5
  "description": "Vue component library based on radix-vue and Geist Design System.",
6
6
  "author": "libondev <bon.li@outlook.com>",
7
7
  "license": "MIT",
@@ -16,7 +16,6 @@
16
16
  "keywords": [
17
17
  "ui",
18
18
  "vue",
19
- "vue3",
20
19
  "ui framework",
21
20
  "component library"
22
21
  ],
@@ -25,62 +24,76 @@
25
24
  "#/*": "./src/*",
26
25
  "#types": "./src/types",
27
26
  "#types/*": "./src/types/*",
28
- "~/*": "./src/components/*",
29
27
  "#utils/*": "./src/components/_utils/*"
30
28
  },
31
29
  "exports": {
32
- ".": "./dist/index.js",
33
- "./vars.css": "./dist/vars.css",
34
- "./components": "./dist/components/*",
30
+ ".": {
31
+ "types": "./dist/index.d.ts",
32
+ "default": "./dist/index.js"
33
+ },
34
+ "./nuxt": "./dist/plugins/nuxt.js",
35
+ "./components/*": "./dist/components/*/index.vue",
35
36
  "./resolver": "./dist/plugins/resolver.js",
36
- "./tailwind.config": "./dist/plugins/tailwind-preset.js",
37
- "./*": "./dist/*"
37
+ "./tokens.css": "./dist/tokens.css"
38
38
  },
39
39
  "main": "./dist/index.js",
40
40
  "module": "./dist/index.js",
41
41
  "types": "./dist/index.d.ts",
42
- "style": "dist/vars.css",
42
+ "style": "./dist/tokens.css",
43
+ "typesVersions": {
44
+ "*": {
45
+ "*": [
46
+ "*",
47
+ "dist/*",
48
+ "dist/*.d.ts",
49
+ "dist/*/index.d.ts"
50
+ ]
51
+ }
52
+ },
43
53
  "files": [
44
- "dist/*"
54
+ "dist"
45
55
  ],
46
56
  "publishConfig": {
47
57
  "access": "public"
48
58
  },
49
59
  "scripts": {
50
- "dev": "pnpm --filter docs dev",
51
- "build": "vite build",
52
- "build:docs": "pnpm --filter docs build",
60
+ "predev": "unbuild --stub",
61
+ "dev": "pnpm dev:docs",
62
+ "dev:docs": "pnpm --filter docs dev",
63
+ "dev:vue2": "pnpm predev && pnpm --filter vue2 dev",
64
+ "prebuild": "node scripts/update-exports.js && unbuild",
65
+ "build": "pnpm build:docs",
66
+ "build:docs": "pnpm prebuild && pnpm --filter docs build",
67
+ "build:vue2": "pnpm prebuild && pnpm --filter vue2 build",
68
+ "preview": "pnpm --filter docs preview",
69
+ "preview:vue2": "pnpm --filter vue2 preview",
53
70
  "lint": "eslint .",
54
71
  "lint:fix": "eslint . --fix",
55
- "type-check": "vue-tsc --noEmit --composite false"
56
- },
57
- "peerDependencies": {
58
- "gdsi": "^1.0.0",
59
- "vue": "^3.4.0"
60
- },
61
- "dependencies": {
62
- "radix-vue": "^1.9.7"
63
- },
64
- "optionalDependencies": {
65
- "shiki": "^1.23.1"
72
+ "test": "vitest run",
73
+ "test:watch": "vitest",
74
+ "typecheck": "vue-tsc -p tsconfig.app.json --noEmit"
66
75
  },
67
76
  "devDependencies": {
68
- "@antfu/eslint-config": "^3.8.0",
69
- "@types/node": "^20.16.12",
70
- "@vitejs/plugin-vue": "^5.1.4",
71
- "@vitejs/plugin-vue-jsx": "^4.0.1",
72
- "eslint": "^9.12.0",
73
- "fast-glob": "^3.3.2",
74
- "gdsi": "^1.0.0",
75
- "tailwindcss": "^3.4.14",
76
- "typescript": "~5.6.3",
77
- "unplugin-auto-import": "^0.18.3",
78
- "unplugin-vue-components": "^0.27.4",
79
- "v-lazy-show": "^0.2.4",
80
- "vite": "^5.4.9",
81
- "vite-plugin-dts": "^4.2.4",
82
- "vue": "^3.5.12",
83
- "vue-router": "^4.4.5",
84
- "vue-tsc": "^2.1.6"
77
+ "@antfu/eslint-config": "catalog:",
78
+ "@nuxt/kit": "catalog:",
79
+ "@nuxt/schema": "catalog:",
80
+ "@testing-library/vue": "catalog:",
81
+ "@tsconfig/node22": "catalog:",
82
+ "@types/node": "catalog:",
83
+ "@vitejs/plugin-vue": "catalog:",
84
+ "@vue/test-utils": "catalog:",
85
+ "@vue/tsconfig": "catalog:",
86
+ "eslint": "catalog:",
87
+ "jsdom": "catalog:",
88
+ "mkdist": "catalog:",
89
+ "tailwindcss": "catalog:",
90
+ "tinyglobby": "catalog:",
91
+ "typescript": "catalog:",
92
+ "unbuild": "catalog:",
93
+ "unplugin-auto-import": "catalog:",
94
+ "unplugin-vue-components": "catalog:",
95
+ "vitest": "catalog:",
96
+ "vue": "catalog:",
97
+ "vue-tsc": "catalog:"
85
98
  }
86
99
  }
package/dist/Check.js DELETED
@@ -1 +0,0 @@
1
- import{defineComponent as r,h as n}from"vue";const i=r((t,e)=>{const o=n("svg",{innerHTML:'<path fill-rule="evenodd" clip-rule="evenodd" d="M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z" fill="currentColor"></path>',height:"16",strokeLinejoin:"round",style:"color:currentColor",viewBox:"0 0 16 16",width:"16",...e.attrs});return()=>o},{name:"CheckIcon"});export{i};
@@ -1 +0,0 @@
1
- import{defineComponent as n,h as r}from"vue";const L=n((t,e)=>{const o=r("svg",{innerHTML:'<path fill-rule="evenodd" clip-rule="evenodd" d="M14.0607 5.49999L13.5303 6.03032L8.7071 10.8535C8.31658 11.2441 7.68341 11.2441 7.29289 10.8535L2.46966 6.03032L1.93933 5.49999L2.99999 4.43933L3.53032 4.96966L7.99999 9.43933L12.4697 4.96966L13 4.43933L14.0607 5.49999Z" fill="currentColor"></path>',height:"16",strokeLinejoin:"round",style:"color:currentColor",viewBox:"0 0 16 16",width:"16",...e.attrs});return()=>o},{name:"ChevronDownIcon"});export{L as i};
@@ -1 +0,0 @@
1
- .shiki,.shiki span{background-color:var(--background-100)!important}html.dark .shiki,html.dark .shiki span{color:var(--shiki-dark)!important;font-style:var(--shiki-dark-font-style)!important;font-weight:var(--shiki-dark-font-weight)!important;text-decoration:var(--shiki-dark-text-decoration)!important}
@@ -1,9 +0,0 @@
1
- export declare function autoUnit(target: string | number): string;
2
- /**
3
- * Increase string a value with unit
4
- *
5
- * @example '2px' + 1 = '3px'
6
- * @example '15em' + (-2) = '13em'
7
- */
8
- export declare function getFlowDirection(propValue: string): '' | 'flex-col';
9
- export declare function getStandardSize(mergeSizes?: Record<string, string>): (v: string) => string;
@@ -1 +0,0 @@
1
- function o(t){return typeof t=="number"||!isNaN(t)?`${t}px`:t}function u(t){return t==="row"?"":"flex-col"}function r(t){const f={small:"h-7 text-sm",default:"h-8 text-sm",large:"h-10 text-base"};return t&&Object.keys(t).forEach(n=>{n in f?f[n]+=` ${t[n]}`:f[n]=t[n]}),n=>f[n]||f.default}export{o as autoUnit,u as getFlowDirection,r as getStandardSize};
@@ -1 +0,0 @@
1
- import{defineComponent as i,openBlock as r,createElementBlock as t,normalizeStyle as f,unref as a,renderSlot as l,createCommentVNode as s}from"vue";import{autoUnit as n}from"../_utils/css.js";const u=["src","width","height"],h={key:0,class:"absolute bottom-[-5px] left-[-3px] z-10 w-1/2 h-1/2 flex items-center rounded-full border border-white bg-white overflow-hidden"},c=i({name:"PAvatar",__name:"avatar",props:{src:{},size:{default:32},placeholder:{type:Boolean}},emits:["error"],setup(b){return(e,o)=>(r(),t("div",{class:"pxd-avatar relative rounded-full border border-white select-none before:absolute before:inset-0 before:w-full before:h-full before:rounded-full before:bg-[length:400%_100%] before:animate-flash-loading before:bg-gradient-to-l after:absolute after:inset-0 after:w-full after:h-full after:rounded-full after:border after:border-gray-alpha-400",style:f({width:a(n)(e.size),height:a(n)(e.size),"--tw-gradient-stops":"var(--accents-1), var(--accents-2), var(--accents-2), var(--accents-1)"})},[l(e.$slots,"default",{},()=>[e.placeholder?s("",!0):(r(),t("img",{key:0,src:e.src,class:"relative rounded-full text-0 overflow-hidden",width:e.size,height:e.size,alt:"avatar","aria-hidden":"true",onError:o[0]||(o[0]=d=>e.$emit("error",d))},null,40,u))]),e.$slots.badge?(r(),t("div",h,[l(e.$slots,"badge")])):s("",!0)],4))}});export{c as _};
@@ -1,6 +0,0 @@
1
- export interface AvatarProps {
2
- src?: string;
3
- size: number | string;
4
- placeholder?: boolean;
5
- }
6
- export { default } from './src/avatar';
@@ -1 +0,0 @@
1
- import{_ as p}from"./_.js";import"vue";import"../_utils/css.js";export{p as default};
@@ -1,22 +0,0 @@
1
- import { AvatarProps } from '../index.js';
2
- declare function __VLS_template(): {
3
- slots: {
4
- default?(_: {}): any;
5
- badge?(_: {}): any;
6
- };
7
- refs: {};
8
- attrs: Partial<{}>;
9
- };
10
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
- declare const __VLS_component: import('vue').DefineComponent<AvatarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
- error: (args_0: Event) => any;
13
- }, string, import('vue').PublicProps, Readonly<AvatarProps> & Readonly<{
14
- onError?: ((args_0: Event) => any) | undefined;
15
- }>, {}, {}, {}, {}, 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,7 +0,0 @@
1
- import { AvatarProps } from '../avatar';
2
- export interface AvatarGroupProps {
3
- max?: number;
4
- size?: number | string;
5
- members: AvatarProps[];
6
- }
7
- export { default } from './src/avatar-group';
@@ -1 +0,0 @@
1
- import{defineComponent as c,computed as d,provide as u,openBlock as t,createElementBlock as s,Fragment as f,renderList as p,unref as a,createBlock as o,withCtx as h,createElementVNode as z,toDisplayString as g,createCommentVNode as v}from"vue";import{_ as n}from"../avatar/_.js";import"../_utils/css.js";const x={class:"flex flex-wrap items-center"},b={class:"relative w-full h-full flex items-center justify-center font-bold text-sm rounded-full bg-gray-1000 text-gray-100 font-mono"},B=c({name:"PAvatarGroup",__name:"avatar-group",props:{max:{default:5},size:{default:32},members:{default:()=>[]}},setup(r){const m=d(()=>r.members.slice(0,r.max));return u("avatarGroupProvider",{size:r.size}),(e,y)=>(t(),s("div",x,[(t(!0),s(f,null,p(a(m),(l,i)=>(t(),o(a(n),{key:i,size:e.size,src:l.src,placeholder:l.placeholder,class:"[&:nth-child(n+2)]:-ml-3"},null,8,["size","src","placeholder"]))),128)),e.members.length>e.max?(t(),o(a(n),{key:0,size:e.size,class:"-ml-3"},{default:h(()=>[z("div",b," +"+g(e.members.length-e.max),1)]),_:1},8,["size"])):v("",!0)]))}});export{B as default};
@@ -1,3 +0,0 @@
1
- import { AvatarGroupProps } from '../index.js';
2
- declare const _default: import('vue').DefineComponent<AvatarGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<AvatarGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
3
- export default _default;
@@ -1 +0,0 @@
1
- export { default } from './src/badge';
@@ -1 +0,0 @@
1
- import{defineComponent as r,openBlock as n,createElementBlock as u,normalizeClass as o,renderSlot as m}from"vue";const g=r({__name:"badge",props:{variant:{default:"default"}},setup(b){const t={default:"font-medium bg-background-100",gray:"font-medium bg-gray-700 text-background-100",blue:"font-medium bg-blue-700 text-background-100",purple:"font-medium bg-purple-700 text-background-100",amber:"font-medium bg-amber-700",red:"font-medium bg-red-700 text-background-100",pink:"font-medium bg-pink-700 text-background-100",green:"font-medium bg-green-700 text-background-100",teal:"font-medium bg-teal-700 text-background-100","gray-subtle":"font-medium bg-gray-200 text-gray-1000","blue-subtle":"font-medium bg-blue-200 text-blue-700","purple-subtle":"font-medium bg-purple-200 text-purple-700","amber-subtle":"font-medium bg-amber-200 text-amber-700","red-subtle":"font-medium bg-red-200 text-red-700","pink-subtle":"font-medium bg-pink-200 text-pink-700","green-subtle":"font-medium bg-green-200 text-green-700","teal-subtle":"font-medium bg-teal-200 text-teal-700",inverted:"font-medium bg-gray-1000 text-background-100",vue:"font-medium text-background-100 bg-gradient-to-br from-[#42d392] via-[#42d392] via-25% to-[#647eff]",trial:"font-medium text-background-100 bg-gradient-to-br from-[#0070f3] to-[#f81ce5]",turborepo:"font-medium text-background-100 bg-gradient-to-br from-[#ff1e56] to-[#0096ff]"};return(e,d)=>(n(),u("span",{class:o(["pxd-badge inline-flex items-center justify-center px-2.5 h-6 text-xs rounded-full",t[e.variant]])},[m(e.$slots,"default")],2))}});export{g as default};
@@ -1,42 +0,0 @@
1
- interface BadgeProps {
2
- variant?: keyof typeof VARIANTS;
3
- }
4
- declare const VARIANTS: {
5
- default: string;
6
- gray: string;
7
- blue: string;
8
- purple: string;
9
- amber: string;
10
- red: string;
11
- pink: string;
12
- green: string;
13
- teal: string;
14
- 'gray-subtle': string;
15
- 'blue-subtle': string;
16
- 'purple-subtle': string;
17
- 'amber-subtle': string;
18
- 'red-subtle': string;
19
- 'pink-subtle': string;
20
- 'green-subtle': string;
21
- 'teal-subtle': string;
22
- inverted: string;
23
- vue: string;
24
- trial: string;
25
- turborepo: string;
26
- };
27
- declare function __VLS_template(): {
28
- slots: {
29
- default?(_: {}): any;
30
- };
31
- refs: {};
32
- attrs: Partial<{}>;
33
- };
34
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
35
- declare const __VLS_component: import('vue').DefineComponent<BadgeProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BadgeProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
36
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
37
- export default _default;
38
- type __VLS_WithTemplateSlots<T, S> = T & {
39
- new (): {
40
- $slots: S;
41
- };
42
- };
@@ -1 +0,0 @@
1
- export { default } from './src/book';
@@ -1 +0,0 @@
1
- import{defineComponent as l,openBlock as o,createElementBlock as r,normalizeStyle as n,createElementVNode as t}from"vue";const s=l({__name:"book",props:{title:{},color:{},width:{default:196},variant:{default:"default"}},setup(d){return(a,e)=>(o(),r("div",{class:"pxd-book w-[--book-width] h-full",style:n({"--book-width":`${a.width}px`,"--book-depth":"29cqw"})},e[0]||(e[0]=[t("div",null,null,-1),t("div",{class:"absolute top-1",style:{height:"calc(100% - 2 * 4px)",width:"calc(var(--book-depth) - 2px)",transform:"translateX(calc(var(--book-width) * 1px - var(--book-depth) / 2 - 3px)) rotateY(90deg) translateX(calc(var(--book-depth) / 2))",background:"linear-gradient(90deg,#eaeaea,transparent 70%),linear-gradient(#fff,#fafafa)"}},null,-1),t("div",{class:"absolute left-0 h-full bg-gray-200 rounded-[6px_4px_4px_6px]",style:{transform:"translateZ(calc(-1 * var(--book-depth)))"}},null,-1)]),4))}});export{s as default};
@@ -1,8 +0,0 @@
1
- interface BookProps {
2
- title: string;
3
- color?: string;
4
- width?: number | string;
5
- variant?: 'default' | 'simple';
6
- }
7
- declare const _default: import('vue').DefineComponent<BookProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<BookProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
8
- export default _default;
@@ -1,23 +0,0 @@
1
- import { StandardSize } from '../../types';
2
- export declare const getButtonSizes: (v: string) => string;
3
- export declare const buttonShapes: {
4
- normal: string;
5
- square: string;
6
- rounded: string;
7
- circle: string;
8
- };
9
- export declare const buttonVariants: {
10
- base: string;
11
- default: string;
12
- secondary: string;
13
- danger: string;
14
- warning: string;
15
- outline: string;
16
- ghost: string;
17
- underline: string;
18
- };
19
- export type ButtonSizes = StandardSize | 'tiny';
20
- export type ButtonShapes = keyof typeof buttonShapes;
21
- export type ButtonVariants = keyof typeof buttonVariants;
22
- export declare function getButtonVariant(variant: ButtonVariants, withBase?: boolean): string;
23
- export { default } from './src/button';
@@ -1 +0,0 @@
1
- import{getStandardSize as b}from"../_utils/css.js";import{defineComponent as u,computed as r,openBlock as l,createElementBlock as p,normalizeClass as c,unref as t,createBlock as g,createCommentVNode as y,renderSlot as o,createElementVNode as f}from"vue";import{_ as h}from"../spinner/_.js";const m=["type","disabled"],v={class:"flex items-center text-nowrap overflow-hidden"},$=u({name:"PButton",__name:"button",props:{type:{default:"button"},icon:{type:Boolean},shadow:{type:Boolean,default:!1},loading:{type:Boolean},disabled:{type:Boolean},shape:{default:"normal"},variant:{default:"default"},size:{default:"default"}},setup(a){const n=r(()=>a.shadow&&!["ghost","underline"].includes(a.variant)),s=r(()=>w(a.size)),i=r(()=>B(a.variant));return(e,k)=>(l(),p("button",{type:e.type,class:c(["pxd-button p-ring",[t(i),t(s),t(x)[e.shape],{"shadow-sm":t(n),"w-8 h-8 !p-0":e.icon}]]),disabled:e.disabled||e.loading},[e.loading?(l(),g(t(h),{key:0})):y("",!0),o(e.$slots,"prefix"),f("span",v,[o(e.$slots,"default")]),o(e.$slots,"suffix")],10,m))}}),w=b({tiny:"w-6 h-6 p-0",default:"px-2 gap-2",small:"px-1.5 gap-1",large:"px-2.5 gap-2"}),x={normal:"rounded-md",square:"rounded-none",rounded:"rounded-full",circle:"rounded-full overflow-hidden aspect-square !p-1"},d={base:"inline-flex items-center select-none border font-inherit b-(1 solid) justify-center cursor-pointer text-sm disabled:cursor-not-allowed disabled:bg-gray-100 disabled:text-gray-700 disabled:border-gray-400",default:"bg-gray-1000 text-background-100 border-transparent enabled:hover:opacity-90 enabled:active:opacity-80",secondary:"bg-gray-100 text-gray-1000 border-transparent enabled:hover:bg-gray-200 enabled:active:bg-gray-alpha-300",danger:"bg-red-800 text-white border-transparent enabled:hover:opacity-90 enabled:active:opacity-80",warning:"bg-amber-800 text-black border-transparent enabled:hover:opacity-90 enabled:active:opacity-80",outline:"text-gray-1000 bg-background-100 border-gray-alpha-400 enabled:hover:bg-gray-100 enabled:active:bg-gray-200",ghost:"bg-transparent text-gray-1000 border-transparent enabled:hover:bg-gray-100 enabled:active:bg-gray-200",underline:"bg-transparent text-gray-1000 border-transparent underline underline-offset-4 enabled:hover:opacity-90 enabled:active:opacity-70"};function B(a,n=!0){return(d[a]||d.default)+(n?` ${d.base}`:"")}export{x as buttonShapes,d as buttonVariants,$ as default,w as getButtonSizes,B as getButtonVariant};
@@ -1,29 +0,0 @@
1
- import { ButtonShapes, ButtonSizes, ButtonVariants } from '../index.js';
2
- interface ButtonProps {
3
- type?: HTMLButtonElement['type'];
4
- icon?: boolean;
5
- shadow?: boolean;
6
- loading?: boolean;
7
- disabled?: boolean;
8
- shape?: ButtonShapes;
9
- variant?: ButtonVariants;
10
- size?: ButtonSizes;
11
- }
12
- declare function __VLS_template(): {
13
- slots: {
14
- prefix?(_: {}): any;
15
- default?(_: {}): any;
16
- suffix?(_: {}): any;
17
- };
18
- refs: {};
19
- attrs: Partial<{}>;
20
- };
21
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
22
- declare const __VLS_component: import('vue').DefineComponent<ButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ButtonProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
23
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
24
- export default _default;
25
- type __VLS_WithTemplateSlots<T, S> = T & {
26
- new (): {
27
- $slots: S;
28
- };
29
- };
@@ -1 +0,0 @@
1
- export { default } from './src/checkbox';
@@ -1 +0,0 @@
1
- import{defineComponent as c,mergeModels as n,useModel as i,openBlock as p,createElementBlock as u,createVNode as e,unref as t,mergeProps as b,withCtx as d,createElementVNode as m,renderSlot as h}from"vue";import{i as g}from"../../Check.js";import{CheckboxRoot as k,CheckboxIndicator as x}from"radix-vue";const y={class:"pxd-checkbox group inline-flex items-center cursor-pointer text-gray-1000"},f={class:"pl-1 pr-1.5 leading-0 active:select-none text-sm text-gray-1000 empty:hidden peer-disabled:text-gray-500"},v=c({name:"PCheckbox",__name:"checkbox",props:n({defaultChecked:{type:Boolean},checked:{type:[Boolean,String]},disabled:{type:Boolean},required:{type:Boolean},name:{},value:{},id:{},asChild:{type:Boolean},as:{}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(l){const o=i(l,"modelValue");return(a,r)=>(p(),u("label",y,[e(t(k),b({checked:o.value,"onUpdate:checked":r[0]||(r[0]=s=>o.value=s),class:"p-ring peer w-4 min-w-4 h-4 p-0 shadow-sm rounded border border-gray-700 transition-colors bg-background-100 data-[state=checked]:bg-current data-[state=checked]:!border-current 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"},a.$attrs),{default:d(()=>[e(t(x),{"as-child":"",class:"block h-full p-px -m-px"},{default:d(()=>[e(t(g),{class:"text-background-100"})]),_:1})]),_:1},16,["checked"]),m("span",f,[h(a.$slots,"default")])]))}});export{v as default};
@@ -1,27 +0,0 @@
1
- import { CheckboxRootProps } from 'radix-vue';
2
- interface CheckboxProps extends CheckboxRootProps {
3
- }
4
- declare let __VLS_typeProps: CheckboxProps;
5
- type __VLS_PublicProps = {
6
- modelValue?: boolean;
7
- } & typeof __VLS_typeProps;
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<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
17
- "update:modelValue": (modelValue: boolean) => any;
18
- }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
19
- "onUpdate:modelValue"?: ((modelValue: boolean) => any) | undefined;
20
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
21
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
22
- export default _default;
23
- type __VLS_WithTemplateSlots<T, S> = T & {
24
- new (): {
25
- $slots: S;
26
- };
27
- };
@@ -1,4 +0,0 @@
1
- export interface CheckboxGroupProps {
2
- direction?: 'row' | 'col';
3
- }
4
- export { default } from './src/checkbox-group';
@@ -1 +0,0 @@
1
- import{defineComponent as r,openBlock as n,createElementBlock as c,normalizeClass as i,unref as l,renderSlot as a}from"vue";import{getFlowDirection as s}from"../_utils/css.js";const u=r({__name:"checkbox-group",props:{direction:{default:"row"}},setup(e){const o=s(e.direction);return(t,p)=>(n(),c("div",{class:i(["flex gap-3",l(o)])},[a(t.$slots,"default")],2))}});export{u as default};
@@ -1,17 +0,0 @@
1
- import { CheckboxGroupProps } from '../index.js';
2
- declare function __VLS_template(): {
3
- slots: {
4
- default?(_: {}): any;
5
- };
6
- refs: {};
7
- attrs: Partial<{}>;
8
- };
9
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
- declare const __VLS_component: import('vue').DefineComponent<CheckboxGroupProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<CheckboxGroupProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, 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
- };
@@ -1 +0,0 @@
1
- export { default } from './src/choicebox';
@@ -1 +0,0 @@
1
- import{defineComponent as p,inject as m,computed as f,openBlock as d,createElementBlock as l,unref as t,createElementVNode as o,toDisplayString as a,createVNode as g,renderSlot as h,createCommentVNode as y}from"vue";import{i as x}from"../../Check.js";import{ChoiceboxInjectionKey as k}from"../choicebox-group/index.js";import"../_utils/css.js";const _=["aria-selected","data-selected"],v={class:"flex gap-6 items-center justify-between p-3"},C={class:"flex flex-col items-stretch justify-start"},j={class:"font-medium text-sm"},V={class:"font-normal text-sm opacity-90 empty:hidden"},w=["data-selected"],N=["data-selected"],S={key:0,class:"border-t border-inherit p-2 flex justify-center"},D=p({__name:"choicebox",props:{title:{},value:{},description:{}},setup(n){const c=n,{multiple:i,modelValue:u,onChoiceboxItemChange:b}=m(k,{modelValue:{}}),s=f(()=>{var e;return(e=u.value)==null?void 0:e.includes(c.value)});return(e,r)=>(d(),l("li",{tabindex:"0","aria-selected":t(s),"data-selected":t(s),class:"pxd-choicebox-item w-full rounded-md list-none cursor-pointer border border-gray-400 bg-background-100 transition-colors hover:bg-gray-100 hover:border-gray-500 data-[selected=true]:border-blue-600 data-[selected=true]:bg-blue-100 data-[selected=true]:text-blue-900",onClick:r[0]||(r[0]=$=>t(b)(e.value))},[o("div",v,[o("div",C,[o("span",j,a(e.title),1),o("span",V,a(e.description),1)]),t(i)?(d(),l("span",{key:0,"data-selected":t(s),class:"relative group block size-4 rounded border border-gray-500 bg-background-100 data-[selected=true]:border-blue-900 data-[selected=true]:bg-blue-900"},[g(t(x),{class:"text-background-100 absolute left-[-1px] top-[-1px] p-px"})],8,w)):(d(),l("span",{key:1,"data-selected":t(s),class:"relative group block size-4 rounded-full bg-background-100 border border-gray-500 data-[selected=true]:border-blue-900"},r[1]||(r[1]=[o("i",{class:"hidden group-data-[selected=true]:block absolute inset-0 m-auto w-1/2 h-1/2 rounded-full bg-blue-900"},null,-1)]),8,N))]),e.$slots.default?(d(),l("div",S,[h(e.$slots,"default")])):y("",!0)],8,_))}});export{D as default};
@@ -1,21 +0,0 @@
1
- interface ChoiceboxProps {
2
- title: string;
3
- value: string;
4
- description?: string;
5
- }
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<ChoiceboxProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ChoiceboxProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
15
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
16
- export default _default;
17
- type __VLS_WithTemplateSlots<T, S> = T & {
18
- new (): {
19
- $slots: S;
20
- };
21
- };
@@ -1,13 +0,0 @@
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';
@@ -1 +0,0 @@
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};
@@ -1,25 +0,0 @@
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
- };
@@ -1 +0,0 @@
1
- export { default } from './src/code-block';
@@ -1 +0,0 @@
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};
@@ -1,8 +0,0 @@
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;
@@ -1 +0,0 @@
1
- export { default } from './src/collapse';
@@ -1 +0,0 @@
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};
@@ -1,9 +0,0 @@
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;
@@ -1 +0,0 @@
1
- export { default } from './src/combobox';
@@ -1 +0,0 @@
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};
@@ -1,19 +0,0 @@
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 +0,0 @@
1
- export { default } from './src/dialog';
@@ -1 +0,0 @@
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};