@besaitech/ng-design-system 0.0.74 → 0.0.75
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.
|
@@ -6265,6 +6265,77 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
6265
6265
|
`, styles: [".animate-sds-bulk{animation:sds-bulk-in .16s ease-out}@keyframes sds-bulk-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.animate-sds-bulk{animation:none}}\n"] }]
|
|
6266
6266
|
}], propDecorators: { count: [{ type: i0.Input, args: [{ isSignal: true, alias: "count", required: false }] }], countLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "countLabel", required: false }] }], clearLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "clearLabel", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], clear: [{ type: i0.Output, args: ["clear"] }] } });
|
|
6267
6267
|
|
|
6268
|
+
/**
|
|
6269
|
+
* The action bar at the foot of a form: Cancel, Save, and whatever commits the thing — projected as
|
|
6270
|
+
* buttons, right-aligned, on a bordered strip that pins to the bottom of the scroll container so the
|
|
6271
|
+
* save button stays in reach on a long editor.
|
|
6272
|
+
*
|
|
6273
|
+
* Project a destructive or secondary action with `sdsFormActionsStart` and it is pushed to the left,
|
|
6274
|
+
* away from the confirming buttons, which is the point: Delete should not sit a few pixels from Save.
|
|
6275
|
+
*
|
|
6276
|
+
* Not {@link SdsBulkBar}, which is for a selection: that one hides itself at zero, says "N selected",
|
|
6277
|
+
* carries a clear-selection button and is announced as a toolbar. A form footer is none of those, and
|
|
6278
|
+
* dressing one up as the other costs a fake count and a screen reader that announces a save bar as
|
|
6279
|
+
* bulk actions. This is a plain labelled `role="group"` — not a toolbar, because the buttons belong in
|
|
6280
|
+
* the form's normal tab order and a toolbar role tells a screen-reader user to expect arrow keys.
|
|
6281
|
+
*
|
|
6282
|
+
* The bar spans its container and carries its own horizontal padding. To let it bleed past a padded
|
|
6283
|
+
* container's edge, put the matching negative margin on the host — the host is a block element:
|
|
6284
|
+
* `<sds-form-actions class="-mx-4 md:-mx-6">`.
|
|
6285
|
+
*
|
|
6286
|
+
* @example
|
|
6287
|
+
* <sds-form-actions>
|
|
6288
|
+
* <sds-button sdsFormActionsStart variant="danger" (click)="remove()">Delete</sds-button>
|
|
6289
|
+
* <sds-button variant="ghost" routerLink="..">Cancel</sds-button>
|
|
6290
|
+
* <sds-button type="submit" variant="secondary" [loading]="saving()">Save</sds-button>
|
|
6291
|
+
* <sds-button [loading]="publishing()" (click)="saveAndPublish()">Save and publish</sds-button>
|
|
6292
|
+
* </sds-form-actions>
|
|
6293
|
+
*/
|
|
6294
|
+
class SdsFormActions {
|
|
6295
|
+
position = input('sticky', ...(ngDevMode ? [{ debugName: "position" }] : []));
|
|
6296
|
+
/**
|
|
6297
|
+
* Accessible name of the group. English default; translate it in the consuming app — a screen
|
|
6298
|
+
* reader reads it before the buttons, so an untranslated one is the odd word out.
|
|
6299
|
+
*/
|
|
6300
|
+
ariaLabel = input('Form actions', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
6301
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsFormActions, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6302
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.25", type: SdsFormActions, isStandalone: true, selector: "sds-form-actions", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.sticky": "position() === 'sticky'", "class.bottom-0": "position() === 'sticky'", "class.z-20": "position() === 'sticky'" }, classAttribute: "block" }, ngImport: i0, template: `
|
|
6303
|
+
<div
|
|
6304
|
+
role="group"
|
|
6305
|
+
[attr.aria-label]="ariaLabel()"
|
|
6306
|
+
class="flex flex-wrap items-center justify-end gap-2 border-t border-border bg-surface/95 px-4 py-3 backdrop-blur md:px-6"
|
|
6307
|
+
>
|
|
6308
|
+
<!-- Written without inner whitespace so :empty matches when nothing is projected here. -->
|
|
6309
|
+
<div class="mr-auto flex flex-wrap items-center gap-2 empty:hidden"><ng-content select="[sdsFormActionsStart]" /></div>
|
|
6310
|
+
<ng-content />
|
|
6311
|
+
</div>
|
|
6312
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6313
|
+
}
|
|
6314
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsFormActions, decorators: [{
|
|
6315
|
+
type: Component,
|
|
6316
|
+
args: [{
|
|
6317
|
+
selector: 'sds-form-actions',
|
|
6318
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
6319
|
+
host: {
|
|
6320
|
+
class: 'block',
|
|
6321
|
+
'[class.sticky]': "position() === 'sticky'",
|
|
6322
|
+
'[class.bottom-0]': "position() === 'sticky'",
|
|
6323
|
+
'[class.z-20]': "position() === 'sticky'",
|
|
6324
|
+
},
|
|
6325
|
+
template: `
|
|
6326
|
+
<div
|
|
6327
|
+
role="group"
|
|
6328
|
+
[attr.aria-label]="ariaLabel()"
|
|
6329
|
+
class="flex flex-wrap items-center justify-end gap-2 border-t border-border bg-surface/95 px-4 py-3 backdrop-blur md:px-6"
|
|
6330
|
+
>
|
|
6331
|
+
<!-- Written without inner whitespace so :empty matches when nothing is projected here. -->
|
|
6332
|
+
<div class="mr-auto flex flex-wrap items-center gap-2 empty:hidden"><ng-content select="[sdsFormActionsStart]" /></div>
|
|
6333
|
+
<ng-content />
|
|
6334
|
+
</div>
|
|
6335
|
+
`,
|
|
6336
|
+
}]
|
|
6337
|
+
}], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
6338
|
+
|
|
6268
6339
|
/**
|
|
6269
6340
|
* Template for one row's content inside `<sds-sortable-list>`.
|
|
6270
6341
|
*
|
|
@@ -20667,5 +20738,5 @@ function provideSdsCharts(config) {
|
|
|
20667
20738
|
* Generated bundle index. Do not edit.
|
|
20668
20739
|
*/
|
|
20669
20740
|
|
|
20670
|
-
export { SDS_ALLERGENS, SDS_ALLERGEN_ICONS, SDS_ALLERGEN_LABELS_EN, SDS_CHART_CONFIG, SDS_CHART_LABELS_EN, SDS_ICONS, SDS_PHONE_COUNTRIES, SDS_THEME_STORAGE_KEY, SDS_UI_PREF_LANG_PARAM, SDS_UI_PREF_THEME_PARAM, SdsAccordion, SdsAccordionContent, SdsAccordionHeader, SdsAccordionPanel, SdsAccordionStore, SdsAddressAutocomplete, SdsAddressExtra, SdsAllergenIcon, SdsAvatar, SdsBadge, SdsBulkBar, SdsButton, SdsCalendar, SdsCard, SdsCheckbox, SdsChecklistRow, SdsChip, SdsChipGroup, SdsDatePicker, SdsDateRangePicker, SdsEnvBanner, SdsFileDrop, SdsIcon, SdsImageCropper, SdsInput, SdsInputNumber, SdsLanguageSwitcher, SdsLocalizedInput, SdsMenu, SdsMenuItem, SdsMenuTrigger, SdsMultiSelect, SdsNavGroup, SdsNavItem, SdsOtpInput, SdsPaginator, SdsPhoneInput, SdsRadio, SdsRangeCalendar, SdsScore, SdsSearchCommand, SdsSegmented, SdsSelect, SdsSelectEmpty, SdsSelectFooter, SdsSelectOption, SdsShell, SdsSidebar, SdsSortableHandle, SdsSortableItem, SdsSortableList, SdsStatusTile, SdsTab, SdsTabList, SdsTabPanel, SdsTabPanels, SdsTable, SdsTableCell, SdsTableEmpty, SdsTableHeader, SdsTableRowExpansion, SdsTabs, SdsTabsStore, SdsTextarea, SdsThemeService, SdsThemeToggle, SdsTimeInput, SdsToastHost, SdsToastService, SdsToggleSwitch, SdsTopbar, SdsTriStateChip, SdsUserMenu, SidebarStore, addDays, addMonths, addMonthsKeepDay, appendUiPrefs, diffInDays, formatDateRange, formatDdMmYyyy, formatHhMm, isOutOfRange, isSameDay, isSameRange, isSdsThemeMode, isoDay, pad2, provideSdsCharts, readUiPrefs, sdsFileMatchesAccept, sdsFormatBytes, sdsFormatNational, sdsLastDays, sdsLastMonths, sdsMatchDialCode, sdsNormalizeSignificant, startOfDay, startOfMonth, stripUiPrefs };
|
|
20741
|
+
export { SDS_ALLERGENS, SDS_ALLERGEN_ICONS, SDS_ALLERGEN_LABELS_EN, SDS_CHART_CONFIG, SDS_CHART_LABELS_EN, SDS_ICONS, SDS_PHONE_COUNTRIES, SDS_THEME_STORAGE_KEY, SDS_UI_PREF_LANG_PARAM, SDS_UI_PREF_THEME_PARAM, SdsAccordion, SdsAccordionContent, SdsAccordionHeader, SdsAccordionPanel, SdsAccordionStore, SdsAddressAutocomplete, SdsAddressExtra, SdsAllergenIcon, SdsAvatar, SdsBadge, SdsBulkBar, SdsButton, SdsCalendar, SdsCard, SdsCheckbox, SdsChecklistRow, SdsChip, SdsChipGroup, SdsDatePicker, SdsDateRangePicker, SdsEnvBanner, SdsFileDrop, SdsFormActions, SdsIcon, SdsImageCropper, SdsInput, SdsInputNumber, SdsLanguageSwitcher, SdsLocalizedInput, SdsMenu, SdsMenuItem, SdsMenuTrigger, SdsMultiSelect, SdsNavGroup, SdsNavItem, SdsOtpInput, SdsPaginator, SdsPhoneInput, SdsRadio, SdsRangeCalendar, SdsScore, SdsSearchCommand, SdsSegmented, SdsSelect, SdsSelectEmpty, SdsSelectFooter, SdsSelectOption, SdsShell, SdsSidebar, SdsSortableHandle, SdsSortableItem, SdsSortableList, SdsStatusTile, SdsTab, SdsTabList, SdsTabPanel, SdsTabPanels, SdsTable, SdsTableCell, SdsTableEmpty, SdsTableHeader, SdsTableRowExpansion, SdsTabs, SdsTabsStore, SdsTextarea, SdsThemeService, SdsThemeToggle, SdsTimeInput, SdsToastHost, SdsToastService, SdsToggleSwitch, SdsTopbar, SdsTriStateChip, SdsUserMenu, SidebarStore, addDays, addMonths, addMonthsKeepDay, appendUiPrefs, diffInDays, formatDateRange, formatDdMmYyyy, formatHhMm, isOutOfRange, isSameDay, isSameRange, isSdsThemeMode, isoDay, pad2, provideSdsCharts, readUiPrefs, sdsFileMatchesAccept, sdsFormatBytes, sdsFormatNational, sdsLastDays, sdsLastMonths, sdsMatchDialCode, sdsNormalizeSignificant, startOfDay, startOfMonth, stripUiPrefs };
|
|
20671
20742
|
//# sourceMappingURL=besaitech-ng-design-system.mjs.map
|