@7pmlabs/design-system 1.0.8 → 1.0.10

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 (126) hide show
  1. package/dist/design-system.css +1 -1
  2. package/dist/design-system.js +24 -16
  3. package/dist/design-system177.js +29 -326
  4. package/dist/design-system177.js.map +1 -1
  5. package/dist/design-system179.js +1 -1
  6. package/dist/design-system179.js.map +1 -1
  7. package/dist/design-system180.js +73 -85
  8. package/dist/design-system180.js.map +1 -1
  9. package/dist/design-system182.js +1 -1
  10. package/dist/design-system182.js.map +1 -1
  11. package/dist/design-system183.js +32 -105
  12. package/dist/design-system183.js.map +1 -1
  13. package/dist/design-system185.js +4 -5
  14. package/dist/design-system185.js.map +1 -1
  15. package/dist/design-system186.js +26 -104
  16. package/dist/design-system186.js.map +1 -1
  17. package/dist/design-system188.js +4 -5
  18. package/dist/design-system188.js.map +1 -1
  19. package/dist/design-system189.js +23 -727
  20. package/dist/design-system189.js.map +1 -1
  21. package/dist/design-system191.js +1 -1
  22. package/dist/design-system191.js.map +1 -1
  23. package/dist/design-system192.js +31 -11
  24. package/dist/design-system192.js.map +1 -1
  25. package/dist/design-system194.js +8 -0
  26. package/dist/design-system194.js.map +1 -0
  27. package/dist/design-system195.js +332 -5
  28. package/dist/design-system195.js.map +1 -1
  29. package/dist/design-system197.js +5 -46
  30. package/dist/design-system197.js.map +1 -1
  31. package/dist/design-system198.js +100 -4
  32. package/dist/design-system198.js.map +1 -1
  33. package/dist/design-system200.js +8 -0
  34. package/dist/design-system200.js.map +1 -0
  35. package/dist/design-system201.js +19 -5
  36. package/dist/design-system201.js.map +1 -1
  37. package/dist/design-system202.js +4 -119
  38. package/dist/design-system202.js.map +1 -1
  39. package/dist/design-system203.js +6 -0
  40. package/dist/design-system203.js.map +1 -0
  41. package/dist/design-system204.js +419 -5
  42. package/dist/design-system204.js.map +1 -1
  43. package/dist/design-system206.js +8 -0
  44. package/dist/design-system206.js.map +1 -0
  45. package/dist/design-system207.js +108 -5
  46. package/dist/design-system207.js.map +1 -1
  47. package/dist/design-system209.js +6 -4
  48. package/dist/design-system209.js.map +1 -1
  49. package/dist/design-system210.js +90 -154
  50. package/dist/design-system210.js.map +1 -1
  51. package/dist/design-system212.js +5 -4
  52. package/dist/design-system212.js.map +1 -1
  53. package/dist/design-system213.js +737 -7
  54. package/dist/design-system213.js.map +1 -1
  55. package/dist/design-system215.js +8 -0
  56. package/dist/design-system215.js.map +1 -0
  57. package/dist/design-system216.js +11 -5
  58. package/dist/design-system216.js.map +1 -1
  59. package/dist/design-system217.js +451 -506
  60. package/dist/design-system217.js.map +1 -1
  61. package/dist/design-system219.js +4 -5
  62. package/dist/design-system219.js.map +1 -1
  63. package/dist/design-system220.js +3 -7
  64. package/dist/design-system220.js.map +1 -1
  65. package/dist/design-system221.js +41 -369
  66. package/dist/design-system221.js.map +1 -1
  67. package/dist/design-system222.js +7 -0
  68. package/dist/design-system222.js.map +1 -0
  69. package/dist/design-system223.js +283 -6
  70. package/dist/design-system223.js.map +1 -1
  71. package/dist/design-system225.js +8 -0
  72. package/dist/design-system225.js.map +1 -0
  73. package/dist/design-system226.js +122 -0
  74. package/dist/design-system226.js.map +1 -0
  75. package/dist/design-system228.js +8 -0
  76. package/dist/design-system228.js.map +1 -0
  77. package/dist/{design-system205.js → design-system229.js} +1 -1
  78. package/dist/{design-system205.js.map → design-system229.js.map} +1 -1
  79. package/dist/design-system231.js +8 -0
  80. package/dist/design-system231.js.map +1 -0
  81. package/dist/{design-system208.js → design-system232.js} +1 -1
  82. package/dist/{design-system208.js.map → design-system232.js.map} +1 -1
  83. package/dist/design-system233.js +7 -0
  84. package/dist/design-system233.js.map +1 -0
  85. package/dist/design-system234.js +173 -0
  86. package/dist/design-system234.js.map +1 -0
  87. package/dist/design-system236.js +8 -0
  88. package/dist/design-system236.js.map +1 -0
  89. package/dist/design-system237.js +10 -0
  90. package/dist/design-system237.js.map +1 -0
  91. package/dist/{design-system214.js → design-system238.js} +2 -2
  92. package/dist/{design-system214.js.map → design-system238.js.map} +1 -1
  93. package/dist/design-system240.js +8 -0
  94. package/dist/design-system240.js.map +1 -0
  95. package/dist/design-system241.js +583 -0
  96. package/dist/design-system241.js.map +1 -0
  97. package/dist/design-system243.js +9 -0
  98. package/dist/design-system243.js.map +1 -0
  99. package/dist/design-system244.js +10 -0
  100. package/dist/design-system244.js.map +1 -0
  101. package/dist/design-system245.js +377 -0
  102. package/dist/design-system245.js.map +1 -0
  103. package/dist/design-system247.js +9 -0
  104. package/dist/design-system247.js.map +1 -0
  105. package/dist/types/components/BSkeleton/BSkeleton.spec.d.ts +1 -0
  106. package/dist/types/components/BSkeleton/BSkeleton.vue.d.ts +46 -0
  107. package/dist/types/components/BSkeleton/BSkeletonAvatar.vue.d.ts +12 -0
  108. package/dist/types/components/BSkeleton/BSkeletonButton.vue.d.ts +14 -0
  109. package/dist/types/components/BSkeleton/BSkeletonImage.vue.d.ts +7 -0
  110. package/dist/types/components/BSkeleton/BSkeletonInput.vue.d.ts +12 -0
  111. package/dist/types/components/BSkeleton/BSkeletonNode.vue.d.ts +19 -0
  112. package/dist/types/components/BSkeleton/index.d.ts +7 -0
  113. package/dist/types/components/BSkeleton/types.d.ts +20 -0
  114. package/dist/types/components/BSplitter/BSplitter.spec.d.ts +1 -0
  115. package/dist/types/components/BSplitter/BSplitter.vue.d.ts +45 -0
  116. package/dist/types/components/BSplitter/BSplitterPanel.vue.d.ts +40 -0
  117. package/dist/types/components/BSplitter/index.d.ts +3 -0
  118. package/dist/types/components/BSplitter/types.d.ts +42 -0
  119. package/dist/types/components/index.d.ts +2 -0
  120. package/package.json +1 -1
  121. package/dist/design-system193.js +0 -528
  122. package/dist/design-system193.js.map +0 -1
  123. package/dist/design-system196.js +0 -6
  124. package/dist/design-system196.js.map +0 -1
  125. package/dist/design-system199.js +0 -286
  126. package/dist/design-system199.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"design-system245.js","names":[],"sources":["../src/components/BUpload/BUpload.vue?vue&type=script&setup=true&lang.ts"],"sourcesContent":["import { useModel as _useModel, mergeModels as _mergeModels, defineComponent as _defineComponent } from 'vue'\nimport { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, toDisplayString as _toDisplayString, withModifiers as _withModifiers, normalizeStyle as _normalizeStyle, normalizeClass as _normalizeClass, createStaticVNode as _createStaticVNode } from \"vue\"\n\nconst _hoisted_1 = [\"tabindex\", \"aria-disabled\", \"aria-label\"]\nconst _hoisted_2 = {\n key: 0,\n class: \"b-upload__card-trigger\"\n}\nconst _hoisted_3 = {\n key: 1,\n class: \"b-upload__default-text\"\n}\nconst _hoisted_4 = [\"accept\", \"multiple\", \"disabled\", \"webkitdirectory\"]\nconst _hoisted_5 = {\n key: 0,\n class: \"b-upload__item-thumbnail\",\n \"aria-hidden\": \"true\"\n}\nconst _hoisted_6 = [\"src\", \"alt\"]\nconst _hoisted_7 = {\n key: 1,\n class: \"b-upload__item-file-icon\"\n}\nconst _hoisted_8 = { class: \"b-upload__item-info\" }\nconst _hoisted_9 = [\"title\"]\nconst _hoisted_10 = { class: \"b-upload__item-actions\" }\nconst _hoisted_11 = [\"onClick\"]\nconst _hoisted_12 = [\"onClick\"]\nconst _hoisted_13 = [\"disabled\", \"onClick\"]\nconst _hoisted_14 = [\"aria-valuenow\", \"aria-label\"]\nconst _hoisted_15 = {\n key: 2,\n class: \"b-upload__hint\"\n}\n\nimport { ref, computed, watch, onMounted, useAttrs } from 'vue';\nimport { useComponentId } from '@/composables/useComponentId';\nimport {\n BUploadListType,\n BUploadFileStatus,\n type BUploadFile,\n type BUploadChangeInfo,\n type BUploadRequestOption,\n type BUploadShowUploadList,\n} from './types';\n\n\nexport default /*@__PURE__*/_defineComponent({\n ...{ inheritAttrs: false },\n __name: 'BUpload',\n props: /*@__PURE__*/_mergeModels({\n accept: { default: '' },\n action: { type: [String, Function], default: '' },\n multiple: { type: Boolean, default: false },\n disabled: { type: Boolean, default: false },\n directory: { type: Boolean, default: false },\n maxCount: {},\n listType: { default: () => (BUploadListType.Text) },\n method: { default: 'POST' },\n name: { default: 'file' },\n headers: {},\n data: { type: [Object, Function] },\n withCredentials: { type: Boolean, default: false },\n openFileDialogOnClick: { type: Boolean, default: true },\n showUploadList: { type: [Boolean, Object], default: true },\n defaultFileList: { default: () => ([]) },\n beforeUpload: { type: Function },\n customRequest: { type: Function }\n }, {\n \"fileList\": { default: undefined },\n \"fileListModifiers\": {},\n }),\n emits: /*@__PURE__*/_mergeModels([\"change\", \"remove\", \"preview\", \"download\", \"drop\"], [\"update:fileList\"]),\n setup(__props: any, { expose: __expose, emit: __emit }) {\n\n\n\nconst attrs = useAttrs();\n\n//#region Props\n\n//#endregion\n\n//#region Model & Events\nconst model = _useModel<BUploadFile[]>(__props, 'fileList');\n\nconst emit = __emit;\n//#endregion\n\n//#region Internal State\nconst { componentUID } = useComponentId();\nconst inputRef = ref<HTMLInputElement | null>(null);\nconst dragOver = ref(false);\nconst internalFileList = ref<BUploadFile[]>(Array.isArray(__props.defaultFileList) ? [...__props.defaultFileList] : []);\n\nconst fileList = computed<BUploadFile[]>({\n get: () => (model.value !== undefined ? model.value : internalFileList.value),\n set: (val) => {\n internalFileList.value = val;\n if (model.value !== undefined) {\n model.value = val;\n }\n },\n});\n\nonMounted(() => {\n if (model.value === undefined && __props.defaultFileList.length > 0) {\n internalFileList.value = [...__props.defaultFileList];\n }\n});\n\nwatch(\n () => model.value,\n (val) => {\n if (val !== undefined) {\n internalFileList.value = val;\n }\n },\n);\n\nconst isPictureCard = computed(\n () =>\n __props.listType === BUploadListType.PictureCard ||\n __props.listType === BUploadListType.PictureCircle,\n);\n\nconst showListConfig = computed<BUploadShowUploadList | false>(() => {\n if (__props.showUploadList === false) return false;\n if (__props.showUploadList === true) {\n return { showPreviewIcon: true, showRemoveIcon: true, showDownloadIcon: false };\n }\n return __props.showUploadList;\n});\n\nconst atMaxCount = computed(() => __props.maxCount !== undefined && __props.maxCount !== 1 && fileList.value.length >= __props.maxCount);\n//#endregion\n\n//#region Upload Logic\nlet fileUidCounter = 0;\n\nfunction genUid(): string {\n fileUidCounter += 1;\n return `b-upload-${componentUID.value}-${fileUidCounter}-${Date.now()}`;\n}\n\nfunction fileToUploadFile(file: File): BUploadFile {\n return {\n uid: genUid(),\n name: file.name,\n size: file.size,\n type: file.type,\n status: BUploadFileStatus.Uploading,\n percent: 0,\n originFileObj: file,\n };\n}\n\nfunction triggerChange(file: BUploadFile, newFileList: BUploadFile[], event?: ProgressEvent) {\n fileList.value = newFileList;\n emit('change', { file, fileList: newFileList, event });\n}\n\nfunction defaultUpload(options: BUploadRequestOption) {\n const xhr = new XMLHttpRequest();\n\n xhr.upload.addEventListener('progress', (e) => {\n if (e.lengthComputable && options.onProgress) {\n options.onProgress({ percent: Math.round((e.loaded / e.total) * 100) });\n }\n });\n\n xhr.addEventListener('load', () => {\n if (xhr.status >= 200 && xhr.status < 300) {\n options.onSuccess?.(xhr.response);\n } else {\n options.onError?.(new Error(`Upload failed with status ${xhr.status}`));\n }\n });\n\n xhr.addEventListener('error', () => {\n options.onError?.(new Error('Upload network error'));\n });\n\n xhr.open(options.method || 'POST', options.action, true);\n\n if (options.withCredentials) {\n xhr.withCredentials = true;\n }\n\n if (options.headers) {\n Object.entries(options.headers).forEach(([key, val]) => {\n xhr.setRequestHeader(key, val);\n });\n }\n\n const formData = new FormData();\n if (options.data) {\n Object.entries(options.data).forEach(([key, val]) => {\n formData.append(key, val as string);\n });\n }\n formData.append(options.filename, options.file);\n\n xhr.send(formData);\n}\n\nasync function uploadFile(file: File, rawFiles: File[]) {\n if (__props.beforeUpload) {\n try {\n const result = await __props.beforeUpload(file, rawFiles);\n if (result === false) return;\n if (result instanceof Blob) {\n const transformed = result instanceof File ? result : new File([result], file.name, { type: result.type });\n processUpload(transformed);\n return;\n }\n } catch {\n return;\n }\n }\n processUpload(file);\n}\n\nfunction processUpload(file: File) {\n const uploadFile = fileToUploadFile(file);\n let newList: BUploadFile[];\n\n if (__props.maxCount === 1) {\n newList = [uploadFile];\n } else if (__props.maxCount !== undefined) {\n newList = [...fileList.value, uploadFile].slice(-__props.maxCount);\n } else {\n newList = [...fileList.value, uploadFile];\n }\n\n triggerChange(uploadFile, newList);\n\n const resolvedAction = typeof __props.action === 'function' ? __props.action(file) : Promise.resolve(__props.action);\n\n resolvedAction.then((url: string) => {\n const requestFn = __props.customRequest || defaultUpload;\n const extraData = typeof __props.data === 'function' ? __props.data(uploadFile) : (__props.data || {});\n\n requestFn({\n action: url,\n file,\n filename: __props.name,\n headers: __props.headers,\n data: extraData,\n withCredentials: __props.withCredentials,\n method: __props.method,\n onProgress: (e) => {\n const updatedFile = { ...uploadFile, percent: e.percent };\n const updatedList = fileList.value.map((f) =>\n f.uid === uploadFile.uid ? updatedFile : f,\n );\n triggerChange(updatedFile, updatedList);\n },\n onSuccess: (response) => {\n const updatedFile = {\n ...uploadFile,\n status: BUploadFileStatus.Done,\n percent: 100,\n response,\n };\n const updatedList = fileList.value.map((f) =>\n f.uid === uploadFile.uid ? updatedFile : f,\n );\n triggerChange(updatedFile, updatedList);\n },\n onError: (error) => {\n const updatedFile = {\n ...uploadFile,\n status: BUploadFileStatus.Error,\n error,\n };\n const updatedList = fileList.value.map((f) =>\n f.uid === uploadFile.uid ? updatedFile : f,\n );\n triggerChange(updatedFile, updatedList);\n },\n });\n });\n}\n\nfunction handleFiles(files: FileList | null) {\n if (!files || files.length === 0) return;\n\n const rawFiles = Array.from(files);\n let filesToUpload: File[];\n\n if (__props.maxCount === 1) {\n filesToUpload = rawFiles.slice(0, 1);\n } else if (__props.maxCount !== undefined) {\n const remaining = __props.maxCount - fileList.value.length;\n filesToUpload = remaining > 0 ? rawFiles.slice(0, remaining) : [];\n } else {\n filesToUpload = rawFiles;\n }\n\n filesToUpload.forEach((file) => uploadFile(file, rawFiles));\n}\n//#endregion\n\n//#region Event Handlers\nfunction handleClick() {\n if (__props.disabled || !__props.openFileDialogOnClick || atMaxCount.value) return;\n inputRef.value?.click();\n}\n\nfunction handleKeyDown(event: KeyboardEvent) {\n if (__props.disabled || atMaxCount.value) return;\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n inputRef.value?.click();\n }\n}\n\nfunction handleInputChange(event: Event) {\n const input = event.target as HTMLInputElement;\n handleFiles(input.files);\n input.value = '';\n}\n\nfunction handleDragOver(event: DragEvent) {\n event.preventDefault();\n if (__props.disabled) return;\n dragOver.value = true;\n}\n\nfunction handleDragLeave(event: DragEvent) {\n event.preventDefault();\n dragOver.value = false;\n}\n\nfunction handleDrop(event: DragEvent) {\n event.preventDefault();\n dragOver.value = false;\n if (__props.disabled) return;\n emit('drop', event);\n handleFiles(event.dataTransfer?.files ?? null);\n}\n\nfunction handleRemove(file: BUploadFile) {\n emit('remove', file);\n const newList = fileList.value.filter((f) => f.uid !== file.uid);\n triggerChange({ ...file, status: BUploadFileStatus.Removed }, newList);\n}\n\nfunction handlePreview(file: BUploadFile) {\n emit('preview', file);\n}\n\nfunction handleDownload(file: BUploadFile) {\n emit('download', file);\n}\n//#endregion\n\n//#region Expose\n__expose({\n /** Open the native file dialog programmatically. */\n openFileDialog: () => inputRef.value?.click(),\n});\n//#endregion\n\nreturn (_ctx: any,_cache: any) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n class: _normalizeClass([\"b-upload\", {\n 'b-upload--disabled': __props.disabled,\n 'b-upload--drag-over': dragOver.value,\n [`b-upload--${__props.listType}`]: true,\n }])\n }, [\n (!isPictureCard.value || !atMaxCount.value)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 0,\n class: \"b-upload__trigger\",\n role: \"button\",\n tabindex: __props.disabled ? -1 : 0,\n \"aria-disabled\": __props.disabled || undefined,\n \"aria-label\": (_unref(attrs)['aria-label'] as string) || 'Upload file',\n onClick: handleClick,\n onKeydown: handleKeyDown,\n onDragover: handleDragOver,\n onDragleave: handleDragLeave,\n onDrop: handleDrop\n }, [\n _renderSlot(_ctx.$slots, \"default\", {}, () => [\n (isPictureCard.value)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_2, [...(_cache[0] || (_cache[0] = [\n _createStaticVNode(\"<span class=\\\"b-upload__plus-icon\\\" aria-hidden=\\\"true\\\" data-v-36315fd9><svg viewBox=\\\"0 0 24 24\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" data-v-36315fd9><line x1=\\\"12\\\" y1=\\\"5\\\" x2=\\\"12\\\" y2=\\\"19\\\" data-v-36315fd9></line><line x1=\\\"5\\\" y1=\\\"12\\\" x2=\\\"19\\\" y2=\\\"12\\\" data-v-36315fd9></line></svg></span><span class=\\\"b-upload__card-text\\\" data-v-36315fd9>Upload</span>\", 2)\n ]))]))\n : (_openBlock(), _createElementBlock(\"span\", _hoisted_3, \"Click to Upload\"))\n ], true)\n ], 40, _hoisted_1))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"input\", {\n ref_key: \"inputRef\",\n ref: inputRef,\n class: \"b-upload__input\",\n type: \"file\",\n accept: __props.accept || undefined,\n multiple: __props.multiple,\n disabled: __props.disabled,\n webkitdirectory: __props.directory || undefined,\n \"aria-hidden\": \"true\",\n tabindex: \"-1\",\n onChange: handleInputChange\n }, null, 40, _hoisted_4),\n (showListConfig.value !== false && fileList.value.length > 0)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 1,\n class: _normalizeClass([\"b-upload__list\", `b-upload__list--${__props.listType}`]),\n role: \"list\",\n \"aria-label\": \"Uploaded files\"\n }, [\n (_openBlock(true), _createElementBlock(_Fragment, null, _renderList(fileList.value, (file) => {\n return (_openBlock(), _createElementBlock(\"div\", {\n key: file.uid,\n class: _normalizeClass([\"b-upload__item\", {\n 'b-upload__item--error': file.status === _unref(BUploadFileStatus).Error,\n 'b-upload__item--done': file.status === _unref(BUploadFileStatus).Done,\n 'b-upload__item--uploading': file.status === _unref(BUploadFileStatus).Uploading,\n }]),\n role: \"listitem\"\n }, [\n (__props.listType !== _unref(BUploadListType).Text)\n ? (_openBlock(), _createElementBlock(\"span\", _hoisted_5, [\n (file.thumbUrl || file.url)\n ? (_openBlock(), _createElementBlock(\"img\", {\n key: 0,\n src: file.thumbUrl || file.url,\n alt: file.name,\n class: \"b-upload__item-image\"\n }, null, 8, _hoisted_6))\n : (_openBlock(), _createElementBlock(\"span\", _hoisted_7, [...(_cache[1] || (_cache[1] = [\n _createElementVNode(\"svg\", {\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n \"stroke-width\": \"1.5\"\n }, [\n _createElementVNode(\"path\", { d: \"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6z\" }),\n _createElementVNode(\"polyline\", { points: \"14,2 14,8 20,8\" })\n ], -1)\n ]))]))\n ]))\n : _createCommentVNode(\"\", true),\n _createElementVNode(\"span\", _hoisted_8, [\n _createElementVNode(\"span\", {\n class: \"b-upload__item-name\",\n title: file.name\n }, _toDisplayString(file.name), 9, _hoisted_9)\n ]),\n _createElementVNode(\"span\", _hoisted_10, [\n (showListConfig.value && showListConfig.value.showPreviewIcon && (file.url || file.thumbUrl))\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 0,\n class: \"b-upload__action-btn\",\n type: \"button\",\n \"aria-label\": \"Preview file\",\n onClick: _withModifiers(($event: any) => (handlePreview(file)), [\"stop\"])\n }, [...(_cache[2] || (_cache[2] = [\n _createElementVNode(\"svg\", {\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n \"stroke-width\": \"2\",\n \"aria-hidden\": \"true\"\n }, [\n _createElementVNode(\"path\", { d: \"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\" }),\n _createElementVNode(\"circle\", {\n cx: \"12\",\n cy: \"12\",\n r: \"3\"\n })\n ], -1)\n ]))], 8, _hoisted_11))\n : _createCommentVNode(\"\", true),\n (showListConfig.value && showListConfig.value.showDownloadIcon && file.status === _unref(BUploadFileStatus).Done)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 1,\n class: \"b-upload__action-btn\",\n type: \"button\",\n \"aria-label\": \"Download file\",\n onClick: _withModifiers(($event: any) => (handleDownload(file)), [\"stop\"])\n }, [...(_cache[3] || (_cache[3] = [\n _createElementVNode(\"svg\", {\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n \"stroke-width\": \"2\",\n \"aria-hidden\": \"true\"\n }, [\n _createElementVNode(\"path\", { d: \"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4\" }),\n _createElementVNode(\"polyline\", { points: \"7,10 12,15 17,10\" }),\n _createElementVNode(\"line\", {\n x1: \"12\",\n y1: \"15\",\n x2: \"12\",\n y2: \"3\"\n })\n ], -1)\n ]))], 8, _hoisted_12))\n : _createCommentVNode(\"\", true),\n (showListConfig.value && showListConfig.value.showRemoveIcon)\n ? (_openBlock(), _createElementBlock(\"button\", {\n key: 2,\n class: \"b-upload__action-btn b-upload__action-btn--remove\",\n type: \"button\",\n \"aria-label\": \"Remove file\",\n disabled: __props.disabled,\n onClick: _withModifiers(($event: any) => (handleRemove(file)), [\"stop\"])\n }, [...(_cache[4] || (_cache[4] = [\n _createElementVNode(\"svg\", {\n viewBox: \"0 0 24 24\",\n fill: \"none\",\n stroke: \"currentColor\",\n \"stroke-width\": \"2\",\n \"aria-hidden\": \"true\"\n }, [\n _createElementVNode(\"line\", {\n x1: \"18\",\n y1: \"6\",\n x2: \"6\",\n y2: \"18\"\n }),\n _createElementVNode(\"line\", {\n x1: \"6\",\n y1: \"6\",\n x2: \"18\",\n y2: \"18\"\n })\n ], -1)\n ]))], 8, _hoisted_13))\n : _createCommentVNode(\"\", true)\n ]),\n (file.status === _unref(BUploadFileStatus).Uploading)\n ? (_openBlock(), _createElementBlock(\"div\", {\n key: 1,\n class: \"b-upload__progress\",\n role: \"progressbar\",\n \"aria-valuenow\": file.percent ?? 0,\n \"aria-valuemin\": \"0\",\n \"aria-valuemax\": \"100\",\n \"aria-label\": `Uploading ${file.name}`\n }, [\n _createElementVNode(\"div\", {\n class: \"b-upload__progress-bar\",\n style: _normalizeStyle({ width: `${file.percent ?? 0}%` })\n }, null, 4)\n ], 8, _hoisted_14))\n : _createCommentVNode(\"\", true)\n ], 2))\n }), 128))\n ], 2))\n : _createCommentVNode(\"\", true),\n (_ctx.$slots.hint)\n ? (_openBlock(), _createElementBlock(\"div\", _hoisted_15, [\n _renderSlot(_ctx.$slots, \"hint\", {}, undefined, true)\n ]))\n : _createCommentVNode(\"\", true)\n ], 2))\n}\n}\n\n})"],"mappings":";;;;AAGA,IAAM,IAAa;CAAC;CAAY;CAAiB;CAAa,EACxD,IAAa;CACjB,KAAK;CACL,OAAO;CACR,EACK,IAAa;CACjB,KAAK;CACL,OAAO;CACR,EACK,IAAa;CAAC;CAAU;CAAY;CAAY;CAAkB,EAClE,KAAa;CACjB,KAAK;CACL,OAAO;CACP,eAAe;CAChB,EACK,KAAa,CAAC,OAAO,MAAM,EAC3B,KAAa;CACjB,KAAK;CACL,OAAO;CACR,EACK,IAAa,EAAE,OAAO,uBAAuB,EAC7C,IAAa,CAAC,QAAQ,EACtB,IAAc,EAAE,OAAO,0BAA0B,EACjD,IAAc,CAAC,UAAU,EACzB,IAAc,CAAC,UAAU,EACzB,IAAc,CAAC,YAAY,UAAU,EACrC,IAAc,CAAC,iBAAiB,aAAa,EAC7C,IAAc;CAClB,KAAK;CACL,OAAO;CACR,EAcD,IAA4B,kBAAiB;CACtC,cAAc;CACnB,QAAQ;CACR,OAAoB,kBAAa;EAC/B,QAAQ,EAAE,SAAS,IAAI;EACvB,QAAQ;GAAE,MAAM,CAAC,QAAQ,SAAS;GAAE,SAAS;GAAI;EACjD,UAAU;GAAE,MAAM;GAAS,SAAS;GAAO;EAC3C,UAAU;GAAE,MAAM;GAAS,SAAS;GAAO;EAC3C,WAA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WAAW,EAAE,IAAI,CAAC;KAC3D,EAAE,MAAM,EAAE,CACZ,EAAE,GAAG,EAAY,IAClB,EAAoB,IAAI,GAAK;IAClC,EAAE,EAAE,EACL,EAAE,IAAI,EACT,EAAE,EAAE,IACL,EAAoB,IAAI,GAAK;GAChC,EAAK,OAAO,QACR,GAAY,EAAE,EAAoB,OAAO,GAAa,CACrD,EAAY,EAAK,QAAQ,QAAQ,EAAE,EAAE,KAAA,GAAW,GAAK,CACtD,CAAC,IACF,EAAoB,IAAI,GAAK;GAClC,EAAE,EAAE;;CAIN,CAAA"}
