Skip to content

Commit 01ce8ff

Browse files
authored
Merge pull request #789 from Sysvale/feature/expose-cuida-utils
feature/expose-cuida-utils
2 parents b516ec9 + 45ad12e commit 01ce8ff

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ import '@sysvale/cuida/dist/style.css';
3434
- E instale o Cuida:
3535

3636
```js
37-
Vue.use(Cuida);
37+
app.use(Cuida);
38+
```
39+
40+
- Exponha os utils do Cuida:
41+
42+
```js
43+
app.provide('cdsUtils', cdsUtils);
3844
```
3945

4046
- Agora para utilizar os componentes, basta usá-los no seu template. Como exemplo, para usar a

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sysvale/cuida",
3-
"version": "3.72.4",
3+
"version": "3.74.0",
44
"description": "A design system built by Sysvale, using storybook and Vue components",
55
"repository": {
66
"type": "git",

src/components/index.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* COMPONENTS */
12
import ActionBar from './ActionBar.vue';
23
import ActionsList from './ActionsList.vue';
34
import Alert from './Alert.vue';
@@ -98,11 +99,19 @@ import TimelineItem from './TimelineItem.vue';
9899
import Tooltip from './Tooltip.vue';
99100
import Truncate from './Truncate.vue';
100101
import PasswordInput from './PasswordInput.vue';
102+
import WebcamModal from './WebcamModal.vue';
101103
import Wizard from './Wizard.vue';
102104

105+
/* DIRECTIVES */
103106
import Cdstip from '../utils/directives/cdstip';
104107
import CdsFloatify from "../utils/directives/cdsFloatify";
105-
import WebcamModal from './WebcamModal.vue';
108+
109+
/* UTILS */
110+
import contrastChecker from '@/utils/methods/contrastChecker';
111+
import hasSlot from '@/utils/methods/hasSlot';
112+
import removeAccents from '@/utils/methods/removeAccents';
113+
import hexToRgb from '@/utils/methods/hexToRgb';
114+
import isDeviceType from '@/utils/methods/isDeviceType';
106115

107116
export default {
108117
install: (app: any, options: any) => {
@@ -211,4 +220,11 @@ export default {
211220
app.component('CdsWebcamModal', WebcamModal);
212221
app.component('CdsWizard', Wizard);
213222
},
223+
utils: {
224+
contrastChecker,
225+
hasSlot,
226+
removeAccents,
227+
hexToRgb,
228+
isDeviceType
229+
},
214230
}

0 commit comments

Comments
 (0)