@comercti/react-components 0.10.0 → 0.12.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/index.d.ts CHANGED
@@ -31,6 +31,9 @@ striped: boolean;
31
31
  orderByServer: boolean;
32
32
  expandLine: boolean;
33
33
  compact: boolean;
34
+ loading: boolean;
35
+ loadingType: "spinner" | "semi-circle" | "dots";
36
+ truncated: boolean;
34
37
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
35
38
  rootRef: HTMLDivElement;
36
39
  }, HTMLDivElement>;
@@ -58,6 +61,7 @@ onLogout?: (value: boolean) => any;
58
61
  }>, {
59
62
  itemsMenu: ItensMenu_2[];
60
63
  itemsMenuMyService: ItensMenu_2[];
64
+ itemsSearch: ItensMenu_2[];
61
65
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
62
66
 
63
67
  declare const __VLS_component_13: DefineComponent<IBreadcrumbsProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
@@ -109,10 +113,7 @@ onSubmit?: () => any;
109
113
  onClear?: () => any;
110
114
  }>, {
111
115
  title: string;
112
- color: string;
113
116
  variant: "dropdown" | "collapse";
114
- backgroundColor: string;
115
- titleColor: string;
116
117
  disabledSubmit: boolean;
117
118
  disabledClear: boolean;
118
119
  showClearButton: boolean;
@@ -134,9 +135,9 @@ close: (value: boolean) => any;
134
135
  onClose?: (value: boolean) => any;
135
136
  }>, {
136
137
  rounded: boolean;
137
- isOpen: boolean;
138
+ background: "white" | "green";
138
139
  position: "top" | "bottom";
139
- background: "1" | "2";
140
+ isOpen: boolean;
140
141
  showIcon: boolean;
141
142
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
142
143
 
@@ -151,6 +152,7 @@ onClick?: (event: MouseEvent) => any;
151
152
  disabled: boolean;
152
153
  block: boolean;
153
154
  type: "button" | "submit" | "a";
155
+ size: "xxs" | "xs" | "sm" | "md" | "lg" | "xl";
154
156
  rounded: "small" | "medium" | "large";
155
157
  variant: tipoVariante;
156
158
  }, {}, {}, {}, string, ComponentProvideOptions, true, {
@@ -162,8 +164,8 @@ close: (value: boolean) => any;
162
164
  }, string, PublicProps, Readonly<__VLS_Props_25> & Readonly<{
163
165
  onClose?: (value: boolean) => any;
164
166
  }>, {
165
- isOpen: boolean;
166
167
  background: "1" | "2";
168
+ isOpen: boolean;
167
169
  closeOutside: boolean;
168
170
  showCloseButton: boolean;
169
171
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
@@ -219,13 +221,13 @@ rootRef: HTMLDivElement;
219
221
  }, any>;
220
222
 
221
223
  declare const __VLS_component_5: DefineComponent<__VLS_Props_9, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
222
- "update:modelValue": (value: CustomEvent<any> | Date) => any;
223
- "update:start": (value: CustomEvent<any> | Date) => any;
224
- "update:end": (value: CustomEvent<any> | Date) => any;
224
+ "update:modelValue": (value: string | number | CustomEvent<any> | Date) => any;
225
+ "update:start": (value: string | number | CustomEvent<any> | Date) => any;
226
+ "update:end": (value: string | number | CustomEvent<any> | Date) => any;
225
227
  }, string, PublicProps, Readonly<__VLS_Props_9> & Readonly<{
226
- "onUpdate:modelValue"?: (value: CustomEvent<any> | Date) => any;
227
- "onUpdate:start"?: (value: CustomEvent<any> | Date) => any;
228
- "onUpdate:end"?: (value: CustomEvent<any> | Date) => any;
228
+ "onUpdate:modelValue"?: (value: string | number | CustomEvent<any> | Date) => any;
229
+ "onUpdate:start"?: (value: string | number | CustomEvent<any> | Date) => any;
230
+ "onUpdate:end"?: (value: string | number | CustomEvent<any> | Date) => any;
229
231
  }>, {
230
232
  invalid: boolean;
231
233
  disabled: boolean;
@@ -233,6 +235,7 @@ range: boolean;
233
235
  rounded: boolean;
234
236
  noAlertIcon: boolean;
235
237
  modal: boolean;
238
+ format: FormatDate;
236
239
  }, {}, {}, {}, string, ComponentProvideOptions, true, {
237
240
  rootRef: HTMLDivElement;
238
241
  }, any>;
