@cerberus-design/react 0.25.0-rc.7 → 0.25.1-rc.1
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/components/combobox/combobox.cjs +1 -2
- package/dist/components/combobox/combobox.d.cts +1 -3
- package/dist/components/combobox/combobox.d.ts +1 -3
- package/dist/components/combobox/combobox.js +1 -2
- package/dist/components/cta-dialog/provider.cjs +3 -1
- package/dist/components/cta-dialog/provider.d.cts +2 -1
- package/dist/components/cta-dialog/provider.d.ts +2 -1
- package/dist/components/cta-dialog/provider.js +3 -1
- package/dist/components/date-picker/calendar.cjs +3 -1
- package/dist/components/date-picker/calendar.d.cts +4 -8
- package/dist/components/date-picker/calendar.d.ts +4 -8
- package/dist/components/date-picker/calendar.js +3 -1
- package/dist/components/date-picker/content.cjs +1 -3
- package/dist/components/date-picker/content.d.cts +1 -2
- package/dist/components/date-picker/content.d.ts +1 -2
- package/dist/components/date-picker/content.js +1 -3
- package/dist/components/date-picker/date-picker.cjs +47 -2
- package/dist/components/date-picker/date-picker.d.cts +1 -6
- package/dist/components/date-picker/date-picker.d.ts +1 -6
- package/dist/components/date-picker/date-picker.js +47 -2
- package/dist/components/date-picker/index.cjs +3 -3
- package/dist/components/date-picker/index.js +3 -3
- package/dist/components/date-picker/input.cjs +1 -1
- package/dist/components/date-picker/input.js +1 -1
- package/dist/components/date-picker/primitives.cjs +4 -1
- package/dist/components/date-picker/primitives.d.cts +1 -4
- package/dist/components/date-picker/primitives.d.ts +1 -4
- package/dist/components/date-picker/primitives.js +4 -1
- package/dist/components/date-picker/range-input.cjs +2 -2
- package/dist/components/date-picker/range-input.js +2 -2
- package/dist/components/field/status-indicator.cjs +1 -2
- package/dist/components/field/status-indicator.d.cts +1 -1
- package/dist/components/field/status-indicator.d.ts +1 -1
- package/dist/components/field/status-indicator.js +1 -2
- package/dist/components/file-upload/file-status.cjs +26 -43
- package/dist/components/file-upload/file-status.js +27 -44
- package/dist/components/file-upload/file-uploader.cjs +21 -47
- package/dist/components/file-upload/file-uploader.d.cts +7 -10
- package/dist/components/file-upload/file-uploader.d.ts +7 -10
- package/dist/components/file-upload/file-uploader.js +22 -48
- package/dist/components/file-upload/helpers.cjs +17 -0
- package/dist/components/file-upload/helpers.d.cts +16 -0
- package/dist/components/file-upload/helpers.d.ts +16 -0
- package/dist/components/file-upload/helpers.js +13 -0
- package/dist/components/file-upload/img-preview.cjs +30 -0
- package/dist/components/file-upload/img-preview.d.cts +2 -0
- package/dist/components/file-upload/img-preview.d.ts +2 -0
- package/dist/components/file-upload/img-preview.js +26 -0
- package/dist/components/file-upload/index.cjs +24 -0
- package/dist/components/file-upload/index.d.cts +4 -0
- package/dist/components/file-upload/index.d.ts +4 -0
- package/dist/components/file-upload/index.js +4 -0
- package/dist/components/file-upload/parts.cjs +28 -0
- package/dist/components/file-upload/parts.d.cts +86 -0
- package/dist/components/file-upload/parts.d.ts +86 -0
- package/dist/components/file-upload/parts.js +24 -0
- package/dist/components/file-upload/primitives.cjs +81 -0
- package/dist/components/file-upload/primitives.d.cts +45 -0
- package/dist/components/file-upload/primitives.d.ts +45 -0
- package/dist/components/file-upload/primitives.js +61 -0
- package/dist/components/file-upload/utils.cjs +18 -0
- package/dist/components/file-upload/utils.d.cts +7 -0
- package/dist/components/file-upload/utils.d.ts +7 -0
- package/dist/components/file-upload/utils.js +14 -0
- package/dist/components/select/select.cjs +6 -3
- package/dist/components/select/select.d.cts +1 -3
- package/dist/components/select/select.d.ts +1 -3
- package/dist/components/select/select.js +6 -3
- package/dist/context/confirm-modal.cjs +3 -1
- package/dist/context/confirm-modal.d.cts +2 -1
- package/dist/context/confirm-modal.d.ts +2 -1
- package/dist/context/confirm-modal.js +3 -1
- package/dist/context/prompt-modal.cjs +4 -2
- package/dist/context/prompt-modal.d.cts +2 -1
- package/dist/context/prompt-modal.d.ts +2 -1
- package/dist/context/prompt-modal.js +5 -3
- package/dist/index.cjs +163 -131
- package/dist/index.client.d.cts +1 -1
- package/dist/index.client.d.ts +1 -1
- package/dist/index.js +8 -4
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-clear-trigger.cjs +19 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-clear-trigger.js +15 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-context.cjs +10 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-context.js +6 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-dropzone.cjs +22 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-dropzone.js +18 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-hidden-input.cjs +21 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-hidden-input.js +17 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-delete-trigger.cjs +23 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-delete-trigger.js +19 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-group.cjs +23 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-group.js +19 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-name.cjs +22 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-name.js +18 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-preview-image.cjs +28 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-preview-image.js +24 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-preview.cjs +22 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-preview.js +18 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-size-text.cjs +22 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item-size-text.js +18 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item.cjs +26 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-item.js +22 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-label.cjs +19 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-label.js +15 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-root.cjs +47 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-root.js +43 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-trigger.cjs +19 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/file-upload-trigger.js +15 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/use-file-upload-context.cjs +15 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/use-file-upload-context.js +10 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/use-file-upload-item-group-props-context.cjs +15 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/use-file-upload-item-group-props-context.js +10 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/use-file-upload-item-props-context.cjs +15 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/use-file-upload-item-props-context.js +10 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/use-file-upload.cjs +36 -0
- package/dist/node_modules/.pnpm/@ark-ui_react@5.30.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@ark-ui/react/dist/components/file-upload/use-file-upload.js +32 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.0/node_modules/@internationalized/date/src/CalendarDate.js +3 -3
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.0/node_modules/@internationalized/date/src/conversion.js +1 -1
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.0/node_modules/@internationalized/date/src/queries.js +1 -1
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/CalendarDate.cjs +218 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/CalendarDate.js +212 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/DateFormatter.cjs +135 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/DateFormatter.js +131 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/calendars/GregorianCalendar.cjs +101 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/calendars/GregorianCalendar.js +93 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/conversion.cjs +200 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/conversion.js +186 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/manipulation.cjs +352 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/manipulation.js +336 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/queries.cjs +39 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/queries.js +30 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/string.cjs +44 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/string.js +37 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/utils.cjs +10 -0
- package/dist/node_modules/.pnpm/@internationalized_date@3.10.1/node_modules/@internationalized/date/src/utils.js +6 -0
- package/dist/node_modules/.pnpm/@zag-js_file-upload@1.31.1/node_modules/@zag-js/file-upload/dist/index.cjs +649 -0
- package/dist/node_modules/.pnpm/@zag-js_file-upload@1.31.1/node_modules/@zag-js/file-upload/dist/index.js +643 -0
- package/dist/node_modules/.pnpm/@zag-js_file-utils@1.31.1/node_modules/@zag-js/file-utils/dist/index.cjs +147 -0
- package/dist/node_modules/.pnpm/@zag-js_file-utils@1.31.1/node_modules/@zag-js/file-utils/dist/index.js +138 -0
- package/dist/node_modules/.pnpm/@zag-js_i18n-utils@1.31.1/node_modules/@zag-js/i18n-utils/dist/index.cjs +53 -0
- package/dist/node_modules/.pnpm/@zag-js_i18n-utils@1.31.1/node_modules/@zag-js/i18n-utils/dist/index.js +48 -0
- package/dist/node_modules/.pnpm/@zag-js_utils@1.31.1/node_modules/@zag-js/utils/dist/index.cjs +9 -0
- package/dist/node_modules/.pnpm/@zag-js_utils@1.31.1/node_modules/@zag-js/utils/dist/index.js +9 -1
- package/package.json +7 -7
- package/src/components/combobox/combobox.tsx +7 -13
- package/src/components/cta-dialog/provider.tsx +8 -3
- package/src/components/date-picker/calendar.tsx +10 -9
- package/src/components/date-picker/content.tsx +4 -11
- package/src/components/date-picker/date-picker.tsx +55 -18
- package/src/components/date-picker/input.tsx +1 -1
- package/src/components/date-picker/primitives.tsx +4 -1
- package/src/components/date-picker/range-input.tsx +2 -2
- package/src/components/field/status-indicator.tsx +2 -5
- package/src/components/file-upload/file-status.tsx +14 -21
- package/src/components/file-upload/file-uploader.tsx +37 -49
- package/src/components/file-upload/helpers.ts +28 -0
- package/src/components/file-upload/img-preview.tsx +41 -0
- package/src/components/file-upload/index.ts +4 -0
- package/src/components/file-upload/parts.tsx +126 -0
- package/src/components/file-upload/primitives.ts +156 -0
- package/src/components/file-upload/utils.ts +20 -0
- package/src/components/select/select.tsx +11 -12
- package/src/context/confirm-modal.tsx +7 -2
- package/src/context/prompt-modal.tsx +9 -4
- package/src/index.client.ts +2 -0
|
@@ -5,14 +5,16 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
const React = require('react');
|
|
8
|
-
const
|
|
8
|
+
const jsx = require('styled-system/jsx');
|
|
9
9
|
const css = require('styled-system/css');
|
|
10
10
|
const patterns = require('styled-system/patterns');
|
|
11
|
+
const recipes = require('styled-system/recipes');
|
|
11
12
|
const cerberus = require('../../context/cerberus.cjs');
|
|
12
|
-
const progressBar = require('../progress/progress-bar.cjs');
|
|
13
13
|
const avatar = require('../avatar/avatar.cjs');
|
|
14
14
|
const field = require('../field/field.cjs');
|
|
15
15
|
const primitives = require('../field/primitives.cjs');
|
|
16
|
+
const progressBar = require('../progress/progress-bar.cjs');
|
|
17
|
+
const text = require('../text/text.cjs');
|
|
16
18
|
const button = require('../icon-button/button.cjs');
|
|
17
19
|
|
|
18
20
|
var processStatus = /* @__PURE__ */ ((processStatus2) => {
|
|
@@ -63,47 +65,28 @@ function FileStatus(props) {
|
|
|
63
65
|
fallback: /* @__PURE__ */ jsxRuntime.jsx(MatchFileStatusIcon, { size: 24, status })
|
|
64
66
|
}
|
|
65
67
|
),
|
|
66
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
67
|
-
"
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
)
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
id: props.id,
|
|
89
|
-
label: "File upload status",
|
|
90
|
-
now,
|
|
91
|
-
size: "sm"
|
|
92
|
-
}
|
|
93
|
-
),
|
|
94
|
-
/* @__PURE__ */ jsxRuntime.jsx(field.Field, { label: "", invalid: modalIconPalette === "hades-dark", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
95
|
-
primitives.FieldHelperText,
|
|
96
|
-
{
|
|
97
|
-
className: css.css({
|
|
98
|
-
color: "page.text.100"
|
|
99
|
-
}),
|
|
100
|
-
id: `help:${file}`,
|
|
101
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(MatchFileStatusText, { status, now })
|
|
102
|
-
}
|
|
103
|
-
) })
|
|
104
|
-
]
|
|
105
|
-
}
|
|
106
|
-
),
|
|
68
|
+
/* @__PURE__ */ jsxRuntime.jsxs(jsx.VStack, { alignItems: "flex-start", gap: "0.12rem", w: "full", children: [
|
|
69
|
+
/* @__PURE__ */ jsxRuntime.jsx(text.Text, { as: "small", color: "page.text.initial", textStyle: "label-sm", children: file }),
|
|
70
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
71
|
+
progressBar.ProgressBar,
|
|
72
|
+
{
|
|
73
|
+
id: props.id,
|
|
74
|
+
label: "File upload status",
|
|
75
|
+
now,
|
|
76
|
+
size: "sm"
|
|
77
|
+
}
|
|
78
|
+
),
|
|
79
|
+
/* @__PURE__ */ jsxRuntime.jsx(field.Field, { label: "", invalid: modalIconPalette === "hades-dark", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
80
|
+
primitives.FieldHelperText,
|
|
81
|
+
{
|
|
82
|
+
className: css.css({
|
|
83
|
+
color: "page.text.100"
|
|
84
|
+
}),
|
|
85
|
+
id: `help:${file}`,
|
|
86
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(MatchFileStatusText, { status, now })
|
|
87
|
+
}
|
|
88
|
+
) })
|
|
89
|
+
] }),
|
|
107
90
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
108
91
|
button.IconButton,
|
|
109
92
|
{
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useMemo, useCallback } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { VStack } from 'styled-system/jsx';
|
|
5
5
|
import { cx, css } from 'styled-system/css';
|
|
6
|
-
import {
|
|
6
|
+
import { hstack } from 'styled-system/patterns';
|
|
7
|
+
import { fileStatus } from 'styled-system/recipes';
|
|
7
8
|
import { useCerberusContext } from '../../context/cerberus.js';
|
|
8
|
-
import { ProgressBar } from '../progress/progress-bar.js';
|
|
9
9
|
import { Avatar } from '../avatar/avatar.js';
|
|
10
10
|
import { Field } from '../field/field.js';
|
|
11
11
|
import { FieldHelperText } from '../field/primitives.js';
|
|
12
|
+
import { ProgressBar } from '../progress/progress-bar.js';
|
|
13
|
+
import { Text } from '../text/text.js';
|
|
12
14
|
import { IconButton } from '../icon-button/button.js';
|
|
13
15
|
|
|
14
16
|
var processStatus = /* @__PURE__ */ ((processStatus2) => {
|
|
@@ -59,47 +61,28 @@ function FileStatus(props) {
|
|
|
59
61
|
fallback: /* @__PURE__ */ jsx(MatchFileStatusIcon, { size: 24, status })
|
|
60
62
|
}
|
|
61
63
|
),
|
|
62
|
-
/* @__PURE__ */ jsxs(
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
)
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
id: props.id,
|
|
85
|
-
label: "File upload status",
|
|
86
|
-
now,
|
|
87
|
-
size: "sm"
|
|
88
|
-
}
|
|
89
|
-
),
|
|
90
|
-
/* @__PURE__ */ jsx(Field, { label: "", invalid: modalIconPalette === "hades-dark", children: /* @__PURE__ */ jsx(
|
|
91
|
-
FieldHelperText,
|
|
92
|
-
{
|
|
93
|
-
className: css({
|
|
94
|
-
color: "page.text.100"
|
|
95
|
-
}),
|
|
96
|
-
id: `help:${file}`,
|
|
97
|
-
children: /* @__PURE__ */ jsx(MatchFileStatusText, { status, now })
|
|
98
|
-
}
|
|
99
|
-
) })
|
|
100
|
-
]
|
|
101
|
-
}
|
|
102
|
-
),
|
|
64
|
+
/* @__PURE__ */ jsxs(VStack, { alignItems: "flex-start", gap: "0.12rem", w: "full", children: [
|
|
65
|
+
/* @__PURE__ */ jsx(Text, { as: "small", color: "page.text.initial", textStyle: "label-sm", children: file }),
|
|
66
|
+
/* @__PURE__ */ jsx(
|
|
67
|
+
ProgressBar,
|
|
68
|
+
{
|
|
69
|
+
id: props.id,
|
|
70
|
+
label: "File upload status",
|
|
71
|
+
now,
|
|
72
|
+
size: "sm"
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
/* @__PURE__ */ jsx(Field, { label: "", invalid: modalIconPalette === "hades-dark", children: /* @__PURE__ */ jsx(
|
|
76
|
+
FieldHelperText,
|
|
77
|
+
{
|
|
78
|
+
className: css({
|
|
79
|
+
color: "page.text.100"
|
|
80
|
+
}),
|
|
81
|
+
id: `help:${file}`,
|
|
82
|
+
children: /* @__PURE__ */ jsx(MatchFileStatusText, { status, now })
|
|
83
|
+
}
|
|
84
|
+
) })
|
|
85
|
+
] }),
|
|
103
86
|
/* @__PURE__ */ jsx(
|
|
104
87
|
IconButton,
|
|
105
88
|
{
|
|
@@ -4,59 +4,33 @@
|
|
|
4
4
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
5
|
|
|
6
6
|
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
-
const css = require('styled-system/css');
|
|
8
|
-
const patterns = require('styled-system/patterns');
|
|
9
|
-
const recipes = require('styled-system/recipes');
|
|
10
|
-
const show = require('../show/show.cjs');
|
|
11
7
|
const cerberus = require('../../context/cerberus.cjs');
|
|
8
|
+
const index = require('../../utils/index.cjs');
|
|
9
|
+
const show = require('../show/show.cjs');
|
|
12
10
|
const avatar = require('../avatar/avatar.cjs');
|
|
11
|
+
const utils = require('./utils.cjs');
|
|
12
|
+
const imgPreview = require('./img-preview.cjs');
|
|
13
|
+
const parts = require('./parts.cjs');
|
|
13
14
|
|
|
14
15
|
function FileUploader(props) {
|
|
16
|
+
const [elProps, rootProps] = index.splitProps(props, ["heading", "showPreview"]);
|
|
17
|
+
const { showPreview = true } = elProps;
|
|
15
18
|
const { icons } = cerberus.useCerberusContext();
|
|
16
|
-
const styles = recipes.fileUploader();
|
|
17
19
|
const { waitingFileUploader: Icon } = icons;
|
|
18
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
{
|
|
33
|
-
className: css.cx(
|
|
34
|
-
patterns.vstack({
|
|
35
|
-
justify: "center"
|
|
36
|
-
}),
|
|
37
|
-
styles.label
|
|
38
|
-
),
|
|
39
|
-
htmlFor: props.name,
|
|
40
|
-
children: [
|
|
41
|
-
/* @__PURE__ */ jsxRuntime.jsx(show.Show, { when: props.heading, children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: styles.heading, children: props.heading }) }),
|
|
42
|
-
"Import ",
|
|
43
|
-
props.accept?.replace(",", ", "),
|
|
44
|
-
" files",
|
|
45
|
-
/* @__PURE__ */ jsxRuntime.jsx("p", { className: styles.description, children: "Click to select files" }),
|
|
46
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
47
|
-
"input",
|
|
48
|
-
{
|
|
49
|
-
...props,
|
|
50
|
-
className: css.cx(props.className, styles.input),
|
|
51
|
-
type: "file"
|
|
52
|
-
}
|
|
53
|
-
)
|
|
54
|
-
]
|
|
55
|
-
}
|
|
56
|
-
)
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
);
|
|
20
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(parts.FileUploadParts.Root, { ...rootProps, children: [
|
|
21
|
+
/* @__PURE__ */ jsxRuntime.jsxs(parts.FileUploadParts.Dropzone, { children: [
|
|
22
|
+
/* @__PURE__ */ jsxRuntime.jsx(parts.FileUploadParts.Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(avatar.Avatar, { gradient: "charon-light", fallback: /* @__PURE__ */ jsxRuntime.jsx(Icon, {}) }) }),
|
|
23
|
+
/* @__PURE__ */ jsxRuntime.jsxs(parts.FileUploadParts.Label, { children: [
|
|
24
|
+
/* @__PURE__ */ jsxRuntime.jsx(show.Show, { when: elProps.heading, children: /* @__PURE__ */ jsxRuntime.jsx(parts.FileUploadParts.Heading, { children: elProps.heading }) }),
|
|
25
|
+
"Import ",
|
|
26
|
+
utils.formatFileTypes(rootProps.accept),
|
|
27
|
+
" files",
|
|
28
|
+
/* @__PURE__ */ jsxRuntime.jsx(parts.FileUploadParts.Description, { children: "Drag and drop files or click to upload" })
|
|
29
|
+
] })
|
|
30
|
+
] }),
|
|
31
|
+
/* @__PURE__ */ jsxRuntime.jsx(show.Show, { when: showPreview, fallback: /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: props.children }), children: () => /* @__PURE__ */ jsxRuntime.jsx(imgPreview.ImgPreview, {}) }),
|
|
32
|
+
/* @__PURE__ */ jsxRuntime.jsx(parts.FileUploadParts.HiddenInput, {})
|
|
33
|
+
] });
|
|
60
34
|
}
|
|
61
35
|
|
|
62
36
|
exports.FileUploader = FileUploader;
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { FileUploadRootProps } from './primitives';
|
|
3
|
+
export interface FileUploaderProps extends FileUploadRootProps {
|
|
3
4
|
/**
|
|
4
5
|
* The optional heading to display in the FileUploader component.
|
|
5
6
|
*/
|
|
6
7
|
heading?: string;
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
+
* Show a preview of the uploaded image.
|
|
9
10
|
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Disable the FileUploader component. Good for single-use file uploads.
|
|
13
|
-
*/
|
|
14
|
-
disabled?: boolean;
|
|
11
|
+
showPreview?: boolean;
|
|
15
12
|
}
|
|
16
13
|
/**
|
|
17
14
|
* A component that allows the user to upload files.
|
|
18
|
-
* @see https://cerberus.digitalu.design/
|
|
15
|
+
* @see https://cerberus.digitalu.design/docs/components/file-uploader
|
|
19
16
|
*/
|
|
20
|
-
export declare function FileUploader(props: FileUploaderProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function FileUploader(props: PropsWithChildren<FileUploaderProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { FileUploadRootProps } from './primitives';
|
|
3
|
+
export interface FileUploaderProps extends FileUploadRootProps {
|
|
3
4
|
/**
|
|
4
5
|
* The optional heading to display in the FileUploader component.
|
|
5
6
|
*/
|
|
6
7
|
heading?: string;
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
+
* Show a preview of the uploaded image.
|
|
9
10
|
*/
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Disable the FileUploader component. Good for single-use file uploads.
|
|
13
|
-
*/
|
|
14
|
-
disabled?: boolean;
|
|
11
|
+
showPreview?: boolean;
|
|
15
12
|
}
|
|
16
13
|
/**
|
|
17
14
|
* A component that allows the user to upload files.
|
|
18
|
-
* @see https://cerberus.digitalu.design/
|
|
15
|
+
* @see https://cerberus.digitalu.design/docs/components/file-uploader
|
|
19
16
|
*/
|
|
20
|
-
export declare function FileUploader(props: FileUploaderProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare function FileUploader(props: PropsWithChildren<FileUploaderProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,58 +1,32 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
-
import { cx } from 'styled-system/css';
|
|
4
|
-
import { vstack } from 'styled-system/patterns';
|
|
5
|
-
import { fileUploader } from 'styled-system/recipes';
|
|
6
|
-
import { Show } from '../show/show.js';
|
|
2
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
7
3
|
import { useCerberusContext } from '../../context/cerberus.js';
|
|
4
|
+
import { splitProps } from '../../utils/index.js';
|
|
5
|
+
import { Show } from '../show/show.js';
|
|
8
6
|
import { Avatar } from '../avatar/avatar.js';
|
|
7
|
+
import { formatFileTypes } from './utils.js';
|
|
8
|
+
import { ImgPreview } from './img-preview.js';
|
|
9
|
+
import { FileUploadParts } from './parts.js';
|
|
9
10
|
|
|
10
11
|
function FileUploader(props) {
|
|
12
|
+
const [elProps, rootProps] = splitProps(props, ["heading", "showPreview"]);
|
|
13
|
+
const { showPreview = true } = elProps;
|
|
11
14
|
const { icons } = useCerberusContext();
|
|
12
|
-
const styles = fileUploader();
|
|
13
15
|
const { waitingFileUploader: Icon } = icons;
|
|
14
|
-
return /* @__PURE__ */ jsxs(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
{
|
|
29
|
-
className: cx(
|
|
30
|
-
vstack({
|
|
31
|
-
justify: "center"
|
|
32
|
-
}),
|
|
33
|
-
styles.label
|
|
34
|
-
),
|
|
35
|
-
htmlFor: props.name,
|
|
36
|
-
children: [
|
|
37
|
-
/* @__PURE__ */ jsx(Show, { when: props.heading, children: /* @__PURE__ */ jsx("p", { className: styles.heading, children: props.heading }) }),
|
|
38
|
-
"Import ",
|
|
39
|
-
props.accept?.replace(",", ", "),
|
|
40
|
-
" files",
|
|
41
|
-
/* @__PURE__ */ jsx("p", { className: styles.description, children: "Click to select files" }),
|
|
42
|
-
/* @__PURE__ */ jsx(
|
|
43
|
-
"input",
|
|
44
|
-
{
|
|
45
|
-
...props,
|
|
46
|
-
className: cx(props.className, styles.input),
|
|
47
|
-
type: "file"
|
|
48
|
-
}
|
|
49
|
-
)
|
|
50
|
-
]
|
|
51
|
-
}
|
|
52
|
-
)
|
|
53
|
-
]
|
|
54
|
-
}
|
|
55
|
-
);
|
|
16
|
+
return /* @__PURE__ */ jsxs(FileUploadParts.Root, { ...rootProps, children: [
|
|
17
|
+
/* @__PURE__ */ jsxs(FileUploadParts.Dropzone, { children: [
|
|
18
|
+
/* @__PURE__ */ jsx(FileUploadParts.Icon, { children: /* @__PURE__ */ jsx(Avatar, { gradient: "charon-light", fallback: /* @__PURE__ */ jsx(Icon, {}) }) }),
|
|
19
|
+
/* @__PURE__ */ jsxs(FileUploadParts.Label, { children: [
|
|
20
|
+
/* @__PURE__ */ jsx(Show, { when: elProps.heading, children: /* @__PURE__ */ jsx(FileUploadParts.Heading, { children: elProps.heading }) }),
|
|
21
|
+
"Import ",
|
|
22
|
+
formatFileTypes(rootProps.accept),
|
|
23
|
+
" files",
|
|
24
|
+
/* @__PURE__ */ jsx(FileUploadParts.Description, { children: "Drag and drop files or click to upload" })
|
|
25
|
+
] })
|
|
26
|
+
] }),
|
|
27
|
+
/* @__PURE__ */ jsx(Show, { when: showPreview, fallback: /* @__PURE__ */ jsx(Fragment, { children: props.children }), children: () => /* @__PURE__ */ jsx(ImgPreview, {}) }),
|
|
28
|
+
/* @__PURE__ */ jsx(FileUploadParts.HiddenInput, {})
|
|
29
|
+
] });
|
|
56
30
|
}
|
|
57
31
|
|
|
58
32
|
export { FileUploader };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
function createErrorMessages(options) {
|
|
7
|
+
return {
|
|
8
|
+
TOO_MANY_FILES: options.tooMany || "📊 Too many files selected",
|
|
9
|
+
FILE_INVALID_TYPE: options.invalidType || "🚫 Invalid file type",
|
|
10
|
+
FILE_TOO_LARGE: options.tooLarge || "📏 File too large",
|
|
11
|
+
FILE_TOO_SMALL: options.tooSmall || "📐 File too small",
|
|
12
|
+
FILE_INVALID: options.invalid || "⚠️ Invalid file",
|
|
13
|
+
FILE_EXISTS: options.exists || "🔄 File already exists"
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
exports.createErrorMessages = createErrorMessages;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FileUploadFileError } from '@ark-ui/react/file-upload';
|
|
2
|
+
type FileErrorTypes = {
|
|
3
|
+
tooMany?: string;
|
|
4
|
+
invalidType?: string;
|
|
5
|
+
tooLarge?: string;
|
|
6
|
+
tooSmall?: string;
|
|
7
|
+
invalid?: string;
|
|
8
|
+
exists?: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Helper function to create error messages for file upload errors. Returns a
|
|
12
|
+
* record of FileUploadFileError codes and their corresponding error messages.
|
|
13
|
+
* @returns Record<FileUploadFileError, string>
|
|
14
|
+
*/
|
|
15
|
+
export declare function createErrorMessages(options: FileErrorTypes): Record<FileUploadFileError, string>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FileUploadFileError } from '@ark-ui/react/file-upload';
|
|
2
|
+
type FileErrorTypes = {
|
|
3
|
+
tooMany?: string;
|
|
4
|
+
invalidType?: string;
|
|
5
|
+
tooLarge?: string;
|
|
6
|
+
tooSmall?: string;
|
|
7
|
+
invalid?: string;
|
|
8
|
+
exists?: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Helper function to create error messages for file upload errors. Returns a
|
|
12
|
+
* record of FileUploadFileError codes and their corresponding error messages.
|
|
13
|
+
* @returns Record<FileUploadFileError, string>
|
|
14
|
+
*/
|
|
15
|
+
export declare function createErrorMessages(options: FileErrorTypes): Record<FileUploadFileError, string>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
function createErrorMessages(options) {
|
|
3
|
+
return {
|
|
4
|
+
TOO_MANY_FILES: options.tooMany || "📊 Too many files selected",
|
|
5
|
+
FILE_INVALID_TYPE: options.invalidType || "🚫 Invalid file type",
|
|
6
|
+
FILE_TOO_LARGE: options.tooLarge || "📏 File too large",
|
|
7
|
+
FILE_TOO_SMALL: options.tooSmall || "📐 File too small",
|
|
8
|
+
FILE_INVALID: options.invalid || "⚠️ Invalid file",
|
|
9
|
+
FILE_EXISTS: options.exists || "🔄 File already exists"
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { createErrorMessages };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
5
|
+
|
|
6
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
const cerberus = require('../../context/cerberus.cjs');
|
|
8
|
+
const parts = require('./parts.cjs');
|
|
9
|
+
const button = require('../icon-button/button.cjs');
|
|
10
|
+
|
|
11
|
+
function ImgPreview(props) {
|
|
12
|
+
const { icons } = cerberus.useCerberusContext();
|
|
13
|
+
const { close: Icon } = icons;
|
|
14
|
+
return /* @__PURE__ */ jsxRuntime.jsx(parts.FileUploadParts.ItemGroup, { children: /* @__PURE__ */ jsxRuntime.jsx(parts.FileUploadParts.Context, { ...props, children: (ctx) => ctx.acceptedFiles.map((file) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
15
|
+
parts.FileUploadParts.Item,
|
|
16
|
+
{
|
|
17
|
+
file,
|
|
18
|
+
className: "file-item",
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ jsxRuntime.jsx(parts.FileUploadParts.ItemPreview, { type: "image/*", children: /* @__PURE__ */ jsxRuntime.jsx(parts.FileUploadParts.ItemPreviewImage, {}) }),
|
|
21
|
+
/* @__PURE__ */ jsxRuntime.jsx(parts.FileUploadParts.ItemName, {}),
|
|
22
|
+
/* @__PURE__ */ jsxRuntime.jsx(parts.FileUploadParts.ItemSizeText, {}),
|
|
23
|
+
/* @__PURE__ */ jsxRuntime.jsx(parts.FileUploadParts.ItemDeleteTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(button.IconButton, { clipboard: true, size: "sm", usage: "ghost", children: /* @__PURE__ */ jsxRuntime.jsx(Icon, {}) }) })
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
file.name
|
|
27
|
+
)) }) });
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
exports.ImgPreview = ImgPreview;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
+
import { useCerberusContext } from '../../context/cerberus.js';
|
|
4
|
+
import { FileUploadParts } from './parts.js';
|
|
5
|
+
import { IconButton } from '../icon-button/button.js';
|
|
6
|
+
|
|
7
|
+
function ImgPreview(props) {
|
|
8
|
+
const { icons } = useCerberusContext();
|
|
9
|
+
const { close: Icon } = icons;
|
|
10
|
+
return /* @__PURE__ */ jsx(FileUploadParts.ItemGroup, { children: /* @__PURE__ */ jsx(FileUploadParts.Context, { ...props, children: (ctx) => ctx.acceptedFiles.map((file) => /* @__PURE__ */ jsxs(
|
|
11
|
+
FileUploadParts.Item,
|
|
12
|
+
{
|
|
13
|
+
file,
|
|
14
|
+
className: "file-item",
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ jsx(FileUploadParts.ItemPreview, { type: "image/*", children: /* @__PURE__ */ jsx(FileUploadParts.ItemPreviewImage, {}) }),
|
|
17
|
+
/* @__PURE__ */ jsx(FileUploadParts.ItemName, {}),
|
|
18
|
+
/* @__PURE__ */ jsx(FileUploadParts.ItemSizeText, {}),
|
|
19
|
+
/* @__PURE__ */ jsx(FileUploadParts.ItemDeleteTrigger, { asChild: true, children: /* @__PURE__ */ jsx(IconButton, { clipboard: true, size: "sm", usage: "ghost", children: /* @__PURE__ */ jsx(Icon, {}) }) })
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
file.name
|
|
23
|
+
)) }) });
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { ImgPreview };
|
|
@@ -2,11 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
+
const primitives = require('./primitives.cjs');
|
|
6
|
+
const parts = require('./parts.cjs');
|
|
5
7
|
const fileStatus = require('./file-status.cjs');
|
|
6
8
|
const fileUploader = require('./file-uploader.cjs');
|
|
9
|
+
const imgPreview = require('./img-preview.cjs');
|
|
10
|
+
const helpers = require('./helpers.cjs');
|
|
7
11
|
|
|
8
12
|
|
|
9
13
|
|
|
14
|
+
exports.FileUploadClearTrigger = primitives.FileUploadClearTrigger;
|
|
15
|
+
exports.FileUploadContext = primitives.FileUploadContext;
|
|
16
|
+
exports.FileUploadDescription = primitives.FileUploadDescription;
|
|
17
|
+
exports.FileUploadDropzone = primitives.FileUploadDropzone;
|
|
18
|
+
exports.FileUploadHeading = primitives.FileUploadHeading;
|
|
19
|
+
exports.FileUploadHiddenInput = primitives.FileUploadHiddenInput;
|
|
20
|
+
exports.FileUploadIcon = primitives.FileUploadIcon;
|
|
21
|
+
exports.FileUploadItem = primitives.FileUploadItem;
|
|
22
|
+
exports.FileUploadItemDeleteTrigger = primitives.FileUploadItemDeleteTrigger;
|
|
23
|
+
exports.FileUploadItemGroup = primitives.FileUploadItemGroup;
|
|
24
|
+
exports.FileUploadItemName = primitives.FileUploadItemName;
|
|
25
|
+
exports.FileUploadItemPreview = primitives.FileUploadItemPreview;
|
|
26
|
+
exports.FileUploadItemPreviewImage = primitives.FileUploadItemPreviewImage;
|
|
27
|
+
exports.FileUploadItemSizeText = primitives.FileUploadItemSizeText;
|
|
28
|
+
exports.FileUploadLabel = primitives.FileUploadLabel;
|
|
29
|
+
exports.FileUploadRoot = primitives.FileUploadRoot;
|
|
30
|
+
exports.FileUploadTrigger = primitives.FileUploadTrigger;
|
|
31
|
+
exports.FileUploadParts = parts.FileUploadParts;
|
|
10
32
|
exports.FileStatus = fileStatus.FileStatus;
|
|
11
33
|
exports.processStatus = fileStatus.processStatus;
|
|
12
34
|
exports.FileUploader = fileUploader.FileUploader;
|
|
35
|
+
exports.ImgPreview = imgPreview.ImgPreview;
|
|
36
|
+
exports.createErrorMessages = helpers.createErrorMessages;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
+
export { FileUploadClearTrigger, FileUploadContext, FileUploadDescription, FileUploadDropzone, FileUploadHeading, FileUploadHiddenInput, FileUploadIcon, FileUploadItem, FileUploadItemDeleteTrigger, FileUploadItemGroup, FileUploadItemName, FileUploadItemPreview, FileUploadItemPreviewImage, FileUploadItemSizeText, FileUploadLabel, FileUploadRoot, FileUploadTrigger } from './primitives.js';
|
|
2
|
+
export { FileUploadParts } from './parts.js';
|
|
1
3
|
export { FileStatus, processStatus } from './file-status.js';
|
|
2
4
|
export { FileUploader } from './file-uploader.js';
|
|
5
|
+
export { ImgPreview } from './img-preview.js';
|
|
6
|
+
export { createErrorMessages } from './helpers.js';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const primitives = require('./primitives.cjs');
|
|
6
|
+
|
|
7
|
+
const FileUploadParts = {
|
|
8
|
+
Context: primitives.FileUploadContext,
|
|
9
|
+
Root: primitives.FileUploadRoot,
|
|
10
|
+
Label: primitives.FileUploadLabel,
|
|
11
|
+
Dropzone: primitives.FileUploadDropzone,
|
|
12
|
+
Trigger: primitives.FileUploadTrigger,
|
|
13
|
+
ClearTrigger: primitives.FileUploadClearTrigger,
|
|
14
|
+
ItemGroup: primitives.FileUploadItemGroup,
|
|
15
|
+
Item: primitives.FileUploadItem,
|
|
16
|
+
ItemPreview: primitives.FileUploadItemPreview,
|
|
17
|
+
ItemPreviewImage: primitives.FileUploadItemPreviewImage,
|
|
18
|
+
ItemName: primitives.FileUploadItemName,
|
|
19
|
+
ItemSizeText: primitives.FileUploadItemSizeText,
|
|
20
|
+
ItemDeleteTrigger: primitives.FileUploadItemDeleteTrigger,
|
|
21
|
+
HiddenInput: primitives.FileUploadHiddenInput,
|
|
22
|
+
// custom cerby primitives
|
|
23
|
+
Icon: primitives.FileUploadIcon,
|
|
24
|
+
Heading: primitives.FileUploadHeading,
|
|
25
|
+
Description: primitives.FileUploadDescription
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
exports.FileUploadParts = FileUploadParts;
|