@comercti/vue-components 0.32.0 → 0.34.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
@@ -8,14 +8,24 @@ import { VNode } from 'vue';
8
8
 
9
9
  declare const __VLS_component: DefineComponent<DataTableProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
10
10
  "update:modelValue": (value: Record<string, any>[]) => any;
11
+ input: (value: string) => any;
11
12
  updateSelected: (value: Record<string, any>[]) => any;
13
+ "update:modelValueEditable": (value: {
14
+ field: string;
15
+ value: string | boolean | number;
16
+ }) => any;
12
17
  orderBy: (value: {
13
18
  key: string;
14
19
  order: "asc" | "desc";
15
20
  }) => any;
16
21
  }, string, PublicProps, Readonly<DataTableProps> & Readonly<{
17
22
  "onUpdate:modelValue"?: (value: Record<string, any>[]) => any;
23
+ onInput?: (value: string) => any;
18
24
  onUpdateSelected?: (value: Record<string, any>[]) => any;
25
+ "onUpdate:modelValueEditable"?: (value: {
26
+ field: string;
27
+ value: string | boolean | number;
28
+ }) => any;
19
29
  onOrderBy?: (value: {
20
30
  key: string;
21
31
  order: "asc" | "desc";
@@ -33,6 +43,13 @@ loading: boolean;
33
43
  loadingType: "spinner" | "semi-circle" | "dots";
34
44
  truncated: boolean;
35
45
  copyable: boolean;
46
+ editColumnStyle: {
47
+ fields: string[];
48
+ style?: Record<string, string>;
49
+ class?: string;
50
+ };
51
+ backgroundPagination: "transparent" | `#${string}` | `rgb(${string})` | `rgba(${string})`;
52
+ backgroundTitle: "transparent" | `#${string}` | `rgb(${string})` | `rgba(${string})`;
36
53
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
37
54
  rootRef: HTMLDivElement;
38
55
  }, HTMLDivElement>;
@@ -174,6 +191,7 @@ close: (value: boolean) => any;
174
191
  }, string, PublicProps, Readonly<__VLS_Props_29> & Readonly<{
175
192
  onClose?: (value: boolean) => any;
176
193
  }>, {
194
+ class: string;
177
195
  background: "1" | "2";
178
196
  isOpen: boolean;
179
197
  closeOutside: boolean;
@@ -268,12 +286,12 @@ focus: () => void;
268
286
  valorSemMascara: Ref<string | number, string | number>;
269
287
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
270
288
  "update:modelValue": (value: string | number | CustomEvent<any>) => any;
271
- input: (value: string | number | CustomEvent<any>) => any;
289
+ input: (value: Event) => any;
272
290
  blur: (value: string | number | CustomEvent<any>) => any;
273
291
  change: (value: string | number | CustomEvent<any>) => any;
274
292
  }, string, PublicProps, Readonly<__VLS_Props_9> & Readonly<{
275
293
  "onUpdate:modelValue"?: (value: string | number | CustomEvent<any>) => any;
276
- onInput?: (value: string | number | CustomEvent<any>) => any;
294
+ onInput?: (value: Event) => any;
277
295
  onBlur?: (value: string | number | CustomEvent<any>) => any;
278
296
  onChange?: (value: string | number | CustomEvent<any>) => any;
279
297
  }>, {
@@ -336,6 +354,7 @@ sendRemovedFile: boolean;
336
354
  tertiaryVariantTitle: string;
337
355
  showUploadedFile: boolean;
338
356
  showRemoveButton: boolean;
357
+ showRemoveButtonPerFile: Record<string, boolean>;
339
358
  }, {}, {}, {}, string, ComponentProvideOptions, false, {
340
359
  inputFile: HTMLInputElement;
341
360
  }, HTMLDivElement>;
@@ -387,7 +406,7 @@ declare type __VLS_Props_10 = {
387
406
  /** Define o texto do botão */
388
407
  text: string;
389
408
  /** Define o botão selecionado */
390
- selected: number;
409
+ selected: number | string;
391
410
  /** Define a variante do botão */
392
411
  variant: 'text' | 'radio';
393
412
  /** Define se o botão está desabilitado */
@@ -658,6 +677,8 @@ declare type __VLS_Props_29 = {
658
677
  closeOutside?: boolean;
659
678
  /** Define se o botão de fechar fica visível */
660
679
  showCloseButton?: boolean;
680
+ /** Define a diretivas do modal */
681
+ class?: string;
661
682
  };
662
683
 
663
684
  declare type __VLS_Props_3 = {
@@ -1705,7 +1726,7 @@ text: string;
1705
1726
  disabled: boolean;
1706
1727
  id: string | number;
1707
1728
  variant: "text" | "radio";
1708
- selected: number;
1729
+ selected: number | string;
1709
1730
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLButtonElement>;
1710
1731
 
1711
1732
  export declare const CeButtonPagination: DefineComponent<__VLS_Props_13, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
@@ -1979,11 +2000,20 @@ contoured: boolean;
1979
2000
 
1980
2001
  export declare const CeTooltip: __VLS_WithTemplateSlots_25<typeof __VLS_component_25, __VLS_TemplateResult_25["slots"]>;
1981
2002
 
2003
+ export declare const CeTruncated: DefineComponent<Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<Props_2> & Readonly<{}>, {
2004
+ reserveSpaceFeedback: boolean;
2005
+ indexItem: number;
2006
+ indexHeader: number;
2007
+ maxLength: number;
2008
+ }, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLDivElement>;
2009
+
1982
2010
  declare interface Coluna {
1983
2011
  text: string;
1984
2012
  value: string;
1985
2013
  }
1986
2014
 
2015
+ declare type CSSColor = HexColor | RgbColor | RgbaColor | 'transparent';
2016
+
1987
2017
  declare type DataTableProps = {
1988
2018
  /** Array utilizado no header da tabela
1989
2019
  *
@@ -1995,6 +2025,10 @@ declare type DataTableProps = {
1995
2025
  *
1996
2026
  * width?: string
1997
2027
  *
2028
+ * editableField?: {
2029
+ * type: InputType | 'boolean'
2030
+ * mask?: string | string[]
2031
+ * }
1998
2032
  */
1999
2033
  headers: Header[];
2000
2034
  /** Ativa a opção de selecinar os conteúdos da tabela */
@@ -2025,6 +2059,16 @@ declare type DataTableProps = {
2025
2059
  paginationStyle?: string;
2026
2060
  /** Habilita a funcionalidade de copiar o conteúdo da célula ao clicar */
2027
2061
  copyable?: boolean;
2062
+ /** Configurações para estilizar colunas editáveis */
2063
+ editColumnStyle?: {
2064
+ fields: string[];
2065
+ style?: Record<string, string>;
2066
+ class?: string;
2067
+ };
2068
+ /** Define o estilo de fundo do slot de paginação */
2069
+ backgroundPagination?: CSSColor;
2070
+ /** Define o estilo de fundo da area superior da tabela */
2071
+ backgroundTitle?: CSSColor;
2028
2072
  };
2029
2073
 
2030
2074
  export declare const disableCeLoading: () => void;
@@ -2058,8 +2102,14 @@ declare type Header = {
2058
2102
  value: string | ((item: Record<string, unknown>) => string);
2059
2103
  sortable?: boolean;
2060
2104
  width?: string;
2105
+ editableField?: {
2106
+ type: InputType | 'boolean';
2107
+ mask?: string | string[];
2108
+ };
2061
2109
  };
2062
2110
 
2111
+ declare type HexColor = `#${string}`;
2112
+
2063
2113
  declare interface IBreadcrumbsProps {
2064
2114
  /** Define o ponto de partida do breadcrumbs */
2065
2115
  home: string;
@@ -2137,6 +2187,8 @@ declare interface IDropzone {
2137
2187
  removableFileName?: string;
2138
2188
  /** Exibi o botão de remover arquivo */
2139
2189
  showRemoveButton?: boolean;
2190
+ /** Exibi o botão de remover arquivo para cada arquivo */
2191
+ showRemoveButtonPerFile?: Record<string, boolean>;
2140
2192
  }
2141
2193
 
2142
2194
  declare interface IFields {
@@ -2152,6 +2204,8 @@ declare interface IItems {
2152
2204
  showDescription?: boolean;
2153
2205
  }
2154
2206
 
2207
+ declare type InputType = 'number' | 'search' | 'time' | 'text' | 'password' | 'email' | 'tel' | 'url' | 'date' | 'datetime-local';
2208
+
2155
2209
  declare type IProgressStepsProps = {
2156
2210
  /** Define os itens que serão exibidos */
2157
2211
  items: IItems[];
@@ -2277,8 +2331,20 @@ declare interface Props {
2277
2331
  clearButton?: boolean;
2278
2332
  }
2279
2333
 
2334
+ declare interface Props_2 {
2335
+ text: string;
2336
+ indexItem?: number;
2337
+ indexHeader?: number;
2338
+ maxLength?: number;
2339
+ reserveSpaceFeedback?: boolean;
2340
+ }
2341
+
2280
2342
  export declare const removeCeToast: (id: number) => void;
2281
2343
 
2344
+ declare type RgbaColor = `rgba(${string})`;
2345
+
2346
+ declare type RgbColor = `rgb(${string})`;
2347
+
2282
2348
  declare interface SelectOption {
2283
2349
  label?: string;
2284
2350
  value?: string | number | boolean | null;
@@ -2362,6 +2428,7 @@ declare module 'vue' {
2362
2428
  'ce-button-pagination': typeof ButtonPaginationComponent;
2363
2429
  'ce-textarea': typeof TextareaComponent;
2364
2430
  'ce-code-input': typeof CodeInputComponent;
2431
+ 'ce-truncated': typeof TruncatedComponent;
2365
2432
  }
2366
2433
  }
2367
2434
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@comercti/vue-components",
3
- "version": "0.32.0",
3
+ "version": "0.34.0",
4
4
  "types": "index.d.ts",
5
5
  "type": "module",
6
6
  "license": "private",
@@ -19,64 +19,64 @@
19
19
  "prismjs": "^1.30.0",
20
20
  "react": "^17.0.2",
21
21
  "react-dom": "^17.0.2",
22
- "veaury": "^2.6.2",
23
- "vitest-sonar-reporter": "^2.0.0",
24
- "vue": "^3.5.13"
22
+ "veaury": "^2.6.3",
23
+ "vitest-sonar-reporter": "^2.0.4",
24
+ "vue": "^3.5.29"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "vue": ">=3.2.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@fontsource/exo-2": "^5.1.1",
31
- "@storybook/addon-actions": "^8.5.5",
30
+ "@fontsource/exo-2": "^5.2.8",
31
+ "@storybook/addon-actions": "^8.6.18",
32
32
  "@storybook/addon-essentials": "8.5.5",
33
33
  "@storybook/addon-interactions": "8.5.5",
34
34
  "@storybook/addon-onboarding": "8.5.5",
35
35
  "@storybook/addon-postcss": "^2.0.0",
36
- "@storybook/addon-viewport": "^8.5.5",
36
+ "@storybook/addon-viewport": "^8.6.18",
37
37
  "@storybook/addons": "^7.6.17",
38
38
  "@storybook/blocks": "8.5.5",
39
- "@storybook/manager-api": "^8.5.5",
39
+ "@storybook/manager-api": "^8.6.14",
40
40
  "@storybook/test": "8.5.5",
41
- "@storybook/theming": "^8.5.5",
41
+ "@storybook/theming": "^8.6.14",
42
42
  "@storybook/vue3": "8.5.5",
43
43
  "@storybook/vue3-vite": "8.5.5",
44
- "@tsconfig/node22": "^22.0.0",
44
+ "@tsconfig/node22": "^22.0.5",
45
45
  "@types/jsdom": "^21.1.7",
46
- "@types/node": "^22.13.2",
47
- "@types/react": "^17.0.85",
46
+ "@types/node": "^22.19.15",
47
+ "@types/react": "^17.0.91",
48
48
  "@types/react-dom": "^17.0.26",
49
- "@vitejs/plugin-react": "^4.4.1",
50
- "@vitejs/plugin-vue": "^5.2.1",
51
- "@vitejs/plugin-vue-jsx": "^4.1.1",
49
+ "@vitejs/plugin-react": "^4.7.0",
50
+ "@vitejs/plugin-vue": "^5.2.4",
51
+ "@vitejs/plugin-vue-jsx": "^4.2.0",
52
52
  "@vitest/coverage-v8": "3.0.5",
53
53
  "@vitest/eslint-plugin": "1.1.25",
54
54
  "@vitest/ui": "3.0.5",
55
55
  "@vue/eslint-config-prettier": "^10.2.0",
56
- "@vue/eslint-config-typescript": "^14.4.0",
56
+ "@vue/eslint-config-typescript": "^14.7.0",
57
57
  "@vue/test-utils": "^2.4.6",
58
58
  "@vue/tsconfig": "^0.7.0",
59
- "autoprefixer": "^10.4.20",
60
- "eslint": "^9.20.1",
61
- "eslint-plugin-storybook": "^0.11.2",
62
- "eslint-plugin-vue": "^9.32.0",
63
- "jiti": "^2.4.2",
64
- "jsdom": "^26.0.0",
59
+ "autoprefixer": "^10.4.27",
60
+ "eslint": "^9.39.3",
61
+ "eslint-plugin-storybook": "^0.11.6",
62
+ "eslint-plugin-vue": "^9.33.0",
63
+ "jiti": "^2.6.1",
64
+ "jsdom": "^26.1.0",
65
65
  "npm-run-all2": "^7.0.2",
66
- "postcss": "^8.5.2",
67
- "prettier": "^3.5.1",
66
+ "postcss": "^8.5.8",
67
+ "prettier": "^3.8.1",
68
68
  "storybook": "8.5.5",
69
69
  "storybook-addon-vue-mdx": "^1.0.6",
70
70
  "storybook-dark-mode": "^4.0.2",
71
- "tailwindcss": "^3.4.17",
71
+ "tailwindcss": "^3.4.19",
72
72
  "typescript": "~5.7.3",
73
- "vite": "^6.1.0",
73
+ "vite": "^6.4.1",
74
74
  "vite-plugin-css-injected-by-js": "^3.5.2",
75
- "vite-plugin-dts": "^4.5.0",
76
- "vite-plugin-vue-devtools": "^7.7.2",
77
- "vitest": "^3.0.5",
75
+ "vite-plugin-dts": "^4.5.4",
76
+ "vite-plugin-vue-devtools": "^7.7.9",
77
+ "vitest": "^3.2.4",
78
78
  "vue-loader": "^17.4.2",
79
- "vue-tsc": "^2.2.0"
79
+ "vue-tsc": "^2.2.12"
80
80
  },
81
81
  "contributors": [
82
82
  {