shirkasoft-ui-components 1.1.2 → 1.2.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/README.md CHANGED
@@ -11,6 +11,10 @@
11
11
  Created by <a href="https://shirkasoft.com" target="_blank"><strong>Shirkasoft</strong></a>
12
12
  </p>
13
13
 
14
+ <p align="center">
15
+ <img src="projects/showcase/public/readme.png" alt="Shirkasoft UI Components showcase" />
16
+ </p>
17
+
14
18
  Angular 21+ UI components library built with **Tailwind CSS**, **standalone components**, **Angular signals**, and **light/dark theme** support via CSS custom properties.
15
19
 
16
20
  ## Installation
@@ -80,6 +84,12 @@ document.documentElement.classList.toggle('dark');
80
84
  | 12 | Tooltip | `shk-tooltip` | — | — |
81
85
  | 13 | Sidebar | `shk-sidebar` | — | — |
82
86
  | 14 | Rail Sidebar | `shk-rail-sidebar` | — | — |
87
+ | 15 | Skeleton | `shk-skeleton` | — | — |
88
+ | 16 | Tag | `shk-tag` | — | — |
89
+ | 17 | Button | `shk-button` | — | — |
90
+ | 18 | Knob | `shk-knob` | ✅ | — |
91
+ | 19 | Loading | `shk-loading-*` | — | — |
92
+ | 20 | Tabs | `shk-tabs` | — | — |
83
93
 
84
94
  ---
85
95
 
