@educarehq/solaris-ui 0.9.0 → 0.10.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@educarehq/solaris-ui",
3
- "version": "0.9.0",
3
+ "version": "0.10.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,6 +16,8 @@
16
16
  --solaris-button-icon-size: var(--solaris-spacing-4);
17
17
  --solaris-button-padding-x: var(--solaris-spacing-4);
18
18
  --solaris-button-padding-y: var(--solaris-spacing-2);
19
+ --solaris-button-icon-padding-start: var(--solaris-spacing-2);
20
+ --solaris-button-icon-padding-end: var(--solaris-spacing-2);
19
21
  --solaris-button-custom-active-border-color: initial;
20
22
  --solaris-button-custom-hover-color: initial;
21
23
  --solaris-button-custom-active-color: initial;
@@ -126,6 +128,14 @@
126
128
  display: block;
127
129
  }
128
130
 
131
+ [solaris-button][data-icon-position='start'] {
132
+ padding-inline-start: var(--solaris-button-icon-padding-start);
133
+ }
134
+
135
+ [solaris-button][data-icon-position='end'] {
136
+ padding-inline-end: var(--solaris-button-icon-padding-end);
137
+ }
138
+
129
139
  [solaris-button][data-appearance='solid'] {
130
140
  --solaris-button-border-width: 0;
131
141
  }
@@ -1,16 +1,16 @@
1
1
  [data-density='compact'] {
2
2
  --solaris-density-scale: 0.75;
3
- --solaris-density-padding-xs: 2px;
4
- --solaris-density-padding-sm: 4px;
5
- --solaris-density-padding-md: 6px;
6
- --solaris-density-padding-lg: 8px;
3
+ --solaris-density-padding-xs: 4px;
4
+ --solaris-density-padding-sm: 6px;
5
+ --solaris-density-padding-md: 8px;
6
+ --solaris-density-padding-lg: 10px;
7
7
  --solaris-density-padding-xl: 12px;
8
- --solaris-density-gap-xs: 2px;
9
- --solaris-density-gap-sm: 4px;
10
- --solaris-density-gap-md: 6px;
11
- --solaris-density-gap-lg: 8px;
12
- --solaris-density-gap-xl: 10px;
13
- --solaris-density-min-width: 36px;
14
- --solaris-density-min-height: 36px;
15
- --solaris-density-font-size: var(--solaris-font-size-xs);
8
+ --solaris-density-gap-xs: 4px;
9
+ --solaris-density-gap-sm: 6px;
10
+ --solaris-density-gap-md: 8px;
11
+ --solaris-density-gap-lg: 10px;
12
+ --solaris-density-gap-xl: 12px;
13
+ --solaris-density-min-width: 40px;
14
+ --solaris-density-min-height: 40px;
15
+ --solaris-density-font-size: var(--solaris-font-size-sm);
16
16
  }
