@pixpilot/shadcn-ui 0.1.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Alert.cjs +1 -1
- package/dist/Alert.js +1 -1
- package/dist/Button.cjs +1 -1
- package/dist/Button.d.ts +1 -1
- package/dist/Button.js +1 -1
- package/dist/CloseButtonRounded.cjs +1 -1
- package/dist/CloseButtonRounded.js +1 -1
- package/dist/Combobox.cjs +1 -1
- package/dist/Combobox.js +1 -1
- package/dist/CommandOptionList.cjs +1 -1
- package/dist/CommandOptionList.js +1 -1
- package/dist/DatePicker.cjs +1 -1
- package/dist/DatePicker.js +1 -1
- package/dist/LoadingOverlay.cjs +1 -1
- package/dist/LoadingOverlay.js +1 -1
- package/dist/Select.d.cts +2 -2
- package/dist/Select.d.ts +2 -2
- package/dist/ThemeToggle.d.cts +2 -2
- package/dist/ThemeToggle.d.ts +2 -2
- package/dist/_virtual/rolldown_runtime.cjs +1 -1
- package/dist/_virtual/rolldown_runtime.js +1 -0
- package/dist/confirmation-dialog/ConfirmationDialog.cjs +1 -1
- package/dist/confirmation-dialog/ConfirmationDialog.js +1 -1
- package/dist/confirmation-dialog/index.cjs +1 -1
- package/dist/file-upload/FileUpload.cjs +1 -0
- package/dist/file-upload/FileUpload.d.cts +7 -0
- package/dist/file-upload/FileUpload.d.ts +7 -0
- package/dist/file-upload/FileUpload.js +1 -0
- package/dist/file-upload/FileUploadItems.cjs +1 -0
- package/dist/file-upload/FileUploadItems.js +1 -0
- package/dist/file-upload/FileUploadListItem.cjs +1 -0
- package/dist/file-upload/FileUploadListItem.js +1 -0
- package/dist/file-upload/hooks/index.cjs +1 -0
- package/dist/file-upload/hooks/index.d.ts +2 -0
- package/dist/file-upload/hooks/index.js +1 -0
- package/dist/file-upload/hooks/use-file-error.cjs +1 -0
- package/dist/file-upload/hooks/use-file-error.js +1 -0
- package/dist/file-upload/hooks/use-file-upload-progress-callbacks.cjs +1 -0
- package/dist/file-upload/hooks/use-file-upload-progress-callbacks.d.ts +1 -0
- package/dist/file-upload/hooks/use-file-upload-progress-callbacks.js +1 -0
- package/dist/file-upload/hooks/use-file-upload-store.cjs +1 -0
- package/dist/file-upload/hooks/use-file-upload-store.d.ts +2 -0
- package/dist/file-upload/hooks/use-file-upload-store.js +1 -0
- package/dist/file-upload/index.cjs +1 -0
- package/dist/file-upload/index.d.cts +2 -0
- package/dist/file-upload/index.d.ts +3 -0
- package/dist/file-upload/index.js +1 -0
- package/dist/file-upload/types/index.d.cts +40 -0
- package/dist/file-upload/types/index.d.ts +40 -0
- package/dist/file-upload/utils/create-placeholder-file.cjs +1 -0
- package/dist/file-upload/utils/create-placeholder-file.js +1 -0
- package/dist/file-upload/utils/get-file-key.cjs +1 -0
- package/dist/file-upload/utils/get-file-key.d.ts +1 -0
- package/dist/file-upload/utils/get-file-key.js +1 -0
- package/dist/file-upload/utils/get-file-meta.cjs +1 -0
- package/dist/file-upload/utils/get-file-meta.d.ts +1 -0
- package/dist/file-upload/utils/get-file-meta.js +1 -0
- package/dist/file-upload/utils/index.d.ts +4 -0
- package/dist/file-upload/utils/is-file-equal.cjs +1 -0
- package/dist/file-upload/utils/is-file-equal.d.ts +1 -0
- package/dist/file-upload/utils/is-file-equal.js +1 -0
- package/dist/file-upload/utils/merge-file-metadata.cjs +1 -0
- package/dist/file-upload/utils/merge-file-metadata.d.ts +1 -0
- package/dist/file-upload/utils/merge-file-metadata.js +1 -0
- package/dist/file-upload-inline/FileUploadInline.cjs +1 -0
- package/dist/file-upload-inline/FileUploadInline.d.cts +10 -0
- package/dist/file-upload-inline/FileUploadInline.d.ts +10 -0
- package/dist/file-upload-inline/FileUploadInline.js +1 -0
- package/dist/file-upload-inline/FileUploadInlineItem.cjs +1 -0
- package/dist/file-upload-inline/FileUploadInlineItem.js +1 -0
- package/dist/file-upload-inline/defaults.cjs +1 -0
- package/dist/file-upload-inline/defaults.js +1 -0
- package/dist/file-upload-inline/index.cjs +1 -0
- package/dist/file-upload-inline/index.d.cts +2 -0
- package/dist/file-upload-inline/index.d.ts +2 -0
- package/dist/file-upload-inline/index.js +1 -0
- package/dist/file-upload-inline/types.d.cts +16 -0
- package/dist/file-upload-inline/types.d.ts +16 -0
- package/dist/file-upload-inline/utils.cjs +1 -0
- package/dist/file-upload-inline/utils.js +1 -0
- package/dist/hooks/index.cjs +1 -1
- package/dist/icon-selector/IconPicker.d.cts +3 -2
- package/dist/icon-selector/IconPicker.d.ts +3 -2
- package/dist/icon-selector/constants.cjs +1 -1
- package/dist/icon-selector/icon-picker-content.cjs +1 -1
- package/dist/icon-selector/icon-picker-content.js +1 -1
- package/dist/icon-selector/index.cjs +1 -1
- package/dist/icon-selector/index.d.cts +1 -2
- package/dist/icon-selector/index.d.ts +1 -2
- package/dist/icon-selector/index.js +1 -1
- package/dist/icon-selector/types.d.cts +4 -2
- package/dist/icon-selector/types.d.ts +4 -2
- package/dist/icon-selector/use-async-providers.cjs +1 -1
- package/dist/icon-selector/use-async-providers.js +1 -1
- package/dist/icon-selector/utils/is-valid-provider.cjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +12 -7
- package/dist/index.d.ts +12 -7
- package/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/@diceui_shared@0.12.0_@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@1_2c51ffe880f01dd537d5b6a13313daf4/node_modules/@diceui/shared/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@diceui_shared@0.12.0_@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@1_2c51ffe880f01dd537d5b6a13313daf4/node_modules/@diceui/shared/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/@diceui_tags-input@0.7.2_@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__reac_e193dc2ff0d426ed009417f8d89778fd/node_modules/@diceui/tags-input/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/@diceui_tags-input@0.7.2_@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__reac_e193dc2ff0d426ed009417f8d89778fd/node_modules/@diceui/tags-input/dist/index.js +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.3/node_modules/@floating-ui/core/dist/floating-ui.core.js +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.4/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.6_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_react-dom@2.1.6_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react/dist/floating-ui.react.esm.cjs +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react/dist/floating-ui.react.esm.js +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react/dist/floating-ui.react.utils.cjs +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +1 -0
- package/dist/node_modules/.pnpm/tabbable@6.3.0/node_modules/tabbable/dist/index.cjs +1 -0
- package/dist/node_modules/.pnpm/tabbable@6.3.0/node_modules/tabbable/dist/index.esm.js +1 -0
- package/dist/packages/shadcn/src/components/index.cjs +1 -0
- package/dist/packages/shadcn/src/components/index.js +1 -0
- package/dist/packages/shadcn/src/components/ui/OrContinueWithSeparator.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/OrContinueWithSeparator.js +1 -0
- package/dist/packages/shadcn/src/components/ui/alert-dialog.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/alert-dialog.js +1 -0
- package/dist/packages/shadcn/src/components/ui/alert.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/alert.js +1 -0
- package/dist/packages/shadcn/src/components/ui/avatar.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/avatar.js +1 -0
- package/dist/packages/shadcn/src/components/ui/badge.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/badge.js +1 -0
- package/dist/packages/shadcn/src/components/ui/button.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/button.js +1 -0
- package/dist/packages/shadcn/src/components/ui/calendar.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/calendar.js +1 -0
- package/dist/packages/shadcn/src/components/ui/card.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/card.js +1 -0
- package/dist/packages/shadcn/src/components/ui/checkbox.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/checkbox.js +1 -0
- package/dist/packages/shadcn/src/components/ui/command.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/command.js +1 -0
- package/dist/packages/shadcn/src/components/ui/dialog.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/dialog.js +1 -0
- package/dist/packages/shadcn/src/components/ui/dropdown-menu.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/dropdown-menu.js +1 -0
- package/dist/packages/shadcn/src/components/ui/file-upload.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/file-upload.js +1 -0
- package/dist/packages/shadcn/src/components/ui/form.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/form.js +1 -0
- package/dist/packages/shadcn/src/components/ui/index.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/index.js +1 -0
- package/dist/packages/shadcn/src/components/ui/input.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/input.js +1 -0
- package/dist/packages/shadcn/src/components/ui/label.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/label.js +1 -0
- package/dist/packages/shadcn/src/components/ui/pagination.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/pagination.js +1 -0
- package/dist/packages/shadcn/src/components/ui/popover.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/popover.js +1 -0
- package/dist/packages/shadcn/src/components/ui/radio-group.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/radio-group.js +1 -0
- package/dist/packages/shadcn/src/components/ui/select.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/select.js +1 -0
- package/dist/packages/shadcn/src/components/ui/separator.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/separator.js +1 -0
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags/index.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags/index.js +1 -0
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags-input-inline/index.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/shadcn-io/tags-input-inline/index.js +1 -0
- package/dist/packages/shadcn/src/components/ui/sheet.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/sheet.js +1 -0
- package/dist/packages/shadcn/src/components/ui/slider.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/slider.js +1 -0
- package/dist/packages/shadcn/src/components/ui/switch.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/switch.js +1 -0
- package/dist/packages/shadcn/src/components/ui/tabs.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/tabs.js +1 -0
- package/dist/packages/shadcn/src/components/ui/textarea.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/textarea.js +1 -0
- package/dist/packages/shadcn/src/components/ui/tooltip.cjs +1 -0
- package/dist/packages/shadcn/src/components/ui/tooltip.js +1 -0
- package/dist/packages/shadcn/src/lib/index.cjs +1 -0
- package/dist/packages/shadcn/src/lib/utils.cjs +1 -0
- package/dist/pagination/Pagination.cjs +1 -0
- package/dist/{Pagination → pagination}/Pagination.d.cts +1 -1
- package/dist/{Pagination → pagination}/Pagination.d.ts +1 -1
- package/dist/pagination/Pagination.js +1 -0
- package/dist/pagination/index.cjs +1 -0
- package/dist/rich-text-editor/RichTextEditor.cjs +1 -0
- package/dist/rich-text-editor/RichTextEditor.d.cts +55 -0
- package/dist/rich-text-editor/RichTextEditor.d.ts +55 -0
- package/dist/rich-text-editor/RichTextEditor.js +1 -0
- package/dist/rich-text-editor/index.cjs +1 -0
- package/dist/rich-text-editor/index.d.cts +1 -0
- package/dist/rich-text-editor/index.d.ts +1 -0
- package/dist/rich-text-editor/index.js +1 -0
- package/dist/rich-text-editor/predefined-toolbar-options.cjs +1 -0
- package/dist/rich-text-editor/predefined-toolbar-options.js +1 -0
- package/dist/spinner/index.cjs +1 -1
- package/dist/spinner/styles.cjs +2 -2
- package/dist/tags-input.d.cts +2 -2
- package/dist/tags-input.d.ts +2 -2
- package/dist/toast/AlertToast.cjs +1 -1
- package/dist/toast/AlertToast.js +1 -1
- package/dist/toast/index.cjs +1 -1
- package/package.json +9 -2
- package/dist/FileUploadInline.cjs +0 -1
- package/dist/FileUploadInline.d.cts +0 -75
- package/dist/FileUploadInline.d.ts +0 -75
- package/dist/FileUploadInline.js +0 -1
- package/dist/Pagination/Pagination.cjs +0 -1
- package/dist/Pagination/Pagination.js +0 -1
- package/dist/Pagination/index.cjs +0 -1
- package/dist/PopoverContent.cjs +0 -1
- package/dist/PopoverContent.d.cts +0 -8
- package/dist/PopoverContent.d.ts +0 -8
- package/dist/PopoverContent.js +0 -1
- package/dist/icon-selector/use-async-providers.d.cts +0 -14
- package/dist/icon-selector/use-async-providers.d.ts +0 -14
- package/dist/shadcn/src/components/ui/alert.cjs +0 -1
- package/dist/shadcn/src/components/ui/alert.js +0 -1
- package/dist/shadcn/src/components/ui/dialog.cjs +0 -1
- package/dist/shadcn/src/components/ui/dialog.js +0 -1
- package/dist/shadcn/src/lib/index.cjs +0 -1
- package/dist/shadcn/src/lib/utils.cjs +0 -1
- /package/dist/{shadcn → packages/shadcn}/src/lib/index.js +0 -0
- /package/dist/{shadcn → packages/shadcn}/src/lib/utils.js +0 -0
- /package/dist/{Pagination → pagination}/index.d.cts +0 -0
- /package/dist/{Pagination → pagination}/index.d.ts +0 -0
- /package/dist/{Pagination → pagination}/index.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../lib/index.js";import{buttonVariants as e}from"@pixpilot/shadcn";import"lucide-react";import"react";import{jsx as t,jsxs as n}from"react/jsx-runtime";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../../../../_virtual/rolldown_runtime.cjs`);require(`../../lib/index.cjs`);let t=require(`react`);t=e.__toESM(t);let n=require(`react/jsx-runtime`);n=e.__toESM(n),require(`@radix-ui/react-popover`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../lib/index.js";import"react";import{jsx as e}from"react/jsx-runtime";import"@radix-ui/react-popover";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../../../../_virtual/rolldown_runtime.cjs`);require(`../../lib/index.cjs`);let t=require(`lucide-react`);t=e.__toESM(t);let n=require(`react`);n=e.__toESM(n);let r=require(`react/jsx-runtime`);r=e.__toESM(r),require(`@radix-ui/react-radio-group`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../lib/index.js";import"lucide-react";import"react";import{jsx as e}from"react/jsx-runtime";import"@radix-ui/react-radio-group";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require(`../../../../../_virtual/rolldown_runtime.cjs`);require(`../../lib/index.cjs`);let t=require(`lucide-react`);t=e.__toESM(t);let n=require(`react`);n=e.__toESM(n);let r=require(`react/jsx-runtime`);r=e.__toESM(r),require(`@radix-ui/react-select`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import"../../lib/index.js";import"lucide-react";import"react";import{jsx as e,jsxs as t}from"react/jsx-runtime";import"@radix-ui/react-select";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../../../../_virtual/rolldown_runtime.cjs`);require(`../../lib/index.cjs`);let t=require(`react`);t=e.__toESM(t);let n=require(`react/jsx-runtime`);n=e.__toESM(n),require(`@radix-ui/react-separator`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../lib/index.js";import"react";import{jsx as e}from"react/jsx-runtime";import"@radix-ui/react-separator";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require(`../../../../../../../_virtual/rolldown_runtime.cjs`);require(`../../../../lib/index.cjs`),require(`../../button.cjs`),require(`../../badge.cjs`),require(`../../command.cjs`),require(`../../popover.cjs`);let t=require(`lucide-react`);t=e.__toESM(t);let n=require(`react`);n=e.__toESM(n);let r=require(`react/jsx-runtime`);r=e.__toESM(r);const i=(0,n.createContext)({value:void 0,setValue:void 0,open:!1,onOpenChange:()=>{},width:void 0,setWidth:void 0});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import"../../../../lib/index.js";import"../../button.js";import"../../badge.js";import"../../command.js";import"../../popover.js";import{XIcon as e}from"lucide-react";import{createContext as t,useEffect as n,useRef as r,useState as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";t({value:void 0,setValue:void 0,open:!1,onOpenChange:()=>{},width:void 0,setWidth:void 0});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../../../../../../_virtual/rolldown_runtime.cjs`);require(`../../../../lib/utils.cjs`),require(`../../../../../../../node_modules/.pnpm/@diceui_tags-input@0.7.2_@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__reac_e193dc2ff0d426ed009417f8d89778fd/node_modules/@diceui/tags-input/dist/index.cjs`);let t=require(`lucide-react`);t=e.__toESM(t);let n=require(`react/jsx-runtime`);n=e.__toESM(n);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../../../lib/utils.js";import"../../../../../../../node_modules/.pnpm/@diceui_tags-input@0.7.2_@floating-ui_react@0.27.16_react-dom@19.2.0_react@19.2.0__reac_e193dc2ff0d426ed009417f8d89778fd/node_modules/@diceui/tags-input/dist/index.js";import{X as e}from"lucide-react";import{jsx as t,jsxs as n}from"react/jsx-runtime";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../../../../_virtual/rolldown_runtime.cjs`);require(`../../lib/index.cjs`);let t=require(`lucide-react`);t=e.__toESM(t);let n=require(`react`);n=e.__toESM(n);let r=require(`react/jsx-runtime`);r=e.__toESM(r);let i=require(`@radix-ui/react-dialog`);i=e.__toESM(i);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../lib/index.js";import{XIcon as e}from"lucide-react";import"react";import{jsx as t,jsxs as n}from"react/jsx-runtime";import"@radix-ui/react-dialog";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../../../../_virtual/rolldown_runtime.cjs`);require(`../../lib/index.cjs`);let t=require(`react`);t=e.__toESM(t);let n=require(`react/jsx-runtime`);n=e.__toESM(n),require(`@radix-ui/react-slider`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../lib/index.js";import"react";import{jsx as e,jsxs as t}from"react/jsx-runtime";import"@radix-ui/react-slider";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";const e=require(`../../../../../_virtual/rolldown_runtime.cjs`);require(`../../lib/index.cjs`);let t=require(`react`);t=e.__toESM(t);let n=require(`react/jsx-runtime`);n=e.__toESM(n),require(`@radix-ui/react-switch`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import"../../lib/index.js";import"react";import{jsx as e}from"react/jsx-runtime";import"@radix-ui/react-switch";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../../../../_virtual/rolldown_runtime.cjs`);require(`../../lib/index.cjs`);let t=require(`react`);t=e.__toESM(t);let n=require(`react/jsx-runtime`);n=e.__toESM(n),require(`@radix-ui/react-tabs`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../lib/index.js";import"react";import{jsx as e}from"react/jsx-runtime";import"@radix-ui/react-tabs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../../../../_virtual/rolldown_runtime.cjs`);require(`../../lib/index.cjs`);let t=require(`react`);t=e.__toESM(t);let n=require(`react/jsx-runtime`);n=e.__toESM(n);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../lib/index.js";import"react";import{jsx as e}from"react/jsx-runtime";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../../../../_virtual/rolldown_runtime.cjs`);require(`../../lib/index.cjs`);let t=require(`react`);t=e.__toESM(t);let n=require(`react/jsx-runtime`);n=e.__toESM(n),require(`@radix-ui/react-tooltip`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../lib/index.js";import"react";import{jsx as e,jsxs as t}from"react/jsx-runtime";import"@radix-ui/react-tooltip";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../../../_virtual/rolldown_runtime.cjs`),t=require(`./utils.cjs`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../../../../_virtual/rolldown_runtime.cjs`);let t=require(`clsx`);t=e.__toESM(t);let n=require(`tailwind-merge`);n=e.__toESM(n);function r(...e){return(0,n.twMerge)((0,t.clsx)(e))}exports.cn=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`);let t=require(`@pixpilot/shadcn`);t=e.__toESM(t);let n=require(`lucide-react`);n=e.__toESM(n);let r=require(`react`);r=e.__toESM(r);let i=require(`react/jsx-runtime`);i=e.__toESM(i);const a=({page:e,totalPages:r,onPageChange:a,maxVisiblePages:o=6,variant:s=`full`,showPageInfo:c=!1,className:l})=>{if(r<=1)return null;let u=e=>t=>{t.preventDefault(),a(t,e)},d=(()=>{let t=[];if(r<=o){for(let e=1;e<=r;e++)t.push(e);return t}let n=r,i=e<=o-1,a=e>=r-(o-2);if(i){for(let e=1;e<o;e++)t.push(e);t.push(`ellipsis-end`),t.push(n)}else if(a){t.push(1),t.push(`ellipsis-start`);for(let e=r-(o-2);e<=r;e++)t.push(e)}else{let r=o-2;t.push(1),t.push(`ellipsis-start`);let i=e-Math.floor(r/2),a=i+r-1;i=Math.max(2,i),a=Math.min(n-1,a),a-i+1<r&&(i===2?a=i+r-1:i=a-r+1);for(let e=i;e<=a;e++)t.push(e);t.push(`ellipsis-end`),t.push(n)}return t})();return s===`compact`?(0,i.jsx)(t.Pagination,{className:l,children:(0,i.jsxs)(t.PaginationContent,{children:[(0,i.jsx)(t.PaginationItem,{children:(0,i.jsx)(t.PaginationLink,{onClick:u(1),"aria-label":`Go to first page`,className:`gap-1 px-2`,children:(0,i.jsx)(n.ChevronsLeft,{className:`h-4 w-4`})})}),(0,i.jsx)(t.PaginationItem,{children:(0,i.jsx)(t.PaginationPrevious,{onClick:u(Math.max(1,e-1))})}),(0,i.jsx)(t.PaginationItem,{children:(0,i.jsxs)(`span`,{className:`flex h-9 items-center justify-center px-4 text-sm font-medium`,children:[e,`/`,r]})}),(0,i.jsx)(t.PaginationItem,{children:(0,i.jsx)(t.PaginationNext,{onClick:u(Math.min(r,e+1))})}),(0,i.jsx)(t.PaginationItem,{children:(0,i.jsx)(t.PaginationLink,{onClick:u(r),"aria-label":`Go to last page`,className:`gap-1 px-2`,children:(0,i.jsx)(n.ChevronsRight,{className:`h-4 w-4`})})})]})}):s===`simple`?(0,i.jsxs)(`div`,{className:`flex items-center justify-center gap-4 ${l??``}`,children:[c&&(0,i.jsxs)(`span`,{className:`text-sm whitespace-nowrap`,children:[`Page `,e,` of `,r]}),(0,i.jsx)(t.Pagination,{children:(0,i.jsxs)(t.PaginationContent,{children:[(0,i.jsx)(t.PaginationItem,{children:(0,i.jsx)(t.PaginationPrevious,{onClick:u(Math.max(1,e-1))})}),(0,i.jsx)(t.PaginationItem,{children:(0,i.jsx)(t.PaginationNext,{onClick:u(Math.min(r,e+1))})})]})})]}):(0,i.jsxs)(`div`,{className:`flex items-center justify-center gap-4 ${l??``}`,children:[c&&(0,i.jsxs)(`span`,{className:`text-sm whitespace-nowrap`,children:[`Page `,e,` of `,r]}),(0,i.jsx)(t.Pagination,{children:(0,i.jsxs)(t.PaginationContent,{children:[(0,i.jsx)(t.PaginationItem,{children:(0,i.jsx)(t.PaginationPrevious,{onClick:u(Math.max(1,e-1))})}),d.map(n=>typeof n==`string`?(0,i.jsx)(t.PaginationItem,{children:(0,i.jsx)(t.PaginationEllipsis,{})},n):(0,i.jsx)(t.PaginationItem,{children:(0,i.jsx)(t.PaginationLink,{onClick:u(n),isActive:n===e,children:n})},n)),(0,i.jsx)(t.PaginationItem,{children:(0,i.jsx)(t.PaginationNext,{onClick:u(Math.min(r,e+1))})})]})})]})};exports.Pagination=a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Pagination as e,PaginationContent as t,PaginationEllipsis as n,PaginationItem as r,PaginationLink as i,PaginationNext as a,PaginationPrevious as o}from"@pixpilot/shadcn";import{ChevronsLeft as s,ChevronsRight as c}from"lucide-react";import l from"react";import{jsx as u,jsxs as d}from"react/jsx-runtime";const f=({page:l,totalPages:f,onPageChange:p,maxVisiblePages:m=6,variant:h=`full`,showPageInfo:g=!1,className:_})=>{if(f<=1)return null;let v=e=>t=>{t.preventDefault(),p(t,e)},y=(()=>{let e=[];if(f<=m){for(let t=1;t<=f;t++)e.push(t);return e}let t=f,n=l<=m-1,r=l>=f-(m-2);if(n){for(let t=1;t<m;t++)e.push(t);e.push(`ellipsis-end`),e.push(t)}else if(r){e.push(1),e.push(`ellipsis-start`);for(let t=f-(m-2);t<=f;t++)e.push(t)}else{let n=m-2;e.push(1),e.push(`ellipsis-start`);let r=l-Math.floor(n/2),i=r+n-1;r=Math.max(2,r),i=Math.min(t-1,i),i-r+1<n&&(r===2?i=r+n-1:r=i-n+1);for(let t=r;t<=i;t++)e.push(t);e.push(`ellipsis-end`),e.push(t)}return e})();return h===`compact`?u(e,{className:_,children:d(t,{children:[u(r,{children:u(i,{onClick:v(1),"aria-label":`Go to first page`,className:`gap-1 px-2`,children:u(s,{className:`h-4 w-4`})})}),u(r,{children:u(o,{onClick:v(Math.max(1,l-1))})}),u(r,{children:d(`span`,{className:`flex h-9 items-center justify-center px-4 text-sm font-medium`,children:[l,`/`,f]})}),u(r,{children:u(a,{onClick:v(Math.min(f,l+1))})}),u(r,{children:u(i,{onClick:v(f),"aria-label":`Go to last page`,className:`gap-1 px-2`,children:u(c,{className:`h-4 w-4`})})})]})}):h===`simple`?d(`div`,{className:`flex items-center justify-center gap-4 ${_??``}`,children:[g&&d(`span`,{className:`text-sm whitespace-nowrap`,children:[`Page `,l,` of `,f]}),u(e,{children:d(t,{children:[u(r,{children:u(o,{onClick:v(Math.max(1,l-1))})}),u(r,{children:u(a,{onClick:v(Math.min(f,l+1))})})]})})]}):d(`div`,{className:`flex items-center justify-center gap-4 ${_??``}`,children:[g&&d(`span`,{className:`text-sm whitespace-nowrap`,children:[`Page `,l,` of `,f]}),u(e,{children:d(t,{children:[u(r,{children:u(o,{onClick:v(Math.max(1,l-1))})}),y.map(e=>typeof e==`string`?u(r,{children:u(n,{})},e):u(r,{children:u(i,{onClick:v(e),isActive:e===l,children:e})},e)),u(r,{children:u(a,{onClick:v(Math.min(f,l+1))})})]})})]})};export{f as Pagination};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`./Pagination.cjs`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`./predefined-toolbar-options.cjs`);let n=require(`@pixpilot/shadcn`);n=e.__toESM(n);let r=require(`react`);r=e.__toESM(r);let i=require(`react/jsx-runtime`);i=e.__toESM(i);let a=require(`@tiptap/react`);a=e.__toESM(a);let o=require(`@tiptap/starter-kit`);o=e.__toESM(o);const s=({onClick:e,isActive:t,disabled:r,children:a,tooltip:o})=>(0,i.jsxs)(n.Tooltip,{children:[(0,i.jsx)(n.TooltipTrigger,{asChild:!0,children:(0,i.jsx)(n.Button,{type:`button`,variant:t?`default`:`ghost`,size:`sm`,onMouseDown:e=>{e.preventDefault()},onClick:e,disabled:r,className:`h-8 w-8 p-0`,children:a})}),(0,i.jsx)(n.TooltipContent,{children:(0,i.jsx)(`p`,{children:o})})]}),c=[],l=[`bold`,`italic`,`underline`,`strike`,`code`,`|`,`heading1`,`heading2`,`heading3`,`|`,`bulletList`,`orderedList`,`|`,`blockquote`,`codeBlock`],u=({content:e,onChange:u,extensions:d=c,editable:f=!0,className:p,contentClassName:m,showToolbar:h=!0,toolbarOptions:g=l,editorProps:_})=>{let[,v]=r.default.useReducer(e=>e+1,0),y={attributes:{class:(0,n.cn)(`min-h-[200px] p-4 text-sm leading-relaxed focus:outline-none`,`[&_h1]:text-3xl [&_h1]:font-bold [&_h1]:leading-tight [&_h1]:my-2`,`[&_h2]:text-2xl [&_h2]:font-bold [&_h2]:leading-tight [&_h2]:my-2`,`[&_h3]:text-xl [&_h3]:font-bold [&_h3]:leading-tight [&_h3]:my-2`,`[&_p]:my-2`,`[&_ul]:list-disc [&_ul]:pl-6 [&_ul]:my-2`,`[&_ol]:list-decimal [&_ol]:pl-6 [&_ol]:my-2`,`[&_blockquote]:border-l-4 [&_blockquote]:border-border [&_blockquote]:pl-4 [&_blockquote]:my-2 [&_blockquote]:italic`,`[&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_code]:text-[0.875em] [&_code]:font-mono`,`[&_pre]:bg-muted [&_pre]:p-4 [&_pre]:rounded [&_pre]:overflow-x-auto [&_pre]:font-mono`,m)}},b={...y,..._,attributes:{...y.attributes,..._?.attributes,class:(0,n.cn)(y.attributes.class,_?.attributes?.class)}},x=(0,a.useEditor)({extensions:[o.default].concat(d),content:e,editable:f,onUpdate:({editor:e})=>{u?.(e.getHTML())},editorProps:b});if(r.default.useEffect(()=>{if(x==null)return()=>{};let e=()=>{v()};return x.on(`selectionUpdate`,e),x.on(`transaction`,e),x.on(`focus`,e),x.on(`blur`,e),()=>{x.off(`selectionUpdate`,e),x.off(`transaction`,e),x.off(`focus`,e),x.off(`blur`,e)}},[x]),x==null)return(0,i.jsxs)(`div`,{className:(0,n.cn)(`border rounded-md bg-background`,p),children:[h&&(0,i.jsx)(`div`,{className:`flex flex-wrap items-center gap-1 border-b p-2 h-10`}),(0,i.jsx)(`div`,{className:`min-h-[200px] p-4 text-sm leading-relaxed`,children:`Loading editor...`})]});let S=e=>{try{e()}catch{}};return(0,i.jsxs)(`div`,{className:(0,n.cn)(`border rounded-md bg-background`,p),children:[(()=>{if(!h)return null;let e=x.isFocused;return(0,i.jsx)(`div`,{className:`flex flex-wrap items-center gap-1 border-b p-2`,children:g.map((n,r)=>{if(n===`|`)return(0,i.jsx)(`div`,{className:`mx-1 h-6 w-px bg-border`},`separator-${r}`);if(typeof n==`string`){let r=t.predefinedToolbarOptions[n];return r?(0,i.jsx)(s,{onClick:()=>S(()=>r.onClick(x)),isActive:e&&(r.isActive?.(x)??!1),tooltip:r.tooltip,children:r.icon},n):null}let a=n;return(0,i.jsx)(s,{onClick:()=>S(()=>a.onClick(x)),isActive:e&&(a.isActive?.(x)??!1),tooltip:a.tooltip,children:a.icon},`custom-${r}-${a.tooltip}`)})})})(),(0,i.jsx)(a.EditorContent,{editor:x})]})};u.displayName=`RichTextEditor`,exports.RichTextEditor=u;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Editor, Extension } from "@tiptap/core";
|
|
3
|
+
|
|
4
|
+
//#region src/rich-text-editor/RichTextEditor.d.ts
|
|
5
|
+
type EditorProps = Editor['options']['editorProps'];
|
|
6
|
+
type ToolbarOption = string | '|' | {
|
|
7
|
+
icon: React.ReactNode;
|
|
8
|
+
tooltip: string;
|
|
9
|
+
onClick: (editor: any) => void;
|
|
10
|
+
isActive?: (editor: any) => boolean;
|
|
11
|
+
};
|
|
12
|
+
interface RichTextEditorProps {
|
|
13
|
+
/**
|
|
14
|
+
* The initial content of the editor
|
|
15
|
+
*/
|
|
16
|
+
content?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Callback when the content changes
|
|
19
|
+
*/
|
|
20
|
+
onChange?: (content: string) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Additional extensions to add to the editor
|
|
23
|
+
*/
|
|
24
|
+
extensions?: Extension[];
|
|
25
|
+
/**
|
|
26
|
+
* Whether the editor is editable
|
|
27
|
+
* @default true
|
|
28
|
+
*/
|
|
29
|
+
editable?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Custom class name for the editor container
|
|
32
|
+
*/
|
|
33
|
+
className?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Custom class name for the editor content
|
|
36
|
+
*/
|
|
37
|
+
contentClassName?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Whether to show the toolbar
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
showToolbar?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Array of toolbar options to display. If provided, only these options will be shown.
|
|
45
|
+
* Can be strings for predefined commands or objects for custom buttons.
|
|
46
|
+
*/
|
|
47
|
+
toolbarOptions?: ToolbarOption[];
|
|
48
|
+
/**
|
|
49
|
+
* Custom editor props to pass to the editor
|
|
50
|
+
*/
|
|
51
|
+
editorProps?: EditorProps;
|
|
52
|
+
}
|
|
53
|
+
declare const RichTextEditor: React.FC<RichTextEditorProps>;
|
|
54
|
+
//#endregion
|
|
55
|
+
export { RichTextEditor, RichTextEditorProps, ToolbarOption };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Editor, Extension } from "@tiptap/core";
|
|
3
|
+
|
|
4
|
+
//#region src/rich-text-editor/RichTextEditor.d.ts
|
|
5
|
+
type EditorProps = Editor['options']['editorProps'];
|
|
6
|
+
type ToolbarOption = string | '|' | {
|
|
7
|
+
icon: React.ReactNode;
|
|
8
|
+
tooltip: string;
|
|
9
|
+
onClick: (editor: any) => void;
|
|
10
|
+
isActive?: (editor: any) => boolean;
|
|
11
|
+
};
|
|
12
|
+
interface RichTextEditorProps {
|
|
13
|
+
/**
|
|
14
|
+
* The initial content of the editor
|
|
15
|
+
*/
|
|
16
|
+
content?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Callback when the content changes
|
|
19
|
+
*/
|
|
20
|
+
onChange?: (content: string) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Additional extensions to add to the editor
|
|
23
|
+
*/
|
|
24
|
+
extensions?: Extension[];
|
|
25
|
+
/**
|
|
26
|
+
* Whether the editor is editable
|
|
27
|
+
* @default true
|
|
28
|
+
*/
|
|
29
|
+
editable?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Custom class name for the editor container
|
|
32
|
+
*/
|
|
33
|
+
className?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Custom class name for the editor content
|
|
36
|
+
*/
|
|
37
|
+
contentClassName?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Whether to show the toolbar
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
showToolbar?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Array of toolbar options to display. If provided, only these options will be shown.
|
|
45
|
+
* Can be strings for predefined commands or objects for custom buttons.
|
|
46
|
+
*/
|
|
47
|
+
toolbarOptions?: ToolbarOption[];
|
|
48
|
+
/**
|
|
49
|
+
* Custom editor props to pass to the editor
|
|
50
|
+
*/
|
|
51
|
+
editorProps?: EditorProps;
|
|
52
|
+
}
|
|
53
|
+
declare const RichTextEditor: React.FC<RichTextEditorProps>;
|
|
54
|
+
//#endregion
|
|
55
|
+
export { RichTextEditor, RichTextEditorProps, ToolbarOption };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{predefinedToolbarOptions as e}from"./predefined-toolbar-options.js";import{Button as t,Tooltip as n,TooltipContent as r,TooltipTrigger as i,cn as a}from"@pixpilot/shadcn";import o from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{EditorContent as l,useEditor as u}from"@tiptap/react";import d from"@tiptap/starter-kit";const f=({onClick:e,isActive:a,disabled:o,children:l,tooltip:u})=>c(n,{children:[s(i,{asChild:!0,children:s(t,{type:`button`,variant:a?`default`:`ghost`,size:`sm`,onMouseDown:e=>{e.preventDefault()},onClick:e,disabled:o,className:`h-8 w-8 p-0`,children:l})}),s(r,{children:s(`p`,{children:u})})]}),p=[],m=[`bold`,`italic`,`underline`,`strike`,`code`,`|`,`heading1`,`heading2`,`heading3`,`|`,`bulletList`,`orderedList`,`|`,`blockquote`,`codeBlock`],h=({content:t,onChange:n,extensions:r=p,editable:i=!0,className:h,contentClassName:g,showToolbar:_=!0,toolbarOptions:v=m,editorProps:y})=>{let[,b]=o.useReducer(e=>e+1,0),x={attributes:{class:a(`min-h-[200px] p-4 text-sm leading-relaxed focus:outline-none`,`[&_h1]:text-3xl [&_h1]:font-bold [&_h1]:leading-tight [&_h1]:my-2`,`[&_h2]:text-2xl [&_h2]:font-bold [&_h2]:leading-tight [&_h2]:my-2`,`[&_h3]:text-xl [&_h3]:font-bold [&_h3]:leading-tight [&_h3]:my-2`,`[&_p]:my-2`,`[&_ul]:list-disc [&_ul]:pl-6 [&_ul]:my-2`,`[&_ol]:list-decimal [&_ol]:pl-6 [&_ol]:my-2`,`[&_blockquote]:border-l-4 [&_blockquote]:border-border [&_blockquote]:pl-4 [&_blockquote]:my-2 [&_blockquote]:italic`,`[&_code]:bg-muted [&_code]:px-1 [&_code]:py-0.5 [&_code]:rounded [&_code]:text-[0.875em] [&_code]:font-mono`,`[&_pre]:bg-muted [&_pre]:p-4 [&_pre]:rounded [&_pre]:overflow-x-auto [&_pre]:font-mono`,g)}},S={...x,...y,attributes:{...x.attributes,...y?.attributes,class:a(x.attributes.class,y?.attributes?.class)}},C=u({extensions:[d].concat(r),content:t,editable:i,onUpdate:({editor:e})=>{n?.(e.getHTML())},editorProps:S});if(o.useEffect(()=>{if(C==null)return()=>{};let e=()=>{b()};return C.on(`selectionUpdate`,e),C.on(`transaction`,e),C.on(`focus`,e),C.on(`blur`,e),()=>{C.off(`selectionUpdate`,e),C.off(`transaction`,e),C.off(`focus`,e),C.off(`blur`,e)}},[C]),C==null)return c(`div`,{className:a(`border rounded-md bg-background`,h),children:[_&&s(`div`,{className:`flex flex-wrap items-center gap-1 border-b p-2 h-10`}),s(`div`,{className:`min-h-[200px] p-4 text-sm leading-relaxed`,children:`Loading editor...`})]});let w=e=>{try{e()}catch{}};return c(`div`,{className:a(`border rounded-md bg-background`,h),children:[(()=>{if(!_)return null;let t=C.isFocused;return s(`div`,{className:`flex flex-wrap items-center gap-1 border-b p-2`,children:v.map((n,r)=>{if(n===`|`)return s(`div`,{className:`mx-1 h-6 w-px bg-border`},`separator-${r}`);if(typeof n==`string`){let r=e[n];return r?s(f,{onClick:()=>w(()=>r.onClick(C)),isActive:t&&(r.isActive?.(C)??!1),tooltip:r.tooltip,children:r.icon},n):null}let i=n;return s(f,{onClick:()=>w(()=>i.onClick(C)),isActive:t&&(i.isActive?.(C)??!1),tooltip:i.tooltip,children:i.icon},`custom-${r}-${i.tooltip}`)})})})(),s(l,{editor:C})]})};h.displayName=`RichTextEditor`;export{h as RichTextEditor};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`./RichTextEditor.cjs`);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { RichTextEditor, RichTextEditorProps, ToolbarOption } from "./RichTextEditor.cjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { RichTextEditor, RichTextEditorProps, ToolbarOption } from "./RichTextEditor.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{RichTextEditor as e}from"./RichTextEditor.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`);let t=require(`lucide-react`);t=e.__toESM(t);let n=require(`react/jsx-runtime`);n=e.__toESM(n);const r={bold:{icon:(0,n.jsx)(t.Bold,{className:`h-4 w-4`}),tooltip:`Bold`,onClick:e=>e.chain().focus().toggleBold().run(),isActive:e=>e.isActive(`bold`)},italic:{icon:(0,n.jsx)(t.Italic,{className:`h-4 w-4`}),tooltip:`Italic`,onClick:e=>e.chain().focus().toggleItalic().run(),isActive:e=>e.isActive(`italic`)},underline:{icon:(0,n.jsx)(t.Underline,{className:`h-4 w-4`}),tooltip:`Underline`,onClick:e=>e.chain().focus().toggleUnderline().run(),isActive:e=>e.isActive(`underline`)},strike:{icon:(0,n.jsx)(t.Strikethrough,{className:`h-4 w-4`}),tooltip:`Strikethrough`,onClick:e=>e.chain().focus().toggleStrike().run(),isActive:e=>e.isActive(`strike`)},code:{icon:(0,n.jsx)(t.Code,{className:`h-4 w-4`}),tooltip:`Inline Code`,onClick:e=>e.chain().focus().toggleCode().run(),isActive:e=>e.isActive(`code`)},heading1:{icon:(0,n.jsx)(t.Heading1,{className:`h-4 w-4`}),tooltip:`Heading 1`,onClick:e=>e.chain().focus().toggleHeading({level:1}).run(),isActive:e=>e.isActive(`heading`,{level:1})},heading2:{icon:(0,n.jsx)(t.Heading2,{className:`h-4 w-4`}),tooltip:`Heading 2`,onClick:e=>e.chain().focus().toggleHeading({level:2}).run(),isActive:e=>e.isActive(`heading`,{level:2})},heading3:{icon:(0,n.jsx)(t.Heading3,{className:`h-4 w-4`}),tooltip:`Heading 3`,onClick:e=>e.chain().focus().toggleHeading({level:3}).run(),isActive:e=>e.isActive(`heading`,{level:3})},bulletList:{icon:(0,n.jsx)(t.List,{className:`h-4 w-4`}),tooltip:`Bullet List`,onClick:e=>e.chain().focus().toggleBulletList().run(),isActive:e=>e.isActive(`bulletList`)},orderedList:{icon:(0,n.jsx)(t.ListOrdered,{className:`h-4 w-4`}),tooltip:`Ordered List`,onClick:e=>e.chain().focus().toggleOrderedList().run(),isActive:e=>e.isActive(`orderedList`)},blockquote:{icon:(0,n.jsx)(t.Quote,{className:`h-4 w-4`}),tooltip:`Blockquote`,onClick:e=>e.chain().focus().toggleBlockquote().run(),isActive:e=>e.isActive(`blockquote`)},codeBlock:{icon:(0,n.jsx)(t.Code2,{className:`h-4 w-4`}),tooltip:`Code Block`,onClick:e=>e.chain().focus().toggleCodeBlock().run(),isActive:e=>e.isActive(`codeBlock`)}};exports.predefinedToolbarOptions=r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Bold as e,Code as t,Code2 as n,Heading1 as r,Heading2 as i,Heading3 as a,Italic as o,List as s,ListOrdered as c,Quote as l,Strikethrough as u,Underline as d}from"lucide-react";import{jsx as f}from"react/jsx-runtime";const p={bold:{icon:f(e,{className:`h-4 w-4`}),tooltip:`Bold`,onClick:e=>e.chain().focus().toggleBold().run(),isActive:e=>e.isActive(`bold`)},italic:{icon:f(o,{className:`h-4 w-4`}),tooltip:`Italic`,onClick:e=>e.chain().focus().toggleItalic().run(),isActive:e=>e.isActive(`italic`)},underline:{icon:f(d,{className:`h-4 w-4`}),tooltip:`Underline`,onClick:e=>e.chain().focus().toggleUnderline().run(),isActive:e=>e.isActive(`underline`)},strike:{icon:f(u,{className:`h-4 w-4`}),tooltip:`Strikethrough`,onClick:e=>e.chain().focus().toggleStrike().run(),isActive:e=>e.isActive(`strike`)},code:{icon:f(t,{className:`h-4 w-4`}),tooltip:`Inline Code`,onClick:e=>e.chain().focus().toggleCode().run(),isActive:e=>e.isActive(`code`)},heading1:{icon:f(r,{className:`h-4 w-4`}),tooltip:`Heading 1`,onClick:e=>e.chain().focus().toggleHeading({level:1}).run(),isActive:e=>e.isActive(`heading`,{level:1})},heading2:{icon:f(i,{className:`h-4 w-4`}),tooltip:`Heading 2`,onClick:e=>e.chain().focus().toggleHeading({level:2}).run(),isActive:e=>e.isActive(`heading`,{level:2})},heading3:{icon:f(a,{className:`h-4 w-4`}),tooltip:`Heading 3`,onClick:e=>e.chain().focus().toggleHeading({level:3}).run(),isActive:e=>e.isActive(`heading`,{level:3})},bulletList:{icon:f(s,{className:`h-4 w-4`}),tooltip:`Bullet List`,onClick:e=>e.chain().focus().toggleBulletList().run(),isActive:e=>e.isActive(`bulletList`)},orderedList:{icon:f(c,{className:`h-4 w-4`}),tooltip:`Ordered List`,onClick:e=>e.chain().focus().toggleOrderedList().run(),isActive:e=>e.isActive(`orderedList`)},blockquote:{icon:f(l,{className:`h-4 w-4`}),tooltip:`Blockquote`,onClick:e=>e.chain().focus().toggleBlockquote().run(),isActive:e=>e.isActive(`blockquote`)},codeBlock:{icon:f(n,{className:`h-4 w-4`}),tooltip:`Code Block`,onClick:e=>e.chain().focus().toggleCodeBlock().run(),isActive:e=>e.isActive(`codeBlock`)}};export{p as predefinedToolbarOptions};
|
package/dist/spinner/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./spinner.cjs`);
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`./spinner.cjs`);
|
package/dist/spinner/styles.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`);function t(e){let{uniqueId:t,speed:n=2,size:r,colors:i,color:a}=e;return`
|
|
2
2
|
@keyframes ${t}-rotate {
|
|
3
3
|
100% {
|
|
4
4
|
transform: rotate(360deg);
|
|
@@ -43,4 +43,4 @@ function e(e){let{uniqueId:t,speed:n=2,size:r,colors:i,color:a}=e;return`
|
|
|
43
43
|
animation: ${i&&i.length>0?`${t}-dash 1.5s ease-in-out infinite, ${(()=>!i||i.length===0?``:`${t}-color-change`)()} ${n*i.length}s ease-in-out infinite`:`${t}-dash 1.5s ease-in-out infinite`};
|
|
44
44
|
stroke-linecap: round;
|
|
45
45
|
}
|
|
46
|
-
`}exports.getGlobalStyles=
|
|
46
|
+
`}exports.getGlobalStyles=t;
|
package/dist/tags-input.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommandOptionListItem } from "./CommandOptionList.cjs";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/tags-input.d.ts
|
|
5
5
|
interface TagsInputProps {
|
|
@@ -55,6 +55,6 @@ declare function TagsInput({
|
|
|
55
55
|
addOnPaste,
|
|
56
56
|
addOnTab,
|
|
57
57
|
onValidate
|
|
58
|
-
}: TagsInputProps):
|
|
58
|
+
}: TagsInputProps): react_jsx_runtime4.JSX.Element;
|
|
59
59
|
//#endregion
|
|
60
60
|
export { TagsInput, TagsInputProps };
|
package/dist/tags-input.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CommandOptionListItem } from "./CommandOptionList.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as react_jsx_runtime4 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/tags-input.d.ts
|
|
5
5
|
interface TagsInputProps {
|
|
@@ -55,6 +55,6 @@ declare function TagsInput({
|
|
|
55
55
|
addOnPaste,
|
|
56
56
|
addOnTab,
|
|
57
57
|
onValidate
|
|
58
|
-
}: TagsInputProps):
|
|
58
|
+
}: TagsInputProps): react_jsx_runtime4.JSX.Element;
|
|
59
59
|
//#endregion
|
|
60
60
|
export { TagsInput, TagsInputProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../Alert.cjs`);let n=require(`@pixpilot/shadcn`);n=e.__toESM(n);let r=require(`react`);r=e.__toESM(r);let i=require(`react
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`../Alert.cjs`);let n=require(`@pixpilot/shadcn`);n=e.__toESM(n);let r=require(`lucide-react`);r=e.__toESM(r);let i=require(`react`);i=e.__toESM(i);let a=require(`react/jsx-runtime`);a=e.__toESM(a);const o=e=>{let{duration:i,onClose:o,...s}=e;return(0,a.jsx)(t.Alert,{icon:!0,...s,className:(0,n.cn)(`shadow-md`,e.className,{"pr-3":o}),children:o&&(0,a.jsx)(`div`,{className:`flex items-start pt-0.5 pl-1`,children:(0,a.jsxs)(`button`,{type:`button`,className:`cursor-pointer opacity-80 transition-opacity hover:opacity-100`,onClick:o,children:[(0,a.jsx)(r.XIcon,{className:`size-4.5`}),(0,a.jsx)(`span`,{className:`sr-only`,children:`Close`})]})})})};o.displayName=`AlertToast`,exports.AlertToast=o;
|
package/dist/toast/AlertToast.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Alert as e}from"../Alert.js";import{cn as t}from"@pixpilot/shadcn";import n from"react";import{jsx as
|
|
1
|
+
import{Alert as e}from"../Alert.js";import{cn as t}from"@pixpilot/shadcn";import{XIcon as n}from"lucide-react";import r from"react";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=r=>{let{duration:o,onClose:s,...c}=r;return i(e,{icon:!0,...c,className:t(`shadow-md`,r.className,{"pr-3":s}),children:s&&i(`div`,{className:`flex items-start pt-0.5 pl-1`,children:a(`button`,{type:`button`,className:`cursor-pointer opacity-80 transition-opacity hover:opacity-100`,onClick:s,children:[i(n,{className:`size-4.5`}),i(`span`,{className:`sr-only`,children:`Close`})]})})})};o.displayName=`AlertToast`;export{o as AlertToast};
|
package/dist/toast/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require(`./toast.cjs`);
|
|
1
|
+
const e=require(`../_virtual/rolldown_runtime.cjs`),t=require(`./toast.cjs`);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixpilot/shadcn-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"description": "Custom UI components and utilities built with shadcn/ui.",
|
|
6
6
|
"author": "m.doaie <m.doaie@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -33,19 +33,26 @@
|
|
|
33
33
|
"@iconify-json/mdi": "^1.2.3",
|
|
34
34
|
"@iconify/react": "^6.0.2",
|
|
35
35
|
"@pixpilot/hash": "^0.0.0",
|
|
36
|
+
"@tailwindcss/typography": "^0.5.19",
|
|
36
37
|
"@tanstack/react-virtual": "^3.13.12",
|
|
38
|
+
"@tiptap/core": "^3.13.0",
|
|
39
|
+
"@tiptap/react": "^3.13.0",
|
|
40
|
+
"@tiptap/starter-kit": "^3.13.0",
|
|
37
41
|
"class-variance-authority": "^0.7.1",
|
|
38
42
|
"lucide-react": "0.553.0",
|
|
39
43
|
"next-themes": "0.4.6",
|
|
44
|
+
"pretty-bytes": "^7.1.0",
|
|
40
45
|
"react-responsive": "^10.0.1",
|
|
41
46
|
"sonner": "2.0.7",
|
|
42
|
-
"@pixpilot/shadcn": "0.
|
|
47
|
+
"@pixpilot/shadcn": "0.3.0"
|
|
43
48
|
},
|
|
44
49
|
"devDependencies": {
|
|
45
50
|
"@storybook/react": "^8.5.3",
|
|
51
|
+
"@testing-library/react": "^16.3.0",
|
|
46
52
|
"@types/node": "^22.18.11",
|
|
47
53
|
"@types/react": "^19.2.2",
|
|
48
54
|
"eslint": "^9.38.0",
|
|
55
|
+
"jsdom": "^27.2.0",
|
|
49
56
|
"react": "19.2.0",
|
|
50
57
|
"react-dom": "19.2.0",
|
|
51
58
|
"tsdown": "^0.15.8",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";const e=require(`./_virtual/rolldown_runtime.cjs`);let t=require(`@pixpilot/shadcn`);t=e.__toESM(t);let n=require(`react`);n=e.__toESM(n);let r=require(`react/jsx-runtime`);r=e.__toESM(r);let i=require(`lucide-react`);i=e.__toESM(i);function a({value:e,onChange:a,buttonText:o=`Browse file`,showIcon:s=!0,showClear:c=!0,className:l,accept:u,disabled:d=!1,maxSize:f,maxFiles:p=2,multiple:m=!1,...h}){let g=n.useMemo(()=>e?Array.isArray(e)?e:[e]:[],[e]),_=n.useCallback(e=>{a&&a(m?e.length>0?e:null:e.length>0?e[0]:null)},[a,m]);return(0,r.jsxs)(t.FileUpload,{...h,value:g,onValueChange:_,accept:u,maxFiles:p,maxSize:f,disabled:d,multiple:m,className:(0,t.cn)(`space-y-2`,l),children:[(m||!m&&g.length===0)&&(0,r.jsxs)(`div`,{className:(0,t.cn)(`flex items-center gap-2 rounded-md border border-input bg-background px-3 `,`hover:bg-accent/50 transition-colors m-0`,d&&`cursor-not-allowed opacity-50`),children:[s&&(0,r.jsx)(i.FileIcon,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),(0,r.jsx)(t.FileUploadTrigger,{asChild:!0,children:(0,r.jsx)(t.Button,{variant:`link`,size:`sm`,className:`h-auto py-2 px-0 text-sm text-muted-foreground hover:no-underline justify-start flex-1`,disabled:d,children:o})})]}),g.length>0&&(0,r.jsx)(t.FileUploadList,{className:`space-y-1 m-0`,children:g.map(e=>(0,r.jsxs)(t.FileUploadItem,{value:e,className:`flex items-center gap-2 rounded-md border border-input bg-background px-3 py-2 m-0`,children:[(0,r.jsx)(t.FileUploadItemMetadata,{className:`min-w-0 flex-1`}),c&&!d&&(0,r.jsx)(t.FileUploadItemDelete,{asChild:!0,children:(0,r.jsx)(t.Button,{variant:`ghost`,size:`icon`,className:`size-7 shrink-0`,"aria-label":`Remove file`,children:(0,r.jsx)(i.XIcon,{className:`h-3.5 w-3.5`})})})]},`${e.name}-${e.size}-${e.lastModified}`))})]})}exports.FileUploadInline=a;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { FileUploadProps } from "@pixpilot/shadcn";
|
|
2
|
-
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
//#region src/FileUploadInline.d.ts
|
|
5
|
-
interface FileUploadInlineProps extends Omit<FileUploadProps, 'value'> {
|
|
6
|
-
/**
|
|
7
|
-
* The current file value (single file or array)
|
|
8
|
-
*/
|
|
9
|
-
value?: File | File[] | null;
|
|
10
|
-
/**
|
|
11
|
-
* Callback when file changes
|
|
12
|
-
*/
|
|
13
|
-
onChange?: (file: File | File[] | null) => void;
|
|
14
|
-
/**
|
|
15
|
-
* Button text when no file is selected
|
|
16
|
-
*/
|
|
17
|
-
buttonText?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Show file icon
|
|
20
|
-
*/
|
|
21
|
-
showIcon?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Whether to show a clear button when a file is selected
|
|
24
|
-
*/
|
|
25
|
-
showClear?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Custom class name for the container
|
|
28
|
-
*/
|
|
29
|
-
className?: string;
|
|
30
|
-
/**
|
|
31
|
-
* Accepted file types
|
|
32
|
-
*/
|
|
33
|
-
accept?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Whether the input is disabled
|
|
36
|
-
*/
|
|
37
|
-
disabled?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Maximum file size in bytes
|
|
40
|
-
*/
|
|
41
|
-
maxSize?: number;
|
|
42
|
-
/**
|
|
43
|
-
* Maximum number of files (for multiple uploads)
|
|
44
|
-
*/
|
|
45
|
-
maxFiles?: number;
|
|
46
|
-
/**
|
|
47
|
-
* Allow multiple file selection
|
|
48
|
-
*/
|
|
49
|
-
multiple?: boolean;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* FileUploadInline - An inline file upload component using FileUpload primitives
|
|
53
|
-
*
|
|
54
|
-
* Features:
|
|
55
|
-
* - Shows a "Browse file" or custom button text
|
|
56
|
-
* - Displays selected filename with truncation
|
|
57
|
-
* - Uses FileUpload component primitives for proper file handling
|
|
58
|
-
* - Clean inline design
|
|
59
|
-
*/
|
|
60
|
-
declare function FileUploadInline({
|
|
61
|
-
value,
|
|
62
|
-
onChange,
|
|
63
|
-
buttonText,
|
|
64
|
-
showIcon,
|
|
65
|
-
showClear,
|
|
66
|
-
className,
|
|
67
|
-
accept,
|
|
68
|
-
disabled,
|
|
69
|
-
maxSize,
|
|
70
|
-
maxFiles,
|
|
71
|
-
multiple,
|
|
72
|
-
...rest
|
|
73
|
-
}: FileUploadInlineProps): react_jsx_runtime3.JSX.Element;
|
|
74
|
-
//#endregion
|
|
75
|
-
export { FileUploadInline, FileUploadInlineProps };
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { FileUploadProps } from "@pixpilot/shadcn";
|
|
2
|
-
import * as react_jsx_runtime3 from "react/jsx-runtime";
|
|
3
|
-
|
|
4
|
-
//#region src/FileUploadInline.d.ts
|
|
5
|
-
interface FileUploadInlineProps extends Omit<FileUploadProps, 'value'> {
|
|
6
|
-
/**
|
|
7
|
-
* The current file value (single file or array)
|
|
8
|
-
*/
|
|
9
|
-
value?: File | File[] | null;
|
|
10
|
-
/**
|
|
11
|
-
* Callback when file changes
|
|
12
|
-
*/
|
|
13
|
-
onChange?: (file: File | File[] | null) => void;
|
|
14
|
-
/**
|
|
15
|
-
* Button text when no file is selected
|
|
16
|
-
*/
|
|
17
|
-
buttonText?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Show file icon
|
|
20
|
-
*/
|
|
21
|
-
showIcon?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Whether to show a clear button when a file is selected
|
|
24
|
-
*/
|
|
25
|
-
showClear?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Custom class name for the container
|
|
28
|
-
*/
|
|
29
|
-
className?: string;
|
|
30
|
-
/**
|
|
31
|
-
* Accepted file types
|
|
32
|
-
*/
|
|
33
|
-
accept?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Whether the input is disabled
|
|
36
|
-
*/
|
|
37
|
-
disabled?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Maximum file size in bytes
|
|
40
|
-
*/
|
|
41
|
-
maxSize?: number;
|
|
42
|
-
/**
|
|
43
|
-
* Maximum number of files (for multiple uploads)
|
|
44
|
-
*/
|
|
45
|
-
maxFiles?: number;
|
|
46
|
-
/**
|
|
47
|
-
* Allow multiple file selection
|
|
48
|
-
*/
|
|
49
|
-
multiple?: boolean;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* FileUploadInline - An inline file upload component using FileUpload primitives
|
|
53
|
-
*
|
|
54
|
-
* Features:
|
|
55
|
-
* - Shows a "Browse file" or custom button text
|
|
56
|
-
* - Displays selected filename with truncation
|
|
57
|
-
* - Uses FileUpload component primitives for proper file handling
|
|
58
|
-
* - Clean inline design
|
|
59
|
-
*/
|
|
60
|
-
declare function FileUploadInline({
|
|
61
|
-
value,
|
|
62
|
-
onChange,
|
|
63
|
-
buttonText,
|
|
64
|
-
showIcon,
|
|
65
|
-
showClear,
|
|
66
|
-
className,
|
|
67
|
-
accept,
|
|
68
|
-
disabled,
|
|
69
|
-
maxSize,
|
|
70
|
-
maxFiles,
|
|
71
|
-
multiple,
|
|
72
|
-
...rest
|
|
73
|
-
}: FileUploadInlineProps): react_jsx_runtime3.JSX.Element;
|
|
74
|
-
//#endregion
|
|
75
|
-
export { FileUploadInline, FileUploadInlineProps };
|
package/dist/FileUploadInline.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{Button as e,FileUpload as t,FileUploadItem as n,FileUploadItemDelete as r,FileUploadItemMetadata as i,FileUploadList as a,FileUploadTrigger as o,cn as s}from"@pixpilot/shadcn";import*as c from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import{FileIcon as d,XIcon as f}from"lucide-react";function p({value:p,onChange:m,buttonText:h=`Browse file`,showIcon:g=!0,showClear:_=!0,className:v,accept:y,disabled:b=!1,maxSize:x,maxFiles:S=2,multiple:C=!1,...w}){let T=c.useMemo(()=>p?Array.isArray(p)?p:[p]:[],[p]),E=c.useCallback(e=>{m&&m(C?e.length>0?e:null:e.length>0?e[0]:null)},[m,C]);return u(t,{...w,value:T,onValueChange:E,accept:y,maxFiles:S,maxSize:x,disabled:b,multiple:C,className:s(`space-y-2`,v),children:[(C||!C&&T.length===0)&&u(`div`,{className:s(`flex items-center gap-2 rounded-md border border-input bg-background px-3 `,`hover:bg-accent/50 transition-colors m-0`,b&&`cursor-not-allowed opacity-50`),children:[g&&l(d,{className:`h-4 w-4 shrink-0 text-muted-foreground`}),l(o,{asChild:!0,children:l(e,{variant:`link`,size:`sm`,className:`h-auto py-2 px-0 text-sm text-muted-foreground hover:no-underline justify-start flex-1`,disabled:b,children:h})})]}),T.length>0&&l(a,{className:`space-y-1 m-0`,children:T.map(t=>u(n,{value:t,className:`flex items-center gap-2 rounded-md border border-input bg-background px-3 py-2 m-0`,children:[l(i,{className:`min-w-0 flex-1`}),_&&!b&&l(r,{asChild:!0,children:l(e,{variant:`ghost`,size:`icon`,className:`size-7 shrink-0`,"aria-label":`Remove file`,children:l(f,{className:`h-3.5 w-3.5`})})})]},`${t.name}-${t.size}-${t.lastModified}`))})]})}export{p as FileUploadInline};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`../_virtual/rolldown_runtime.cjs`);let t=require(`@pixpilot/shadcn`);t=e.__toESM(t);let n=require(`react`);n=e.__toESM(n);let r=require(`react/jsx-runtime`);r=e.__toESM(r);let i=require(`lucide-react`);i=e.__toESM(i);const a=({page:e,totalPages:n,onPageChange:a,maxVisiblePages:o=6,variant:s=`full`,showPageInfo:c=!1,className:l})=>{if(n<=1)return null;let u=e=>t=>{t.preventDefault(),a(t,e)},d=(()=>{let t=[];if(n<=o){for(let e=1;e<=n;e++)t.push(e);return t}let r=n,i=e<=o-1,a=e>=n-(o-2);if(i){for(let e=1;e<o;e++)t.push(e);t.push(`ellipsis-end`),t.push(r)}else if(a){t.push(1),t.push(`ellipsis-start`);for(let e=n-(o-2);e<=n;e++)t.push(e)}else{let n=o-2;t.push(1),t.push(`ellipsis-start`);let i=e-Math.floor(n/2),a=i+n-1;i=Math.max(2,i),a=Math.min(r-1,a),a-i+1<n&&(i===2?a=i+n-1:i=a-n+1);for(let e=i;e<=a;e++)t.push(e);t.push(`ellipsis-end`),t.push(r)}return t})();return s===`compact`?(0,r.jsx)(t.Pagination,{className:l,children:(0,r.jsxs)(t.PaginationContent,{children:[(0,r.jsx)(t.PaginationItem,{children:(0,r.jsx)(t.PaginationLink,{onClick:u(1),"aria-label":`Go to first page`,className:`gap-1 px-2`,children:(0,r.jsx)(i.ChevronsLeft,{className:`h-4 w-4`})})}),(0,r.jsx)(t.PaginationItem,{children:(0,r.jsx)(t.PaginationPrevious,{onClick:u(Math.max(1,e-1))})}),(0,r.jsx)(t.PaginationItem,{children:(0,r.jsxs)(`span`,{className:`flex h-9 items-center justify-center px-4 text-sm font-medium`,children:[e,`/`,n]})}),(0,r.jsx)(t.PaginationItem,{children:(0,r.jsx)(t.PaginationNext,{onClick:u(Math.min(n,e+1))})}),(0,r.jsx)(t.PaginationItem,{children:(0,r.jsx)(t.PaginationLink,{onClick:u(n),"aria-label":`Go to last page`,className:`gap-1 px-2`,children:(0,r.jsx)(i.ChevronsRight,{className:`h-4 w-4`})})})]})}):s===`simple`?(0,r.jsxs)(`div`,{className:`flex items-center justify-center gap-4 ${l??``}`,children:[c&&(0,r.jsxs)(`span`,{className:`text-sm whitespace-nowrap`,children:[`Page `,e,` of `,n]}),(0,r.jsx)(t.Pagination,{children:(0,r.jsxs)(t.PaginationContent,{children:[(0,r.jsx)(t.PaginationItem,{children:(0,r.jsx)(t.PaginationPrevious,{onClick:u(Math.max(1,e-1))})}),(0,r.jsx)(t.PaginationItem,{children:(0,r.jsx)(t.PaginationNext,{onClick:u(Math.min(n,e+1))})})]})})]}):(0,r.jsxs)(`div`,{className:`flex items-center justify-center gap-4 ${l??``}`,children:[c&&(0,r.jsxs)(`span`,{className:`text-sm whitespace-nowrap`,children:[`Page `,e,` of `,n]}),(0,r.jsx)(t.Pagination,{children:(0,r.jsxs)(t.PaginationContent,{children:[(0,r.jsx)(t.PaginationItem,{children:(0,r.jsx)(t.PaginationPrevious,{onClick:u(Math.max(1,e-1))})}),d.map(n=>typeof n==`string`?(0,r.jsx)(t.PaginationItem,{children:(0,r.jsx)(t.PaginationEllipsis,{})},n):(0,r.jsx)(t.PaginationItem,{children:(0,r.jsx)(t.PaginationLink,{onClick:u(n),isActive:n===e,children:n})},n)),(0,r.jsx)(t.PaginationItem,{children:(0,r.jsx)(t.PaginationNext,{onClick:u(Math.min(n,e+1))})})]})})]})};exports.Pagination=a;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Pagination as e,PaginationContent as t,PaginationEllipsis as n,PaginationItem as r,PaginationLink as i,PaginationNext as a,PaginationPrevious as o}from"@pixpilot/shadcn";import s from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";import{ChevronsLeft as u,ChevronsRight as d}from"lucide-react";const f=({page:s,totalPages:f,onPageChange:p,maxVisiblePages:m=6,variant:h=`full`,showPageInfo:g=!1,className:_})=>{if(f<=1)return null;let v=e=>t=>{t.preventDefault(),p(t,e)},y=(()=>{let e=[];if(f<=m){for(let t=1;t<=f;t++)e.push(t);return e}let t=f,n=s<=m-1,r=s>=f-(m-2);if(n){for(let t=1;t<m;t++)e.push(t);e.push(`ellipsis-end`),e.push(t)}else if(r){e.push(1),e.push(`ellipsis-start`);for(let t=f-(m-2);t<=f;t++)e.push(t)}else{let n=m-2;e.push(1),e.push(`ellipsis-start`);let r=s-Math.floor(n/2),i=r+n-1;r=Math.max(2,r),i=Math.min(t-1,i),i-r+1<n&&(r===2?i=r+n-1:r=i-n+1);for(let t=r;t<=i;t++)e.push(t);e.push(`ellipsis-end`),e.push(t)}return e})();return h===`compact`?c(e,{className:_,children:l(t,{children:[c(r,{children:c(i,{onClick:v(1),"aria-label":`Go to first page`,className:`gap-1 px-2`,children:c(u,{className:`h-4 w-4`})})}),c(r,{children:c(o,{onClick:v(Math.max(1,s-1))})}),c(r,{children:l(`span`,{className:`flex h-9 items-center justify-center px-4 text-sm font-medium`,children:[s,`/`,f]})}),c(r,{children:c(a,{onClick:v(Math.min(f,s+1))})}),c(r,{children:c(i,{onClick:v(f),"aria-label":`Go to last page`,className:`gap-1 px-2`,children:c(d,{className:`h-4 w-4`})})})]})}):h===`simple`?l(`div`,{className:`flex items-center justify-center gap-4 ${_??``}`,children:[g&&l(`span`,{className:`text-sm whitespace-nowrap`,children:[`Page `,s,` of `,f]}),c(e,{children:l(t,{children:[c(r,{children:c(o,{onClick:v(Math.max(1,s-1))})}),c(r,{children:c(a,{onClick:v(Math.min(f,s+1))})})]})})]}):l(`div`,{className:`flex items-center justify-center gap-4 ${_??``}`,children:[g&&l(`span`,{className:`text-sm whitespace-nowrap`,children:[`Page `,s,` of `,f]}),c(e,{children:l(t,{children:[c(r,{children:c(o,{onClick:v(Math.max(1,s-1))})}),y.map(e=>typeof e==`string`?c(r,{children:c(n,{})},e):c(r,{children:c(i,{onClick:v(e),isActive:e===s,children:e})},e)),c(r,{children:c(a,{onClick:v(Math.min(f,s+1))})})]})})]})};export{f as Pagination};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./Pagination.cjs`);
|
package/dist/PopoverContent.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require(`./_virtual/rolldown_runtime.cjs`);let t=require(`@pixpilot/shadcn`);t=e.__toESM(t);let n=require(`react`);n=e.__toESM(n);let r=require(`react/jsx-runtime`);r=e.__toESM(r);const i=e=>(0,r.jsx)(t.PopoverContent,{...e,className:`w-auto max-w-[100vw] border-0 bg-transparent p-0 sm:max-w-[calc(100vw-2rem)]`});i.displayName=`PopoverContent`,exports.PopoverContent=i;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PopoverContent } from "@pixpilot/shadcn";
|
|
2
|
-
import React from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/PopoverContent.d.ts
|
|
5
|
-
interface PopoverContentProps extends React.ComponentProps<typeof PopoverContent> {}
|
|
6
|
-
declare const PopoverContent$1: React.FC<PopoverContentProps>;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { PopoverContent$1 as PopoverContent, PopoverContentProps };
|
package/dist/PopoverContent.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PopoverContent } from "@pixpilot/shadcn";
|
|
2
|
-
import React from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/PopoverContent.d.ts
|
|
5
|
-
interface PopoverContentProps extends React.ComponentProps<typeof PopoverContent> {}
|
|
6
|
-
declare const PopoverContent$1: React.FC<PopoverContentProps>;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { PopoverContent$1 as PopoverContent, PopoverContentProps };
|
package/dist/PopoverContent.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{PopoverContent as e}from"@pixpilot/shadcn";import t from"react";import{jsx as n}from"react/jsx-runtime";const r=t=>n(e,{...t,className:`w-auto max-w-[100vw] border-0 bg-transparent p-0 sm:max-w-[calc(100vw-2rem)]`});r.displayName=`PopoverContent`;export{r as PopoverContent};
|