infinity-forge 11.1.6 → 11.1.8
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/dist/ui/components/form/checkbox/index.js +4 -2
- package/dist/ui/components/form/checkbox/index.js.map +1 -1
- package/dist/ui/components/form/handler/form-handler/index.d.ts +1 -0
- package/dist/ui/components/form/handler/form-handler/index.js +2 -2
- package/dist/ui/components/form/handler/form-handler/index.js.map +1 -1
- package/dist/ui/components/form/handler/form-handler/use-form-handler.d.ts +1 -0
- package/dist/ui/components/form/handler/interfaces.d.ts +3 -0
- package/dist/ui/components/form/input/index.js +5 -3
- package/dist/ui/components/form/input/index.js.map +1 -1
- package/dist/ui/components/form/input-file/component.js +3 -1
- package/dist/ui/components/form/input-file/component.js.map +1 -1
- package/dist/ui/components/form/input-file/hooks/use-components-file.js +3 -0
- package/dist/ui/components/form/input-file/hooks/use-components-file.js.map +1 -1
- package/dist/ui/components/form/input-file/hooks/use-file-elements.js +1 -1
- package/dist/ui/components/form/input-file/hooks/use-file-elements.js.map +1 -1
- package/dist/ui/components/form/input-week-availability/availability-preview/index.d.ts +1 -1
- package/dist/ui/components/form/input-week-availability/availability-preview/index.js +1 -1
- package/dist/ui/components/form/input-week-availability/availability-preview/index.js.map +1 -1
- package/dist/ui/components/form/input-week-availability/input.d.ts +7 -12
- package/dist/ui/components/form/input-week-availability/input.js +11 -82
- package/dist/ui/components/form/input-week-availability/input.js.map +1 -1
- package/dist/ui/components/form/input-week-availability/shared/components/availability-switch.d.ts +7 -0
- package/dist/ui/components/form/input-week-availability/shared/components/availability-switch.js +19 -0
- package/dist/ui/components/form/input-week-availability/shared/components/availability-switch.js.map +1 -0
- package/dist/ui/components/form/input-week-availability/shared/components/desktop-table-v1.d.ts +11 -0
- package/dist/ui/components/form/input-week-availability/shared/components/desktop-table-v1.js +15 -0
- package/dist/ui/components/form/input-week-availability/shared/components/desktop-table-v1.js.map +1 -0
- package/dist/ui/components/form/input-week-availability/shared/components/desktop-table.d.ts +11 -0
- package/dist/ui/components/form/input-week-availability/shared/components/desktop-table.js +14 -0
- package/dist/ui/components/form/input-week-availability/shared/components/desktop-table.js.map +1 -0
- package/dist/ui/components/form/input-week-availability/shared/components/mobile-layout.d.ts +11 -0
- package/dist/ui/components/form/input-week-availability/shared/components/mobile-layout.js +14 -0
- package/dist/ui/components/form/input-week-availability/shared/components/mobile-layout.js.map +1 -0
- package/dist/ui/components/form/input-week-availability/shared/constants/day-labels.d.ts +6 -0
- package/dist/ui/components/form/input-week-availability/shared/constants/day-labels.js +9 -0
- package/dist/ui/components/form/input-week-availability/shared/constants/day-labels.js.map +1 -0
- package/dist/ui/components/form/input-week-availability/shared/hooks/use-week-availability.d.ts +5 -0
- package/dist/ui/components/form/input-week-availability/shared/hooks/use-week-availability.js +39 -0
- package/dist/ui/components/form/input-week-availability/shared/hooks/use-week-availability.js.map +1 -0
- package/dist/ui/components/form/input-week-availability/shared/index.d.ts +9 -0
- package/dist/ui/components/form/input-week-availability/shared/index.js +26 -0
- package/dist/ui/components/form/input-week-availability/shared/index.js.map +1 -0
- package/dist/ui/components/form/input-week-availability/shared/styles/base-styles.d.ts +1 -0
- package/dist/ui/components/form/input-week-availability/shared/styles/base-styles.js +14 -0
- package/dist/ui/components/form/input-week-availability/shared/styles/base-styles.js.map +1 -0
- package/dist/ui/components/form/input-week-availability/shared/styles/desktop-styles.d.ts +1 -0
- package/dist/ui/components/form/input-week-availability/shared/styles/desktop-styles.js +14 -0
- package/dist/ui/components/form/input-week-availability/shared/styles/desktop-styles.js.map +1 -0
- package/dist/ui/components/form/input-week-availability/shared/styles/mobile-styles.d.ts +1 -0
- package/dist/ui/components/form/input-week-availability/shared/styles/mobile-styles.js +14 -0
- package/dist/ui/components/form/input-week-availability/shared/styles/mobile-styles.js.map +1 -0
- package/dist/ui/components/form/input-week-availability/shared/types.d.ts +20 -0
- package/dist/ui/components/form/input-week-availability/shared/types.js +9 -0
- package/dist/ui/components/form/input-week-availability/shared/types.js.map +1 -0
- package/dist/ui/components/form/input-week-availability/shared/utils/day-formatter.d.ts +6 -0
- package/dist/ui/components/form/input-week-availability/shared/utils/day-formatter.js +13 -0
- package/dist/ui/components/form/input-week-availability/shared/utils/day-formatter.js.map +1 -0
- package/dist/ui/components/form/input-week-availability/v-01/index.d.ts +7 -0
- package/dist/ui/components/form/input-week-availability/v-01/index.js +16 -0
- package/dist/ui/components/form/input-week-availability/v-01/index.js.map +1 -0
- package/dist/ui/components/form/input-week-availability/v-02/index.d.ts +7 -0
- package/dist/ui/components/form/input-week-availability/v-02/index.js +22 -0
- package/dist/ui/components/form/input-week-availability/v-02/index.js.map +1 -0
- package/dist/ui/components/form/select/index.js +8 -7
- package/dist/ui/components/form/select/index.js.map +1 -1
- package/dist/ui/components/form/textarea/index.js +6 -3
- package/dist/ui/components/form/textarea/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/ui/components/form/input-week-availability/styles.d.ts +0 -1
- package/dist/ui/components/form/input-week-availability/styles.js +0 -14
- package/dist/ui/components/form/input-week-availability/styles.js.map +0 -1
package/dist/ui/components/form/input-week-availability/shared/components/mobile-layout.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobile-layout.js","sourceRoot":"","sources":["../../../../../../../src/ui/components/form/input-week-availability/shared/components/mobile-layout.tsx"],"names":[],"mappings":";;AAUA,oCAqBC;;AA/BD,mCAAoC;AACpC,6DAA0D;AAS1D,SAAgB,YAAY,CAAC,EAAkE;QAAhE,SAAS,eAAA,EAAE,QAAQ,cAAA,EAAE,gBAAgB,sBAAA,EAAE,IAAI,UAAA;IACxE,OAAO,CACL,gCAAK,SAAS,EAAC,0BAA0B,YACtC,IAAI,CAAC,GAAG,CAAC,UAAC,GAAG,IAAK,OAAA,CACjB,iCAAK,SAAS,EAAC,UAAU,aACvB,gCAAK,SAAS,EAAC,WAAW,YAAE,GAAG,CAAC,KAAK,GAAO,EAC5C,gCAAK,SAAS,EAAC,SAAS,YACrB,cAAO,CAAC,GAAG,CAAC,UAAC,MAAM;wBAClB,IAAM,GAAG,GAAG,UAAG,SAAS,cAAI,GAAG,CAAC,KAAK,cAAI,MAAM,CAAC,KAAK,YAAS,CAAA;wBAC9D,OAAO,CACL,iCAAK,SAAS,EAAC,YAAY,aACzB,iCAAM,SAAS,EAAC,cAAc,YAAE,MAAM,CAAC,KAAK,GAAQ,EACpD,uBAAC,wCAAkB,IAAC,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,EAAE,gBAAgB,GAAI,KAF1D,MAAM,CAAC,KAAK,CAGvC,CACP,CAAA;oBACH,CAAC,CAAC,GACE,KAZuB,GAAG,CAAC,KAAK,CAalC,CACP,EAfkB,CAelB,CAAC,GACE,CACP,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const dayLabels: {
|
|
2
|
+
readonly short: readonly ["S", "T", "Q", "Q", "S", "S", "D"];
|
|
3
|
+
readonly medium: readonly ["Seg", "Ter", "Qua", "Qui", "Sex", "Sab", "Dom"];
|
|
4
|
+
readonly long: readonly ["Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado", "Domingo"];
|
|
5
|
+
};
|
|
6
|
+
export type DayLabelFormat = keyof typeof dayLabels;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dayLabels = void 0;
|
|
4
|
+
exports.dayLabels = {
|
|
5
|
+
short: ['S', 'T', 'Q', 'Q', 'S', 'S', 'D'],
|
|
6
|
+
medium: ['Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sab', 'Dom'],
|
|
7
|
+
long: ['Segunda', 'Terça', 'Quarta', 'Quinta', 'Sexta', 'Sábado', 'Domingo'],
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=day-labels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"day-labels.js","sourceRoot":"","sources":["../../../../../../../src/ui/components/form/input-week-availability/shared/constants/day-labels.ts"],"names":[],"mappings":";;;AAAa,QAAA,SAAS,GAAG;IACvB,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAC1C,MAAM,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IACzD,IAAI,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC;CACpE,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.useWeekAvailability = useWeekAvailability;
|
|
15
|
+
var react_1 = require("react");
|
|
16
|
+
var formik_1 = require("formik");
|
|
17
|
+
var mock_1 = require("../../mock.js");
|
|
18
|
+
var day_formatter_1 = require("../utils/day-formatter.js");
|
|
19
|
+
function useWeekAvailability(name) {
|
|
20
|
+
var _a = (0, formik_1.useFormikContext)(), values = _a.values, setFieldValue = _a.setFieldValue;
|
|
21
|
+
var initialValue = day_formatter_1.dayValues.reduce(function (reducer, day) {
|
|
22
|
+
var _a;
|
|
23
|
+
return __assign(__assign({}, reducer), (_a = {}, _a[day] = mock_1.periods.reduce(function (reducerPeriod, period) {
|
|
24
|
+
var _a;
|
|
25
|
+
return (__assign(__assign({}, reducerPeriod), (_a = {}, _a[period.value] = { active: false }, _a)));
|
|
26
|
+
}, {}), _a));
|
|
27
|
+
}, {});
|
|
28
|
+
var nameInput = name || 'weekAvailability';
|
|
29
|
+
(0, react_1.useEffect)(function () {
|
|
30
|
+
if (!(values === null || values === void 0 ? void 0 : values[nameInput])) {
|
|
31
|
+
setFieldValue(nameInput, initialValue);
|
|
32
|
+
}
|
|
33
|
+
}, []);
|
|
34
|
+
return {
|
|
35
|
+
nameInput: nameInput,
|
|
36
|
+
initialValue: initialValue,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=use-week-availability.js.map
|
package/dist/ui/components/form/input-week-availability/shared/hooks/use-week-availability.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-week-availability.js","sourceRoot":"","sources":["../../../../../../../src/ui/components/form/input-week-availability/shared/hooks/use-week-availability.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAMA,kDAsBC;AA5BD,+BAAiC;AACjC,iCAAyC;AACzC,mCAAoC;AAEpC,wDAAkD;AAElD,SAAgB,mBAAmB,CAAC,IAAa;IACzC,IAAA,KAA4B,IAAA,yBAAgB,GAAE,EAA5C,MAAM,YAAA,EAAE,aAAa,mBAAuB,CAAA;IAEpD,IAAM,YAAY,GAA2B,yBAAS,CAAC,MAAM,CAAC,UAAC,OAAO,EAAE,GAAG;;QACzE,6BACK,OAAO,gBACT,GAAG,IAAG,cAAO,CAAC,MAAM,CAAC,UAAC,aAAa,EAAE,MAAM;;YAAK,OAAA,uBAAM,aAAa,gBAAG,MAAM,CAAC,KAAK,IAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAG;QAAzD,CAAyD,EAAE,EAAE,CAAC,OAChH;IACH,CAAC,EAAE,EAA4B,CAAC,CAAA;IAEhC,IAAM,SAAS,GAAG,IAAI,IAAI,kBAAkB,CAAA;IAE5C,IAAA,iBAAS,EAAC;QACR,IAAI,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAG,SAAS,CAAC,CAAA,EAAE,CAAC;YACzB,aAAa,CAAC,SAAS,EAAE,YAAY,CAAC,CAAA;QACxC,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAA;IAEN,OAAO;QACL,SAAS,WAAA;QACT,YAAY,cAAA;KACb,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './types.js';
|
|
2
|
+
export * from './hooks/use-week-availability.js';
|
|
3
|
+
export * from './components/availability-switch.js';
|
|
4
|
+
export * from './components/desktop-table.js';
|
|
5
|
+
export * from './components/desktop-table-v1.js';
|
|
6
|
+
export * from './components/mobile-layout.js';
|
|
7
|
+
export * from './styles/base-styles.js';
|
|
8
|
+
export * from './styles/mobile-styles.js';
|
|
9
|
+
export * from './styles/desktop-styles.js';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types.js"), exports);
|
|
18
|
+
__exportStar(require("./hooks/use-week-availability.js"), exports);
|
|
19
|
+
__exportStar(require("./components/availability-switch.js"), exports);
|
|
20
|
+
__exportStar(require("./components/desktop-table.js"), exports);
|
|
21
|
+
__exportStar(require("./components/desktop-table-v1.js"), exports);
|
|
22
|
+
__exportStar(require("./components/mobile-layout.js"), exports);
|
|
23
|
+
__exportStar(require("./styles/base-styles.js"), exports);
|
|
24
|
+
__exportStar(require("./styles/mobile-styles.js"), exports);
|
|
25
|
+
__exportStar(require("./styles/desktop-styles.js"), exports);
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/ui/components/form/input-week-availability/shared/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAuB;AACvB,gEAA6C;AAC7C,mEAAgD;AAChD,6DAA0C;AAC1C,gEAA6C;AAC7C,6DAA0C;AAC1C,uDAAoC;AACpC,yDAAsC;AACtC,0DAAuC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const BaseInputWeekAvailability: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, never>> & string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.BaseInputWeekAvailability = void 0;
|
|
11
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
+
exports.BaseInputWeekAvailability = (0, styled_components_1.default)('div')(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n > label {\n margin-bottom: clamp(10px, 1vw, 15px);\n }\n\n th {\n text-align: center;\n }\n\n thead {\n background-color: transparent !important;\n\n th:not(:first-child) {\n padding: 1px 5px 5px;\n border-radius: 5px 5px 0 0;\n }\n }\n\n tr:not(:last-child) {\n td,\n th {\n padding: 1px 5px 5px;\n }\n }\n\n tr:last-child td {\n border-radius: 0 0 5px 5px;\n padding: 1px 5px;\n }\n\n th,\n td {\n &:not(:first-child):not(:empty) {\n background-color: #f2f2f2;\n }\n\n &:empty {\n padding: 1px 3px !important;\n }\n\n &:first-child {\n padding-right: 15px !important;\n }\n }\n\n td > div {\n height: 100%;\n margin: auto;\n }\n\n table label {\n width: 20px !important;\n height: 20px !important;\n border: none !important;\n background: transparent !important;\n margin-bottom: 0 !important;\n cursor: pointer;\n\n svg {\n width: 100% !important;\n height: 100% !important;\n }\n }\n\n .input_control {\n margin-bottom: 2px !important;\n }\n\n .input-wrapper {\n display: flex;\n align-items: center;\n }\n\n @media only screen and (max-width: 1600px) {\n thead th:not(:first-child),\n tr:not(:last-child) td,\n tr:not(:last-child) th,\n tr:last-child td {\n padding: 1px 4px 4px;\n }\n\n th,\n td {\n &:empty {\n padding: 1px 2px !important;\n }\n\n &:first-child {\n padding-right: 10px !important;\n }\n }\n\n tr:last-child td {\n padding-bottom: 1px !important;\n }\n\n table label {\n width: 18px !important;\n height: 18px !important;\n }\n }\n\n @media only screen and (max-width: 1024px) {\n > label {\n width: 100%;\n text-align: center;\n max-width: 242px;\n margin-bottom: 10px;\n }\n\n table label {\n width: 16px !important;\n height: 16px !important;\n }\n\n th,\n td {\n font-size: 12px;\n\n &:first-child {\n padding-right: 5px !important;\n }\n }\n }\n"], ["\n > label {\n margin-bottom: clamp(10px, 1vw, 15px);\n }\n\n th {\n text-align: center;\n }\n\n thead {\n background-color: transparent !important;\n\n th:not(:first-child) {\n padding: 1px 5px 5px;\n border-radius: 5px 5px 0 0;\n }\n }\n\n tr:not(:last-child) {\n td,\n th {\n padding: 1px 5px 5px;\n }\n }\n\n tr:last-child td {\n border-radius: 0 0 5px 5px;\n padding: 1px 5px;\n }\n\n th,\n td {\n &:not(:first-child):not(:empty) {\n background-color: #f2f2f2;\n }\n\n &:empty {\n padding: 1px 3px !important;\n }\n\n &:first-child {\n padding-right: 15px !important;\n }\n }\n\n td > div {\n height: 100%;\n margin: auto;\n }\n\n table label {\n width: 20px !important;\n height: 20px !important;\n border: none !important;\n background: transparent !important;\n margin-bottom: 0 !important;\n cursor: pointer;\n\n svg {\n width: 100% !important;\n height: 100% !important;\n }\n }\n\n .input_control {\n margin-bottom: 2px !important;\n }\n\n .input-wrapper {\n display: flex;\n align-items: center;\n }\n\n @media only screen and (max-width: 1600px) {\n thead th:not(:first-child),\n tr:not(:last-child) td,\n tr:not(:last-child) th,\n tr:last-child td {\n padding: 1px 4px 4px;\n }\n\n th,\n td {\n &:empty {\n padding: 1px 2px !important;\n }\n\n &:first-child {\n padding-right: 10px !important;\n }\n }\n\n tr:last-child td {\n padding-bottom: 1px !important;\n }\n\n table label {\n width: 18px !important;\n height: 18px !important;\n }\n }\n\n @media only screen and (max-width: 1024px) {\n > label {\n width: 100%;\n text-align: center;\n max-width: 242px;\n margin-bottom: 10px;\n }\n\n table label {\n width: 16px !important;\n height: 16px !important;\n }\n\n th,\n td {\n font-size: 12px;\n\n &:first-child {\n padding-right: 5px !important;\n }\n }\n }\n"])));
|
|
13
|
+
var templateObject_1;
|
|
14
|
+
//# sourceMappingURL=base-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-styles.js","sourceRoot":"","sources":["../../../../../../../src/ui/components/form/input-week-availability/shared/styles/base-styles.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,wEAAsC;AAEzB,QAAA,yBAAyB,GAAG,IAAA,2BAAM,EAAC,KAAK,CAAC,gnEAAA,6iEA4HrD,KAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DesktopStyles: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.DesktopStyles = void 0;
|
|
11
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
+
exports.DesktopStyles = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n @media only screen and (min-width: 769px) {\n .tabela-disponibilidade {\n border-collapse: separate;\n border-spacing: 24px 0;\n width: 100%;\n table-layout: fixed;\n }\n .tabela-disponibilidade th.dia {\n background: #fff;\n border: 1px solid #ccc;\n border-bottom: none;\n border-radius: 10px 10px 0 0;\n padding: 16px 0 8px 0;\n text-align: center;\n color: #1a1a1a;\n }\n .tabela-disponibilidade td.celula {\n background: #fff;\n border-left: 1px solid #ccc;\n border-right: 1px solid #ccc;\n text-align: center;\n padding: 1rem 0;\n }\n .tabela-disponibilidade tr:last-child td.celula {\n border-radius: 0 0 10px 10px;\n border-bottom: 1px solid #ccc;\n }\n .tabela-disponibilidade th,\n .tabela-disponibilidade td {\n vertical-align: middle;\n }\n .tabela-disponibilidade td.periodo {\n font-size: 14px;\n font-weight: 400;\n color: #1a1a1a;\n background: transparent;\n text-align: right;\n padding-right: 12px;\n min-width: 60px;\n }\n .tabela-disponibilidade label {\n width: 24px !important;\n height: 24px !important;\n margin: 0 auto !important;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .tabela-disponibilidade .icon-check,\n .tabela-disponibilidade .icon-close {\n width: 24px !important;\n height: 24px !important;\n }\n .tabela-disponibilidade th:not(.dia),\n .tabela-disponibilidade td:not(.celula):not(.periodo) {\n background: transparent !important;\n border: none !important;\n padding: 0 !important;\n }\n }\n"], ["\n @media only screen and (min-width: 769px) {\n .tabela-disponibilidade {\n border-collapse: separate;\n border-spacing: 24px 0;\n width: 100%;\n table-layout: fixed;\n }\n .tabela-disponibilidade th.dia {\n background: #fff;\n border: 1px solid #ccc;\n border-bottom: none;\n border-radius: 10px 10px 0 0;\n padding: 16px 0 8px 0;\n text-align: center;\n color: #1a1a1a;\n }\n .tabela-disponibilidade td.celula {\n background: #fff;\n border-left: 1px solid #ccc;\n border-right: 1px solid #ccc;\n text-align: center;\n padding: 1rem 0;\n }\n .tabela-disponibilidade tr:last-child td.celula {\n border-radius: 0 0 10px 10px;\n border-bottom: 1px solid #ccc;\n }\n .tabela-disponibilidade th,\n .tabela-disponibilidade td {\n vertical-align: middle;\n }\n .tabela-disponibilidade td.periodo {\n font-size: 14px;\n font-weight: 400;\n color: #1a1a1a;\n background: transparent;\n text-align: right;\n padding-right: 12px;\n min-width: 60px;\n }\n .tabela-disponibilidade label {\n width: 24px !important;\n height: 24px !important;\n margin: 0 auto !important;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .tabela-disponibilidade .icon-check,\n .tabela-disponibilidade .icon-close {\n width: 24px !important;\n height: 24px !important;\n }\n .tabela-disponibilidade th:not(.dia),\n .tabela-disponibilidade td:not(.celula):not(.periodo) {\n background: transparent !important;\n border: none !important;\n padding: 0 !important;\n }\n }\n"])));
|
|
13
|
+
var templateObject_1;
|
|
14
|
+
//# sourceMappingURL=desktop-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"desktop-styles.js","sourceRoot":"","sources":["../../../../../../../src/ui/components/form/input-week-availability/shared/styles/desktop-styles.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,wEAAsC;AAEzB,QAAA,aAAa,GAAG,2BAAM,CAAC,GAAG,wvDAAA,qrDA6DtC,KAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const MobileStyles: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.MobileStyles = void 0;
|
|
11
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
+
exports.MobileStyles = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .week-availability-mobile {\n display: none;\n }\n\n @media only screen and (max-width: 768px) {\n .tabela-disponibilidade {\n display: none !important;\n }\n .week-availability-mobile {\n display: flex;\n flex-direction: row;\n gap: 24px;\n width: 100%;\n align-items: flex-start;\n justify-content: center;\n }\n .day-card {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n padding: 24px 10px;\n border-radius: 10px;\n border: 1px solid #ccc;\n background: #fff;\n flex: 1 0 0;\n min-width: 80px;\n box-sizing: border-box;\n }\n .day-title {\n color: #1a1a1a;\n text-align: center;\n font-family: 'Poppins', sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n margin-bottom: 0;\n }\n .periods {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n }\n .period-row {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n gap: 8px;\n }\n .period-label {\n display: block;\n color: #1a1a1a;\n font-family: 'Poppins', sans-serif;\n font-size: 12px;\n font-weight: 400;\n line-height: 18px;\n text-align: left;\n }\n .day-card label {\n width: 24px !important;\n height: 24px !important;\n margin: 0 !important;\n background: transparent !important;\n box-shadow: none !important;\n }\n .day-card label[aria-checked='true'],\n .day-card label input:checked + span {\n background: transparent !important;\n box-shadow: none !important;\n }\n }\n"], ["\n .week-availability-mobile {\n display: none;\n }\n\n @media only screen and (max-width: 768px) {\n .tabela-disponibilidade {\n display: none !important;\n }\n .week-availability-mobile {\n display: flex;\n flex-direction: row;\n gap: 24px;\n width: 100%;\n align-items: flex-start;\n justify-content: center;\n }\n .day-card {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n padding: 24px 10px;\n border-radius: 10px;\n border: 1px solid #ccc;\n background: #fff;\n flex: 1 0 0;\n min-width: 80px;\n box-sizing: border-box;\n }\n .day-title {\n color: #1a1a1a;\n text-align: center;\n font-family: 'Poppins', sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n margin-bottom: 0;\n }\n .periods {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n }\n .period-row {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n gap: 8px;\n }\n .period-label {\n display: block;\n color: #1a1a1a;\n font-family: 'Poppins', sans-serif;\n font-size: 12px;\n font-weight: 400;\n line-height: 18px;\n text-align: left;\n }\n .day-card label {\n width: 24px !important;\n height: 24px !important;\n margin: 0 !important;\n background: transparent !important;\n box-shadow: none !important;\n }\n .day-card label[aria-checked='true'],\n .day-card label input:checked + span {\n background: transparent !important;\n box-shadow: none !important;\n }\n }\n"])));
|
|
13
|
+
var templateObject_1;
|
|
14
|
+
//# sourceMappingURL=mobile-styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobile-styles.js","sourceRoot":"","sources":["../../../../../../../src/ui/components/form/input-week-availability/shared/styles/mobile-styles.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,wEAAsC;AAEzB,QAAA,YAAY,GAAG,2BAAM,CAAC,GAAG,41DAAA,yxDA4ErC,KAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { dayValues } from './utils/day-formatter.js';
|
|
2
|
+
import { periods } from '../mock.js';
|
|
3
|
+
import { DayLabelFormat } from './constants/day-labels.js';
|
|
4
|
+
export type { DayLabelFormat };
|
|
5
|
+
export type DayValue = (typeof dayValues)[number];
|
|
6
|
+
export type PeriodValue = (typeof periods)[number]['value'];
|
|
7
|
+
export type WeekAvailabilityResult = {
|
|
8
|
+
[day in DayValue]: {
|
|
9
|
+
[period in PeriodValue]: {
|
|
10
|
+
active: boolean;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
export interface WeekAvailabilityBaseProps {
|
|
15
|
+
dayLabelFormat?: DayLabelFormat;
|
|
16
|
+
}
|
|
17
|
+
export declare function getDays(format?: DayLabelFormat): {
|
|
18
|
+
label: "Dom" | "Seg" | "Ter" | "Qua" | "Qui" | "Sex" | "T" | "Q" | "D" | "Sab" | "S" | "Segunda" | "Terça" | "Quarta" | "Quinta" | "Sexta" | "Sábado" | "Domingo";
|
|
19
|
+
value: "segunda" | "terca" | "quarta" | "quinta" | "sexta" | "sabado" | "domingo";
|
|
20
|
+
}[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDays = getDays;
|
|
4
|
+
var day_formatter_1 = require("./utils/day-formatter.js");
|
|
5
|
+
function getDays(format) {
|
|
6
|
+
if (format === void 0) { format = 'medium'; }
|
|
7
|
+
return (0, day_formatter_1.getDaysWithFormat)(format);
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/ui/components/form/input-week-availability/shared/types.ts"],"names":[],"mappings":";;AAqBA,0BAEC;AAvBD,uDAAoE;AAqBpE,SAAgB,OAAO,CAAC,MAAiC;IAAjC,uBAAA,EAAA,iBAAiC;IACvD,OAAO,IAAA,iCAAiB,EAAC,MAAM,CAAC,CAAA;AAClC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DayLabelFormat } from '../constants/day-labels.js';
|
|
2
|
+
export declare const dayValues: readonly ["segunda", "terca", "quarta", "quinta", "sexta", "sabado", "domingo"];
|
|
3
|
+
export declare function getDaysWithFormat(format: DayLabelFormat): {
|
|
4
|
+
label: "Dom" | "Seg" | "Ter" | "Qua" | "Qui" | "Sex" | "T" | "Q" | "D" | "Sab" | "S" | "Segunda" | "Terça" | "Quarta" | "Quinta" | "Sexta" | "Sábado" | "Domingo";
|
|
5
|
+
value: "segunda" | "terca" | "quarta" | "quinta" | "sexta" | "sabado" | "domingo";
|
|
6
|
+
}[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dayValues = void 0;
|
|
4
|
+
exports.getDaysWithFormat = getDaysWithFormat;
|
|
5
|
+
var day_labels_1 = require("../constants/day-labels.js");
|
|
6
|
+
exports.dayValues = ['segunda', 'terca', 'quarta', 'quinta', 'sexta', 'sabado', 'domingo'];
|
|
7
|
+
function getDaysWithFormat(format) {
|
|
8
|
+
return exports.dayValues.map(function (value, index) { return ({
|
|
9
|
+
label: day_labels_1.dayLabels[format][index],
|
|
10
|
+
value: value,
|
|
11
|
+
}); });
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=day-formatter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"day-formatter.js","sourceRoot":"","sources":["../../../../../../../src/ui/components/form/input-week-availability/shared/utils/day-formatter.ts"],"names":[],"mappings":";;;AAIA,8CAKC;AATD,sDAAmE;AAEtD,QAAA,SAAS,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAU,CAAA;AAExG,SAAgB,iBAAiB,CAAC,MAAsB;IACtD,OAAO,iBAAS,CAAC,GAAG,CAAC,UAAC,KAAK,EAAE,KAAK,IAAK,OAAA,CAAC;QACtC,KAAK,EAAE,sBAAS,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC;QAC/B,KAAK,OAAA;KACN,CAAC,EAHqC,CAGrC,CAAC,CAAA;AACL,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InputProps } from '../../../../../ui/index.js';
|
|
2
|
+
import { DayLabelFormat } from '../shared/types.js';
|
|
3
|
+
interface Props extends InputProps {
|
|
4
|
+
dayLabelFormat?: DayLabelFormat;
|
|
5
|
+
}
|
|
6
|
+
export declare function InputWeekAvailabilityV1({ name, label, readOnly, dayLabelFormat }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InputWeekAvailabilityV1 = InputWeekAvailabilityV1;
|
|
4
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
var ui_1 = require("../../../../../ui/index.js");
|
|
6
|
+
var use_week_availability_1 = require("../shared/hooks/use-week-availability.js");
|
|
7
|
+
var desktop_table_v1_1 = require("../shared/components/desktop-table-v1.js");
|
|
8
|
+
var base_styles_1 = require("../shared/styles/base-styles.js");
|
|
9
|
+
var types_1 = require("../shared/types.js");
|
|
10
|
+
function InputWeekAvailabilityV1(_a) {
|
|
11
|
+
var name = _a.name, label = _a.label, readOnly = _a.readOnly, dayLabelFormat = _a.dayLabelFormat;
|
|
12
|
+
var nameInput = (0, use_week_availability_1.useWeekAvailability)(name).nameInput;
|
|
13
|
+
var days = (0, types_1.getDays)(dayLabelFormat || 'short');
|
|
14
|
+
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'InputWeekAvailability', children: (0, jsx_runtime_1.jsxs)(base_styles_1.BaseInputWeekAvailability, { className: 'input_week_availability', children: [label && (0, jsx_runtime_1.jsx)("label", { className: 'font-18-bold', children: label }), (0, jsx_runtime_1.jsx)(desktop_table_v1_1.DesktopTableV1, { nameInput: nameInput, readOnly: readOnly, useIconComponent: false, days: days })] }) }));
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/ui/components/form/input-week-availability/v-01/index.tsx"],"names":[],"mappings":";;AAUA,0DAYC;;AAtBD,2BAAwC;AACxC,+EAA2E;AAC3E,0EAAsE;AACtE,4DAAwE;AACxE,yCAAyD;AAMzD,SAAgB,uBAAuB,CAAC,EAAgD;QAA9C,IAAI,UAAA,EAAE,KAAK,WAAA,EAAE,QAAQ,cAAA,EAAE,cAAc,oBAAA;IACrE,IAAA,SAAS,GAAK,IAAA,2CAAmB,EAAC,IAAI,CAAC,UAA9B,CAA8B;IAC/C,IAAM,IAAI,GAAG,IAAA,eAAO,EAAC,cAAc,IAAI,OAAO,CAAC,CAAA;IAE/C,OAAO,CACL,uBAAC,UAAK,IAAC,IAAI,EAAC,uBAAuB,YACjC,wBAAC,uCAAyB,IAAC,SAAS,EAAC,yBAAyB,aAC3D,KAAK,IAAI,kCAAO,SAAS,EAAC,cAAc,YAAE,KAAK,GAAS,EACzD,uBAAC,iCAAc,IAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,GAAI,IACvE,GACtB,CACT,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InputProps } from '../../../../../ui/index.js';
|
|
2
|
+
import { DayLabelFormat } from '../shared/types.js';
|
|
3
|
+
interface Props extends InputProps {
|
|
4
|
+
dayLabelFormat?: DayLabelFormat;
|
|
5
|
+
}
|
|
6
|
+
export declare function InputWeekAvailabilityV2({ name, label, readOnly, dayLabelFormat }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.InputWeekAvailabilityV2 = InputWeekAvailabilityV2;
|
|
4
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
var ui_1 = require("../../../../../ui/index.js");
|
|
6
|
+
var use_window_1 = require("../../../../../ui/hooks/use-window.js");
|
|
7
|
+
var use_week_availability_1 = require("../shared/hooks/use-week-availability.js");
|
|
8
|
+
var desktop_table_1 = require("../shared/components/desktop-table.js");
|
|
9
|
+
var mobile_layout_1 = require("../shared/components/mobile-layout.js");
|
|
10
|
+
var base_styles_1 = require("../shared/styles/base-styles.js");
|
|
11
|
+
var mobile_styles_1 = require("../shared/styles/mobile-styles.js");
|
|
12
|
+
var desktop_styles_1 = require("../shared/styles/desktop-styles.js");
|
|
13
|
+
var types_1 = require("../shared/types.js");
|
|
14
|
+
function InputWeekAvailabilityV2(_a) {
|
|
15
|
+
var name = _a.name, label = _a.label, readOnly = _a.readOnly, dayLabelFormat = _a.dayLabelFormat;
|
|
16
|
+
var nameInput = (0, use_week_availability_1.useWeekAvailability)(name).nameInput;
|
|
17
|
+
var windowObj = (0, use_window_1.useWindow)();
|
|
18
|
+
var isMobile = windowObj && windowObj.innerWidth <= 768;
|
|
19
|
+
var days = (0, types_1.getDays)(dayLabelFormat || 'medium');
|
|
20
|
+
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'InputWeekAvailability', children: (0, jsx_runtime_1.jsx)(base_styles_1.BaseInputWeekAvailability, { className: 'input_week_availability', children: (0, jsx_runtime_1.jsx)(mobile_styles_1.MobileStyles, { children: (0, jsx_runtime_1.jsxs)(desktop_styles_1.DesktopStyles, { children: [label && (0, jsx_runtime_1.jsx)("label", { className: 'font-18-bold', children: label }), isMobile ? ((0, jsx_runtime_1.jsx)(mobile_layout_1.MobileLayout, { nameInput: nameInput, readOnly: readOnly, useIconComponent: true, days: days })) : ((0, jsx_runtime_1.jsx)(desktop_table_1.DesktopTable, { nameInput: nameInput, readOnly: readOnly, useIconComponent: true, days: days }))] }) }) }) }));
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/ui/components/form/input-week-availability/v-02/index.tsx"],"names":[],"mappings":";;AAcA,0DAsBC;;AApCD,2BAAwC;AACxC,oDAAiD;AACjD,+EAA2E;AAC3E,oEAAiE;AACjE,oEAAiE;AACjE,4DAAwE;AACxE,gEAA6D;AAC7D,kEAA+D;AAC/D,yCAAyD;AAMzD,SAAgB,uBAAuB,CAAC,EAAgD;QAA9C,IAAI,UAAA,EAAE,KAAK,WAAA,EAAE,QAAQ,cAAA,EAAE,cAAc,oBAAA;IACrE,IAAA,SAAS,GAAK,IAAA,2CAAmB,EAAC,IAAI,CAAC,UAA9B,CAA8B;IAC/C,IAAM,SAAS,GAAG,IAAA,sBAAS,GAAE,CAAA;IAC7B,IAAM,QAAQ,GAAG,SAAS,IAAI,SAAS,CAAC,UAAU,IAAI,GAAG,CAAA;IACzD,IAAM,IAAI,GAAG,IAAA,eAAO,EAAC,cAAc,IAAI,QAAQ,CAAC,CAAA;IAEhD,OAAO,CACL,uBAAC,UAAK,IAAC,IAAI,EAAC,uBAAuB,YACjC,uBAAC,uCAAyB,IAAC,SAAS,EAAC,yBAAyB,YAC5D,uBAAC,4BAAY,cACX,wBAAC,8BAAa,eACX,KAAK,IAAI,kCAAO,SAAS,EAAC,cAAc,YAAE,KAAK,GAAS,EACxD,QAAQ,CAAC,CAAC,CAAC,CACV,uBAAC,4BAAY,IAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAI,CAC/F,CAAC,CAAC,CAAC,CACF,uBAAC,4BAAY,IAAC,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,gBAAgB,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,GAAI,CAC/F,IACa,GACH,GACW,GACtB,CACT,CAAA;AACH,CAAC"}
|
|
@@ -78,13 +78,14 @@ var ui_1 = require("../../../../ui/index.js");
|
|
|
78
78
|
var custom_styles_1 = require("./custom-styles.js");
|
|
79
79
|
var S = __importStar(require("./styles.js"));
|
|
80
80
|
function Select(props) {
|
|
81
|
-
var _a, _b, _c, _d;
|
|
82
|
-
var
|
|
83
|
-
var
|
|
81
|
+
var _a, _b, _c, _d, _e;
|
|
82
|
+
var _f = (0, react_1.useState)(props.options || []), options = _f[0], setOptions = _f[1];
|
|
83
|
+
var _g = (0, react_1.useState)(false), isLoading = _g[0], setIsLoading = _g[1];
|
|
84
|
+
var formHandler = (0, ui_1.useFormHandler)();
|
|
84
85
|
var isMounted = (0, ui_1.useComponentIsMounted)();
|
|
85
|
-
var
|
|
86
|
+
var _h = (0, formik_1.useField)({
|
|
86
87
|
name: props.name,
|
|
87
|
-
}), field =
|
|
88
|
+
}), field = _h[0], state = _h[1], utils = _h[2];
|
|
88
89
|
var fieldValue = field.value || [];
|
|
89
90
|
var value = !props.onlyOneValue
|
|
90
91
|
? fieldValue && (fieldValue === null || fieldValue === void 0 ? void 0 : fieldValue.length) > 0 && props.isGroup
|
|
@@ -136,7 +137,7 @@ function Select(props) {
|
|
|
136
137
|
var rest = __rest(_a, []);
|
|
137
138
|
return (0, jsx_runtime_1.jsx)(react_select_2.components.Input, __assign({}, rest, { autoComplete: 'off' }));
|
|
138
139
|
};
|
|
139
|
-
return ((0, jsx_runtime_1.jsxs)(S.SelectWrapper, { children: [(0, jsx_runtime_1.jsx)(ui_1.InputControl, __assign({}, props, { children: (0, jsx_runtime_1.jsx)(SelectComponent, { isClearable: props === null || props === void 0 ? void 0 : props.isClearable, menuPortalTarget: document === null || document === void 0 ? void 0 : document.body, onCreateOption: handleCreate, isDisabled: isLoading || props.disabled, isLoading: isLoading, isSearchable: props.isSearchable, menuPlacement: props.menuPlacement || 'auto', menuIsOpen: props.forceOpenToDevelop ? props.forceOpenToDevelop : undefined, placeholder: props.placeholder, name: field.name, closeMenuOnSelect: props === null || props === void 0 ? void 0 : props.closeMenuOnSelect, noOptionsMessage: function () { return props.noOptionMessage || 'Nenhuma opção encontrada.'; }, onChange: function (ev) {
|
|
140
|
+
return ((0, jsx_runtime_1.jsxs)(S.SelectWrapper, { children: [(0, jsx_runtime_1.jsx)(ui_1.InputControl, __assign({}, props, { children: (0, jsx_runtime_1.jsx)(SelectComponent, { isClearable: props === null || props === void 0 ? void 0 : props.isClearable, menuPortalTarget: document === null || document === void 0 ? void 0 : document.body, onCreateOption: handleCreate, isDisabled: isLoading || props.disabled || ((_a = formHandler === null || formHandler === void 0 ? void 0 : formHandler.inputs) === null || _a === void 0 ? void 0 : _a.readOnly), isLoading: isLoading, isSearchable: props.isSearchable, menuPlacement: props.menuPlacement || 'auto', menuIsOpen: props.forceOpenToDevelop ? props.forceOpenToDevelop : undefined, placeholder: props.placeholder, name: field.name, closeMenuOnSelect: props === null || props === void 0 ? void 0 : props.closeMenuOnSelect, noOptionsMessage: function () { return props.noOptionMessage || 'Nenhuma opção encontrada.'; }, onChange: function (ev) {
|
|
140
141
|
var _a;
|
|
141
142
|
var value = props.onlyOneValue
|
|
142
143
|
? (_a = ev === null || ev === void 0 ? void 0 : ev.value) !== null && _a !== void 0 ? _a : null
|
|
@@ -151,6 +152,6 @@ function Select(props) {
|
|
|
151
152
|
props.onChangeInput && props.onChangeInput(value, function () { return utils.setValue(value); }, { state: state, utils: utils });
|
|
152
153
|
}, value: valueExternalSelect || props.isMultiple ? value : value[0], isMulti: props.isMultiple, options: options, components: props.CustomOption
|
|
153
154
|
? { Option: props.CustomOption, SingleValue: props.CustomOption, Input: Input }
|
|
154
|
-
: { Input: Input }, className: ((
|
|
155
|
+
: { Input: Input }, className: ((_b = field === null || field === void 0 ? void 0 : field.value) === null || _b === void 0 ? void 0 : _b.length) > 0 ? 'open' : '', styles: __assign({ menuPortal: function (base) { return (__assign(__assign({}, base), { zIndex: ui_1.zIndexInfinityForge.reactSelectDropdown })); } }, (props.customStlyes || custom_styles_1.customStyles)) }) })), ((_c = props === null || props === void 0 ? void 0 : props.addButton) === null || _c === void 0 ? void 0 : _c.CustomComponent) ? ((0, jsx_runtime_1.jsx)("div", { className: 'custom-component', children: (_d = props === null || props === void 0 ? void 0 : props.addButton) === null || _d === void 0 ? void 0 : _d.CustomComponent })) : (((_e = props === null || props === void 0 ? void 0 : props.addButton) === null || _e === void 0 ? void 0 : _e.onClick) && ((0, jsx_runtime_1.jsx)("button", { className: 'add', type: 'button', onClick: props.addButton.onClick, children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'PlusIcon' }) })))] }));
|
|
155
156
|
}
|
|
156
157
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ui/components/form/select/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ui/components/form/select/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;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AK,uBAAL,KAAK,CAAE,SAAS,0CAAE,OAAO,KAAI,CAC3B,mCAAQ,SAAS,EAAC,KAAK,EAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,YACpE,uBAAC,SAAI,IAAC,IAAI,EAAC,UAAU,GAAG,GACjB,CACV,CACF,IACe,CACnB,CAAA;AACH,CAAC"}
|
|
@@ -16,9 +16,12 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
16
16
|
var react_1 = require("react");
|
|
17
17
|
var formik_1 = require("formik");
|
|
18
18
|
var input_control_1 = require("../input-control/index.js");
|
|
19
|
+
var handler_1 = require("../handler/index.js");
|
|
19
20
|
function Textarea(props) {
|
|
20
|
-
var _a
|
|
21
|
-
var _b = (0,
|
|
21
|
+
var _a;
|
|
22
|
+
var _b = (0, formik_1.useField)({ name: props.name }), field = _b[0], state = _b[1], helpers = _b[2];
|
|
23
|
+
var _c = (0, react_1.useState)(field.value), tempValue = _c[0], setTempValue = _c[1];
|
|
24
|
+
var formHandler = (0, handler_1.useFormHandler)();
|
|
22
25
|
(0, react_1.useEffect)(function () {
|
|
23
26
|
if (field.value === undefined) {
|
|
24
27
|
helpers.setValue("");
|
|
@@ -37,7 +40,7 @@ function Textarea(props) {
|
|
|
37
40
|
(_a = props === null || props === void 0 ? void 0 : props.onChangeBlur) === null || _a === void 0 ? void 0 : _a.call(props, tempValue, undefined, { state: state, utils: helpers });
|
|
38
41
|
}
|
|
39
42
|
};
|
|
40
|
-
return ((0, jsx_runtime_1.jsx)(input_control_1.InputControl, __assign({}, props, { fieldValue: value, children: (0, jsx_runtime_1.jsx)("textarea", __assign({ id: props.name, className: "font-16-regular" }, props, field, { rows: props.rows || 5, value: value, onChange: function (ev) {
|
|
43
|
+
return ((0, jsx_runtime_1.jsx)(input_control_1.InputControl, __assign({}, props, { fieldValue: value, children: (0, jsx_runtime_1.jsx)("textarea", __assign({ id: props.name, className: "font-16-regular" }, props, field, { readOnly: (props === null || props === void 0 ? void 0 : props.readOnly) || ((_a = formHandler === null || formHandler === void 0 ? void 0 : formHandler.inputs) === null || _a === void 0 ? void 0 : _a.readOnly), rows: props.rows || 5, value: value, onChange: function (ev) {
|
|
41
44
|
var _a;
|
|
42
45
|
var newValue = ev.target.value;
|
|
43
46
|
if (props.onChangeMode === 'blur') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ui/components/form/textarea/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ui/components/form/textarea/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;AAMA,4BAsDC;;AA5DD,+BAAoD;AACpD,iCAAiC;AACjC,kDAA+C;AAE/C,sCAA2C;AAE3C,SAAgB,QAAQ,CAAC,KAAiB;;IAClC,IAAA,KAA0B,IAAA,iBAAQ,EAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,EAAvD,KAAK,QAAA,EAAE,KAAK,QAAA,EAAE,OAAO,QAAkC,CAAA;IACxD,IAAA,KAA4B,IAAA,gBAAQ,EAAC,KAAK,CAAC,KAAK,CAAC,EAAhD,SAAS,QAAA,EAAE,YAAY,QAAyB,CAAA;IAEvD,IAAM,WAAW,GAAG,IAAA,wBAAc,GAAE,CAAA;IAEpC,IAAA,iBAAS,EAAC;QACR,IAAI,KAAK,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;YAC9B,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;QACtB,CAAC;IACH,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAA;IAEjB,IAAA,iBAAS,EAAC;QACR,IAAI,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,YAAY,MAAK,MAAM,EAAE,CAAC;YACnC,YAAY,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;Q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AE,CAAC,CAAA;gBACpB,CAAC;gBAED,MAAA,KAAK,CAAC,aAAa,sDAAG,QAAQ,EAAE,SAAS,EAAE,EAAE,KAAK,OAAA,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAA;YACvE,CAAC,EACD,MAAM,EAAE,KAAK,CAAC,YAAY,KAAK,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,IACjE,IACW,CAChB,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const InputWeekAvailability: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, never>> & string;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
-
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
-
return cooked;
|
|
5
|
-
};
|
|
6
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
-
};
|
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
-
exports.InputWeekAvailability = void 0;
|
|
11
|
-
var styled_components_1 = __importDefault(require("styled-components"));
|
|
12
|
-
exports.InputWeekAvailability = (0, styled_components_1.default)('div')(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n > label {\n margin-bottom: clamp(10px, 1vw, 15px);\n }\n\n th {\n text-align: center;\n }\n\n thead {\n background-color: transparent !important;\n\n th:not(:first-child) {\n padding: 1px 5px 5px;\n border-radius: 5px 5px 0 0;\n }\n }\n\n tr:not(:last-child) {\n td,\n th {\n padding: 1px 5px 5px;\n }\n }\n\n tr:last-child td {\n border-radius: 0 0 5px 5px;\n padding: 1px 5px;\n }\n\n th,\n td {\n &:not(:first-child):not(:empty) {\n background-color: #f2f2f2;\n }\n\n &:empty {\n padding: 1px 3px !important;\n }\n\n &:first-child {\n padding-right: 15px !important;\n }\n }\n\n td > div {\n height: 100%;\n margin: auto;\n }\n\n table label {\n width: 20px !important;\n height: 20px !important;\n border: none !important;\n background: transparent !important;\n margin-bottom: 0 !important;\n cursor: pointer;\n\n svg {\n width: 100% !important;\n height: 100% !important;\n }\n }\n\n .input_control {\n margin-bottom: 2px !important;\n }\n\n .input-wrapper {\n display: flex;\n align-items: center;\n }\n\n @media only screen and (max-width: 1600px) {\n thead th:not(:first-child),\n tr:not(:last-child) td,\n tr:not(:last-child) th,\n tr:last-child td {\n padding: 1px 4px 4px;\n }\n\n th,\n td {\n &:empty {\n padding: 1px 2px !important;\n }\n\n &:first-child {\n padding-right: 10px !important;\n }\n }\n\n tr:last-child td {\n padding-bottom: 1px !important;\n }\n\n table label {\n width: 18px !important;\n height: 18px !important;\n }\n }\n\n @media only screen and (max-width: 1024px) {\n > label {\n width: 100%;\n text-align: center;\n max-width: 242px;\n margin-bottom: 10px;\n }\n\n table label {\n width: 16px !important;\n height: 16px !important;\n }\n\n th,\n td {\n font-size: 12px;\n\n &:first-child {\n padding-right: 5px !important;\n }\n }\n }\n\n .week-availability-mobile {\n display: none;\n }\n\n @media only screen and (max-width: 768px) {\n .tabela-disponibilidade {\n display: none !important;\n }\n .week-availability-mobile {\n display: flex;\n flex-direction: row;\n gap: 24px;\n width: 100%;\n align-items: flex-start;\n justify-content: center;\n }\n .day-card {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n padding: 24px 10px;\n border-radius: 10px;\n border: 1px solid #ccc;\n background: #fff;\n flex: 1 0 0;\n min-width: 80px;\n box-sizing: border-box;\n }\n .day-title {\n color: #1a1a1a;\n text-align: center;\n font-family: 'Poppins', sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n margin-bottom: 0;\n }\n .periods {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n }\n .period-row {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n gap: 8px;\n }\n .period-label {\n display: block;\n color: #1a1a1a;\n font-family: 'Poppins', sans-serif;\n font-size: 12px;\n font-weight: 400;\n line-height: 18px;\n text-align: left;\n }\n .day-card label {\n width: 24px !important;\n height: 24px !important;\n margin: 0 !important;\n background: transparent !important;\n box-shadow: none !important;\n }\n .day-card label[aria-checked='true'],\n .day-card label input:checked + span {\n background: transparent !important;\n box-shadow: none !important;\n }\n }\n\n @media only screen and (min-width: 769px) {\n .tabela-disponibilidade {\n border-collapse: separate;\n border-spacing: 24px 0;\n width: 100%;\n table-layout: fixed;\n }\n .tabela-disponibilidade th.dia {\n background: #fff;\n border: 1px solid #ccc;\n border-bottom: none;\n border-radius: 10px 10px 0 0;\n padding: 16px 0 8px 0;\n text-align: center;\n color: #1a1a1a;\n }\n .tabela-disponibilidade td.celula {\n background: #fff;\n border-left: 1px solid #ccc;\n border-right: 1px solid #ccc;\n text-align: center;\n padding: 1rem 0;\n }\n .tabela-disponibilidade tr:last-child td.celula {\n border-radius: 0 0 10px 10px;\n border-bottom: 1px solid #ccc;\n }\n .tabela-disponibilidade th,\n .tabela-disponibilidade td {\n vertical-align: middle;\n }\n .tabela-disponibilidade td.periodo {\n font-size: 14px;\n font-weight: 400;\n color: #1a1a1a;\n background: transparent;\n text-align: right;\n padding-right: 12px;\n min-width: 60px;\n }\n .tabela-disponibilidade label {\n width: 24px !important;\n height: 24px !important;\n margin: 0 auto !important;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .tabela-disponibilidade .icon-check,\n .tabela-disponibilidade .icon-close {\n width: 24px !important;\n height: 24px !important;\n }\n .tabela-disponibilidade th:not(.dia),\n .tabela-disponibilidade td:not(.celula):not(.periodo) {\n background: transparent !important;\n border: none !important;\n padding: 0 !important;\n }\n }\n"], ["\n > label {\n margin-bottom: clamp(10px, 1vw, 15px);\n }\n\n th {\n text-align: center;\n }\n\n thead {\n background-color: transparent !important;\n\n th:not(:first-child) {\n padding: 1px 5px 5px;\n border-radius: 5px 5px 0 0;\n }\n }\n\n tr:not(:last-child) {\n td,\n th {\n padding: 1px 5px 5px;\n }\n }\n\n tr:last-child td {\n border-radius: 0 0 5px 5px;\n padding: 1px 5px;\n }\n\n th,\n td {\n &:not(:first-child):not(:empty) {\n background-color: #f2f2f2;\n }\n\n &:empty {\n padding: 1px 3px !important;\n }\n\n &:first-child {\n padding-right: 15px !important;\n }\n }\n\n td > div {\n height: 100%;\n margin: auto;\n }\n\n table label {\n width: 20px !important;\n height: 20px !important;\n border: none !important;\n background: transparent !important;\n margin-bottom: 0 !important;\n cursor: pointer;\n\n svg {\n width: 100% !important;\n height: 100% !important;\n }\n }\n\n .input_control {\n margin-bottom: 2px !important;\n }\n\n .input-wrapper {\n display: flex;\n align-items: center;\n }\n\n @media only screen and (max-width: 1600px) {\n thead th:not(:first-child),\n tr:not(:last-child) td,\n tr:not(:last-child) th,\n tr:last-child td {\n padding: 1px 4px 4px;\n }\n\n th,\n td {\n &:empty {\n padding: 1px 2px !important;\n }\n\n &:first-child {\n padding-right: 10px !important;\n }\n }\n\n tr:last-child td {\n padding-bottom: 1px !important;\n }\n\n table label {\n width: 18px !important;\n height: 18px !important;\n }\n }\n\n @media only screen and (max-width: 1024px) {\n > label {\n width: 100%;\n text-align: center;\n max-width: 242px;\n margin-bottom: 10px;\n }\n\n table label {\n width: 16px !important;\n height: 16px !important;\n }\n\n th,\n td {\n font-size: 12px;\n\n &:first-child {\n padding-right: 5px !important;\n }\n }\n }\n\n .week-availability-mobile {\n display: none;\n }\n\n @media only screen and (max-width: 768px) {\n .tabela-disponibilidade {\n display: none !important;\n }\n .week-availability-mobile {\n display: flex;\n flex-direction: row;\n gap: 24px;\n width: 100%;\n align-items: flex-start;\n justify-content: center;\n }\n .day-card {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n padding: 24px 10px;\n border-radius: 10px;\n border: 1px solid #ccc;\n background: #fff;\n flex: 1 0 0;\n min-width: 80px;\n box-sizing: border-box;\n }\n .day-title {\n color: #1a1a1a;\n text-align: center;\n font-family: 'Poppins', sans-serif;\n font-size: 14px;\n font-weight: 400;\n line-height: 20px;\n margin-bottom: 0;\n }\n .periods {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 16px;\n }\n .period-row {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n gap: 8px;\n }\n .period-label {\n display: block;\n color: #1a1a1a;\n font-family: 'Poppins', sans-serif;\n font-size: 12px;\n font-weight: 400;\n line-height: 18px;\n text-align: left;\n }\n .day-card label {\n width: 24px !important;\n height: 24px !important;\n margin: 0 !important;\n background: transparent !important;\n box-shadow: none !important;\n }\n .day-card label[aria-checked='true'],\n .day-card label input:checked + span {\n background: transparent !important;\n box-shadow: none !important;\n }\n }\n\n @media only screen and (min-width: 769px) {\n .tabela-disponibilidade {\n border-collapse: separate;\n border-spacing: 24px 0;\n width: 100%;\n table-layout: fixed;\n }\n .tabela-disponibilidade th.dia {\n background: #fff;\n border: 1px solid #ccc;\n border-bottom: none;\n border-radius: 10px 10px 0 0;\n padding: 16px 0 8px 0;\n text-align: center;\n color: #1a1a1a;\n }\n .tabela-disponibilidade td.celula {\n background: #fff;\n border-left: 1px solid #ccc;\n border-right: 1px solid #ccc;\n text-align: center;\n padding: 1rem 0;\n }\n .tabela-disponibilidade tr:last-child td.celula {\n border-radius: 0 0 10px 10px;\n border-bottom: 1px solid #ccc;\n }\n .tabela-disponibilidade th,\n .tabela-disponibilidade td {\n vertical-align: middle;\n }\n .tabela-disponibilidade td.periodo {\n font-size: 14px;\n font-weight: 400;\n color: #1a1a1a;\n background: transparent;\n text-align: right;\n padding-right: 12px;\n min-width: 60px;\n }\n .tabela-disponibilidade label {\n width: 24px !important;\n height: 24px !important;\n margin: 0 auto !important;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .tabela-disponibilidade .icon-check,\n .tabela-disponibilidade .icon-close {\n width: 24px !important;\n height: 24px !important;\n }\n .tabela-disponibilidade th:not(.dia),\n .tabela-disponibilidade td:not(.celula):not(.periodo) {\n background: transparent !important;\n border: none !important;\n padding: 0 !important;\n }\n }\n"])));
|
|
13
|
-
var templateObject_1;
|
|
14
|
-
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../src/ui/components/form/input-week-availability/styles.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,wEAAsC;AAEzB,QAAA,qBAAqB,GAAG,IAAA,2BAAM,EAAC,KAAK,CAAC,0jLAAA,u/KAqQjD,KAAA"}
|