@@ -123,6 +123,11 @@ declare class SolarisIconComponent {
123
123
  interface SvgPathElement {
124
124
  type: 'path';
125
125
  d: string;
126
+ fill?: string;
127
+ stroke?: string;
128
+ strokeWidth?: number;
129
+ strokeLinecap?: string;
130
+ strokeLinejoin?: string;
126
131
  }
127
132
  interface SvgLineElement {
128
133
  type: 'line';
@@ -130,20 +135,40 @@ interface SvgLineElement {
130
135
  y1: number;
131
136
  x2: number;
132
137
  y2: number;
138
+ fill?: string;
139
+ stroke?: string;
140
+ strokeWidth?: number;
141
+ strokeLinecap?: string;
142
+ strokeLinejoin?: string;
133
143
  }
134
144
  interface SvgPolylineElement {
135
145
  type: 'polyline';
136
146
  points: string;
147
+ fill?: string;
148
+ stroke?: string;
149
+ strokeWidth?: number;
150
+ strokeLinecap?: string;
151
+ strokeLinejoin?: string;
137
152
  }
138
153
  interface SvgPolygonElement {
139
154
  type: 'polygon';
140
155
  points: string;
156
+ fill?: string;
157
+ stroke?: string;
158
+ strokeWidth?: number;
159
+ strokeLinecap?: string;
160
+ strokeLinejoin?: string;
141
161
  }
142
162
  interface SvgCircleElement {
143
163
  type: 'circle';
144
164
  cx: number;
145
165
  cy: number;
146
166
  r: number;
167
+ fill?: string;
168
+ stroke?: string;
169
+ strokeWidth?: number;
170
+ strokeLinecap?: string;
171
+ strokeLinejoin?: string;
147
172
  }
148
173
  interface SvgRectElement {
149
174
  type: 'rect';
@@ -153,6 +178,11 @@ interface SvgRectElement {
153
178
  height: number;
154
179
  rx?: number;
155
180
  ry?: number;
181
+ fill?: string;
182
+ stroke?: string;
183
+ strokeWidth?: number;
184
+ strokeLinecap?: string;
185
+ strokeLinejoin?: string;
156
186
  }
157
187
  type SvgElement = SvgPathElement | SvgLineElement | SvgPolylineElement | SvgPolygonElement | SvgCircleElement | SvgRectElement;
158
188
  interface SolarisIconDefinition {
@@ -184,7 +214,7 @@ declare const SOLARIS_ICONS_CONFIG: InjectionToken<SolarisIconsConfig>;
184
214
 
185
215
  declare const SOLARIS_BUILT_IN_ICONS: SolarisIconDefinition[];
186
216
 
187
- type SolarisBuiltInIcon = 'check' | 'x' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'chevron-forward' | 'chevron-backward' | 'chevron-first' | 'chevron-last' | 'info' | 'warning' | 'danger' | 'caution' | 'success' | 'shield-check' | 'sun' | 'moon' | 'monitor' | 'globe' | 'ellipsis' | 'slash' | 'dot' | 'home' | 'edit' | 'trash' | 'move' | 'gear' | 'settings' | 'wrench' | 'unlink' | 'unlock' | 'lock';
217
+ type SolarisBuiltInIcon = 'check' | 'x' | 'chevron-down' | 'chevron-left' | 'chevron-right' | 'chevron-up' | 'chevron-forward' | 'chevron-backward' | 'chevron-first' | 'chevron-last' | 'info' | 'warning' | 'danger' | 'caution' | 'success' | 'shield-check' | 'sun' | 'moon' | 'monitor' | 'globe' | 'ellipsis' | 'slash' | 'dot' | 'home' | 'edit' | 'trash' | 'move' | 'gear' | 'settings' | 'wrench' | 'unlink' | 'unlock' | 'lock' | 'google' | 'microsoft' | 'apple' | 'android' | 'github';
188
218
  type SolarisIconName = string & {
189
219
  __brand?: never;
190
220
  };
@@ -321,6 +351,7 @@ type SolarisButtonColor = 'neutral' | 'primary' | 'success' | 'warning' | 'dange
321
351
  type SolarisButtonRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
322
352
  type SolarisButtonDensity = 'compact' | 'normal' | 'comfortable';
323
353
  type SolarisButtonShape = 'normal' | 'wide';
354
+ type SolarisButtonIconPosition = 'start' | 'end';
324
355
 
325
356
  declare class SolarisButtonDirective {
326
357
  readonly appearance: _angular_core.InputSignal<SolarisButtonAppearance>;
@@ -333,6 +364,9 @@ declare class SolarisButtonDirective {
333
364
  readonly fullWidth: _angular_core.InputSignal<boolean>;
334
365
  readonly loadingLabelKey: _angular_core.InputSignal<string | undefined>;
335
366
  readonly loadingLabel: _angular_core.InputSignal<string | undefined>;
367
+ readonly icon: _angular_core.InputSignal<string | undefined>;
368
+ readonly iconPosition: _angular_core.InputSignal<SolarisButtonIconPosition>;
369
+ protected readonly computedIconPosition: _angular_core.Signal<string | null>;
336
370
  protected readonly isEffectivelyDisabled: _angular_core.Signal<boolean>;
337
371
  protected readonly themeService: SolarisThemeService;
338
372
  protected readonly effectiveDensity: _angular_core.Signal<"compact" | "normal" | "comfortable">;
@@ -342,15 +376,19 @@ declare class SolarisButtonDirective {
342
376
  private readonly platformId;
343
377
  private readonly destroyRef;
344
378
  private spinnerRef;
379
+ private iconRef;
345
380
  protected readonly resolvedLoadingLabel: _angular_core.Signal<string | undefined>;
346
381
  protected readonly isButton: boolean;
347
382
  protected readonly isAnchor: boolean;
348
383
  constructor();
349
384
  private attachSpinner;
350
385
  private detachSpinner;
386
+ private syncIcon;
387
+ private placeIcon;
388
+ private detachIcon;
351
389
  onClick(event: MouseEvent): void;
352
390
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SolarisButtonDirective, never>;
353
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SolarisButtonDirective, "[solaris-button]", never, { "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "radius": { "alias": "radius"; "required": false; "isSignal": true; }; "density": { "alias": "density"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "loadingLabelKey": { "alias": "loadingLabelKey"; "required": false; "isSignal": true; }; "loadingLabel": { "alias": "loadingLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
391
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SolarisButtonDirective, "[solaris-button]", never, { "appearance": { "alias": "appearance"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "radius": { "alias": "radius"; "required": false; "isSignal": true; }; "density": { "alias": "density"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "loadingLabelKey": { "alias": "loadingLabelKey"; "required": false; "isSignal": true; }; "loadingLabel": { "alias": "loadingLabel"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconPosition": { "alias": "iconPosition"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
354
392
  }
355
393
 
356
394
  declare class SolarisButtonIconDirective {