@brickclay-org/ui 0.0.14 → 0.0.17

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/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as i0 from '@angular/core';
2
2
  import { OnInit, OnDestroy, OnChanges, EventEmitter, SimpleChanges, AfterViewInit, QueryList, ElementRef } from '@angular/core';
3
3
  import * as rxjs from 'rxjs';
4
4
  import * as i1 from '@angular/common';
5
- import { ControlValueAccessor } from '@angular/forms';
5
+ import { ControlValueAccessor, NgControl } from '@angular/forms';
6
6
 
7
7
  declare const BrickclayIcons: {
8
8
  readonly arrowleft: "assets/icons/chevron-left.svg";
@@ -416,5 +416,141 @@ declare class RadioComponent implements ControlValueAccessor {
416
416
  static ɵcmp: i0.ɵɵComponentDeclaration<RadioComponent, "brickclay-radio-button", never, { "radioClass": { "alias": "radioClass"; "required": false; }; "label": { "alias": "label"; "required": false; }; "labelClass": { "alias": "labelClass"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; }, { "change": "change"; }, never, never, true, never>;
417
417
  }
418
418
 
419
- export { BrickclayIcons, BrickclayLib, CalendarManagerService, CalendarModule, CheckboxComponent, CustomCalendarComponent, RadioComponent, ScheduledDatePickerComponent, TimePickerComponent, ToggleComponent };
420
- export type { CalendarRange, CalendarSelection, ScheduledDateSelection, TimeConfiguration };
419
+ type PillVariant = 'Light' | 'Solid' | 'Outline' | 'Transparent';
420
+ type PillColor = 'Gray' | 'Primary' | 'Error' | 'Warning' | 'Success' | 'Purple' | 'Cyan';
421
+ type PillSize = 'xsm' | 'sm' | 'md' | 'lg';
422
+ declare class PillComponent {
423
+ label: string;
424
+ variant: PillVariant;
425
+ color: PillColor;
426
+ size: PillSize;
427
+ dot: 'left' | 'right' | 'none';
428
+ removable: boolean;
429
+ customClass: string;
430
+ clicked: EventEmitter<string>;
431
+ get containerClasses(): string;
432
+ onRemove(e: Event): void;
433
+ static ɵfac: i0.ɵɵFactoryDeclaration<PillComponent, never>;
434
+ static ɵcmp: i0.ɵɵComponentDeclaration<PillComponent, "brickclay-pill", never, { "label": { "alias": "label"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "color": { "alias": "color"; "required": false; }; "size": { "alias": "size"; "required": false; }; "dot": { "alias": "dot"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; }, { "clicked": "clicked"; }, never, never, true, never>;
435
+ }
436
+
437
+ type BadgeVariant = 'Light' | 'Solid' | 'Outline' | 'Transparent';
438
+ type BadgeColor = 'Gray' | 'Primary' | 'Error' | 'Warning' | 'Success' | 'Purple' | 'Cyan';
439
+ type BadgeSize = 'xsm' | 'sm' | 'md' | 'lg';
440
+ declare class BadgeComponent {
441
+ label: string;
442
+ variant: BadgeVariant;
443
+ color: BadgeColor;
444
+ size: BadgeSize;
445
+ dot: 'left' | 'right' | 'none';
446
+ removable: boolean;
447
+ customClass: string;
448
+ clicked: EventEmitter<string>;
449
+ get containerClasses(): string;
450
+ onRemove(e: Event): void;
451
+ static ɵfac: i0.ɵɵFactoryDeclaration<BadgeComponent, never>;
452
+ static ɵcmp: i0.ɵɵComponentDeclaration<BadgeComponent, "brickclay-badge", never, { "label": { "alias": "label"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "color": { "alias": "color"; "required": false; }; "size": { "alias": "size"; "required": false; }; "dot": { "alias": "dot"; "required": false; }; "removable": { "alias": "removable"; "required": false; }; "customClass": { "alias": "customClass"; "required": false; }; }, { "clicked": "clicked"; }, never, never, true, never>;
453
+ }
454
+
455
+ type SpinnerSize = 'xsm' | 'sm' | 'md' | 'lg' | 'xl';
456
+ declare class Spinner {
457
+ size: SpinnerSize;
458
+ show: boolean;
459
+ color: string;
460
+ get classes(): string;
461
+ static ɵfac: i0.ɵɵFactoryDeclaration<Spinner, never>;
462
+ static ɵcmp: i0.ɵɵComponentDeclaration<Spinner, "brickclay-spinner", never, { "size": { "alias": "size"; "required": false; }; "show": { "alias": "show"; "required": false; }; "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>;
463
+ }
464
+
465
+ type ButtonSize = 'xxsm' | 'xsm' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
466
+ type ButtonVariant = 'primary' | 'secondary';
467
+ declare class UiButton {
468
+ variant: ButtonVariant;
469
+ size: ButtonSize;
470
+ label: string;
471
+ leftIcon?: string;
472
+ rightIcon?: string;
473
+ iconAlt: string;
474
+ type: 'button' | 'submit' | 'reset';
475
+ loading: boolean;
476
+ disabled: boolean;
477
+ buttonClass: string;
478
+ textClass: string;
479
+ spinnerClass: string;
480
+ clicked: EventEmitter<boolean>;
481
+ onClick(event: Event): void;
482
+ get buttonClasses(): string;
483
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiButton, never>;
484
+ static ɵcmp: i0.ɵɵComponentDeclaration<UiButton, "brickclay-button", never, { "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "label": { "alias": "label"; "required": false; }; "leftIcon": { "alias": "leftIcon"; "required": false; }; "rightIcon": { "alias": "rightIcon"; "required": false; }; "iconAlt": { "alias": "iconAlt"; "required": false; }; "type": { "alias": "type"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "buttonClass": { "alias": "buttonClass"; "required": false; }; "textClass": { "alias": "textClass"; "required": false; }; "spinnerClass": { "alias": "spinnerClass"; "required": false; }; }, { "clicked": "clicked"; }, never, never, true, never>;
485
+ }
486
+
487
+ type IconButtonSize = 'xxsm' | 'xsm' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
488
+ type IconButtonVariant = 'primary' | 'secondary';
489
+ declare class UiIconButton {
490
+ icon: string;
491
+ alt: string;
492
+ variant: IconButtonVariant;
493
+ size: IconButtonSize;
494
+ disabled: boolean;
495
+ buttonClass: string;
496
+ clicked: EventEmitter<boolean>;
497
+ onClick(event: Event): void;
498
+ get buttonClasses(): string;
499
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiIconButton, never>;
500
+ static ɵcmp: i0.ɵɵComponentDeclaration<UiIconButton, "brickclay-icon-button", never, { "icon": { "alias": "icon"; "required": false; }; "alt": { "alias": "alt"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "buttonClass": { "alias": "buttonClass"; "required": false; }; }, { "clicked": "clicked"; }, never, never, true, never>;
501
+ }
502
+
503
+ interface GroupItem {
504
+ label: string;
505
+ value: any;
506
+ }
507
+ type GroupMode = 'single' | 'multiple';
508
+ declare class ButtonGroup {
509
+ items: GroupItem[];
510
+ mode: GroupMode;
511
+ disabled: boolean;
512
+ value: any | any[];
513
+ valueChange: EventEmitter<any>;
514
+ onItemClick(itemValue: any): void;
515
+ isActive(itemValue: any): boolean;
516
+ get containerClass(): string;
517
+ static ɵfac: i0.ɵɵFactoryDeclaration<ButtonGroup, never>;
518
+ static ɵcmp: i0.ɵɵComponentDeclaration<ButtonGroup, "brickclay-button-group", never, { "items": { "alias": "items"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, true, never>;
519
+ }
520
+
521
+ declare class Textarea implements ControlValueAccessor {
522
+ private ngControl;
523
+ name: string;
524
+ id?: string;
525
+ label: string;
526
+ placeholder: string;
527
+ rows: number;
528
+ hint: string;
529
+ required: boolean;
530
+ maxLength: number | null;
531
+ hasError: boolean | null;
532
+ errorMessage: string;
533
+ trimWhiteSpaces: boolean;
534
+ eventType: 'input' | 'change' | 'blur';
535
+ value: string;
536
+ isDisabled: boolean;
537
+ onChange: (_: any) => void;
538
+ onTouched: () => void;
539
+ constructor(ngControl: NgControl);
540
+ get effectiveId(): string;
541
+ get control(): any;
542
+ get touched(): boolean;
543
+ get dirty(): boolean;
544
+ get errors(): any;
545
+ get showError(): boolean;
546
+ handleEvent(event: Event): void;
547
+ writeValue(value: any): void;
548
+ registerOnChange(fn: any): void;
549
+ registerOnTouched(fn: any): void;
550
+ setDisabledState(isDisabled: boolean): void;
551
+ static ɵfac: i0.ɵɵFactoryDeclaration<Textarea, [{ optional: true; self: true; }]>;
552
+ static ɵcmp: i0.ɵɵComponentDeclaration<Textarea, "brickclay-textarea", never, { "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "required": { "alias": "required"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "hasError": { "alias": "hasError"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "trimWhiteSpaces": { "alias": "trimWhiteSpaces"; "required": false; }; "eventType": { "alias": "eventType"; "required": false; }; }, {}, never, never, true, never>;
553
+ }
554
+
555
+ export { BadgeComponent, BrickclayIcons, BrickclayLib, ButtonGroup, CalendarManagerService, CalendarModule, CheckboxComponent, CustomCalendarComponent, PillComponent, RadioComponent, ScheduledDatePickerComponent, Spinner, Textarea, TimePickerComponent, ToggleComponent, UiButton, UiIconButton };
556
+ export type { BadgeColor, BadgeSize, BadgeVariant, ButtonSize, ButtonVariant, CalendarRange, CalendarSelection, GroupItem, GroupMode, IconButtonSize, IconButtonVariant, PillColor, PillSize, PillVariant, ScheduledDateSelection, SpinnerSize, TimeConfiguration };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brickclay-org/ui",
3
- "version": "0.0.14",
3
+ "version": "0.0.17",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=17.0.0 <=21.0.0",
6
6
  "@angular/core": ">=17.0.0 <=21.0.0",
@@ -0,0 +1,85 @@
1
+ /* --- BASE --- */
2
+ .badge {
3
+ @apply inline-flex items-center justify-center font-medium border transition-colors duration-200 cursor-default gap-1.5 rounded-[4px];
4
+ }
5
+
6
+ /* --- SHAPES --- */
7
+ .isBadge {
8
+ @apply rounded-[4px]; /* ≈ 4px */
9
+ }
10
+
11
+ .isPill {
12
+ @apply rounded-full;
13
+ }
14
+
15
+
16
+ /* --- SIZES --- */
17
+ .badge-xsm { @apply px-2 py-0.5 text-[10px] leading-[14px]; }
18
+ .badge-sm { @apply px-2 py-0.5 text-xs leading-[18px]; }
19
+ .badge-md { @apply px-2 py-0.5 text-sm; }
20
+ .badge-lg { @apply px-3 py-1 text-sm; }
21
+
22
+
23
+ /* --- DYNAMIC ELEMENTS (Dots & Close) --- */
24
+
25
+ /* OPTIMIZATION: 'bg-current' makes the dot the same color as the text.
26
+ This works for Solids (Text is white -> Dot is white)
27
+ and Outlines (Text is Blue -> Dot is Blue).
28
+ */
29
+ .dot {
30
+ @apply rounded-full size-1.5 flex-shrink-0 flex-grow-0 bg-current;
31
+ }
32
+
33
+ /* Inherit text color for the SVG stroke */
34
+ .badge-close {
35
+ @apply flex items-center justify-center rounded-full text-inherit transition-colors;
36
+ }
37
+
38
+ /* Sizes for close button based on parent size */
39
+ .badge-xsm .badge-close { @apply w-3 h-3; }
40
+ .badge-sm .badge-close { @apply w-3 h-3; }
41
+ .badge-md .badge-close,
42
+ .badge-lg .badge-close { @apply w-3.5 h-3.5; }
43
+
44
+
45
+ /* --- VARIANTS: SOLID --- */
46
+ .Gray-Solid { @apply bg-[#6B7080] border-[#6B7080] text-white; }
47
+ .Primary-Solid { @apply bg-[#294FFF] border-[#294FFF] text-white; }
48
+ .Error-Solid { @apply bg-[#FA727A] border-[#FA727A] text-[#4C0513]; }
49
+ .Warning-Solid { @apply bg-[#FA9E3A] border-[#FA9E3A] text-[#461C04]; }
50
+ /* Fixed Custom Dot color for Success Solid if you want it darker than text, otherwise remove next line */
51
+ .Success-Solid { @apply bg-[#57D175] border-[#57D175] text-[#461C04]; }
52
+ .Success-Solid .dot { @apply bg-[#082B13]; } /* Override bg-current only here */
53
+
54
+ .Purple-Solid { @apply bg-[#CE8EF2] border-[#CE8EF2] text-[#461C04]; }
55
+ .Cyan-Solid { @apply bg-[#3FC2F1] border-[#3FC2F1] text-[#461C04]; }
56
+
57
+
58
+ /* --- VARIANTS: LIGHT --- */
59
+ .Gray-Light { @apply bg-[#F4F4F6] border-transparent text-[#363C51]; }
60
+ .Primary-Light { @apply bg-[#E5F3FF] border-transparent text-[#1434CB]; }
61
+ .Error-Light { @apply bg-[#FFF1F1] border-transparent text-[#CB1432]; }
62
+ .Warning-Light { @apply bg-[#FFEED7] border-transparent text-[#A04C02]; }
63
+ .Success-Light { @apply bg-[#F1FCF3] border-transparent text-[#1E7735]; }
64
+ .Purple-Light { @apply bg-[#F6EAFD] border-transparent text-[#9130C0]; }
65
+ .Cyan-Light { @apply bg-[#F1FAFE] border-transparent text-[#096E9B]; }
66
+
67
+
68
+ /* --- VARIANTS: OUTLINE --- */
69
+ .Gray-Outline { @apply bg-[#F4F4F6] border-[#BBBDC5] text-[#363C51]; }
70
+ .Primary-Outline { @apply bg-[#E5F3FF] border-[#3F71FF] text-[#1434CB]; }
71
+ .Error-Outline { @apply bg-[#FFF1F1] border-[#FA727A] text-[#CB1432]; }
72
+ .Warning-Outline { @apply bg-[#FFEED7] border-[#FBAE58] text-[#A04C02]; }
73
+ .Success-Outline { @apply bg-[#F1FCF3] border-[#57D175] text-[#1E7735]; }
74
+ .Purple-Outline { @apply bg-[#F6EAFD] border-[#CE8EF2] text-[#9130C0]; }
75
+ .Cyan-Outline { @apply bg-[#F1FAFE] border-[#3FC2F1] text-[#096E9B]; }
76
+
77
+
78
+ /* --- VARIANTS: TRANSPARENT --- */
79
+ .Gray-Transparent { @apply bg-transparent border-[#BBBDC5] text-[#363C51]; }
80
+ .Primary-Transparent { @apply bg-transparent border-[#3F71FF] text-[#1434CB]; }
81
+ .Error-Transparent { @apply bg-transparent border-[#FA727A] text-[#CB1432]; }
82
+ .Warning-Transparent { @apply bg-transparent border-[#FBAE58] text-[#A04C02]; }
83
+ .Success-Transparent { @apply bg-transparent border-[#57D175] text-[#1E7735]; }
84
+ .Purple-Transparent { @apply bg-transparent border-[#CE8EF2] text-[#9130C0]; }
85
+ .Cyan-Transparent { @apply bg-transparent border-[#3FC2F1] text-[#096E9B]; }
@@ -0,0 +1,34 @@
1
+ /* Main Container */
2
+ /* Simulates the border box surrounding the buttons */
3
+ .group-container {
4
+ @apply inline-flex items-center border border-[#E1E3EA] bg-white rounded-md p-1 gap-2.5 select-none transition-all;
5
+ }
6
+
7
+ /* Individual Button Item */
8
+ .group-item {
9
+ @apply flex items-center justify-center font-medium rounded-md transition-all duration-200 cursor-pointer text-center relative;
10
+ }
11
+
12
+ /* --- STATES --- */
13
+
14
+ /* Active State (Black Background) */
15
+ .group-item.active {
16
+ @apply bg-black text-white shadow-sm;
17
+ }
18
+
19
+ /* Inactive State (Transparent/Gray) */
20
+ .group-item.inactive {
21
+ @apply text-[#6B7080] hover:bg-gray-50;
22
+ }
23
+
24
+ /* --- SIZES --- */
25
+
26
+ /* Small */
27
+ .group-container .group-item {
28
+ @apply px-4 py-[3px] text-[13px] leading-5;
29
+ }
30
+ .group-container.disabled .group-item {
31
+ @apply opacity-50 cursor-not-allowed;
32
+ }
33
+
34
+
@@ -0,0 +1,77 @@
1
+ /* --- BASE --- */
2
+ .pill {
3
+ @apply inline-flex items-center justify-center font-medium border transition-colors duration-200 cursor-default gap-1.5 rounded-full;
4
+ }
5
+
6
+
7
+
8
+ /* --- SIZES --- */
9
+ .pill-xsm { @apply px-2 py-0.5 text-[10px] leading-[14px]; }
10
+ .pill-sm { @apply px-2 py-0.5 text-xs leading-[18px]; }
11
+ .pill-md { @apply px-2 py-0.5 text-sm; }
12
+ .pill-lg { @apply px-3 py-1 text-sm; }
13
+
14
+
15
+ /* --- DYNAMIC ELEMENTS (Dots & Close) --- */
16
+
17
+ /* OPTIMIZATION: 'bg-current' makes the dot the same color as the text.
18
+ This works for Solids (Text is white -> Dot is white)
19
+ and Outlines (Text is Blue -> Dot is Blue).
20
+ */
21
+ .dot {
22
+ @apply rounded-full size-1.5 flex-shrink-0 flex-grow-0 bg-current;
23
+ }
24
+
25
+ /* Inherit text color for the SVG stroke */
26
+ .pill-close {
27
+ @apply flex items-center justify-center rounded-full text-inherit transition-colors;
28
+ }
29
+
30
+ /* Sizes for close button based on parent size */
31
+ .pill-xsm .pill-close { @apply w-3 h-3; }
32
+ .pill-sm .pill-close { @apply w-3 h-3; }
33
+ .pill-md .pill-close,
34
+ .pill-lg .pill-close { @apply w-3.5 h-3.5; }
35
+
36
+
37
+ /* --- VARIANTS: SOLID --- */
38
+ .Gray-Solid { @apply bg-[#6B7080] border-[#6B7080] text-white; }
39
+ .Primary-Solid { @apply bg-[#294FFF] border-[#294FFF] text-white; }
40
+ .Error-Solid { @apply bg-[#FA727A] border-[#FA727A] text-[#4C0513]; }
41
+ .Warning-Solid { @apply bg-[#FA9E3A] border-[#FA9E3A] text-[#461C04]; }
42
+ /* Fixed Custom Dot color for Success Solid if you want it darker than text, otherwise remove next line */
43
+ .Success-Solid { @apply bg-[#57D175] border-[#57D175] text-[#461C04]; }
44
+ .Success-Solid .dot { @apply bg-[#082B13]; } /* Override bg-current only here */
45
+
46
+ .Purple-Solid { @apply bg-[#CE8EF2] border-[#CE8EF2] text-[#461C04]; }
47
+ .Cyan-Solid { @apply bg-[#3FC2F1] border-[#3FC2F1] text-[#461C04]; }
48
+
49
+
50
+ /* --- VARIANTS: LIGHT --- */
51
+ .Gray-Light { @apply bg-[#F4F4F6] border-transparent text-[#363C51]; }
52
+ .Primary-Light { @apply bg-[#E5F3FF] border-transparent text-[#1434CB]; }
53
+ .Error-Light { @apply bg-[#FFF1F1] border-transparent text-[#CB1432]; }
54
+ .Warning-Light { @apply bg-[#FFEED7] border-transparent text-[#A04C02]; }
55
+ .Success-Light { @apply bg-[#F1FCF3] border-transparent text-[#1E7735]; }
56
+ .Purple-Light { @apply bg-[#F6EAFD] border-transparent text-[#9130C0]; }
57
+ .Cyan-Light { @apply bg-[#F1FAFE] border-transparent text-[#096E9B]; }
58
+
59
+
60
+ /* --- VARIANTS: OUTLINE --- */
61
+ .Gray-Outline { @apply bg-[#F4F4F6] border-[#BBBDC5] text-[#363C51]; }
62
+ .Primary-Outline { @apply bg-[#E5F3FF] border-[#3F71FF] text-[#1434CB]; }
63
+ .Error-Outline { @apply bg-[#FFF1F1] border-[#FA727A] text-[#CB1432]; }
64
+ .Warning-Outline { @apply bg-[#FFEED7] border-[#FBAE58] text-[#A04C02]; }
65
+ .Success-Outline { @apply bg-[#F1FCF3] border-[#57D175] text-[#1E7735]; }
66
+ .Purple-Outline { @apply bg-[#F6EAFD] border-[#CE8EF2] text-[#9130C0]; }
67
+ .Cyan-Outline { @apply bg-[#F1FAFE] border-[#3FC2F1] text-[#096E9B]; }
68
+
69
+
70
+ /* --- VARIANTS: TRANSPARENT --- */
71
+ .Gray-Transparent { @apply bg-transparent border-[#BBBDC5] text-[#363C51]; }
72
+ .Primary-Transparent { @apply bg-transparent border-[#3F71FF] text-[#1434CB]; }
73
+ .Error-Transparent { @apply bg-transparent border-[#FA727A] text-[#CB1432]; }
74
+ .Warning-Transparent { @apply bg-transparent border-[#FBAE58] text-[#A04C02]; }
75
+ .Success-Transparent { @apply bg-transparent border-[#57D175] text-[#1E7735]; }
76
+ .Purple-Transparent { @apply bg-transparent border-[#CE8EF2] text-[#9130C0]; }
77
+ .Cyan-Transparent { @apply bg-transparent border-[#3FC2F1] text-[#096E9B]; }
@@ -0,0 +1,32 @@
1
+ /* Base Animation & Shape */
2
+ .spinner {
3
+ @apply inline-block rounded-full animate-spin border-current border-t-transparent;
4
+ border-style: solid;
5
+ }
6
+
7
+ /* --- EXACT SIZES --- */
8
+
9
+ /* 1. 15px */
10
+ .spinner.xsm {
11
+ @apply w-[15px] h-[15px] border-[1.5px];
12
+ }
13
+
14
+ /* 2. 25px */
15
+ .spinner.sm {
16
+ @apply w-[25px] h-[25px] border-[2.34px];
17
+ }
18
+
19
+ /* 3. 35px */
20
+ .spinner.md {
21
+ @apply w-[35px] h-[35px] border-[3.28px];
22
+ }
23
+
24
+ /* 4. 50px */
25
+ .spinner.lg {
26
+ @apply w-[50px] h-[50px] border-[4.7px];
27
+ }
28
+
29
+ /* 5. 64px */
30
+ .spinner.xl {
31
+ @apply w-[64px] h-[64px] border-[6px];
32
+ }
File without changes
@@ -0,0 +1,72 @@
1
+ /* Base Button Style */
2
+ .btn {
3
+ @apply border rounded transition-colors duration-200 cursor-pointer;
4
+ }
5
+
6
+ /* --- VARIANTS --- */
7
+
8
+ .btn-primary {
9
+ @apply
10
+ font-medium flex justify-center gap-2 items-center bg-black text-white
11
+
12
+ /* FOCUS */
13
+ focus-visible:outline-2 focus-visible:outline-offset-[2.5px] focus-visible:outline-black
14
+
15
+ /* ACTIVE */
16
+ active:bg-[#242424]
17
+
18
+ /* DISABLED */
19
+ disabled:opacity-90 disabled:cursor-not-allowed disabled:bg-[#242424];
20
+ }
21
+ .btn-primary.xxl {
22
+ @apply gap-3
23
+ }
24
+
25
+ .btn-secondary {
26
+ @apply
27
+ font-medium flex justify-center gap-2 items-center
28
+ bg-white text-[#6B7080]
29
+
30
+ /* FOCUS */
31
+ focus-visible:outline-2 focus-visible:outline-offset-[3px] focus-visible:outline-[#F5F5FA]
32
+
33
+ /* ACTIVE */
34
+ active:bg-[#F4F4F6]
35
+
36
+ /* DISABLED */
37
+ disabled:opacity-90 disabled:cursor-not-allowed disabled:bg-[#F4F4F6];
38
+ }
39
+
40
+ /* --- SIZES --- */
41
+ /* These classes define padding, text size, AND icon/spinner size */
42
+
43
+ .xxsm { @apply px-2 py-1 text-xs leading-[18px]; }
44
+ .xsm { @apply px-3 py-2 text-xs leading-[18px]; }
45
+ .sm { @apply px-[14px] py-2 text-sm; }
46
+ .md { @apply px-4 py-2.5 text-sm; }
47
+ .lg { @apply px-[18px] py-2.5 text-base; }
48
+ .xl { @apply px-5 py-3 text-base; }
49
+ .xxl { @apply px-7 py-4 text-lg leading-[26px]; }
50
+
51
+ /* --- ICON SIZING (Nested) --- */
52
+ .xxsm .icon { @apply size-[11px]; }
53
+ .xsm .icon { @apply size-[15px]; }
54
+ .sm .icon { @apply size-4; }
55
+ .md .icon { @apply size-4; }
56
+ .lg .icon { @apply size-4; }
57
+ .xl .icon { @apply size-4; }
58
+ .xxl .icon { @apply size-5; }
59
+
60
+ /* --- SPINNER --- */
61
+ .spinner {
62
+ @apply shrink-0 border-t-transparent rounded-full animate-spin border-current;
63
+ }
64
+
65
+ /* Spinner sizing per button size */
66
+ .xxsm .spinner { @apply size-[14px] border-[1.5px]; }
67
+ .xsm .spinner { @apply size-[15px] border-[1.5px]; }
68
+ .sm .spinner { @apply size-[15px] border-[1.5px]; }
69
+ .md .spinner { @apply size-[15px] border-[1.5px]; }
70
+ .lg .spinner { @apply size-[15px] border-[1.5px]; }
71
+ .xl .spinner { @apply size-[15px] border-[1.5px]; }
72
+ .xxl .spinner { @apply size-[24px] border-[2.34px]; }
@@ -0,0 +1,51 @@
1
+ /* Base Shape */
2
+ .btn-icon {
3
+ @apply rounded border flex items-center justify-center transition-all duration-200 cursor-pointer shrink-0 shadow;
4
+ }
5
+
6
+ /* --- VARIANTS --- */
7
+
8
+ /* 1. Primary: Solid Black (Matches your top row) */
9
+ .btn-icon.primary {
10
+ @apply bg-black text-white
11
+ focus-visible:outline-2 focus-visible:outline-offset-[2.5px] focus-visible:outline-black
12
+ active:bg-[#242424]
13
+ disabled:opacity-80 disabled:cursor-not-allowed;
14
+ }
15
+
16
+ /* 2. Secondary: White with Gray Border (Matches your existing secondary) */
17
+ .btn-icon.secondary {
18
+ @apply bg-white border-[#E3E3E7] text-[#6B7080]
19
+ /* FOCUS */
20
+ focus-visible:outline-2 focus-visible:outline-offset-[3px] focus-visible:outline-[#F5F5FA]
21
+ /* ACTIVE */
22
+ active:bg-[#F4F4F6]
23
+
24
+ /* DISABLED */
25
+ disabled:opacity-50 disabled:cursor-not-allowed disabled:bg-[#F4F4F6];
26
+
27
+ }
28
+
29
+
30
+ /* --- SIZES (Square Dimensions) --- */
31
+ /* These specific heights match the calculated height of your text buttons */
32
+
33
+ .btn-icon.xxsm { @apply p-1.5;}
34
+ .btn-icon.xsm { @apply p-1.5;}
35
+ .btn-icon.sm { @apply p-2;}
36
+ .btn-icon.md { @apply p-2.5;}
37
+ .btn-icon.lg { @apply p-3;}
38
+ .btn-icon.xl { @apply p-[14px];}
39
+ .btn-icon.xxl { @apply p-4;}
40
+
41
+ /* --- ICON SIZING --- */
42
+ /* Ensures icons scale nicely within the square */
43
+ .btn-icon.xxsm .icon { @apply size-[14px]; }
44
+ .btn-icon.xsm .icon { @apply size-[18px]; }
45
+ .btn-icon.sm .icon { @apply size-[20px]; }
46
+ .btn-icon.md .icon { @apply size-[20px]; }
47
+ .btn-icon.lg .icon { @apply size-[20px]; }
48
+ .btn-icon.xl .icon { @apply size-[20px]; }
49
+ .btn-icon.xxl .icon { @apply size-[26px]; }
50
+
51
+
package/src/styles.css CHANGED
@@ -2,3 +2,10 @@
2
2
  @import './lib/toggle/toggle.css';
3
3
  @import './lib/checkbox/checkbox.css';
4
4
  @import './lib/radio/radio.css';
5
+ @import './lib/pill/pill.css';
6
+ @import './lib/badge/badge.css';
7
+ @import './lib/spinner/spinner.css';
8
+ @import './lib/ui-button/ui-button.css';
9
+ @import './lib/ui-icon-button/ui-icon-button.css';
10
+ @import './lib/button-group/button-group.css';
11
+ @import './lib/textarea/textarea.css';