@@ -0,0 +1,9 @@
1
+ import e from "./design-system14.js";
2
+ import t from "./design-system245.js";
3
+ /* empty css */
4
+ //#region src/components/BUpload/BUpload.vue
5
+ var n = /* @__PURE__ */ e(t, [["__scopeId", "data-v-36315fd9"]]);
6
+ //#endregion
7
+ export { n as default };
8
+
9
+ //# sourceMappingURL=design-system247.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"design-system247.js","names":[],"sources":["../src/components/BUpload/BUpload.vue"],"sourcesContent":["<script lang=\"ts\" setup>\nimport { ref, computed, watch, onMounted, useAttrs } from 'vue';\nimport { useComponentId } from '@/composables/useComponentId';\nimport {\n BUploadListType,\n BUploadFileStatus,\n type BUploadFile,\n type BUploadChangeInfo,\n type BUploadRequestOption,\n type BUploadShowUploadList,\n} from './types';\n\ndefineOptions({ inheritAttrs: false });\n\nconst attrs = useAttrs();\n\n//#region Props\nconst {\n accept = '',\n action = '',\n multiple = false,\n disabled = false,\n directory = false,\n maxCount,\n listType = BUploadListType.Text,\n method = 'POST',\n name: fieldName = 'file',\n headers,\n data,\n withCredentials = false,\n openFileDialogOnClick = true,\n showUploadList = true,\n defaultFileList = [],\n beforeUpload,\n customRequest,\n} = defineProps<{\n /** File types that can be accepted (MIME types or extensions). */\n accept?: string;\n /** Uploading URL. */\n action?: string | ((file: File) => Promise<string>);\n /** Whether to support multiple file selection. */\n multiple?: boolean;\n /** Whether to disable the upload button. */\n disabled?: boolean;\n /** Support uploading directories. */\n directory?: boolean;\n /** Limit the number of uploaded files. */\n maxCount?: number;\n /** Built-in style of the upload list. */\n listType?: BUploadListType | `${BUploadListType}`;\n /** HTTP method for upload request. */\n method?: string;\n /** The name of the file field in the upload request. */\n name?: string;\n /** Custom request headers for upload. */\n headers?: Record<string, string>;\n /** Extra data to include with the upload request. */\n data?: Record<string, unknown> | ((file: BUploadFile) => Record<string, unknown>);\n /** Whether to send cookies with the request. */\n withCredentials?: boolean;\n /** Whether clicking the component opens the file dialog. */\n openFileDialogOnClick?: boolean;\n /** Whether to show the upload list. */\n showUploadList?: boolean | BUploadShowUploadList;\n /** Initial file list for uncontrolled usage. */\n defaultFileList?: BUploadFile[];\n /** Hook before uploading. Return false or a rejected Promise to stop. */\n beforeUpload?: (file: File, fileList: File[]) => boolean | Promise<File | Blob | boolean | void>;\n /** Override the default upload behavior. */\n customRequest?: (options: BUploadRequestOption) => void;\n}>();\n//#endregion\n\n//#region Model & Events\nconst model = defineModel<BUploadFile[]>('fileList', { default: undefined });\n\nconst emit = defineEmits<{\n change: [info: BUploadChangeInfo];\n remove: [file: BUploadFile];\n preview: [file: BUploadFile];\n download: [file: BUploadFile];\n drop: [event: DragEvent];\n}>();\n//#endregion\n\n//#region Internal State\nconst { componentUID } = useComponentId();\nconst inputRef = ref<HTMLInputElement | null>(null);\nconst dragOver = ref(false);\nconst internalFileList = ref<BUploadFile[]>(Array.isArray(defaultFileList) ? [...defaultFileList] : []);\n\nconst fileList = computed<BUploadFile[]>({\n get: () => (model.value !== undefined ? model.value : internalFileList.value),\n set: (val) => {\n internalFileList.value = val;\n if (model.value !== undefined) {\n model.value = val;\n }\n },\n});\n\nonMounted(() => {\n if (model.value === undefined && defaultFileList.length > 0) {\n internalFileList.value = [...defaultFileList];\n }\n});\n\nwatch(\n () => model.value,\n (val) => {\n if (val !== undefined) {\n internalFileList.value = val;\n }\n },\n);\n\nconst isPictureCard = computed(\n () =>\n listType === BUploadListType.PictureCard ||\n listType === BUploadListType.PictureCircle,\n);\n\nconst showListConfig = computed<BUploadShowUploadList | false>(() => {\n if (showUploadList === false) return false;\n if (showUploadList === true) {\n return { showPreviewIcon: true, showRemoveIcon: true, showDownloadIcon: false };\n }\n return showUploadList;\n});\n\nconst atMaxCount = computed(() => maxCount !== undefined && maxCount !== 1 && fileList.value.length >= maxCount);\n//#endregion\n\n//#region Upload Logic\nlet fileUidCounter = 0;\n\nfunction genUid(): string {\n fileUidCounter += 1;\n return `b-upload-${componentUID.value}-${fileUidCounter}-${Date.now()}`;\n}\n\nfunction fileToUploadFile(file: File): BUploadFile {\n return {\n uid: genUid(),\n name: file.name,\n size: file.size,\n type: file.type,\n status: BUploadFileStatus.Uploading,\n percent: 0,\n originFileObj: file,\n };\n}\n\nfunction triggerChange(file: BUploadFile, newFileList: BUploadFile[], event?: ProgressEvent) {\n fileList.value = newFileList;\n emit('change', { file, fileList: newFileList, event });\n}\n\nfunction defaultUpload(options: BUploadRequestOption) {\n const xhr = new XMLHttpRequest();\n\n xhr.upload.addEventListener('progress', (e) => {\n if (e.lengthComputable && options.onProgress) {\n options.onProgress({ percent: Math.round((e.loaded / e.total) * 100) });\n }\n });\n\n xhr.addEventListener('load', () => {\n if (xhr.status >= 200 && xhr.status < 300) {\n options.onSuccess?.(xhr.response);\n } else {\n options.onError?.(new Error(`Upload failed with status ${xhr.status}`));\n }\n });\n\n xhr.addEventListener('error', () => {\n options.onError?.(new Error('Upload network error'));\n });\n\n xhr.open(options.method || 'POST', options.action, true);\n\n if (options.withCredentials) {\n xhr.withCredentials = true;\n }\n\n if (options.headers) {\n Object.entries(options.headers).forEach(([key, val]) => {\n xhr.setRequestHeader(key, val);\n });\n }\n\n const formData = new FormData();\n if (options.data) {\n Object.entries(options.data).forEach(([key, val]) => {\n formData.append(key, val as string);\n });\n }\n formData.append(options.filename, options.file);\n\n xhr.send(formData);\n}\n\nasync function uploadFile(file: File, rawFiles: File[]) {\n if (beforeUpload) {\n try {\n const result = await beforeUpload(file, rawFiles);\n if (result === false) return;\n if (result instanceof Blob) {\n const transformed = result instanceof File ? result : new File([result], file.name, { type: result.type });\n processUpload(transformed);\n return;\n }\n } catch {\n return;\n }\n }\n processUpload(file);\n}\n\nfunction processUpload(file: File) {\n const uploadFile = fileToUploadFile(file);\n let newList: BUploadFile[];\n\n if (maxCount === 1) {\n newList = [uploadFile];\n } else if (maxCount !== undefined) {\n newList = [...fileList.value, uploadFile].slice(-maxCount);\n } else {\n newList = [...fileList.value, uploadFile];\n }\n\n triggerChange(uploadFile, newList);\n\n const resolvedAction = typeof action === 'function' ? action(file) : Promise.resolve(action);\n\n resolvedAction.then((url: string) => {\n const requestFn = customRequest || defaultUpload;\n const extraData = typeof data === 'function' ? data(uploadFile) : (data || {});\n\n requestFn({\n action: url,\n file,\n filename: fieldName,\n headers,\n data: extraData,\n withCredentials,\n method,\n onProgress: (e) => {\n const updatedFile = { ...uploadFile, percent: e.percent };\n const updatedList = fileList.value.map((f) =>\n f.uid === uploadFile.uid ? updatedFile : f,\n );\n triggerChange(updatedFile, updatedList);\n },\n onSuccess: (response) => {\n const updatedFile = {\n ...uploadFile,\n status: BUploadFileStatus.Done,\n percent: 100,\n response,\n };\n const updatedList = fileList.value.map((f) =>\n f.uid === uploadFile.uid ? updatedFile : f,\n );\n triggerChange(updatedFile, updatedList);\n },\n onError: (error) => {\n const updatedFile = {\n ...uploadFile,\n status: BUploadFileStatus.Error,\n error,\n };\n const updatedList = fileList.value.map((f) =>\n f.uid === uploadFile.uid ? updatedFile : f,\n );\n triggerChange(updatedFile, updatedList);\n },\n });\n });\n}\n\nfunction handleFiles(files: FileList | null) {\n if (!files || files.length === 0) return;\n\n const rawFiles = Array.from(files);\n let filesToUpload: File[];\n\n if (maxCount === 1) {\n filesToUpload = rawFiles.slice(0, 1);\n } else if (maxCount !== undefined) {\n const remaining = maxCount - fileList.value.length;\n filesToUpload = remaining > 0 ? rawFiles.slice(0, remaining) : [];\n } else {\n filesToUpload = rawFiles;\n }\n\n filesToUpload.forEach((file) => uploadFile(file, rawFiles));\n}\n//#endregion\n\n//#region Event Handlers\nfunction handleClick() {\n if (disabled || !openFileDialogOnClick || atMaxCount.value) return;\n inputRef.value?.click();\n}\n\nfunction handleKeyDown(event: KeyboardEvent) {\n if (disabled || atMaxCount.value) return;\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n inputRef.value?.click();\n }\n}\n\nfunction handleInputChange(event: Event) {\n const input = event.target as HTMLInputElement;\n handleFiles(input.files);\n input.value = '';\n}\n\nfunction handleDragOver(event: DragEvent) {\n event.preventDefault();\n if (disabled) return;\n dragOver.value = true;\n}\n\nfunction handleDragLeave(event: DragEvent) {\n event.preventDefault();\n dragOver.value = false;\n}\n\nfunction handleDrop(event: DragEvent) {\n event.preventDefault();\n dragOver.value = false;\n if (disabled) return;\n emit('drop', event);\n handleFiles(event.dataTransfer?.files ?? null);\n}\n\nfunction handleRemove(file: BUploadFile) {\n emit('remove', file);\n const newList = fileList.value.filter((f) => f.uid !== file.uid);\n triggerChange({ ...file, status: BUploadFileStatus.Removed }, newList);\n}\n\nfunction handlePreview(file: BUploadFile) {\n emit('preview', file);\n}\n\nfunction handleDownload(file: BUploadFile) {\n emit('download', file);\n}\n//#endregion\n\n//#region Expose\ndefineExpose({\n /** Open the native file dialog programmatically. */\n openFileDialog: () => inputRef.value?.click(),\n});\n//#endregion\n</script>\n\n<template>\n <div\n class=\"b-upload\"\n :class=\"{\n 'b-upload--disabled': disabled,\n 'b-upload--drag-over': dragOver,\n [`b-upload--${listType}`]: true,\n }\"\n >\n <!-- Upload trigger area -->\n <div\n v-if=\"!isPictureCard || !atMaxCount\"\n class=\"b-upload__trigger\"\n role=\"button\"\n :tabindex=\"disabled ? -1 : 0\"\n :aria-disabled=\"disabled || undefined\"\n :aria-label=\"(attrs['aria-label'] as string) || 'Upload file'\"\n @click=\"handleClick\"\n @keydown=\"handleKeyDown\"\n @dragover=\"handleDragOver\"\n @dragleave=\"handleDragLeave\"\n @drop=\"handleDrop\"\n >\n <slot>\n <div v-if=\"isPictureCard\" class=\"b-upload__card-trigger\">\n <span class=\"b-upload__plus-icon\" aria-hidden=\"true\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\">\n <line x1=\"12\" y1=\"5\" x2=\"12\" y2=\"19\" />\n <line x1=\"5\" y1=\"12\" x2=\"19\" y2=\"12\" />\n </svg>\n </span>\n <span class=\"b-upload__card-text\">Upload</span>\n </div>\n <span v-else class=\"b-upload__default-text\">Click to Upload</span>\n </slot>\n </div>\n\n <!-- Hidden file input -->\n <input\n ref=\"inputRef\"\n class=\"b-upload__input\"\n type=\"file\"\n :accept=\"accept || undefined\"\n :multiple=\"multiple\"\n :disabled=\"disabled\"\n :webkitdirectory=\"directory || undefined\"\n aria-hidden=\"true\"\n tabindex=\"-1\"\n @change=\"handleInputChange\"\n />\n\n <!-- File list -->\n <div\n v-if=\"showListConfig !== false && fileList.length > 0\"\n class=\"b-upload__list\"\n :class=\"`b-upload__list--${listType}`\"\n role=\"list\"\n aria-label=\"Uploaded files\"\n >\n <div\n v-for=\"file in fileList\"\n :key=\"file.uid\"\n class=\"b-upload__item\"\n :class=\"{\n 'b-upload__item--error': file.status === BUploadFileStatus.Error,\n 'b-upload__item--done': file.status === BUploadFileStatus.Done,\n 'b-upload__item--uploading': file.status === BUploadFileStatus.Uploading,\n }\"\n role=\"listitem\"\n >\n <!-- Thumbnail for picture types -->\n <span\n v-if=\"listType !== BUploadListType.Text\"\n class=\"b-upload__item-thumbnail\"\n aria-hidden=\"true\"\n >\n <img\n v-if=\"file.thumbUrl || file.url\"\n :src=\"file.thumbUrl || file.url\"\n :alt=\"file.name\"\n class=\"b-upload__item-image\"\n />\n <span v-else class=\"b-upload__item-file-icon\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"1.5\">\n <path d=\"M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6z\" />\n <polyline points=\"14,2 14,8 20,8\" />\n </svg>\n </span>\n </span>\n\n <!-- File info -->\n <span class=\"b-upload__item-info\">\n <span class=\"b-upload__item-name\" :title=\"file.name\">\n {{ file.name }}\n </span>\n </span>\n\n <!-- Actions -->\n <span class=\"b-upload__item-actions\">\n <button\n v-if=\"showListConfig && showListConfig.showPreviewIcon && (file.url || file.thumbUrl)\"\n class=\"b-upload__action-btn\"\n type=\"button\"\n aria-label=\"Preview file\"\n @click.stop=\"handlePreview(file)\"\n >\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\">\n <path d=\"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z\" />\n <circle cx=\"12\" cy=\"12\" r=\"3\" />\n </svg>\n </button>\n <button\n v-if=\"showListConfig && showListConfig.showDownloadIcon && file.status === BUploadFileStatus.Done\"\n class=\"b-upload__action-btn\"\n type=\"button\"\n aria-label=\"Download file\"\n @click.stop=\"handleDownload(file)\"\n >\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\">\n <path d=\"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4\" />\n <polyline points=\"7,10 12,15 17,10\" />\n <line x1=\"12\" y1=\"15\" x2=\"12\" y2=\"3\" />\n </svg>\n </button>\n <button\n v-if=\"showListConfig && showListConfig.showRemoveIcon\"\n class=\"b-upload__action-btn b-upload__action-btn--remove\"\n type=\"button\"\n aria-label=\"Remove file\"\n :disabled=\"disabled\"\n @click.stop=\"handleRemove(file)\"\n >\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" aria-hidden=\"true\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" />\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" />\n </svg>\n </button>\n </span>\n\n <!-- Progress bar -->\n <div\n v-if=\"file.status === BUploadFileStatus.Uploading\"\n class=\"b-upload__progress\"\n role=\"progressbar\"\n :aria-valuenow=\"file.percent ?? 0\"\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n :aria-label=\"`Uploading ${file.name}`\"\n >\n <div\n class=\"b-upload__progress-bar\"\n :style=\"{ width: `${file.percent ?? 0}%` }\"\n />\n </div>\n </div>\n </div>\n\n <!-- Hint slot -->\n <div v-if=\"$slots.hint\" class=\"b-upload__hint\">\n <slot name=\"hint\" />\n </div>\n </div>\n</template>\n\n<style scoped>\n.b-upload {\n --b-upload-actions-color: rgba(0, 0, 0, 0.45);\n --b-upload-card-size: 102px;\n --b-upload-color-primary: #1677ff;\n --b-upload-color-error: #d32f2f;\n --b-upload-color-success: #52c41a;\n --b-upload-color-border: #d9d9d9;\n --b-upload-color-bg: #fafafa;\n --b-upload-color-bg-hover: #f0f0f0;\n --b-upload-color-text: rgba(0, 0, 0, 0.88);\n --b-upload-color-text-secondary: rgba(0, 0, 0, 0.6);\n --b-upload-border-radius: 8px;\n --b-upload-line-height: 1.5715;\n --b-upload-font-size: 14px;\n --b-upload-progress-stroke-width: 2px;\n\n position: relative;\n font-size: var(--b-upload-font-size);\n line-height: var(--b-upload-line-height);\n color: var(--b-upload-color-text);\n}\n\n/* Picture-card/circle layout: root becomes flex container */\n.b-upload--picture-card,\n.b-upload--picture-circle {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n align-items: flex-start;\n}\n\n/* Hidden file input */\n.b-upload__input {\n position: absolute;\n width: 0;\n height: 0;\n opacity: 0;\n overflow: hidden;\n pointer-events: none;\n}\n\n/* Trigger */\n.b-upload__trigger {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n outline: none;\n border-radius: var(--b-upload-border-radius);\n}\n\n.b-upload__trigger:focus-visible {\n outline: 2px solid var(--b-upload-color-primary);\n outline-offset: 2px;\n}\n\n.b-upload--disabled .b-upload__trigger {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n/* Default text trigger */\n.b-upload__default-text {\n padding: 4px 15px;\n border: 1px solid var(--b-upload-color-border);\n border-radius: var(--b-upload-border-radius);\n background: #fff;\n color: var(--b-upload-color-text);\n transition: border-color 0.2s, color 0.2s;\n}\n\n.b-upload__trigger:hover .b-upload__default-text {\n color: var(--b-upload-color-primary);\n border-color: var(--b-upload-color-primary);\n}\n\n/* Picture card trigger */\n.b-upload--picture-card .b-upload__trigger,\n.b-upload--picture-circle .b-upload__trigger {\n display: inline-flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: var(--b-upload-card-size);\n height: var(--b-upload-card-size);\n border: 1px dashed var(--b-upload-color-border);\n border-radius: var(--b-upload-border-radius);\n background: var(--b-upload-color-bg);\n transition: border-color 0.2s;\n}\n\n.b-upload--picture-circle .b-upload__trigger {\n border-radius: 50%;\n}\n\n.b-upload--picture-card .b-upload__trigger:hover,\n.b-upload--picture-circle .b-upload__trigger:hover {\n border-color: var(--b-upload-color-primary);\n}\n\n.b-upload__card-trigger {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 8px;\n color: var(--b-upload-color-text-secondary);\n}\n\n.b-upload__plus-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.b-upload__plus-icon svg {\n width: 20px;\n height: 20px;\n}\n\n.b-upload__card-text {\n font-size: var(--b-upload-font-size);\n}\n\n/* Drag states */\n.b-upload--drag-over .b-upload__trigger {\n border-color: var(--b-upload-color-primary);\n background: color-mix(in srgb, var(--b-upload-color-primary) 5%, transparent);\n}\n\n/* File list - text type */\n.b-upload__list {\n margin-top: 8px;\n}\n\n.b-upload__list--text .b-upload__item,\n.b-upload__list--picture .b-upload__item {\n display: flex;\n align-items: center;\n padding: 4px 8px;\n border-radius: var(--b-upload-border-radius);\n transition: background-color 0.2s;\n position: relative;\n}\n\n.b-upload__list--text .b-upload__item:hover,\n.b-upload__list--picture .b-upload__item:hover {\n background: var(--b-upload-color-bg);\n}\n\n/* File list - picture-card type */\n.b-upload__list--picture-card,\n.b-upload__list--picture-circle {\n display: contents;\n}\n\n.b-upload__list--picture-card .b-upload__item,\n.b-upload__list--picture-circle .b-upload__item {\n position: relative;\n width: var(--b-upload-card-size);\n height: var(--b-upload-card-size);\n border: 1px solid var(--b-upload-color-border);\n border-radius: var(--b-upload-border-radius);\n overflow: hidden;\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.b-upload__list--picture-circle .b-upload__item {\n border-radius: 50%;\n}\n\n/* Thumbnails */\n.b-upload__item-thumbnail {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: 48px;\n height: 48px;\n margin-right: 8px;\n}\n\n.b-upload__list--picture-card .b-upload__item-thumbnail,\n.b-upload__list--picture-circle .b-upload__item-thumbnail {\n width: 100%;\n height: 100%;\n margin-right: 0;\n}\n\n.b-upload__item-image {\n max-width: 100%;\n max-height: 100%;\n object-fit: cover;\n}\n\n.b-upload__item-file-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--b-upload-color-text-secondary);\n}\n\n.b-upload__item-file-icon svg {\n width: 24px;\n height: 24px;\n}\n\n/* File info */\n.b-upload__item-info {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n}\n\n.b-upload__item-name {\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--b-upload-color-text);\n transition: color 0.2s;\n}\n\n.b-upload__item--error .b-upload__item-name {\n color: var(--b-upload-color-error);\n}\n\n/* For card mode, hide file info text */\n.b-upload__list--picture-card .b-upload__item-info,\n.b-upload__list--picture-circle .b-upload__item-info {\n display: none;\n}\n\n/* Actions */\n.b-upload__item-actions {\n display: flex;\n align-items: center;\n gap: 4px;\n margin-left: 8px;\n}\n\n.b-upload__list--picture-card .b-upload__item-actions,\n.b-upload__list--picture-circle .b-upload__item-actions {\n position: absolute;\n inset: 0;\n margin-left: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 8px;\n background: rgba(0, 0, 0, 0.5);\n opacity: 0;\n transition: opacity 0.2s;\n}\n\n.b-upload__list--picture-card .b-upload__item:hover .b-upload__item-actions,\n.b-upload__list--picture-circle .b-upload__item:hover .b-upload__item-actions {\n opacity: 1;\n}\n\n.b-upload__action-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n border: none;\n background: none;\n cursor: pointer;\n color: var(--b-upload-actions-color);\n transition: color 0.2s;\n}\n\n.b-upload__action-btn:hover {\n color: var(--b-upload-color-primary);\n}\n\n.b-upload__action-btn--remove:hover {\n color: var(--b-upload-color-error);\n}\n\n.b-upload__action-btn:disabled {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n.b-upload__action-btn svg {\n width: 16px;\n height: 16px;\n}\n\n.b-upload__list--picture-card .b-upload__action-btn,\n.b-upload__list--picture-circle .b-upload__action-btn {\n color: rgba(255, 255, 255, 0.85);\n}\n\n.b-upload__list--picture-card .b-upload__action-btn svg,\n.b-upload__list--picture-circle .b-upload__action-btn svg {\n width: 24px;\n height: 24px;\n}\n\n.b-upload__list--picture-card .b-upload__action-btn:hover,\n.b-upload__list--picture-circle .b-upload__action-btn:hover {\n color: #fff;\n}\n\n/* Progress bar */\n.b-upload__progress {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: var(--b-upload-progress-stroke-width);\n background: var(--b-upload-color-bg-hover);\n overflow: hidden;\n}\n\n.b-upload__progress-bar {\n height: 100%;\n background: var(--b-upload-color-primary);\n transition: width 0.2s;\n}\n\n/* Hint */\n.b-upload__hint {\n margin-top: 8px;\n color: var(--b-upload-color-text-secondary);\n font-size: 12px;\n}\n\n/* Dark mode - explicit */\n[data-prefers-color='dark'] .b-upload {\n --b-upload-actions-color: rgba(255, 255, 255, 0.45);\n --b-upload-color-border: #424242;\n --b-upload-color-bg: #1f1f1f;\n --b-upload-color-bg-hover: #2f2f2f;\n --b-upload-color-text: rgba(255, 255, 255, 0.85);\n --b-upload-color-text-secondary: rgba(255, 255, 255, 0.6);\n}\n\n@media (prefers-color-scheme: dark) {\n [data-prefers-color='system'] .b-upload {\n --b-upload-actions-color: rgba(255, 255, 255, 0.45);\n --b-upload-color-border: #424242;\n --b-upload-color-bg: #1f1f1f;\n --b-upload-color-bg-hover: #2f2f2f;\n --b-upload-color-text: rgba(255, 255, 255, 0.85);\n --b-upload-color-text-secondary: rgba(255, 255, 255, 0.6);\n }\n}\n\n/* Dark mode - follow system (only when no explicit preference is set) */\n@media (prefers-color-scheme: dark) {\n :root:not([data-prefers-color]) .b-upload {\n --b-upload-actions-color: rgba(255, 255, 255, 0.45);\n --b-upload-color-border: #424242;\n --b-upload-color-bg: #1f1f1f;\n --b-upload-color-bg-hover: #2f2f2f;\n --b-upload-color-text: rgba(255, 255, 255, 0.85);\n --b-upload-color-text-secondary: rgba(255, 255, 255, 0.6);\n }\n}\n\n/* Reduced motion */\n@media (prefers-reduced-motion: reduce) {\n .b-upload__trigger,\n .b-upload__default-text,\n .b-upload__item-name,\n .b-upload__action-btn,\n .b-upload__progress-bar,\n .b-upload__item-actions,\n .b-upload__list--text .b-upload__item,\n .b-upload__list--picture .b-upload__item {\n transition: none;\n }\n}\n</style>\n"],"mappings":""}
@@ -0,0 +1,46 @@
1
+ import type { BSkeletonAvatarConfig, BSkeletonParagraphConfig, BSkeletonTitleConfig } from './types';
2
+ type __VLS_Props = {
3
+ /**
4
+ * Show the animated shimmer effect.
5
+ * @default false
6
+ */
7
+ active?: boolean;
8
+ /**
9
+ * Show the avatar placeholder. Pass an object to configure its shape/size/active.
10
+ * @default false
11
+ */
12
+ avatar?: boolean | BSkeletonAvatarConfig;
13
+ /**
14
+ * When `false`, renders the default slot (real content) instead of placeholders.
15
+ * @default true
16
+ */
17
+ loading?: boolean;
18
+ /**
19
+ * Show paragraph placeholder rows. Pass an object to configure rows / row widths.
20
+ * @default true
21
+ */
22
+ paragraph?: boolean | BSkeletonParagraphConfig;
23
+ /**
24
+ * Round corners on title and paragraph rows.
25
+ * @default false
26
+ */
27
+ round?: boolean;
28
+ /**
29
+ * Show the title bar placeholder. Pass an object to configure its width.
30
+ * @default true
31
+ */
32
+ title?: boolean | BSkeletonTitleConfig;
33
+ };
34
+ type __VLS_Slots = {
35
+ /** Real content rendered when `loading` is `false`. */
36
+ default?(): unknown;
37
+ };
38
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
39
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
40
+ declare const _default: typeof __VLS_export;
41
+ export default _default;
42
+ type __VLS_WithSlots<T, S> = T & {
43
+ new (): {
44
+ $slots: S;
45
+ };
46
+ };
@@ -0,0 +1,12 @@
1
+ import type { BSkeletonAvatarShape, BSkeletonAvatarSize } from './types';
2
+ type __VLS_Props = {
3
+ /** Animated shimmer effect. @default false */
4
+ active?: boolean;
5
+ /** Avatar shape. @default 'circle' */
6
+ shape?: BSkeletonAvatarShape;
7
+ /** Avatar size: preset string or pixel number. @default 'default' */
8
+ size?: BSkeletonAvatarSize;
9
+ };
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
@@ -0,0 +1,14 @@
1
+ import type { BSkeletonButtonShape, BSkeletonButtonSize } from './types';
2
+ type __VLS_Props = {
3
+ /** Animated shimmer effect. @default false */
4
+ active?: boolean;
5
+ /** Stretch to full width. @default false */
6
+ block?: boolean;
7
+ /** Button shape. @default 'default' */
8
+ shape?: BSkeletonButtonShape;
9
+ /** Button size. @default 'default' */
10
+ size?: BSkeletonButtonSize;
11
+ };
12
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -0,0 +1,7 @@
1
+ type __VLS_Props = {
2
+ /** Animated shimmer effect. @default false */
3
+ active?: boolean;
4
+ };
5
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
6
+ declare const _default: typeof __VLS_export;
7
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import type { BSkeletonInputSize } from './types';
2
+ type __VLS_Props = {
3
+ /** Animated shimmer effect. @default false */
4
+ active?: boolean;
5
+ /** Stretch to full width. @default false */
6
+ block?: boolean;
7
+ /** Input size. @default 'default' */
8
+ size?: BSkeletonInputSize;
9
+ };
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
@@ -0,0 +1,19 @@
1
+ type __VLS_Props = {
2
+ /** Animated shimmer effect. @default false */
3
+ active?: boolean;
4
+ /** Stretch to fill the parent's width and height. @default false */
5
+ fullSize?: boolean;
6
+ };
7
+ type __VLS_Slots = {
8
+ /** Custom content placed inside the placeholder block (e.g., an icon). */
9
+ default?(): unknown;
10
+ };
11
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
12
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -0,0 +1,7 @@
1
+ export { default as BSkeleton } from './BSkeleton.vue';
2
+ export { default as BSkeletonAvatar } from './BSkeletonAvatar.vue';
3
+ export { default as BSkeletonButton } from './BSkeletonButton.vue';
4
+ export { default as BSkeletonImage } from './BSkeletonImage.vue';
5
+ export { default as BSkeletonInput } from './BSkeletonInput.vue';
6
+ export { default as BSkeletonNode } from './BSkeletonNode.vue';
7
+ export type { BSkeletonAvatarConfig, BSkeletonAvatarShape, BSkeletonAvatarSize, BSkeletonButtonShape, BSkeletonButtonSize, BSkeletonInputSize, BSkeletonParagraphConfig, BSkeletonTitleConfig, } from './types';
@@ -0,0 +1,20 @@
1
+ export type BSkeletonAvatarShape = 'circle' | 'square';
2
+ export type BSkeletonAvatarSize = 'small' | 'default' | 'large' | number;
3
+ export type BSkeletonButtonShape = 'circle' | 'round' | 'square' | 'default';
4
+ export type BSkeletonButtonSize = 'small' | 'default' | 'large';
5
+ export type BSkeletonInputSize = 'small' | 'default' | 'large';
6
+ /** Props shape for the inline-configured `avatar` field on BSkeleton. */
7
+ export interface BSkeletonAvatarConfig {
8
+ active?: boolean;
9
+ shape?: BSkeletonAvatarShape;
10
+ size?: BSkeletonAvatarSize;
11
+ }
12
+ /** Props shape for the inline-configured `title` field on BSkeleton. */
13
+ export interface BSkeletonTitleConfig {
14
+ width?: number | string;
15
+ }
16
+ /** Props shape for the inline-configured `paragraph` field on BSkeleton. */
17
+ export interface BSkeletonParagraphConfig {
18
+ rows?: number;
19
+ width?: number | string | (number | string)[];
20
+ }
@@ -0,0 +1,45 @@
1
+ import { type BSplitterCollapsible, type BSplitterOrientation } from './types';
2
+ type __VLS_Props = {
3
+ /** Convenience boolean for vertical orientation. @default false */
4
+ vertical?: boolean;
5
+ /** Layout orientation. Takes precedence over `vertical` when set. */
6
+ orientation?: BSplitterOrientation;
7
+ /** Whether resize is committed only on release (preview line during drag). @default false */
8
+ lazy?: boolean;
9
+ /** Splitter-level collapsible config (motion + custom icons). */
10
+ collapsible?: BSplitterCollapsible;
11
+ };
12
+ declare function getSizes(): number[];
13
+ declare function setSizes(next: number[]): void;
14
+ declare var __VLS_6: {}, __VLS_8: {}, __VLS_10: {};
15
+ type __VLS_Slots = {} & {
16
+ draggerIcon?: (props: typeof __VLS_6) => any;
17
+ } & {
18
+ collapseIconStart?: (props: typeof __VLS_8) => any;
19
+ } & {
20
+ collapseIconEnd?: (props: typeof __VLS_10) => any;
21
+ };
22
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {
23
+ getSizes: typeof getSizes;
24
+ setSizes: typeof setSizes;
25
+ }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
26
+ resize: (sizes: number[]) => any;
27
+ collapse: (collapsed: boolean[], sizes: number[]) => any;
28
+ resizeStart: (sizes: number[]) => any;
29
+ resizeEnd: (sizes: number[]) => any;
30
+ draggerDoubleClick: (index: number) => any;
31
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
32
+ onResize?: (sizes: number[]) => any;
33
+ onCollapse?: (collapsed: boolean[], sizes: number[]) => any;
34
+ onResizeStart?: (sizes: number[]) => any;
35
+ onResizeEnd?: (sizes: number[]) => any;
36
+ onDraggerDoubleClick?: (index: number) => any;
37
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
38
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
39
+ declare const _default: typeof __VLS_export;
40
+ export default _default;
41
+ type __VLS_WithSlots<T, S> = T & {
42
+ new (): {
43
+ $slots: S;
44
+ };
45
+ };
@@ -0,0 +1,40 @@
1
+ /**
2
+ * BSplitterPanel
3
+ * --------------
4
+ * A pure data/marker component used inside <BSplitter>.
5
+ *
6
+ * It does not render any wrapper element of its own — <BSplitter> reads the
7
+ * VNode's props and default-slot content and renders the panel <div>
8
+ * itself, so that draggers can be interspersed correctly between panels.
9
+ *
10
+ * Props mirror AntD's `Splitter.Panel` API.
11
+ */
12
+ import type { BSplitterPanelCollapsible } from './types';
13
+ type __VLS_Props = {
14
+ /** Controlled size (px number or any CSS unit string e.g. '50%'). */
15
+ size?: number | string;
16
+ /** Initial size for uncontrolled mode (px number or CSS string). */
17
+ defaultSize?: number | string;
18
+ /** Minimum size (px or CSS string). */
19
+ min?: number | string;
20
+ /** Maximum size (px or CSS string). */
21
+ max?: number | string;
22
+ /** Whether the dragger adjacent to this panel can resize it. @default true */
23
+ resizable?: boolean;
24
+ /** Collapsible config — `true` enables both directions, or pass an object. */
25
+ collapsible?: boolean | BSplitterPanelCollapsible;
26
+ /** Destroy panel content from the DOM when its size collapses to 0. @default false */
27
+ destroyOnHidden?: boolean;
28
+ };
29
+ type __VLS_Slots = {
30
+ default?(): unknown;
31
+ };
32
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
33
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
34
+ declare const _default: typeof __VLS_export;
35
+ export default _default;
36
+ type __VLS_WithSlots<T, S> = T & {
37
+ new (): {
38
+ $slots: S;
39
+ };
40
+ };
@@ -0,0 +1,3 @@
1
+ export { default as BSplitter } from './BSplitter.vue';
2
+ export { default as BSplitterPanel } from './BSplitterPanel.vue';
3
+ export type { BSplitterCollapsible, BSplitterContext, BSplitterOrientation, BSplitterPanelCollapsible, BSplitterPanelConfig, } from './types';
@@ -0,0 +1,42 @@
1
+ import type { InjectionKey, VNode } from 'vue';
2
+ export type BSplitterOrientation = 'horizontal' | 'vertical';
3
+ /**
4
+ * Per-side collapsible config on a panel.
5
+ * `start` = collapse toward the previous (left/top) panel.
6
+ * `end` = collapse toward the next (right/bottom) panel.
7
+ */
8
+ export interface BSplitterPanelCollapsible {
9
+ start?: boolean;
10
+ end?: boolean;
11
+ }
12
+ /**
13
+ * Splitter-level collapsible config (motion + custom icons).
14
+ */
15
+ export interface BSplitterCollapsible {
16
+ /** Whether the size change should animate (CSS transition). @default true */
17
+ motion?: boolean;
18
+ /** Custom icon nodes for the collapse buttons. */
19
+ icon?: {
20
+ start?: VNode | string;
21
+ end?: VNode | string;
22
+ };
23
+ }
24
+ /** Resolved per-panel configuration extracted from slot VNodes. */
25
+ export interface BSplitterPanelConfig {
26
+ /** Panel index (0-based). */
27
+ index: number;
28
+ size?: number | string;
29
+ defaultSize?: number | string;
30
+ min?: number | string;
31
+ max?: number | string;
32
+ resizable: boolean;
33
+ collapsible: BSplitterPanelCollapsible | false;
34
+ destroyOnHidden: boolean;
35
+ /** Default slot content for the panel. */
36
+ content?: VNode[];
37
+ }
38
+ /** Context provided by BSplitter to its children (currently unused; kept for future). */
39
+ export interface BSplitterContext {
40
+ orientation: 'horizontal' | 'vertical';
41
+ }
42
+ export declare const BSplitterContextKey: InjectionKey<BSplitterContext>;
@@ -35,8 +35,10 @@ export * from './BRadio';
35
35
  export * from './BRate';
36
36
  export * from './BSegmented';
37
37
  export * from './BSelect';
38
+ export * from './BSkeleton';
38
39
  export * from './BSlider';
39
40
  export * from './BSpin';
41
+ export * from './BSplitter';
40
42
  export { default as BSteps } from './BSteps/BSteps.vue';
41
43
  export * from './BSwitch';
42
44
  export * from './BTable';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@7pmlabs/design-system",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "homepage": "https://github.com/ngphanducthinh/design-system",