codexly-ui 0.4.9 → 0.5.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/fesm2022/codexly-ui.mjs +102 -30
- package/fesm2022/codexly-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/types/codexly-ui.d.ts +33 -7
package/package.json
CHANGED
package/types/codexly-ui.d.ts
CHANGED
|
@@ -115,10 +115,10 @@ declare class ClxButtonComponent {
|
|
|
115
115
|
private readonly _themeSvc;
|
|
116
116
|
readonly variant: _angular_core.InputSignal<ClxButtonVariant>;
|
|
117
117
|
readonly color: _angular_core.InputSignal<ClxColorInput | undefined>;
|
|
118
|
-
readonly size: _angular_core.InputSignal<"
|
|
118
|
+
readonly size: _angular_core.InputSignal<"sm" | "md" | "xxs" | "xs" | "lg" | undefined>;
|
|
119
119
|
readonly shape: _angular_core.InputSignal<ClxShape | undefined>;
|
|
120
120
|
protected readonly _color: _angular_core.Signal<ClxColorInput>;
|
|
121
|
-
protected readonly _size: _angular_core.Signal<"
|
|
121
|
+
protected readonly _size: _angular_core.Signal<"sm" | "md" | "xxs" | "xs" | "lg">;
|
|
122
122
|
protected readonly _shape: _angular_core.Signal<ClxShape>;
|
|
123
123
|
readonly loading: _angular_core.InputSignal<boolean>;
|
|
124
124
|
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
@@ -167,11 +167,11 @@ declare class ClxBadgeComponent {
|
|
|
167
167
|
private readonly _themeSvc;
|
|
168
168
|
readonly variant: _angular_core.InputSignal<ClxBadgeVariant>;
|
|
169
169
|
readonly color: _angular_core.InputSignal<ClxColorInput | undefined>;
|
|
170
|
-
readonly size: _angular_core.InputSignal<"
|
|
170
|
+
readonly size: _angular_core.InputSignal<"sm" | "md" | "xs" | undefined>;
|
|
171
171
|
readonly shape: _angular_core.InputSignal<ClxShape | undefined>;
|
|
172
172
|
readonly positioned: _angular_core.InputSignal<boolean>;
|
|
173
173
|
protected readonly _color: _angular_core.Signal<ClxColorInput>;
|
|
174
|
-
protected readonly _size: _angular_core.Signal<"
|
|
174
|
+
protected readonly _size: _angular_core.Signal<"sm" | "md" | "xs">;
|
|
175
175
|
protected readonly _shape: _angular_core.Signal<ClxShape>;
|
|
176
176
|
protected readonly _hostClass: _angular_core.Signal<string>;
|
|
177
177
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClxBadgeComponent, never>;
|
|
@@ -1101,7 +1101,10 @@ interface ClxExistingFile {
|
|
|
1101
1101
|
/** Set when the caller wants per-file status overlays (e.g. processing/failed thumbnails). */
|
|
1102
1102
|
status?: 'DONE' | 'PENDING' | 'PROCESSING' | 'FAILED';
|
|
1103
1103
|
}
|
|
1104
|
-
|
|
1104
|
+
/** A single rendered preview item — mixes already-existing and newly-selected files under one
|
|
1105
|
+
* shape. Passed to `primaryAction`/`secondaryAction` resolvers and emitted by their click
|
|
1106
|
+
* outputs, so callers can act on whichever item was clicked without `clx-upload` needing to
|
|
1107
|
+
* know what that action means (e.g. opening a domain-specific settings modal). */
|
|
1105
1108
|
interface ClxUploadPreviewItem {
|
|
1106
1109
|
kind: 'existing' | 'new';
|
|
1107
1110
|
key: string;
|
|
@@ -1115,6 +1118,16 @@ interface ClxUploadPreviewItem {
|
|
|
1115
1118
|
existing?: ClxExistingFile;
|
|
1116
1119
|
file?: File;
|
|
1117
1120
|
}
|
|
1121
|
+
/** Visual description of a per-item action badge button (icon/color/tooltip). Returned by a
|
|
1122
|
+
* `primaryAction`/`secondaryAction` resolver function — return `null`/`undefined` to hide the
|
|
1123
|
+
* button for a specific item. */
|
|
1124
|
+
interface ClxUploadItemAction {
|
|
1125
|
+
icon: string;
|
|
1126
|
+
color?: ClxColorInput;
|
|
1127
|
+
tooltip?: string;
|
|
1128
|
+
}
|
|
1129
|
+
type ClxUploadItemActionResolver = (item: ClxUploadPreviewItem) => ClxUploadItemAction | null | undefined;
|
|
1130
|
+
|
|
1118
1131
|
declare class ClxUploadComponent implements ControlValueAccessor, OnDestroy {
|
|
1119
1132
|
private readonly _themeSvc;
|
|
1120
1133
|
readonly multiple: _angular_core.InputSignal<boolean>;
|
|
@@ -1130,12 +1143,20 @@ declare class ClxUploadComponent implements ControlValueAccessor, OnDestroy {
|
|
|
1130
1143
|
* preview grid as newly-selected local files. The component never deletes these itself —
|
|
1131
1144
|
* removing one only emits `existingFileRemove`, letting the caller decide (e.g. call the API). */
|
|
1132
1145
|
readonly existingFiles: _angular_core.InputSignal<ClxExistingFile[]>;
|
|
1146
|
+
/** Resolves the badge button shown top-right on each thumbnail. Defaults to a red "Eliminar"
|
|
1147
|
+
* button wired to the built-in remove behavior. Return `null` for an item to hide it. */
|
|
1148
|
+
readonly primaryAction: _angular_core.InputSignal<ClxUploadItemActionResolver>;
|
|
1149
|
+
/** Resolves an optional second badge button (bottom-right on each thumbnail). Hidden by
|
|
1150
|
+
* default — the caller owns what clicking it means (e.g. opening a settings modal); this
|
|
1151
|
+
* component only reports which item was clicked via `secondaryActionClick`. */
|
|
1152
|
+
readonly secondaryAction: _angular_core.InputSignal<ClxUploadItemActionResolver | null>;
|
|
1133
1153
|
readonly onUploadError: _angular_core.OutputEmitterRef<{
|
|
1134
1154
|
file: File;
|
|
1135
1155
|
error: ClxUploadError;
|
|
1136
1156
|
}>;
|
|
1137
1157
|
readonly onUploadSuccess: _angular_core.OutputEmitterRef<File[]>;
|
|
1138
1158
|
readonly existingFileRemove: _angular_core.OutputEmitterRef<string>;
|
|
1159
|
+
readonly secondaryActionClick: _angular_core.OutputEmitterRef<ClxUploadPreviewItem>;
|
|
1139
1160
|
readonly _files: _angular_core.WritableSignal<File[]>;
|
|
1140
1161
|
readonly _isDragging: _angular_core.WritableSignal<boolean>;
|
|
1141
1162
|
readonly _errorKey: _angular_core.WritableSignal<ClxUploadError | null>;
|
|
@@ -1173,6 +1194,11 @@ declare class ClxUploadComponent implements ControlValueAccessor, OnDestroy {
|
|
|
1173
1194
|
protected _onDragOver(event: DragEvent): void;
|
|
1174
1195
|
protected _onDragLeave(): void;
|
|
1175
1196
|
protected _onDrop(event: DragEvent): void;
|
|
1197
|
+
protected _resolvePrimaryAction(item: ClxUploadPreviewItem): ClxUploadItemAction | null;
|
|
1198
|
+
protected _resolveSecondaryAction(item: ClxUploadPreviewItem): ClxUploadItemAction | null;
|
|
1199
|
+
/** Built-in behavior for the default primary action (remove). Callers who override
|
|
1200
|
+
* `primaryAction` only for its visuals still get this same removal behavior. */
|
|
1201
|
+
protected _onPrimaryAction(item: ClxUploadPreviewItem): void;
|
|
1176
1202
|
protected _removeItem(item: ClxUploadPreviewItem): void;
|
|
1177
1203
|
private _getObjectUrl;
|
|
1178
1204
|
private _releaseObjectUrl;
|
|
@@ -1183,7 +1209,7 @@ declare class ClxUploadComponent implements ControlValueAccessor, OnDestroy {
|
|
|
1183
1209
|
private _nameFromUrl;
|
|
1184
1210
|
protected _formatSize(bytes: number): string;
|
|
1185
1211
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ClxUploadComponent, never>;
|
|
1186
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ClxUploadComponent, "clx-upload", never, { "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "existingFiles": { "alias": "existingFiles"; "required": false; "isSignal": true; }; }, { "onUploadError": "onUploadError"; "onUploadSuccess": "onUploadSuccess"; "existingFileRemove": "existingFileRemove"; }, never, ["[clx-label]"], true, never>;
|
|
1212
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ClxUploadComponent, "clx-upload", never, { "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "accept": { "alias": "accept"; "required": false; "isSignal": true; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "existingFiles": { "alias": "existingFiles"; "required": false; "isSignal": true; }; "primaryAction": { "alias": "primaryAction"; "required": false; "isSignal": true; }; "secondaryAction": { "alias": "secondaryAction"; "required": false; "isSignal": true; }; }, { "onUploadError": "onUploadError"; "onUploadSuccess": "onUploadSuccess"; "existingFileRemove": "existingFileRemove"; "secondaryActionClick": "secondaryActionClick"; }, never, ["[clx-label]"], true, never>;
|
|
1187
1213
|
}
|
|
1188
1214
|
|
|
1189
1215
|
type ClxColorPickerSize = 'sm' | 'md' | 'lg';
|
|
@@ -3105,4 +3131,4 @@ declare class ClxToastService {
|
|
|
3105
3131
|
}
|
|
3106
3132
|
|
|
3107
3133
|
export { CLX_ADDON_BORDER, CLX_ADDON_TEXT, CLX_ALERT_OPTIONS, CLX_ALERT_RESOLVE, CLX_BG_ADDON, CLX_BG_DISABLED, CLX_BG_ICON_WRAP, CLX_BG_SECTION, CLX_BG_SURFACE, CLX_BORDER_DEFAULT, CLX_BORDER_DISABLED, CLX_BORDER_MEDIUM, CLX_COLOR_HEX, CLX_COLOR_HEX_100, CLX_COLOR_MAP, CLX_FONT_CATALOG, CLX_MODAL_ANIM_CONFIG, CLX_MODAL_DATA, CLX_MODAL_REF, CLX_OPTION_DISABLED, CLX_PLACEHOLDER, CLX_RADIO_GROUP, CLX_RADIUS_MAP, CLX_TEXT_BODY, CLX_TEXT_DISABLED, CLX_TEXT_HEADING, CLX_TEXT_HINT, CLX_TEXT_IDLE, CLX_TEXT_INPUT, CLX_TEXT_LABEL, CLX_TEXT_OPTION, CLX_TEXT_SUBTITLE, CLX_TEXT_TITLE, CLX_THEME_CONFIG, CLX_THEME_DEFAULTS, CLX_TOAST_DEFAULTS, ClxAlertComponent, ClxAlertService, ClxAnimateDirective, ClxAnimateGroupDirective, ClxAnimateService, ClxAppLayoutComponent, ClxAvatarComponent, ClxBadgeComponent, ClxBrandComponent, ClxButtonComponent, ClxButtonGroupComponent, ClxCardBodyDirective, ClxCardComponent, ClxCardFooterDirective, ClxCardHeaderDirective, ClxCarouselComponent, ClxCarouselDirective, ClxCartComponent, ClxCartSummaryDrawer, ClxCellDirective, ClxCheckboxComponent, ClxColorPickerComponent, ClxColumnDefDirective, ClxDateRangePickerComponent, ClxDatepickerComponent, ClxDrawerComponent, ClxDrawerService, ClxEditorComponent, ClxEditorLinkModalComponent, ClxFilterPanelComponent, ClxHeaderCellDirective, ClxIconComponent, ClxInputComponent, ClxListComponent, ClxListItemComponent, ClxMenuComponent, ClxMenuItemComponent, ClxModalComponent, ClxModalService, ClxNavGroupComponent, ClxNumberComponent, ClxPageEmptyComponent, ClxPageNotFoundComponent, ClxPageServerErrorComponent, ClxPageUnauthorizedComponent, ClxPaginationComponent, ClxProductComponent, ClxProductDetailComponent, ClxProfileComponent, ClxProgressBarComponent, ClxRadioComponent, ClxRadioGroupComponent, ClxRatingComponent, ClxSelectComponent, ClxSkeletonComponent, ClxSliderComponent, ClxSpinnerComponent, ClxStatCardComponent, ClxStepComponent, ClxStepperComponent, ClxSwitchComponent, ClxTabDirective, ClxTableComponent, ClxTabsComponent, ClxTagComponent, ClxTextareaComponent, ClxThemeService, ClxTimelineComponent, ClxTimelineItemComponent, ClxTimepickerComponent, ClxToastComponent, ClxToastContainerComponent, ClxToastService, ClxTooltipComponent, ClxTooltipDirective, ClxTreeComponent, ClxUploadComponent, ClxWishlistComponent, ClxWizardComponent, TIMEPICKER_SIZE_MAP, parseColorInput, provideCodexlyTheme, resolveColor, resolveContainerRadius, resolveRadius };
|
|
3108
|
-
export type { ClxAlertButtonOptions, ClxAlertOptions, ClxAlertResult, ClxAlertType, ClxAnimateAttentionSeeker, ClxAnimateBackEntrance, ClxAnimateBackExit, ClxAnimateBouncingEntrance, ClxAnimateBouncingExit, ClxAnimateConfig, ClxAnimateDefaults, ClxAnimateEvent, ClxAnimateFadingEntrance, ClxAnimateFadingExit, ClxAnimateFlipper, ClxAnimateLightspeed, ClxAnimateName, ClxAnimateRotatingEntrance, ClxAnimateRotatingExit, ClxAnimateSlidingEntrance, ClxAnimateSlidingExit, ClxAnimateSpecial, ClxAnimateTrigger, ClxAnimateZoomingEntrance, ClxAnimateZoomingExit, ClxAvatarContentType, ClxBadgeVariant, ClxButtonColor, ClxButtonGroupShape, ClxButtonVariant, ClxCardPadding, ClxCardShadow, ClxCardVariant, ClxCarouselAspectRatio, ClxCarouselConfig, ClxCartItem, ClxCartSummaryData, ClxCellContext, ClxCheckboxVariant, ClxColor, ClxColorInput, ClxColorPickerFormat, ClxColorPickerSize, ClxColorResolved, ClxColorTokens, ClxCouponResult, ClxDateRange, ClxDateRangePickerSize, ClxDateRangePickerStatus, ClxDatepickerSize, ClxDatepickerStatus, ClxDrawerButtonOptions, ClxDrawerConfig, ClxDrawerRef, ClxDrawerSize, ClxEditorSize, ClxEditorTool, ClxEditorToolbarGroup, ClxExistingFile, ClxFilterChangeEvent, ClxFilterField, ClxFilterFieldType, ClxFilterOption, ClxFilterValue, ClxFilterValues, ClxFontFamily, ClxFontOption, ClxInputSize, ClxInputStatus, ClxInputType, ClxListItem, ClxListSize, ClxListVariant, ClxModalButtonOptions, ClxModalConfig, ClxModalRef, ClxModalSize, ClxNumberSize, ClxNumberVariant, ClxPageChangeEvent, ClxPageSizeChangeEvent, ClxPaginationSize, ClxProduct, ClxProductDescription, ClxProductDetailData, ClxProductLayout, ClxProductSize, ClxProductSpec, ClxProfileMenuItem, ClxProgressBarSize, ClxProgressBarVariant, ClxRadioVariant, ClxReview, ClxRippleItem, ClxSelectOption, ClxSelectSize, ClxShade, ClxShape, ClxSize, ClxSkeletonVariant, ClxSliderSize, ClxSpecOption, ClxSpecType, ClxSpinnerColor, ClxSpinnerVariant, ClxStatMetric, ClxStepperOrientation, ClxStepperSize, ClxStepperStatus, ClxStepperStep, ClxTabItem, ClxTableColumn, ClxTablePageEvent, ClxTableSelectionEvent, ClxTableSort, ClxTableSortEvent, ClxTagShape, ClxTagSize, ClxTagVariant, ClxTextareaResize, ClxTextareaSize, ClxTextareaStatus, ClxThemeConfig, ClxThemeMode, ClxTimelineLineStyle, ClxTimelineMode, ClxTimelineSize, ClxTimepickerSize, ClxTimepickerStatus, ClxToastAction, ClxToastEntry, ClxToastOptions, ClxToastPosition, ClxToastType, ClxTooltipPosition, ClxTooltipSize, ClxTreeExpandEvent, ClxTreeNode, ClxTreeSelectEvent, ClxTreeSize, ClxTreeVariant, ClxTrendDirection, ClxUploadError, ClxUploadSize, ClxVariation, ClxWishlistItem, ClxWishlistPageChangeEvent, ClxWizardColor, ClxWizardOrientation, ClxWizardStepStatus, SparkPoint };
|
|
3134
|
+
export type { ClxAlertButtonOptions, ClxAlertOptions, ClxAlertResult, ClxAlertType, ClxAnimateAttentionSeeker, ClxAnimateBackEntrance, ClxAnimateBackExit, ClxAnimateBouncingEntrance, ClxAnimateBouncingExit, ClxAnimateConfig, ClxAnimateDefaults, ClxAnimateEvent, ClxAnimateFadingEntrance, ClxAnimateFadingExit, ClxAnimateFlipper, ClxAnimateLightspeed, ClxAnimateName, ClxAnimateRotatingEntrance, ClxAnimateRotatingExit, ClxAnimateSlidingEntrance, ClxAnimateSlidingExit, ClxAnimateSpecial, ClxAnimateTrigger, ClxAnimateZoomingEntrance, ClxAnimateZoomingExit, ClxAvatarContentType, ClxBadgeVariant, ClxButtonColor, ClxButtonGroupShape, ClxButtonVariant, ClxCardPadding, ClxCardShadow, ClxCardVariant, ClxCarouselAspectRatio, ClxCarouselConfig, ClxCartItem, ClxCartSummaryData, ClxCellContext, ClxCheckboxVariant, ClxColor, ClxColorInput, ClxColorPickerFormat, ClxColorPickerSize, ClxColorResolved, ClxColorTokens, ClxCouponResult, ClxDateRange, ClxDateRangePickerSize, ClxDateRangePickerStatus, ClxDatepickerSize, ClxDatepickerStatus, ClxDrawerButtonOptions, ClxDrawerConfig, ClxDrawerRef, ClxDrawerSize, ClxEditorSize, ClxEditorTool, ClxEditorToolbarGroup, ClxExistingFile, ClxFilterChangeEvent, ClxFilterField, ClxFilterFieldType, ClxFilterOption, ClxFilterValue, ClxFilterValues, ClxFontFamily, ClxFontOption, ClxInputSize, ClxInputStatus, ClxInputType, ClxListItem, ClxListSize, ClxListVariant, ClxModalButtonOptions, ClxModalConfig, ClxModalRef, ClxModalSize, ClxNumberSize, ClxNumberVariant, ClxPageChangeEvent, ClxPageSizeChangeEvent, ClxPaginationSize, ClxProduct, ClxProductDescription, ClxProductDetailData, ClxProductLayout, ClxProductSize, ClxProductSpec, ClxProfileMenuItem, ClxProgressBarSize, ClxProgressBarVariant, ClxRadioVariant, ClxReview, ClxRippleItem, ClxSelectOption, ClxSelectSize, ClxShade, ClxShape, ClxSize, ClxSkeletonVariant, ClxSliderSize, ClxSpecOption, ClxSpecType, ClxSpinnerColor, ClxSpinnerVariant, ClxStatMetric, ClxStepperOrientation, ClxStepperSize, ClxStepperStatus, ClxStepperStep, ClxTabItem, ClxTableColumn, ClxTablePageEvent, ClxTableSelectionEvent, ClxTableSort, ClxTableSortEvent, ClxTagShape, ClxTagSize, ClxTagVariant, ClxTextareaResize, ClxTextareaSize, ClxTextareaStatus, ClxThemeConfig, ClxThemeMode, ClxTimelineLineStyle, ClxTimelineMode, ClxTimelineSize, ClxTimepickerSize, ClxTimepickerStatus, ClxToastAction, ClxToastEntry, ClxToastOptions, ClxToastPosition, ClxToastType, ClxTooltipPosition, ClxTooltipSize, ClxTreeExpandEvent, ClxTreeNode, ClxTreeSelectEvent, ClxTreeSize, ClxTreeVariant, ClxTrendDirection, ClxUploadError, ClxUploadItemAction, ClxUploadItemActionResolver, ClxUploadPreviewItem, ClxUploadSize, ClxVariation, ClxWishlistItem, ClxWishlistPageChangeEvent, ClxWizardColor, ClxWizardOrientation, ClxWizardStepStatus, SparkPoint };
|