@besaitech/ng-design-system 0.0.74 → 0.0.76
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,73 @@ 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 on a floating card that rides at the bottom of the scroll container, so the save button
|
|
6271
|
+
* 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
|
+
* Deliberately the same chrome as {@link SdsBulkBar} — rounded card, full border, solid surface,
|
|
6277
|
+
* `shadow-xl`, floating clear of the bottom edge rather than welded to it, same entrance. The two are
|
|
6278
|
+
* the app's only bars that hover over scrolling content, and a form footer that looked like a
|
|
6279
|
+
* different species from the bulk bar would read as a different kind of thing. What they are not is
|
|
6280
|
+
* the same semantics: that one is a `role="toolbar"` for a selection, announcing "N selected" and
|
|
6281
|
+
* hiding itself at zero. This is a plain labelled `role="group"`, because these buttons belong in the
|
|
6282
|
+
* form's normal tab order and a toolbar role tells a screen-reader user to expect arrow keys.
|
|
6283
|
+
*
|
|
6284
|
+
* It floats, so do not bleed it past its container with negative margins the way a flush strip wants:
|
|
6285
|
+
* the rounded corners and the shadow need the inset to read as a card.
|
|
6286
|
+
*
|
|
6287
|
+
* @example
|
|
6288
|
+
* <sds-form-actions>
|
|
6289
|
+
* <sds-button sdsFormActionsStart variant="danger" (click)="remove()">Delete</sds-button>
|
|
6290
|
+
* <sds-button variant="ghost" routerLink="..">Cancel</sds-button>
|
|
6291
|
+
* <sds-button type="submit" variant="secondary" [loading]="saving()">Save</sds-button>
|
|
6292
|
+
* <sds-button [loading]="publishing()" (click)="saveAndPublish()">Save and publish</sds-button>
|
|
6293
|
+
* </sds-form-actions>
|
|
6294
|
+
*/
|
|
6295
|
+
class SdsFormActions {
|
|
6296
|
+
position = input('sticky', ...(ngDevMode ? [{ debugName: "position" }] : []));
|
|
6297
|
+
/**
|
|
6298
|
+
* Accessible name of the group. English default; translate it in the consuming app — a screen
|
|
6299
|
+
* reader reads it before the buttons, so an untranslated one is the odd word out.
|
|
6300
|
+
*/
|
|
6301
|
+
ariaLabel = input('Form actions', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : []));
|
|
6302
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsFormActions, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
6303
|
+
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-3": "position() === 'sticky'", "class.z-30": "position() === 'sticky'" }, classAttribute: "block" }, ngImport: i0, template: `
|
|
6304
|
+
<div
|
|
6305
|
+
role="group"
|
|
6306
|
+
[attr.aria-label]="ariaLabel()"
|
|
6307
|
+
class="flex flex-wrap items-center justify-end gap-x-3 gap-y-2 rounded-card border border-border bg-surface px-3 py-2 shadow-xl animate-sds-form-actions"
|
|
6308
|
+
>
|
|
6309
|
+
<!-- Written without inner whitespace so :empty matches when nothing is projected here. -->
|
|
6310
|
+
<div class="mr-auto flex flex-wrap items-center gap-2 empty:hidden"><ng-content select="[sdsFormActionsStart]" /></div>
|
|
6311
|
+
<ng-content />
|
|
6312
|
+
</div>
|
|
6313
|
+
`, isInline: true, styles: [".animate-sds-form-actions{animation:sds-form-actions-in .16s ease-out}@keyframes sds-form-actions-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.animate-sds-form-actions{animation:none}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
6314
|
+
}
|
|
6315
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdsFormActions, decorators: [{
|
|
6316
|
+
type: Component,
|
|
6317
|
+
args: [{ selector: 'sds-form-actions', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
6318
|
+
class: 'block',
|
|
6319
|
+
'[class.sticky]': "position() === 'sticky'",
|
|
6320
|
+
'[class.bottom-3]': "position() === 'sticky'",
|
|
6321
|
+
'[class.z-30]': "position() === 'sticky'",
|
|
6322
|
+
}, template: `
|
|
6323
|
+
<div
|
|
6324
|
+
role="group"
|
|
6325
|
+
[attr.aria-label]="ariaLabel()"
|
|
6326
|
+
class="flex flex-wrap items-center justify-end gap-x-3 gap-y-2 rounded-card border border-border bg-surface px-3 py-2 shadow-xl animate-sds-form-actions"
|
|
6327
|
+
>
|
|
6328
|
+
<!-- Written without inner whitespace so :empty matches when nothing is projected here. -->
|
|
6329
|
+
<div class="mr-auto flex flex-wrap items-center gap-2 empty:hidden"><ng-content select="[sdsFormActionsStart]" /></div>
|
|
6330
|
+
<ng-content />
|
|
6331
|
+
</div>
|
|
6332
|
+
`, styles: [".animate-sds-form-actions{animation:sds-form-actions-in .16s ease-out}@keyframes sds-form-actions-in{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.animate-sds-form-actions{animation:none}}\n"] }]
|
|
6333
|
+
}], propDecorators: { position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
6334
|
+
|
|
6268
6335
|
/**
|
|
6269
6336
|
* Template for one row's content inside `<sds-sortable-list>`.
|
|
6270
6337
|
*
|
|
@@ -20667,5 +20734,5 @@ function provideSdsCharts(config) {
|
|
|
20667
20734
|
* Generated bundle index. Do not edit.
|
|
20668
20735
|
*/
|
|
20669
20736
|
|
|
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 };
|
|
20737
|
+
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
20738
|
//# sourceMappingURL=besaitech-ng-design-system.mjs.map
|