yukit-web 1.0.4 → 1.1.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/fesm2022/yukit-web.mjs
CHANGED
|
@@ -2249,6 +2249,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
2249
2249
|
}]
|
|
2250
2250
|
}
|
|
2251
2251
|
});
|
|
2252
|
+
const YUW_FIELD_FILL_CLASS = "bg-(color:--neutrals-fill-input) dark:bg-(color:--neutrals-fill-input)";
|
|
2252
2253
|
const yuwFieldSizeVariants = cva("", {
|
|
2253
2254
|
variants: { size: {
|
|
2254
2255
|
default: "h-10",
|
|
@@ -2888,11 +2889,11 @@ var YuwComboboxComponent = class YuwComboboxComponent extends YuwValueAccessorBa
|
|
|
2888
2889
|
this._focusSelectors = ["input", "button"];
|
|
2889
2890
|
this._generatedId = `yuw-combobox-${++nextUniqueId$2}`;
|
|
2890
2891
|
this._itemToString = (value) => this._labelByValue().get(value) ?? value;
|
|
2891
|
-
this._chipsClass = computed(() => yuwFieldMinHeightVariants({ size: this.size() }), ...ngDevMode ? [{ debugName: "_chipsClass" }] : /* istanbul ignore next */ []);
|
|
2892
|
+
this._chipsClass = computed(() => cn(yuwFieldMinHeightVariants({ size: this.size() }), YUW_FIELD_FILL_CLASS), ...ngDevMode ? [{ debugName: "_chipsClass" }] : /* istanbul ignore next */ []);
|
|
2892
2893
|
this._clearVisible = computed(() => this.clearAriaLabel() !== void 0, ...ngDevMode ? [{ debugName: "_clearVisible" }] : /* istanbul ignore next */ []);
|
|
2893
2894
|
this._contentClass = computed(() => this.triggerTemplate() ? "w-auto min-w-56 max-w-80" : "", ...ngDevMode ? [{ debugName: "_contentClass" }] : /* istanbul ignore next */ []);
|
|
2894
2895
|
this._controlId = computed(() => this.inputId() ?? this._generatedId, ...ngDevMode ? [{ debugName: "_controlId" }] : /* istanbul ignore next */ []);
|
|
2895
|
-
this._fieldClass = computed(() => yuwFieldSizeVariants({ size: this.size() }), ...ngDevMode ? [{ debugName: "_fieldClass" }] : /* istanbul ignore next */ []);
|
|
2896
|
+
this._fieldClass = computed(() => cn(yuwFieldSizeVariants({ size: this.size() }), YUW_FIELD_FILL_CLASS), ...ngDevMode ? [{ debugName: "_fieldClass" }] : /* istanbul ignore next */ []);
|
|
2896
2897
|
this._itemClass = computed(() => this.checkboxes() ? CHECKBOX_ITEM_CLASS : "", ...ngDevMode ? [{ debugName: "_itemClass" }] : /* istanbul ignore next */ []);
|
|
2897
2898
|
this._labelByValue = computed(() => new Map(this.options().map((option) => [option.value, option.label])), ...ngDevMode ? [{ debugName: "_labelByValue" }] : /* istanbul ignore next */ []);
|
|
2898
2899
|
this._multipleValue = computed(() => {
|
|
@@ -2913,7 +2914,7 @@ var YuwComboboxComponent = class YuwComboboxComponent extends YuwValueAccessorBa
|
|
|
2913
2914
|
const value = this.value();
|
|
2914
2915
|
return Array.isArray(value) ? value[0] : value;
|
|
2915
2916
|
}, ...ngDevMode ? [{ debugName: "_singleValue" }] : /* istanbul ignore next */ []);
|
|
2916
|
-
this._triggerClass = computed(() => yuwButtonVariants({ size: this.size() }), ...ngDevMode ? [{ debugName: "_triggerClass" }] : /* istanbul ignore next */ []);
|
|
2917
|
+
this._triggerClass = computed(() => cn(yuwButtonVariants({ size: this.size() }), YUW_FIELD_FILL_CLASS), ...ngDevMode ? [{ debugName: "_triggerClass" }] : /* istanbul ignore next */ []);
|
|
2917
2918
|
this._triggerContext = computed(() => {
|
|
2918
2919
|
const labels = this._selectedChips().map((chip) => chip.label);
|
|
2919
2920
|
return {
|
|
@@ -3913,7 +3914,7 @@ var YuwInputComponent = class YuwInputComponent extends YuwTextFieldBase {
|
|
|
3913
3914
|
this.enterPressed = output();
|
|
3914
3915
|
this._autoId = `yuw-input-${++nextYuwInputId}`;
|
|
3915
3916
|
this._focusSelectors = ["input"];
|
|
3916
|
-
this._classes = computed(() => cn(yuwFieldSizeVariants({ size: this.size() }), this.userClass()), ...ngDevMode ? [{ debugName: "_classes" }] : /* istanbul ignore next */ []);
|
|
3917
|
+
this._classes = computed(() => cn(yuwFieldSizeVariants({ size: this.size() }), YUW_FIELD_FILL_CLASS, this.userClass()), ...ngDevMode ? [{ debugName: "_classes" }] : /* istanbul ignore next */ []);
|
|
3917
3918
|
this._hasLeftAddon = computed(() => this._leftAddons().length > 0, ...ngDevMode ? [{ debugName: "_hasLeftAddon" }] : /* istanbul ignore next */ []);
|
|
3918
3919
|
this._hasRightAddon = computed(() => this._rightAddons().length > 0, ...ngDevMode ? [{ debugName: "_hasRightAddon" }] : /* istanbul ignore next */ []);
|
|
3919
3920
|
this._hasAddons = computed(() => this._hasLeftAddon() || this._hasRightAddon(), ...ngDevMode ? [{ debugName: "_hasAddons" }] : /* istanbul ignore next */ []);
|
|
@@ -5179,7 +5180,7 @@ var YuwSheetComponent = class YuwSheetComponent {
|
|
|
5179
5180
|
isSignal: true
|
|
5180
5181
|
}],
|
|
5181
5182
|
ngImport: i0,
|
|
5182
|
-
template: "<hlm-sheet\n [side]=\"side()\"\n [state]=\"_sheetState()\"\n [aria-label]=\"ariaLabel()\"\n [aria-modal]=\"ariaModal()\"\n [scrollStrategy]=\"scrollStrategy()\"\n [closeOnOutsidePointerEvents]=\"closeOnOutsidePointerEvents()\"\n [disableClose]=\"disableClose()\"\n (stateChanged)=\"onStateChanged($event)\"\n>\n @if (showTrigger()) {\n <yuw-button yuwSheetTriggerButton [variant]=\"triggerVariant()\" [size]=\"triggerSize()\">\n <ng-content select=\"[yuwSheetTrigger]\" />\n </yuw-button>\n }\n\n <hlm-sheet-content *hlmSheetPortal [showCloseButton]=\"false\" [class]=\"_panelClass()\">\n @if (title() || description() || note()) {\n <div hlmSheetHeader>\n @if (title()) {\n <h2 hlmSheetTitle>{{ title() }}</h2>\n }\n @if (description()) {\n <p hlmSheetDescription>{{ description() }}</p>\n }\n @if (note()) {\n <p hlmSheetDescription>{{ note() }}</p>\n }\n </div>\n }\n\n @if (hasHeader()) {\n <div class=\"flex items-start gap-3 px-4 pt-6\">\n <div class=\"min-w-0 flex-1\">\n <ng-content select=\"[yuwSheetHeader]\" />\n </div>\n @if (closeLabel()) {\n <ng-container [ngTemplateOutlet]=\"closeButton\" />\n }\n </div>\n }\n\n <div [class]=\"_bodyClass()\">\n <ng-content />\n </div>\n\n @if (hasFooter()) {\n <div hlmSheetFooter class=\"bg-(--neutrals-surface-
|
|
5183
|
+
template: "<hlm-sheet\n [side]=\"side()\"\n [state]=\"_sheetState()\"\n [aria-label]=\"ariaLabel()\"\n [aria-modal]=\"ariaModal()\"\n [scrollStrategy]=\"scrollStrategy()\"\n [closeOnOutsidePointerEvents]=\"closeOnOutsidePointerEvents()\"\n [disableClose]=\"disableClose()\"\n (stateChanged)=\"onStateChanged($event)\"\n>\n @if (showTrigger()) {\n <yuw-button yuwSheetTriggerButton [variant]=\"triggerVariant()\" [size]=\"triggerSize()\">\n <ng-content select=\"[yuwSheetTrigger]\" />\n </yuw-button>\n }\n\n <hlm-sheet-content *hlmSheetPortal [showCloseButton]=\"false\" [class]=\"_panelClass()\">\n @if (title() || description() || note()) {\n <div hlmSheetHeader>\n @if (title()) {\n <h2 hlmSheetTitle>{{ title() }}</h2>\n }\n @if (description()) {\n <p hlmSheetDescription>{{ description() }}</p>\n }\n @if (note()) {\n <p hlmSheetDescription>{{ note() }}</p>\n }\n </div>\n }\n\n @if (hasHeader()) {\n <div class=\"flex items-start gap-3 px-4 pt-6\">\n <div class=\"min-w-0 flex-1\">\n <ng-content select=\"[yuwSheetHeader]\" />\n </div>\n @if (closeLabel()) {\n <ng-container [ngTemplateOutlet]=\"closeButton\" />\n }\n </div>\n }\n\n <div [class]=\"_bodyClass()\">\n <ng-content />\n </div>\n\n @if (hasFooter()) {\n <div hlmSheetFooter class=\"bg-(--neutrals-surface-accent)\">\n <ng-content select=\"[yuwSheetFooter]\" />\n </div>\n }\n\n @if (closeLabel() && !hasHeader()) {\n <div class=\"absolute inset-e-3 top-3\">\n <ng-container [ngTemplateOutlet]=\"closeButton\" />\n </div>\n }\n\n <ng-template #closeButton>\n <yuw-button yuwSheetClose variant=\"ghost\" size=\"icon-sm\">\n <ng-icon name=\"lucideX\" />\n <span class=\"sr-only\">{{ closeLabel() }}</span>\n </yuw-button>\n </ng-template>\n </hlm-sheet-content>\n</hlm-sheet>\n",
|
|
5183
5184
|
dependencies: [
|
|
5184
5185
|
{
|
|
5185
5186
|
kind: "component",
|
|
@@ -5299,7 +5300,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
5299
5300
|
}],
|
|
5300
5301
|
host: { class: "contents" },
|
|
5301
5302
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
5302
|
-
template: "<hlm-sheet\n [side]=\"side()\"\n [state]=\"_sheetState()\"\n [aria-label]=\"ariaLabel()\"\n [aria-modal]=\"ariaModal()\"\n [scrollStrategy]=\"scrollStrategy()\"\n [closeOnOutsidePointerEvents]=\"closeOnOutsidePointerEvents()\"\n [disableClose]=\"disableClose()\"\n (stateChanged)=\"onStateChanged($event)\"\n>\n @if (showTrigger()) {\n <yuw-button yuwSheetTriggerButton [variant]=\"triggerVariant()\" [size]=\"triggerSize()\">\n <ng-content select=\"[yuwSheetTrigger]\" />\n </yuw-button>\n }\n\n <hlm-sheet-content *hlmSheetPortal [showCloseButton]=\"false\" [class]=\"_panelClass()\">\n @if (title() || description() || note()) {\n <div hlmSheetHeader>\n @if (title()) {\n <h2 hlmSheetTitle>{{ title() }}</h2>\n }\n @if (description()) {\n <p hlmSheetDescription>{{ description() }}</p>\n }\n @if (note()) {\n <p hlmSheetDescription>{{ note() }}</p>\n }\n </div>\n }\n\n @if (hasHeader()) {\n <div class=\"flex items-start gap-3 px-4 pt-6\">\n <div class=\"min-w-0 flex-1\">\n <ng-content select=\"[yuwSheetHeader]\" />\n </div>\n @if (closeLabel()) {\n <ng-container [ngTemplateOutlet]=\"closeButton\" />\n }\n </div>\n }\n\n <div [class]=\"_bodyClass()\">\n <ng-content />\n </div>\n\n @if (hasFooter()) {\n <div hlmSheetFooter class=\"bg-(--neutrals-surface-
|
|
5303
|
+
template: "<hlm-sheet\n [side]=\"side()\"\n [state]=\"_sheetState()\"\n [aria-label]=\"ariaLabel()\"\n [aria-modal]=\"ariaModal()\"\n [scrollStrategy]=\"scrollStrategy()\"\n [closeOnOutsidePointerEvents]=\"closeOnOutsidePointerEvents()\"\n [disableClose]=\"disableClose()\"\n (stateChanged)=\"onStateChanged($event)\"\n>\n @if (showTrigger()) {\n <yuw-button yuwSheetTriggerButton [variant]=\"triggerVariant()\" [size]=\"triggerSize()\">\n <ng-content select=\"[yuwSheetTrigger]\" />\n </yuw-button>\n }\n\n <hlm-sheet-content *hlmSheetPortal [showCloseButton]=\"false\" [class]=\"_panelClass()\">\n @if (title() || description() || note()) {\n <div hlmSheetHeader>\n @if (title()) {\n <h2 hlmSheetTitle>{{ title() }}</h2>\n }\n @if (description()) {\n <p hlmSheetDescription>{{ description() }}</p>\n }\n @if (note()) {\n <p hlmSheetDescription>{{ note() }}</p>\n }\n </div>\n }\n\n @if (hasHeader()) {\n <div class=\"flex items-start gap-3 px-4 pt-6\">\n <div class=\"min-w-0 flex-1\">\n <ng-content select=\"[yuwSheetHeader]\" />\n </div>\n @if (closeLabel()) {\n <ng-container [ngTemplateOutlet]=\"closeButton\" />\n }\n </div>\n }\n\n <div [class]=\"_bodyClass()\">\n <ng-content />\n </div>\n\n @if (hasFooter()) {\n <div hlmSheetFooter class=\"bg-(--neutrals-surface-accent)\">\n <ng-content select=\"[yuwSheetFooter]\" />\n </div>\n }\n\n @if (closeLabel() && !hasHeader()) {\n <div class=\"absolute inset-e-3 top-3\">\n <ng-container [ngTemplateOutlet]=\"closeButton\" />\n </div>\n }\n\n <ng-template #closeButton>\n <yuw-button yuwSheetClose variant=\"ghost\" size=\"icon-sm\">\n <ng-icon name=\"lucideX\" />\n <span class=\"sr-only\">{{ closeLabel() }}</span>\n </yuw-button>\n </ng-template>\n </hlm-sheet-content>\n</hlm-sheet>\n"
|
|
5303
5304
|
}]
|
|
5304
5305
|
}],
|
|
5305
5306
|
ctorParameters: () => [],
|
|
@@ -5532,7 +5533,7 @@ var YuwInputFileComponent = class YuwInputFileComponent extends YuwValueAccessor
|
|
|
5532
5533
|
this._isMobile = injectIsMobile();
|
|
5533
5534
|
this._listOpen = signal(false, ...ngDevMode ? [{ debugName: "_listOpen" }] : /* istanbul ignore next */ []);
|
|
5534
5535
|
this._preview = signal(void 0, ...ngDevMode ? [{ debugName: "_preview" }] : /* istanbul ignore next */ []);
|
|
5535
|
-
this._boxClasses = computed(() => cn(yuwFieldSizeVariants({ size: this.size() }), "flex min-w-0 items-center justify-between gap-2 rounded-lg border border-input
|
|
5536
|
+
this._boxClasses = computed(() => cn(yuwFieldSizeVariants({ size: this.size() }), YUW_FIELD_FILL_CLASS, "flex min-w-0 items-center justify-between gap-2 rounded-lg border border-input ps-2.5 pe-2 text-sm"), ...ngDevMode ? [{ debugName: "_boxClasses" }] : /* istanbul ignore next */ []);
|
|
5536
5537
|
this._countText = computed(() => this.countLabel()?.(this.value().length), ...ngDevMode ? [{ debugName: "_countText" }] : /* istanbul ignore next */ []);
|
|
5537
5538
|
this._entries = computed(() => this.value().map((file) => ({
|
|
5538
5539
|
file,
|
|
@@ -6082,7 +6083,7 @@ var YuwTextareaComponent = class YuwTextareaComponent extends YuwTextFieldBase {
|
|
|
6082
6083
|
this.rows = input(void 0, ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
|
|
6083
6084
|
this._autoId = `yuw-textarea-${++nextYuwTextareaId}`;
|
|
6084
6085
|
this._focusSelectors = ["textarea"];
|
|
6085
|
-
this._classes = computed(() => cn(this.userClass()), ...ngDevMode ? [{ debugName: "_classes" }] : /* istanbul ignore next */ []);
|
|
6086
|
+
this._classes = computed(() => cn(YUW_FIELD_FILL_CLASS, this.userClass()), ...ngDevMode ? [{ debugName: "_classes" }] : /* istanbul ignore next */ []);
|
|
6086
6087
|
this._hasLeftAddon = computed(() => this._leftAddons().length > 0, ...ngDevMode ? [{ debugName: "_hasLeftAddon" }] : /* istanbul ignore next */ []);
|
|
6087
6088
|
this._hasRightAddon = computed(() => this._rightAddons().length > 0, ...ngDevMode ? [{ debugName: "_hasRightAddon" }] : /* istanbul ignore next */ []);
|
|
6088
6089
|
this._hasAddons = computed(() => this._hasLeftAddon() || this._hasRightAddon(), ...ngDevMode ? [{ debugName: "_hasAddons" }] : /* istanbul ignore next */ []);
|
|
@@ -6378,7 +6379,7 @@ var YuwSearchInputComponent = class YuwSearchInputComponent extends YuwTextField
|
|
|
6378
6379
|
this._focusSelectors = ["input"];
|
|
6379
6380
|
this._open = signal(false, ...ngDevMode ? [{ debugName: "_open" }] : /* istanbul ignore next */ []);
|
|
6380
6381
|
this._collapsible = computed(() => this.collapseFrom() !== void 0, ...ngDevMode ? [{ debugName: "_collapsible" }] : /* istanbul ignore next */ []);
|
|
6381
|
-
this._classes = computed(() => cn(yuwFieldSizeVariants({ size: this.size() }), searchInputGroupVariants({
|
|
6382
|
+
this._classes = computed(() => cn(yuwFieldSizeVariants({ size: this.size() }), YUW_FIELD_FILL_CLASS, searchInputGroupVariants({
|
|
6382
6383
|
transparent: this.transparent(),
|
|
6383
6384
|
collapsible: this._collapsible()
|
|
6384
6385
|
}), this.userClass(), "overflow-hidden"), ...ngDevMode ? [{ debugName: "_classes" }] : /* istanbul ignore next */ []);
|
|
@@ -6673,7 +6674,7 @@ var YuwPasswordInputComponent = class YuwPasswordInputComponent extends YuwTextF
|
|
|
6673
6674
|
this.enterPressed = output();
|
|
6674
6675
|
this._autoId = `yuw-password-input-${++nextYuwPasswordInputId}`;
|
|
6675
6676
|
this._focusSelectors = ["input"];
|
|
6676
|
-
this._classes = computed(() => cn(yuwFieldSizeVariants({ size: this.size() }), this.userClass()), ...ngDevMode ? [{ debugName: "_classes" }] : /* istanbul ignore next */ []);
|
|
6677
|
+
this._classes = computed(() => cn(yuwFieldSizeVariants({ size: this.size() }), YUW_FIELD_FILL_CLASS, this.userClass()), ...ngDevMode ? [{ debugName: "_classes" }] : /* istanbul ignore next */ []);
|
|
6677
6678
|
this._hasLeftAddon = computed(() => this._leftAddons().length > 0, ...ngDevMode ? [{ debugName: "_hasLeftAddon" }] : /* istanbul ignore next */ []);
|
|
6678
6679
|
this._reveal = computed(() => YUW_PASSWORD_REVEAL_STATES[`${this.masked()}`], ...ngDevMode ? [{ debugName: "_reveal" }] : /* istanbul ignore next */ []);
|
|
6679
6680
|
}
|
|
@@ -6868,7 +6869,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
6868
6869
|
}]
|
|
6869
6870
|
}
|
|
6870
6871
|
});
|
|
6871
|
-
const yuwInputOtpSizeVariants = cva("", {
|
|
6872
|
+
const yuwInputOtpSizeVariants = cva("[&_[data-slot=input-otp-slot]]:bg-(color:--neutrals-fill-input)", {
|
|
6872
6873
|
variants: { size: {
|
|
6873
6874
|
default: "[&_[data-slot=input-otp-slot]]:size-10",
|
|
6874
6875
|
xs: "[&_[data-slot=input-otp-slot]]:size-7",
|
|
@@ -7125,7 +7126,7 @@ const YUW_SWITCH_HELM_SIZE = {
|
|
|
7125
7126
|
default: "default",
|
|
7126
7127
|
lg: "default"
|
|
7127
7128
|
};
|
|
7128
|
-
const yuwSwitchSizeVariants = cva("", {
|
|
7129
|
+
const yuwSwitchSizeVariants = cva("[&_[data-slot=switch-thumb][data-state=unchecked]]:bg-(color:--neutrals-fill-strong)", {
|
|
7129
7130
|
variants: { size: {
|
|
7130
7131
|
xs: "",
|
|
7131
7132
|
sm: "data-[size=default]:h-[18px] data-[size=default]:w-[28px] [&_[data-slot=switch-thumb]]:group-data-[size=default]/switch:size-3.5",
|
|
@@ -10145,7 +10146,7 @@ var YuwDatepickerComponent = class YuwDatepickerComponent extends YuwValueAccess
|
|
|
10145
10146
|
if (!value) return [];
|
|
10146
10147
|
return Array.isArray(value) ? value : [value];
|
|
10147
10148
|
}, ...ngDevMode ? [{ debugName: "_multipleValue" }] : /* istanbul ignore next */ []);
|
|
10148
|
-
this._triggerClass = computed(() => cn("max-w-full", yuwButtonVariants({ size: this.size() }), this.userClass()), ...ngDevMode ? [{ debugName: "_triggerClass" }] : /* istanbul ignore next */ []);
|
|
10149
|
+
this._triggerClass = computed(() => cn("max-w-full", yuwButtonVariants({ size: this.size() }), YUW_FIELD_FILL_CLASS, this.userClass()), ...ngDevMode ? [{ debugName: "_triggerClass" }] : /* istanbul ignore next */ []);
|
|
10149
10150
|
this._triggerContext = computed(() => ({ $implicit: this._label() ?? "" }), ...ngDevMode ? [{ debugName: "_triggerContext" }] : /* istanbul ignore next */ []);
|
|
10150
10151
|
}
|
|
10151
10152
|
_emptyValue() {
|