@producteca/producteca-ui-kit 0.0.5 → 0.0.7

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.
@@ -1,4 +1,4 @@
1
-
1
+ import './button.scss';
2
2
  interface Props {
3
3
  label: string;
4
4
  variant?: 'primary' | 'secondary' | 'success' | 'error';
@@ -0,0 +1,34 @@
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
+ var __rest = (this && this.__rest) || function (s, e) {
14
+ var t = {};
15
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
+ t[p] = s[p];
17
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
+ t[p[i]] = s[p[i]];
21
+ }
22
+ return t;
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.Button = void 0;
26
+ var jsx_runtime_1 = require("react/jsx-runtime");
27
+ require("./button.scss");
28
+ var Button = function (_a) {
29
+ var _b = _a.type, type = _b === void 0 ? 'button' : _b, _c = _a.variant, variant = _c === void 0 ? 'primary' : _c, _d = _a.size, size = _d === void 0 ? 'lg' : _d, label = _a.label, outline = _a.outline, props = __rest(_a, ["type", "variant", "size", "label", "outline"]);
30
+ var outlineClass = outline ? 'outline' : '';
31
+ return ((0, jsx_runtime_1.jsx)("button", __assign({ type: type, className: "btn ".concat(size, " ").concat(variant, " ").concat(outlineClass, " ") }, props, { children: label })));
32
+ };
33
+ exports.Button = Button;
34
+ exports.default = exports.Button;
@@ -1,5 +1,5 @@
1
- import { default as React } from 'react';
2
-
1
+ import React from 'react';
2
+ import './emptyState.scss';
3
3
  interface Props {
4
4
  onActionClick?: () => void;
5
5
  actionTex?: string;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.EmptyState = void 0;
7
+ var jsx_runtime_1 = require("react/jsx-runtime");
8
+ var locales_1 = __importDefault(require("../../locales"));
9
+ var icons_1 = require("../icons");
10
+ require("./emptyState.scss");
11
+ var DefaultIcon = (0, jsx_runtime_1.jsx)(icons_1.SearchPublication, {});
12
+ var EmptyState = function (_a) {
13
+ var onActionClick = _a.onActionClick, _b = _a.icon, icon = _b === void 0 ? DefaultIcon : _b, _c = _a.actionTex, actionTex = _c === void 0 ? (0, locales_1.default)('reloadPage') : _c, _d = _a.text, text = _d === void 0 ? (0, locales_1.default)('noResultsFound') : _d;
14
+ return ((0, jsx_runtime_1.jsxs)("div", { className: "empty-state-container", children: [icon, (0, jsx_runtime_1.jsxs)("div", { className: "link-container", children: [(0, jsx_runtime_1.jsxs)("span", { children: [" ", text, " "] }), onActionClick && (0, jsx_runtime_1.jsx)("a", { onClick: onActionClick, children: actionTex })] })] }));
15
+ };
16
+ exports.EmptyState = EmptyState;
17
+ exports.default = exports.EmptyState;
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SearchPublication = void 0;
4
+ var searchPublication_1 = require("./searchPublication/searchPublication");
5
+ Object.defineProperty(exports, "SearchPublication", { enumerable: true, get: function () { return searchPublication_1.SearchPublication; } });
@@ -1,4 +1,4 @@
1
-
1
+ import '../icons.scss';
2
2
  interface Props {
3
3
  size?: number;
4
4
  color?: string | undefined;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SearchPublication = void 0;
4
+ var jsx_runtime_1 = require("react/jsx-runtime");
5
+ require("../icons.scss");
6
+ var SearchPublication = function (_a) {
7
+ var _b = _a.size, size = _b === void 0 ? 100 : _b, _c = _a.color, color = _c === void 0 ? '#D4D9D8' : _c;
8
+ return ((0, jsx_runtime_1.jsx)("svg", { id: "Capa_1", "data-name": "Capa 1", xmlns: "http://www.w3.org/2000/svg", width: size, height: size, viewBox: "0 0 95 95", children: (0, jsx_runtime_1.jsxs)("g", { id: "Grupo_1315", "data-name": "Grupo 1315", children: [(0, jsx_runtime_1.jsx)("path", { id: "Trazado_2280", "data-name": "Trazado 2280", style: { fill: color }, d: "M0,13.62c.09-.37.16-.76.26-1.14a7.22,7.22,0,0,1,7-5.28H24.3c.23,0,.3,0,.29-.29a7,7,0,0,1,.58-3.25A6.37,6.37,0,0,1,33.63.6a6.47,6.47,0,0,1,1.75,1.22,6.2,6.2,0,0,1,1.89,4.53c0,.22,0,.43,0,.65s0,.2.21.2H54.63a7.21,7.21,0,0,1,7.24,7.18V34.23a1.45,1.45,0,0,1-1.33,1.55h-.16A1.44,1.44,0,0,1,59,34.5c0-.12,0-.25,0-.37V14.55a4.33,4.33,0,0,0-4.2-4.46H7.4A4.34,4.34,0,0,0,3,13.44a4.07,4.07,0,0,0-.12,1V79.22a4.33,4.33,0,0,0,4.32,4.32H54.44a1.5,1.5,0,0,1,1.49.83,1.45,1.45,0,0,1-.68,1.93,1.39,1.39,0,0,1-.53.14,2.62,2.62,0,0,1-.28,0H7.29A7.25,7.25,0,0,1,.06,80.26c0-.1,0-.21-.06-.3ZM30.91,7.2h3.23c.17,0,.23,0,.22-.22s0-.47,0-.7A3.43,3.43,0,0,0,28,4.62a4.27,4.27,0,0,0-.45,2.3c0,.22,0,.29.27.29,1,0,2.09,0,3.14,0Z" }), (0, jsx_runtime_1.jsx)("path", { id: "Trazado_2281", "data-name": "Trazado 2281", style: { fill: color }, d: "M54.79,38.4c8.35-.94,15.22,1.7,20.36,8.46A19.94,19.94,0,0,1,79.1,57a20.86,20.86,0,0,1-2,11.63.24.24,0,0,0,.05.34h0L92.23,82.66a5.82,5.82,0,1,1-7.83,8.62l-.07-.06Q76.76,84.37,69.2,77.47c-.15-.13-.23-.09-.37,0a21.24,21.24,0,0,1-7,2.6,21.08,21.08,0,0,1-21-8.55,20.4,20.4,0,0,1-3.79-10A21.15,21.15,0,0,1,51.26,39.31,23.75,23.75,0,0,1,54.79,38.4Zm21.72,18A18.62,18.62,0,1,0,61,77.68h0A18.64,18.64,0,0,0,76.51,56.39Zm15.08,30a3.31,3.31,0,0,0-1.12-2L75.89,71.17c-.16-.14-.23-.14-.36,0a20.4,20.4,0,0,1-4.16,4.49c-.2.15-.19.23,0,.39,1.78,1.6,3.56,3.22,5.34,4.84l9.39,8.52a3.32,3.32,0,0,0,5.5-3Z" }), (0, jsx_runtime_1.jsx)("path", { id: "Trazado_2282", "data-name": "Trazado 2282", style: { fill: color }, d: "M31,19.9H20.38A5.76,5.76,0,0,1,14.57,15a3.12,3.12,0,0,1,0-1.1,1.45,1.45,0,0,1,2.88.22,2.85,2.85,0,0,0,1.74,2.68A2.54,2.54,0,0,0,20.3,17H42a2.9,2.9,0,0,0,2.89-2.85,1.46,1.46,0,0,1,2.91-.07v.1a5.8,5.8,0,0,1-5.72,5.72Z" }), (0, jsx_runtime_1.jsx)("path", { id: "Trazado_2283", "data-name": "Trazado 2283", style: { fill: color }, d: "M13.22,68V66.07A1.86,1.86,0,0,1,15,64.15c1.36,0,2.73,0,4.09,0A1.86,1.86,0,0,1,20.88,66q0,2,0,3.93A1.91,1.91,0,0,1,19,71.83c-1.28,0-2.57,0-3.85,0a1.91,1.91,0,0,1-1.91-1.9V68Zm2.24,0v.76a.77.77,0,0,0,.71.85.28.28,0,0,0,.13,0c.5,0,1,0,1.49,0a.78.78,0,0,0,.85-.73v-.09c0-.51,0-1,0-1.54a.76.76,0,0,0-.72-.8h0a12.2,12.2,0,0,0-1.71,0,.76.76,0,0,0-.72.79h0V68Z" }), (0, jsx_runtime_1.jsx)("path", { id: "Trazado_2284", "data-name": "Trazado 2284", style: { fill: color }, d: "M13.22,52.67V50.75a1.87,1.87,0,0,1,1.83-1.9q2,0,4,0a1.88,1.88,0,0,1,1.84,1.81c0,1.35,0,2.71,0,4.06a1.84,1.84,0,0,1-1.77,1.79,39.85,39.85,0,0,1-4.09,0,1.85,1.85,0,0,1-1.81-1.89.19.19,0,0,1,0-.08ZM17,54.27h.76a.79.79,0,0,0,.84-.73v-.07c0-.52,0-1,0-1.57a.76.76,0,0,0-.71-.79c-.6,0-1.2,0-1.79,0a.74.74,0,0,0-.68.75q0,.83,0,1.65a.77.77,0,0,0,.77.75Z" }), (0, jsx_runtime_1.jsx)("path", { id: "Trazado_2285", "data-name": "Trazado 2285", style: { fill: color }, d: "M13.22,37.38v-2a1.88,1.88,0,0,1,1.86-1.87q2,0,3.93,0a1.85,1.85,0,0,1,1.86,1.78c0,1.37,0,2.74,0,4.12A1.85,1.85,0,0,1,19,41.23q-2,0-4,0a1.88,1.88,0,0,1-1.85-1.9ZM17.05,39h.75a.8.8,0,0,0,.84-.74v-.06c0-.53,0-1,0-1.57a.77.77,0,0,0-.75-.8H16.2a.77.77,0,0,0-.74.76c0,.55,0,1.1,0,1.66a.77.77,0,0,0,.77.75c.27,0,.54,0,.81,0Z" }), (0, jsx_runtime_1.jsx)("path", { id: "Trazado_2286", "data-name": "Trazado 2286", style: { fill: color }, d: "M30.54,38.84h-5a1.45,1.45,0,0,1-1.47-1.43A1.48,1.48,0,0,1,25.26,36a2,2,0,0,1,.35,0h9.87a1.45,1.45,0,0,1,.11,2.9H30.54Z" }), (0, jsx_runtime_1.jsx)("path", { id: "Trazado_2287", "data-name": "Trazado 2287", style: { fill: color }, d: "M28.44,54.14H25.59a1.44,1.44,0,0,1-1.49-1.39s0,0,0-.06a1.48,1.48,0,0,1,1.47-1.46h5.73a1.45,1.45,0,0,1,1.52,1.38,1.44,1.44,0,0,1-1.37,1.52h-3Z" }), (0, jsx_runtime_1.jsx)("path", { id: "Trazado_2288", "data-name": "Trazado 2288", style: { fill: color }, d: "M27.36,66.54c.63,0,1.26,0,1.9,0a1.44,1.44,0,0,1,1.36,1.27,1.47,1.47,0,0,1-1,1.56,1.6,1.6,0,0,1-.54.07H25.64a1.46,1.46,0,0,1-.17-2.91.43.43,0,0,1,.16,0h1.73Z" }), (0, jsx_runtime_1.jsx)("path", { id: "Trazado_2289", "data-name": "Trazado 2289", style: { fill: color }, d: "M54.49,47.45a13.8,13.8,0,0,1,8.82,1.95,12.64,12.64,0,0,1,4.62,5.36,18.36,18.36,0,0,1,1.44,4.33,1.24,1.24,0,0,1-1,1.45h0A1.22,1.22,0,0,1,67,59.63a16.4,16.4,0,0,0-1.56-4.37A9.91,9.91,0,0,0,57,49.91a11.82,11.82,0,0,0-2.59.08,1.23,1.23,0,0,1-1.47-.94v0a1.23,1.23,0,0,1,1-1.47H54Z" })] }) }));
9
+ };
10
+ exports.SearchPublication = SearchPublication;
11
+ exports.default = exports.SearchPublication;
@@ -0,0 +1,20 @@
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("./button/button"), exports);
18
+ __exportStar(require("./emptyState/emptyState"), exports);
19
+ __exportStar(require("./icons"), exports);
20
+ __exportStar(require("./spinner/spinner"), exports);
@@ -1,4 +1,4 @@
1
-
1
+ import './spinner.scss';
2
2
  interface Props {
3
3
  size?: number;
4
4
  }
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Spinner = void 0;
4
+ var jsx_runtime_1 = require("react/jsx-runtime");
5
+ require("./spinner.scss");
6
+ var Spinner = function (_a) {
7
+ var _b = _a.size, size = _b === void 0 ? 40 : _b;
8
+ return (0, jsx_runtime_1.jsx)("div", { style: { width: size, height: size }, className: "loader" });
9
+ };
10
+ exports.Spinner = Spinner;
11
+ exports.default = exports.Spinner;
package/dist/index.js ADDED
@@ -0,0 +1,17 @@
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("./components"), exports);
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = {
4
+ noResultsFound: 'No se encontraron resultados',
5
+ reloadPage: 'Recargar página',
6
+ };
@@ -1,2 +1,2 @@
1
- declare const _default: import('i18next').TFunction<["translation", ...string[]], undefined>;
1
+ declare const _default: import("i18next").TFunction<["translation", ...string[]], undefined>;
2
2
  export default _default;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var translator_1 = __importDefault(require("./translator"));
7
+ exports.default = translator_1.default.t;
@@ -1,3 +1,2 @@
1
- import { default as i18next } from 'i18next';
2
-
1
+ import i18next from 'i18next';
3
2
  export default i18next;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var i18next_1 = __importDefault(require("i18next"));
7
+ var react_i18next_1 = require("react-i18next");
8
+ var es_1 = __importDefault(require("./es"));
9
+ var resources = {
10
+ en: {
11
+ translation: {},
12
+ },
13
+ es: {
14
+ translation: es_1.default,
15
+ },
16
+ };
17
+ i18next_1.default.use(react_i18next_1.initReactI18next).init({
18
+ resources: resources,
19
+ lng: 'es',
20
+ interpolation: {
21
+ escapeValue: false,
22
+ },
23
+ debug: true,
24
+ });
25
+ exports.default = i18next_1.default;
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var manager_api_1 = require("@storybook/manager-api");
4
+ manager_api_1.addons.setConfig({
5
+ navSize: 300,
6
+ bottomPanelHeight: 300,
7
+ rightPanelWidth: 300,
8
+ panelPosition: 'bottom',
9
+ enableShortcuts: true,
10
+ showToolbar: true,
11
+ theme: undefined,
12
+ selectedPanel: undefined,
13
+ initialActive: 'sidebar',
14
+ sidebar: {
15
+ showRoots: false,
16
+ collapsedRoots: ['other'],
17
+ },
18
+ toolbar: {
19
+ title: { hidden: false },
20
+ zoom: { hidden: false },
21
+ eject: { hidden: false },
22
+ copy: { hidden: false },
23
+ fullscreen: { hidden: false },
24
+ },
25
+ });
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.objectValuesToControls = void 0;
4
+ var objectValuesToControls = function (obj, control) {
5
+ if (control === void 0) { control = 'select'; }
6
+ return ({
7
+ control: control,
8
+ options: Object.keys(obj),
9
+ });
10
+ };
11
+ exports.objectValuesToControls = objectValuesToControls;
package/package.json CHANGED
@@ -1,8 +1,7 @@
1
1
  {
2
2
  "name": "@producteca/producteca-ui-kit",
3
- "version": "0.0.5",
4
- "main": "./dist/producteca-ui-kit.umd.js",
5
- "module": "./dist/producteca-ui-kit.es.js",
3
+ "version": "0.0.7",
4
+ "main": "./dist/index.js",
6
5
  "types": "./dist/index.d.ts",
7
6
  "repository": {
8
7
  "type": "git",
@@ -14,21 +13,13 @@
14
13
  "url": "https://github.com/parsimotion/producteca-ui-kit/issues"
15
14
  },
16
15
  "homepage": "https://github.com/parsimotion/producteca-ui-kit#readme",
17
- "exports": {
18
- ".": {
19
- "types": "./dist/index.d.ts",
20
- "import": "./dist/producteca-ui-kit.es.js",
21
- "require": "./dist/producteca-ui-kit.umd.js"
22
- },
23
- "./dist/style.css": "./dist/style.css"
24
- },
25
16
  "engines": {
26
17
  "node": "22"
27
18
  },
28
19
  "scripts": {
29
20
  "dev": "storybook dev -p 6006",
30
21
  "build": "storybook build",
31
- "build:lib": "tsc && vite build",
22
+ "build:lib": "tsc",
32
23
  "lint": "eslint --ext .js,.jsx,.ts,.tsx --fix",
33
24
  "prettier": "prettier --write \"src/**/*.{ts,tsx,js,mdx}\"",
34
25
  "test": "vitest",