Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
171 changes: 152 additions & 19 deletions docs/.docgen/components-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@
},
"defaultValue": {
"func": false,
"value": "1"
"value": "5"
}
},
{
Expand All @@ -822,7 +822,7 @@
},
"defaultValue": {
"func": false,
"value": "false"
"value": "true"
}
}
],
Expand Down Expand Up @@ -1144,6 +1144,17 @@
"func": false,
"value": "false"
}
},
{
"name": "ghost",
"description": "Especifica se o componente deve ser exibido na sua versão ghost.",
"type": {
"name": "boolean"
},
"defaultValue": {
"func": false,
"value": "false"
}
}
],
"events": [
Expand Down Expand Up @@ -1410,6 +1421,17 @@
"func": false,
"value": "false"
}
},
{
"name": "ghost",
"description": "Especifica se o componente deve ser exibido na sua versão ghost.",
"type": {
"name": "boolean"
},
"defaultValue": {
"func": false,
"value": "false"
}
}
],
"slots": [
Expand Down Expand Up @@ -1637,8 +1659,9 @@
]
},
"CdsButton": {
"displayName": "CdsButton",
"name": "CdsButton",
"exportName": "default",
"displayName": "Button",
"description": "",
"tags": {},
"props": [
Expand Down Expand Up @@ -1740,7 +1763,7 @@
},
{
"name": "loading",
"description": "Especifica se a versão do Botão é a secundária.",
"description": "Especifica se o botão deve mostrar spinner de carregamento.\nCaso o botão seja do tipo ghost ou secondary a variante do spinner é a mesma passada na prop variant.",
"type": {
"name": "boolean"
},
Expand Down Expand Up @@ -2876,6 +2899,35 @@
"func": false,
"value": "[]"
}
},
{
"name": "state",
"description": "Especifica o estado do TextInput. As opções são 'default', 'valid', 'loading' e 'invalid'.",
"tags": {},
"values": [
"default",
"valid",
"loading",
"invalid"
],
"type": {
"name": "string"
},
"defaultValue": {
"func": false,
"value": "'default'"
}
},
{
"name": "errorMessage",
"description": "Especifica a mensagem de erro, que será exibida caso o estado seja inválido",
"type": {
"name": "string"
},
"defaultValue": {
"func": false,
"value": "'Valor inválido'"
}
}
],
"events": [
Expand Down Expand Up @@ -4323,8 +4375,9 @@
]
},
"CdsDropdownButton": {
"displayName": "CdsDropdownButton",
"name": "CdsDropdownButton",
"exportName": "default",
"displayName": "DropdownButton",
"description": "",
"tags": {},
"props": [
Expand Down Expand Up @@ -4424,27 +4477,38 @@
"md",
"lg"
]
}
],
"events": [
},
{
"name": "click",
"description": "Evento que indica que o DropdownButton foi clicado",
"name": "disabled",
"description": "Desabilita o input.",
"type": {
"names": [
"Event"
]
"name": "boolean"
},
"defaultValue": {
"func": false,
"value": "false"
}
},
{
"name": "action-click",
"name": "tooltipText",
"description": "Texto a ser exibido como tooltip com o hover do DropdownButton quando a prop disabled estiver ativa.",
"type": {
"names": [
"undefined"
]
"name": "string"
},
"defaultValue": {
"func": false,
"value": "null"
}
}
],
"events": [
{
"name": "button-click"
},
{
"name": "action-click"
}
],
"sourceFiles": [
"src/components/DropdownButton.vue"
]
Expand Down Expand Up @@ -8390,7 +8454,7 @@
},
"defaultValue": {
"func": false,
"value": "'https://cuida.framer.wiki/'"
"value": "null"
}
},
{
Expand Down Expand Up @@ -10730,6 +10794,18 @@
"value": "false"
}
},
{
"name": "deepSearch",
"description": "Indica se a busca deve levar em consideração argumentos compostos.\nSó tem efeito se a prop `searchable` for `true`.",
"type": {
"name": "boolean"
},
"required": false,
"defaultValue": {
"func": false,
"value": "false"
}
},
{
"name": "width",
"tags": {
Expand Down Expand Up @@ -10927,6 +11003,17 @@
"func": false,
"value": "false"
}
},
{
"name": "ghost",
"description": "Especifica se o componente deve ser exibido na sua versão ghost.",
"type": {
"name": "boolean"
},
"defaultValue": {
"func": false,
"value": "false"
}
}
],
"slots": [
Expand Down Expand Up @@ -12673,6 +12760,17 @@
"func": false,
"value": "false"
}
},
{
"name": "loading",
"description": "Ativa o estado de carregamento do componente, exibindo um Skeleton para a tabela.",
"type": {
"name": "boolean"
},
"defaultValue": {
"func": false,
"value": "false"
}
}
],
"events": [
Expand Down Expand Up @@ -13354,7 +13452,7 @@
},
"defaultValue": {
"func": false,
"value": "'https://cuida.framer.wiki/'"
"value": "null"
}
},
{
Expand Down Expand Up @@ -13442,6 +13540,11 @@
}
}
],
"slots": [
{
"name": "label"
}
],
"sourceFiles": [
"src/components/TextInput.vue"
]
Expand Down Expand Up @@ -14643,6 +14746,16 @@
"func": false,
"value": "''"
}
},
{
"name": "year",
"type": {
"name": "number"
},
"defaultValue": {
"func": false,
"value": "new Date().getFullYear()"
}
}
],
"events": [
Expand Down Expand Up @@ -14681,6 +14794,26 @@
"func": false,
"value": "''"
}
},
{
"name": "minDate",
"type": {
"name": "string"
},
"defaultValue": {
"func": false,
"value": "''"
}
},
{
"name": "maxDate",
"type": {
"name": "string"
},
"defaultValue": {
"func": false,
"value": "''"
}
}
],
"events": [
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sysvale/cuida",
"version": "3.154.1",
"version": "3.154.2",
"description": "A design system built by Sysvale, using storybook and Vue components",
"repository": {
"type": "git",
Expand Down
14 changes: 2 additions & 12 deletions src/components/DateInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -829,23 +829,13 @@ function toDateTime() {
}

function handleMonthSelection(selectedMonth) {
internalValue.value = internalValue.value ? internalValue.value : DateTime.now().setLocale('pt-BR').toFormat('dd/MM/yyyy');
showMonthPicker.value = !showMonthPicker.value;
let [day, month, year] = internalValue.value.split('/');
month = selectedMonth.index;
let daysInMonth = DateTime.local(+year, +month).daysInMonth;

day = daysInMonth < day ? daysInMonth : day;

currentDate.value = DateTime.fromFormat(`${day}/${month}/${year}`, 'dd/MM/yyyy');
currentDate.value = currentDate.value.set({ month: parseInt(selectedMonth.index) });
}

function handleYearSelection(selectedYear) {
internalValue.value = internalValue.value ? internalValue.value : DateTime.now().setLocale('pt-BR').toFormat('dd/MM/yyyy');
showYearPicker.value = !showYearPicker.value;
let [day, month] = internalValue.value.split('/');

currentDate.value = DateTime.fromFormat(`${day}/${month}/${selectedYear}`, 'dd/MM/yyyy');
currentDate.value = currentDate.value.set({ year: selectedYear });
}

function toggleMonthPickerDisplay() {
Expand Down
4 changes: 2 additions & 2 deletions src/components/InternalComponents/MonthSelectorGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ const internalMaxDate = ref(props.maxDate);

/* COMPUTED */
const currentMonth = computed(() => {
if (!internalDate.value) return 1;
if (!internalDate.value) return null;
const month = internalDate.value.split('-')[1];
return month ? parseInt(month) : 1;
return month ? parseInt(month) : null;
});

/* WATCHERS */
Expand Down
Loading