@@ -789,6 +799,212 @@ interface RailSidebarItem {
789
799
 
790
800
  ---
791
801
 
802
+ ### Skeleton (`shk-skeleton`)
803
+
804
+ Placeholder block shown while content is loading. Rectangular or circular, with `wave`, `pulse` or no animation.
805
+
806
+ ```html
807
+ <shk-skeleton height="1.5rem" width="60%" />
808
+ <shk-skeleton shape="circle" size="5rem" />
809
+ <shk-skeleton width="16rem" height="5rem" borderRadius="12px" animation="pulse" />
810
+ ```
811
+
812
+ | Input | Type | Default |
813
+ | -------------- | ----------------------------- | ------------ |
814
+ | `shape` | `'rectangle' \| 'circle'` | `'rectangle'`|
815
+ | `size` | `string` | `''` (circle)|
816
+ | `width` | `string` | `'100%'` |
817
+ | `height` | `string` | `'1rem'` |
818
+ | `borderRadius` | `string` | `'0.25rem'` |
819
+ | `animation` | `'wave' \| 'pulse' \| 'none'` | `'wave'` |
820
+ | `style` | `object` | `{}` |
821
+ | `styleClass` | `string` | `''` |
822
+
823
+ ---
824
+
825
+ ### Tag (`shk-tag`)
826
+
827
+ Small label used to highlight a value, status or category.
828
+
829
+ ```html
830
+ <shk-tag value="Activo" severity="success" [rounded]="true" />
831
+ <shk-tag value="Precio" severity="contrast" icon="dollar-sign" />
832
+ ```
833
+
834
+ ```typescript
835
+ type TagSeverity = 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'contrast';
836
+ ```
837
+
838
+ | Input | Type | Default |
839
+ | ------------ | -------------- | ------------- |
840
+ | `value` | `string \| number` | `''` |
841
+ | `severity` | `TagSeverity` | `'secondary'` |
842
+ | `rounded` | `boolean` | `false` |
843
+ | `icon` | `string` | `''` (lucide) |
844
+ | `style` | `object` | `{}` |
845
+ | `styleClass` | `string` | `''` |
846
+
847
+ ---
848
+
849
+ ### Button (`shk-button`)
850
+
851
+ Generic button with severity variants, lucide icons, sizes and a loading state. Icons are resolved by name from a built-in lucide registry (`plus`, `pencil`, `trash-2`, `search`, `arrow-right`, …).
852
+
853
+ ```html
854
+ <shk-button label="Añadir" icon="plus" (onClick)="create()" />
855
+ <shk-button label="Eliminar" severity="danger" [outlined]="true" />
856
+ <shk-button [label]="loading() ? 'Cargando…' : 'Guardar'" [loading]="loading()" />
857
+ <shk-button icon="search" severity="secondary" [rounded]="true" ariaLabel="Buscar" />
858
+ ```
859
+
860
+ ```typescript
861
+ type ButtonSeverity = 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'danger' | 'help' | 'contrast';
862
+ type ButtonSize = 'small' | 'large';
863
+ type ButtonIconPosition = 'left' | 'right' | 'top' | 'bottom';
864
+ ```
865
+
866
+ | Input | Type | Default |
867
+ | ------------- | ------------------ | ------------ |
868
+ | `label` | `string` | `''` |
869
+ | `icon` | `string` | `''` (lucide)|
870
+ | `iconPos` | `ButtonIconPosition`| `'left'` |
871
+ | `severity` | `ButtonSeverity` | `'primary'` |
872
+ | `outlined` | `boolean` | `false` |
873
+ | `text` | `boolean` | `false` |
874
+ | `raised` | `boolean` | `false` |
875
+ | `rounded` | `boolean` | `false` |
876
+ | `size` | `ButtonSize` | `undefined` |
877
+ | `disabled` | `boolean` | `false` |
878
+ | `loading` | `boolean` | `false` |
879
+ | `loadingIcon` | `string` | `'refresh'` |
880
+ | `loadingText` | `string` | `''` |
881
+ | `type` | `'button' \| 'submit' \| 'reset'` | `'button'` |
882
+ | `ariaLabel` | `string` | `''` |
883
+ | `title` | `string` | `''` |
884
+ | `style` | `object` | `{}` |
885
+ | `styleClass` | `string` | `''` |
886
+
887
+ | Output | Type |
888
+ | -------- | ------------ |
889
+ | `onClick`| `MouseEvent` |
890
+
891
+ ---
892
+
893
+ ### Knob (`shk-knob`)
894
+
895
+ SVG radial knob with pointer drag and keyboard (arrow keys) support. Implements `ControlValueAccessor` (reactive forms / `[(ngModel)]`), and also offers `[(value)]`.
896
+
897
+ ```html
898
+ <shk-knob [formControl]="scoreCtrl" [min]="0" [max]="10" [step]="0.5" [size]="120" />
899
+ <shk-knob [(value)]="value" valueColor="#3b82f6" rangeColor="#e2e8f0" />
900
+ ```
901
+
902
+ | Input | Type | Default |
903
+ | ------------- | --------- | -------------------------------- |
904
+ | `value` | `model<number>` | `0` |
905
+ | `min` | `number` | `0` |
906
+ | `max` | `number` | `100` |
907
+ | `step` | `number` | `1` |
908
+ | `size` | `number` | `100` (px) |
909
+ | `strokeWidth` | `number` | `14` |
910
+ | `valueColor` | `string` | `var(--shk-primary-600)` |
911
+ | `rangeColor` | `string` | `var(--shk-surface-200)` |
912
+ | `showValue` | `boolean` | `true` |
913
+ | `disabled` | `boolean` | `false` |
914
+ | `readonly` | `boolean` | `false` |
915
+ | `ariaLabel` | `string` | `''` |
916
+
917
+ | Output | Type |
918
+ | -------- | -------- |
919
+ | `change` | `number` |
920
+ | `end` | `number` |
921
+
922
+ ---
923
+
924
+ ### Loading (`shk-loading-*`)
925
+
926
+ A set of reusable loading indicators: spinner, indeterminate/determinate bar, dots and overlay.
927
+
928
+ ```html
929
+ <shk-loading-spinner [size]="'2.5rem'" [thickness]="4" label="Cargando…" />
930
+ <shk-loading-bar [indeterminate]="true" height="0.5rem" />
931
+ <shk-loading-bar [indeterminate]="false" [progress]="progress()" />
932
+ <shk-loading-dots [count]="5" label="Enviando…" />
933
+ <shk-loading-overlay [visible]="loading" message="Cargando datos…" [backdrop]="'light'">
934
+ <!-- content to cover -->
935
+ </shk-loading-overlay>
936
+ ```
937
+
938
+ **`shk-loading-spinner`**
939
+
940
+ | Input | Type | Default |
941
+ | ---------- | -------- | ------- |
942
+ | `size` | `string` | `'2rem'`|
943
+ | `thickness`| `number` | `3` |
944
+ | `color` | `string` | primary token |
945
+ | `label` | `string` | `''` |
946
+
947
+ **`shk-loading-bar`**
948
+
949
+ | Input | Type | Default |
950
+ | -------------- | --------- | ------------ |
951
+ | `height` | `string` | `'0.25rem'` |
952
+ | `indeterminate`| `boolean` | `true` |
953
+ | `progress` | `number` | `0` (0-100) |
954
+ | `color` | `string` | primary token|
955
+ | `rounded` | `boolean` | `true` |
956
+
957
+ **`shk-loading-dots`**
958
+
959
+ | Input | Type | Default |
960
+ | ------- | -------- | ------------ |
961
+ | `size` | `string` | `'0.5rem'` |
962
+ | `color` | `string` | primary token|
963
+ | `count` | `number` | `3` |
964
+ | `label` | `string` | `''` |
965
+
966
+ **`shk-loading-overlay`**
967
+
968
+ | Input | Type | Default |
969
+ | ------------ | ---------------------------------- | -------------- |
970
+ | `visible` | `boolean` | `false` |
971
+ | `message` | `string` | `''` |
972
+ | `spinnerSize`| `string` | `'2.5rem'` |
973
+ | `color` | `string` | primary token |
974
+ | `backdrop` | `'transparent' \| 'light' \| 'dark'` | `'transparent'` |
975
+
976
+ ---
977
+
978
+ ### Tabs (`shk-tabs`)
979
+
980
+ Tabbed content with a PrimeNG-like nested API. Values can be numbers or strings; the active value is two-way bindable.
981
+
982
+ ```html
983
+ <shk-tabs [value]="activeTab()" (valueChange)="onTabChange($event)" [scrollable]="true">
984
+ <shk-tablist [scrollable]="true">
985
+ <shk-tab [value]="0">General</shk-tab>
986
+ <shk-tab [value]="1">Detalle</shk-tab>
987
+ <shk-tab [value]="2" [disabled]="true">Bloqueado</shk-tab>
988
+ </shk-tablist>
989
+ <shk-tabpanels>
990
+ <shk-tabpanel [value]="0">Contenido General</shk-tabpanel>
991
+ <shk-tabpanel [value]="1">Contenido Detalle</shk-tabpanel>
992
+ </shk-tabpanels>
993
+ </shk-tabs>
994
+ ```
995
+
996
+ | Selector | Inputs | Outputs |
997
+ | ------------- | ------------------------ | --------------- |
998
+ | `shk-tabs` | `value` (model), `scrollable` | `valueChange` |
999
+ | `shk-tablist` | `scrollable`, `styleClass` | — |
1000
+ | `shk-tab` | `value`, `disabled`, `styleClass` | — |
1001
+ | `shk-tabpanels`| — | — |
1002
+ | `shk-tabpanel`| `value` | — |
1003
+
1004
+ > Panels are rendered lazily: only the active panel exists in the DOM.
1005
+
1006
+ ---
1007
+
792
1008
  ## Development
793
1009
 
794
1010
  ```bash