@ttoss/components 2.13.0 → 2.13.1

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.
@@ -13,7 +13,8 @@ interface DatePickerProps {
13
13
  value?: DateRange;
14
14
  presets?: DateRangePreset[];
15
15
  onChange?: (range: DateRange | undefined) => void;
16
+ disabled?: boolean;
16
17
  }
17
- declare const DatePicker: ({ label, value, presets, onChange, }: DatePickerProps) => react_jsx_runtime.JSX.Element;
18
+ declare const DatePicker: ({ label, value, presets, onChange, disabled, }: DatePickerProps) => react_jsx_runtime.JSX.Element;
18
19
 
19
20
  export { DatePicker, type DateRange };
@@ -14,7 +14,8 @@ var DatePicker = /* @__PURE__ */__name(({
14
14
  label,
15
15
  value,
16
16
  presets,
17
- onChange
17
+ onChange,
18
+ disabled
18
19
  }) => {
19
20
  const [date, setDate] = React.useState(value);
20
21
  const [pickerSelection, setPickerSelection] = React.useState(value);
@@ -96,6 +97,7 @@ var DatePicker = /* @__PURE__ */__name(({
96
97
  position: "relative"
97
98
  }
98
99
  }, label && /* @__PURE__ */React.createElement(Label, null, label), /* @__PURE__ */React.createElement(Button, {
100
+ disabled,
99
101
  variant: "secondary",
100
102
  onClick: /* @__PURE__ */__name(() => {
101
103
  return setIsOpen(!isOpen);
@@ -111,7 +113,10 @@ var DatePicker = /* @__PURE__ */__name(({
111
113
  border: "md",
112
114
  borderColor: "display.border.muted.default",
113
115
  height: "40px",
114
- minWidth: ["auto", "240px"]
116
+ minWidth: ["auto", "240px"],
117
+ "&:disabled": {
118
+ borderColor: "display.border.muted.default"
119
+ }
115
120
  }
116
121
  }, date?.from ? date.to ? /* @__PURE__ */React.createElement(Text, {
117
122
  sx: {
@@ -131,10 +136,7 @@ var DatePicker = /* @__PURE__ */__name(({
131
136
  sx: {
132
137
  fontSize: ["12px", "14px"]
133
138
  }
134
- }, "Selecione o per\xEDodo"), /* @__PURE__ */React.createElement(Icon, {
135
- icon: "mdi:chevron-down",
136
- size: 16
137
- })), isOpen && /* @__PURE__ */React.createElement(React.Fragment, null, /* @__PURE__ */React.createElement(Box, {
139
+ }, "Selecione o per\xEDodo")), isOpen && /* @__PURE__ */React.createElement(React.Fragment, null, /* @__PURE__ */React.createElement(Box, {
138
140
  sx: {
139
141
  display: ["block", "none"],
140
142
  position: "fixed",
@@ -311,6 +313,7 @@ var DatePicker = /* @__PURE__ */__name(({
311
313
  }
312
314
  }
313
315
  }, /* @__PURE__ */React.createElement(DayPicker, {
316
+ disabled,
314
317
  mode: "range",
315
318
  locale: ptBR,
316
319
  selected: pickerSelection?.from ? {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttoss/components",
3
- "version": "2.13.0",
3
+ "version": "2.13.1",
4
4
  "description": "React components for ttoss ecosystem.",
5
5
  "license": "MIT",
6
6
  "author": "ttoss",
@@ -125,10 +125,10 @@
125
125
  },
126
126
  "peerDependencies": {
127
127
  "react": ">=16.8.0",
128
- "@ttoss/react-hooks": "^2.2.0",
129
128
  "@ttoss/react-i18n": "^2.1.0",
130
- "@ttoss/react-icons": "^0.6.0",
131
- "@ttoss/ui": "^6.6.0"
129
+ "@ttoss/react-hooks": "^2.2.0",
130
+ "@ttoss/ui": "^6.7.0",
131
+ "@ttoss/react-icons": "^0.6.0"
132
132
  },
133
133
  "devDependencies": {
134
134
  "@types/jest": "^30.0.0",
@@ -140,10 +140,10 @@
140
140
  "@ttoss/config": "^1.36.0",
141
141
  "@ttoss/i18n-cli": "^0.7.39",
142
142
  "@ttoss/react-i18n": "^2.1.0",
143
- "@ttoss/react-hooks": "^2.2.0",
143
+ "@ttoss/test-utils": "^4.1.0",
144
+ "@ttoss/ui": "^6.7.0",
144
145
  "@ttoss/react-icons": "^0.6.0",
145
- "@ttoss/ui": "^6.6.0",
146
- "@ttoss/test-utils": "^4.1.0"
146
+ "@ttoss/react-hooks": "^2.2.0"
147
147
  },
148
148
  "keywords": [
149
149
  "React",