@ng-solid/design-system 22.4.0 → 22.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-solid/design-system",
3
- "version": "22.4.0",
3
+ "version": "22.4.1",
4
4
  "license": "MIT",
5
5
  "description": "Arvisfy, the token-driven Angular design system for ng-solid.",
6
6
  "author": "Ulises Familia Rodríguez <chicromedia@hotmail.com>",
@@ -123,12 +123,20 @@ declare class NsBreadcrumbsComponent {
123
123
  }
124
124
 
125
125
  type NsButtonVariant = 'primary' | 'secondary' | 'tertiary' | 'success' | 'danger' | 'dark';
126
+ type NsButtonSize = 'xs' | NsSize;
126
127
  declare class NsButtonComponent {
127
128
  readonly type: _angular_core.InputSignal<"button" | "submit" | "reset">;
128
129
  readonly variant: _angular_core.InputSignal<NsButtonVariant>;
129
- readonly size: _angular_core.InputSignal<NsSize>;
130
+ readonly size: _angular_core.InputSignal<NsButtonSize>;
130
131
  readonly icon: _angular_core.InputSignal<string>;
131
132
  readonly iconOnly: _angular_core.InputSignalWithTransform<boolean, unknown>;
133
+ /**
134
+ * Explicit `ns-icon` size override. Defaults to 14 for `size="xs"` and 16
135
+ * for every other size when left unset.
136
+ */
137
+ readonly iconSize: _angular_core.InputSignalWithTransform<number, unknown>;
138
+ /** Resolved `ns-icon` size: `iconSize()` when set, else a per-size default. */
139
+ readonly effectiveIconSize: _angular_core.Signal<number>;
132
140
  readonly ariaLabel: _angular_core.InputSignal<string>;
133
141
  readonly block: _angular_core.InputSignalWithTransform<boolean, unknown>;
134
142
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
@@ -150,7 +158,7 @@ declare class NsButtonComponent {
150
158
  private readonly control;
151
159
  focus(): void;
152
160
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsButtonComponent, never>;
153
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsButtonComponent, "ns-button", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconOnly": { "alias": "iconOnly"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "block": { "alias": "block"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
161
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<NsButtonComponent, "ns-button", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconOnly": { "alias": "iconOnly"; "required": false; "isSignal": true; }; "iconSize": { "alias": "iconSize"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "block": { "alias": "block"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
154
162
  }
155
163
 
156
164
  type NsButtonGroupSelectionMode = 'single' | 'multiple';
@@ -752,14 +760,17 @@ declare class NsDropdownItemDirective {
752
760
  readonly key: _angular_core.InputSignal<NsKey>;
753
761
  readonly label: _angular_core.InputSignal<string>;
754
762
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
763
+ readonly dot: _angular_core.InputSignal<NsColor>;
755
764
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsDropdownItemDirective, never>;
756
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NsDropdownItemDirective, "ns-dropdown-item", never, { "key": { "alias": "key"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
765
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NsDropdownItemDirective, "ns-dropdown-item", never, { "key": { "alias": "key"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "dot": { "alias": "dot"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
757
766
  }
758
767
 
759
768
  interface NsDropdownItem<T = unknown> {
760
769
  key: NsKey;
761
770
  label: string;
762
771
  disabled?: boolean;
772
+ /** Optional color dot rendered before the label (decorative, `aria-hidden`). */
773
+ dot?: NsColor;
763
774
  value?: T;
764
775
  }
765
776
  type NsDropdownValue = NsKey | readonly NsKey[] | null;
@@ -768,6 +779,7 @@ interface NsDropdownWorkingItem {
768
779
  readonly key: NsKey;
769
780
  readonly label: string;
770
781
  readonly disabled: boolean;
782
+ readonly dot?: NsColor;
771
783
  }
772
784
  declare class NsDropdownComponent extends NsValueAccessor<NsDropdownValue> {
773
785
  readonly collection: _angular_core.InputSignal<readonly NsDropdownItem<unknown>[]>;
@@ -799,6 +811,8 @@ declare class NsDropdownComponent extends NsValueAccessor<NsDropdownValue> {
799
811
  readonly visibleItems: _angular_core.Signal<NsDropdownWorkingItem[]>;
800
812
  readonly selectedKeys: _angular_core.Signal<ReadonlySet<NsKey>>;
801
813
  readonly selectedLabel: _angular_core.Signal<string>;
814
+ /** Dot of the selected item; the trigger shows it for single selection only. */
815
+ readonly selectedDot: _angular_core.Signal<NsColor>;
802
816
  readonly activeId: _angular_core.Signal<string>;
803
817
  constructor();
804
818
  toggle(): void;
@@ -854,7 +868,29 @@ declare class NsInputNumberComponent extends NsValueAccessor<number | null> {
854
868
  onKeydown(event: KeyboardEvent): void;
855
869
  stepBy(direction: 1 | -1): void;
856
870
  private get formatter();
871
+ /**
872
+ * `format: { style: 'percent' }` deliberately breaks from `Intl.NumberFormat`'s
873
+ * own convention. `Intl` expects a *fraction* (`format(0.1)` → "10%"); this
874
+ * component's model is the 0-100 *magnitude* instead (`100` means 100%), so a
875
+ * model of `10` paints "10%".
876
+ *
877
+ * Why: almost every form in this codebase stores a percentage as an integer
878
+ * 0-100 (discounts, tax rates, commission splits, `min`/`max`/`step` all read
879
+ * naturally as "0 to 100"). Making the model a 0-1 fraction would just push
880
+ * the ×100/÷100 conversion onto every consumer instead of doing it once here.
881
+ *
882
+ * Do NOT "fix" this back to matching `Intl` — that silently multiplies every
883
+ * stored percentage by 100 the next time this input round-trips a value.
884
+ * The bug this comment guards against: `formatDisplayValue` used to hand the
885
+ * raw 0-100 model straight to `Intl` (which reads it as a fraction, so `0.1`
886
+ * printed as "10%"), while `parse` read "10%" back as the magnitude `10` — a
887
+ * value that then painted as "1,000%" on the next blur. `parse` already
888
+ * returns the 0-100 magnitude and is intentionally left untouched; only the
889
+ * percent *formatting* path divides by 100 before calling `Intl`.
890
+ */
891
+ private isPercentMode;
857
892
  private formatDisplayValue;
893
+ /** Returns the 0-100 magnitude even in percent mode — see `isPercentMode`. */
858
894
  private parse;
859
895
  private constrain;
860
896
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NsInputNumberComponent, never>;
@@ -1977,4 +2013,4 @@ declare class NsTooltipDirective implements OnDestroy {
1977
2013
  }
1978
2014
 
1979
2015
  export { Arvisfy, NS_EDITOR_TOOLS_DEFAULT, NS_RETIRED_TOKENS, NS_THEME_OPTIONS, NS_TOAST_OPTIONS, NsAccordionComponent, NsAccordionItemComponent, NsAlertComponent, NsAvatarComponent, NsAvatarGroupComponent, NsBadgeComponent, NsBreadcrumbItemComponent, NsBreadcrumbsComponent, NsButtonComponent, NsButtonGroupComponent, NsCardBodyComponent, NsCardComponent, NsCardFooterComponent, NsCardHeaderComponent, NsCheckboxComponent, NsChipComponent, NsCollectionController, NsCommandPaletteComponent, NsCommentComponent, NsContentEditableComponent, NsDatePickerComponent, NsDateRangePickerComponent, NsDescriptionComponent, NsDividerComponent, NsDrawerComponent, NsDrawerRef, NsDrawerService, NsDropdownComponent, NsDropdownItemDirective, NsEditorColorPickerComponent, NsEditorComponent, NsEditorImageComponent, NsEditorLinkComponent, NsEditorListComponent, NsEditorParagraphComponent, NsEditorToggleCommandComponent, NsEmptyStateComponent, NsFieldContext, NsFieldDirective, NsImageUploadComponent, NsInputCodeComponent, NsInputComponent, NsInputGroupAddonComponent, NsInputGroupComponent, NsInputNumberComponent, NsInputSearchComponent, NsLinkComponent, NsLoadMoreComponent, NsMenuComponent, NsMenuDividerComponent, NsMenuItemComponent, NsMenuSectionComponent, NsMeterComponent, NsModalComponent, NsModalRef, NsModalService, NsOptionCardComponent, NsOverlayRef, NsOverlayService, NsPaginationComponent, NsPasswordComponent, NsPopoverComponent, NsProgressBarComponent, NsRadioComponent, NsRadioGroupComponent, NsSchedule, NsScheduleComponent, NsScheduleService, NsSchemaMarkupComponent, NsSideNavComponent, NsSideNavItemComponent, NsSideNavSectionComponent, NsSkeletonComponent, NsSliderComponent, NsStatCardComponent, NsSurfaceComponent, NsSwitchComponent, NsTabComponent, NsTabsComponent, NsTagComponent, NsTagGroupComponent, NsTextAreaComponent, NsThemeService, NsTimelineComponent, NsTimelineItemComponent, NsToastComponent, NsToastHandle, NsToastService, NsTooltipComponent, NsTooltipDirective, NsValueAccessor, TemplateDirective, defineNsPreset, flattenTokens, getNsOverlayPosition, provideNsTheme, referenceToCssVariable, tokenPathToCssVariable, validateNsPreset };
1980
- export type { NsAlertVariant, NsBadgeMode, NsButtonGroupSelectionMode, NsButtonVariant, NsChipColor, NsChipSize, NsChipVariant, NsCollectionItem, NsColor, NsColorScheme, NsCommandGroup, NsCommandItem, NsComment, NsComponentInputs, NsDateRangeValue, NsDateView, NsDeepPartial, NsDrawerComponentInputs, NsDrawerConfig, NsDrawerOptions, NsDrawerPosition, NsDropdownItem, NsDropdownValue, NsEditorTool, NsEmptyStateSize, NsFlattenedPrimitiveTokens, NsKey, NsModalConfig, NsModalOptions, NsModalSize, NsOrientation, NsOverlayCloseReason, NsOverlayConfig, NsOverlayPosition, NsPlacement, NsPrimitiveReference, NsPrimitiveTokenValue, NsResolvedColorScheme, NsResolvedThemeOptions, NsResolvedToastThemeOptions, NsSchemaMarkup, NsSchemaType, NsSelectionMode, NsSemanticReference, NsSemanticTokens, NsSideNavColor, NsSize, NsSliderValue, NsStatCardDeltaTone, NsStatCardHintTone, NsStatCardIconTone, NsStatCardValueTone, NsStatCardVariant, NsTabsVariant, NsThemeOptions, NsThemePreset, NsThemePresetOverrides, NsTimelineItemColor, NsTimelineSize, NsToastAction, NsToastCloseReason, NsToastOptions, NsToastPlacement, NsToastThemeOptions, NsToastVariant, NsTokenTree, NsVariant };
2016
+ export type { NsAlertVariant, NsBadgeMode, NsButtonGroupSelectionMode, NsButtonSize, NsButtonVariant, NsChipColor, NsChipSize, NsChipVariant, NsCollectionItem, NsColor, NsColorScheme, NsCommandGroup, NsCommandItem, NsComment, NsComponentInputs, NsDateRangeValue, NsDateView, NsDeepPartial, NsDrawerComponentInputs, NsDrawerConfig, NsDrawerOptions, NsDrawerPosition, NsDropdownItem, NsDropdownValue, NsEditorTool, NsEmptyStateSize, NsFlattenedPrimitiveTokens, NsKey, NsModalConfig, NsModalOptions, NsModalSize, NsOrientation, NsOverlayCloseReason, NsOverlayConfig, NsOverlayPosition, NsPlacement, NsPrimitiveReference, NsPrimitiveTokenValue, NsResolvedColorScheme, NsResolvedThemeOptions, NsResolvedToastThemeOptions, NsSchemaMarkup, NsSchemaType, NsSelectionMode, NsSemanticReference, NsSemanticTokens, NsSideNavColor, NsSize, NsSliderValue, NsStatCardDeltaTone, NsStatCardHintTone, NsStatCardIconTone, NsStatCardValueTone, NsStatCardVariant, NsTabsVariant, NsThemeOptions, NsThemePreset, NsThemePresetOverrides, NsTimelineItemColor, NsTimelineSize, NsToastAction, NsToastCloseReason, NsToastOptions, NsToastPlacement, NsToastThemeOptions, NsToastVariant, NsTokenTree, NsVariant };