@@ -297,6 +300,7 @@ onCloseDropdown?: () => any;
297
300
  }>, {
298
301
  invalid: boolean;
299
302
  disabled: boolean;
303
+ reserveSpaceFeedback: boolean;
300
304
  search: boolean;
301
305
  multiple: boolean;
302
306
  closeChip: boolean;
@@ -387,6 +391,8 @@ declare type __VLS_Props_12 = {
387
391
  disabled?: boolean;
388
392
  /** Abrange toda a largura de um elemento para o radio */
389
393
  block?: boolean;
394
+ /** Exibe os radios em uma linha */
395
+ row?: boolean;
390
396
  };
391
397
 
392
398
  declare type __VLS_Props_13 = {
@@ -397,7 +403,7 @@ declare type __VLS_Props_13 = {
397
403
  /** Define o contorno do toggle */
398
404
  contoured?: boolean;
399
405
  /** Idenficador do toggle */
400
- id: string;
406
+ id?: string;
401
407
  /** Informa que está invalido */
402
408
  invalid?: boolean;
403
409
  /** Label do toggle */
@@ -499,11 +505,15 @@ declare type __VLS_Props_18 = {
499
505
  name?: string;
500
506
  /** Email do usuário */
501
507
  email?: string;
508
+ /** Array de opções de pesquisa do menu */
509
+ itemsSearch?: ItensMenu_2[];
502
510
  };
503
511
 
504
512
  declare type __VLS_Props_19 = {
505
513
  /** Array de opções do menu */
506
514
  items: ItensMenu_2[];
515
+ /** Array de opções de pesquisa do menu */
516
+ itemsSearch?: ItensMenu_2[];
507
517
  /** Define se o menu está na home */
508
518
  isHome?: boolean;
509
519
  /** Define se o input de pesquisa será exibido */
@@ -523,6 +533,8 @@ declare type __VLS_Props_2 = {
523
533
  textDirection?: 'left' | 'right';
524
534
  /** Define o valor selecionado */
525
535
  modelValue: number;
536
+ /**Define a posição de abertura das opções */
537
+ position?: 'top' | 'bottom';
526
538
  };
527
539
 
528
540
  declare type __VLS_Props_20 = {
@@ -554,14 +566,8 @@ declare type __VLS_Props_21 = {
554
566
  declare type __VLS_Props_22 = {
555
567
  /** Define o tipo do filtro */
556
568
  variant?: 'dropdown' | 'collapse';
557
- /** Define a cor do texto e do ícone */
558
- color?: string;
559
- /** Define a cor do background */
560
- backgroundColor?: string;
561
569
  /** Define o título do filtro */
562
570
  title: string;
563
- /** Define a cor do título do filtro */
564
- titleColor?: string;
565
571
  /** Define o texto do botão */
566
572
  text: string;
567
573
  /**Desabilita o botão de submit */
@@ -591,7 +597,7 @@ declare type __VLS_Props_24 = {
591
597
  /** Define se o banner abre ou fecha */
592
598
  isOpen: boolean;
593
599
  /** Define a cor do background */
594
- background?: '1' | '2';
600
+ background?: 'white' | 'green';
595
601
  /** Define o border radius do banner */
596
602
  rounded?: boolean;
597
603
  /** Define se o icone aparece */
@@ -701,6 +707,8 @@ declare type __VLS_Props_34 = {
701
707
  declare type __VLS_Props_4 = {
702
708
  /** Tipo do button (`attrs:to` ou `attrs:href` podem sobrepor essa regra) */
703
709
  type?: 'button' | 'submit' | 'a';
710
+ /** Tamanho do button */
711
+ size?: 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
704
712
  /** Variante de cores do button */
705
713
  variant?: tipoVariante;
706
714
  /** Arredondamento do button */
@@ -778,7 +786,7 @@ declare type __VLS_Props_8 = {
778
786
  };
779
787
 
780
788
  declare type __VLS_Props_9 = {
781
- modelValue?: Date | string | null;
789
+ modelValue?: Date | string | null | number;
782
790
  start?: Date | string | null;
783
791
  end?: Date | string | null;
784
792
  /** Habilita range */
@@ -803,6 +811,8 @@ declare type __VLS_Props_9 = {
803
811
  rounded?: boolean;
804
812
  /** Desativa o sinalizador do input (quando não usa `slots['append-inner']`) */
805
813
  noAlertIcon?: boolean;
814
+ /** Define o formato da data retornada */
815
+ format?: FormatDate;
806
816
  };
807
817
 
808
818
  declare function __VLS_template(): {
@@ -1613,6 +1623,8 @@ declare interface CeSelectFieldProps {
1613
1623
  search?: boolean;
1614
1624
  /** Ativa botão de remover chip value */
1615
1625
  closeChip?: boolean;
1626
+ /** Se o select deve reservar espaço para feedback de erro */
1627
+ reserveSpaceFeedback?: boolean;
1616
1628
  }
1617
1629
 
1618
1630
  export declare const CeSlider: default_2.ComponentType<typeof _default_19>;
@@ -1651,6 +1663,12 @@ declare type DataTableProps = {
1651
1663
  expandLine?: boolean;
1652
1664
  /** Define o estilo compacto da tabela */
1653
1665
  compact?: boolean;
1666
+ /** Exibi o loading na tabela */
1667
+ loading?: boolean;
1668
+ /** tipo do loading na tabela */
1669
+ loadingType?: 'spinner' | 'semi-circle' | 'dots';
1670
+ /** Define se o texto das células será truncado */
1671
+ truncated?: boolean;
1654
1672
  };
1655
1673
 
1656
1674
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1692,12 +1710,12 @@ updateFiles: (file: FileItem[]) => any;
1692
1710
  onUpdateFiles?: (file: FileItem[]) => any;
1693
1711
  }>, {
1694
1712
  disabled: boolean;
1713
+ clear: boolean;
1695
1714
  accept: string[];
1696
1715
  multiple: boolean;
1697
1716
  maxFile: number;
1698
1717
  maxFileSize: number;
1699
1718
  selectAll: boolean;
1700
- clear: boolean;
1701
1719
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
1702
1720
 
1703
1721
  declare const _default_16: __VLS_WithTemplateSlots_7<typeof __VLS_component_7, __VLS_TemplateResult_7["slots"]>;
@@ -1715,6 +1733,7 @@ onChange?: (value: CustomEvent<any> | ModelValueType_2) => any;
1715
1733
  invalid: boolean;
1716
1734
  disabled: boolean;
1717
1735
  block: boolean;
1736
+ row: boolean;
1718
1737
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
1719
1738
 
1720
1739
  declare const _default_18: __VLS_WithTemplateSlots_8<typeof __VLS_component_8, __VLS_TemplateResult_8["slots"]>;
@@ -1756,7 +1775,7 @@ onChange?: (value: boolean | CustomEvent<any>) => any;
1756
1775
  invalid: boolean;
1757
1776
  disabled: boolean;
1758
1777
  contoured: boolean;
1759
- }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
1778
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
1760
1779
 
1761
1780
  declare const _default_21: __VLS_WithTemplateSlots_9<typeof __VLS_component_9, __VLS_TemplateResult_9["slots"]>;
1762
1781
 
@@ -1779,6 +1798,7 @@ toggleMenu: (clicado: boolean) => any;
1779
1798
  onRedirect?: (item: SubMenu | ItensMenu_2) => any;
1780
1799
  onToggleMenu?: (clicado: boolean) => any;
1781
1800
  }>, {
1801
+ itemsSearch: ItensMenu_2[];
1782
1802
  isHome: boolean;
1783
1803
  isSearch: boolean;
1784
1804
  isOpen: boolean;
@@ -1818,8 +1838,8 @@ declare const _default_36: __VLS_WithTemplateSlots_21<typeof __VLS_component_21,
1818
1838
 
1819
1839
  declare const _default_37: DefineComponent<__VLS_Props_27, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_27> & Readonly<{}>, {
1820
1840
  type: "spinner" | "semi-circle" | "dots";
1821
- background: "smoky" | "transparent";
1822
1841
  showLoading: boolean;
1842
+ background: "smoky" | "transparent";
1823
1843
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
1824
1844
 
1825
1845
  declare const _default_38: __VLS_WithTemplateSlots_22<typeof __VLS_component_22, __VLS_TemplateResult_22["slots"]>;
@@ -1837,8 +1857,8 @@ redirect: (valor?: string) => any;
1837
1857
  }, string, PublicProps, Readonly<__VLS_Props_32> & Readonly<{
1838
1858
  onRedirect?: (valor?: string) => any;
1839
1859
  }>, {
1840
- variant: "1" | "2" | "3" | "4" | "5";
1841
1860
  background: "white" | "green";
1861
+ variant: "1" | "2" | "3" | "4" | "5";
1842
1862
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
1843
1863
 
1844
1864
  declare const _default_43: __VLS_WithTemplateSlots_26<typeof __VLS_component_26, __VLS_TemplateResult_26["slots"]>;
@@ -1854,6 +1874,7 @@ onUpdatePerPage?: (value: number) => any;
1854
1874
  }>, {
1855
1875
  disabled: boolean;
1856
1876
  textDirection: "left" | "right";
1877
+ position: "top" | "bottom";
1857
1878
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
1858
1879
  menuRef: HTMLDivElement;
1859
1880
  }, HTMLDivElement>;
@@ -1908,6 +1929,8 @@ declare interface FileItem {
1908
1929
  status: string;
1909
1930
  }
1910
1931
 
1932
+ declare type FormatDate = 'yyyy-MM-dd' | 'dd/MM/yyyy' | 'timestamp' | 'iso' | 'string';
1933
+
1911
1934
  declare type Header = {
1912
1935
  text: string;
1913
1936
  value: string | ((item: Record<string, unknown>) => string);
@@ -1984,7 +2007,7 @@ declare interface ItemsSelection {
1984
2007
  }
1985
2008
 
1986
2009
  declare interface ItensMenu_2 {
1987
- text: string;
2010
+ text?: string;
1988
2011
  path?: string;
1989
2012
  icon?: string;
1990
2013
  description?: string;
@@ -2014,7 +2037,7 @@ declare interface IVariants {
2014
2037
 
2015
2038
  declare type ModelValueType = string | number | boolean | (string | number | boolean)[];
2016
2039
 
2017
- declare type ModelValueType_2 = string | number;
2040
+ declare type ModelValueType_2 = string | number | boolean;
2018
2041
 
2019
2042
  declare interface optsRadio {
2020
2043
  label?: string;
@@ -2025,11 +2048,15 @@ declare interface optsRadio {
2025
2048
 
2026
2049
  declare type PaginationProps = {
2027
2050
  /** Total de páginas */
2028
- totalPages: number;
2051
+ totalPages?: number;
2029
2052
  /** Página atual */
2030
2053
  currentPage: number;
2031
2054
  /** Itens por página */
2032
- itemsPerPage: number;
2055
+ itemsPerPage?: number;
2056
+ /** totalItems + itemsPerPage, geram o total de páginas (alternativa ao totalPages) */
2057
+ totalItems?: number;
2058
+ /** Valor do currentPage para two-way binding (v-model) */
2059
+ modelValue?: number;
2033
2060
  };
2034
2061
 
2035
2062
  export declare const removeCeToast: (id: number) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comercti/react-components",
3
- "version": "0.10.0",
3
+ "version": "0.12.0",
4
4
  "types": "index.d.ts",
5
5
  "type": "module",
6
6
  "license": "private",
@@ -11,6 +11,7 @@
11
11
  "description": "",
12
12
  "dependencies": {
13
13
  "@wdns/vue-code-block": "^2.3.5",
14
+ "date-fns": "^4.1.0",
14
15
  "highlight.js": "^11.11.1",
15
16
  "prismjs": "^1.30.0",
16
17
  "react": "^17.0.2",
@@ -30,6 +31,7 @@
30
31
  "@storybook/addon-onboarding": "8.5.5",
31
32
  "@storybook/addon-postcss": "^2.0.0",
32
33
  "@storybook/addon-viewport": "^8.5.5",
34
+ "@storybook/addons": "^7.6.17",
33
35
  "@storybook/blocks": "8.5.5",
34
36
  "@storybook/manager-api": "^8.5.5",
35
37
  "@storybook/test": "8.5.5",
@@ -62,6 +64,7 @@
62
64
  "prettier": "^3.5.1",
63
65
  "storybook": "8.5.5",
64
66
  "storybook-addon-vue-mdx": "^1.0.6",
67
+ "storybook-dark-mode": "^4.0.2",
65
68
  "tailwindcss": "^3.4.17",
66
69
  "typescript": "~5.7.3",
67
70
  "vite": "^6.1.0",