test-stpr-ui-kit 0.0.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.
@@ -0,0 +1,13 @@
1
+ import { default as default_2 } from 'react';
2
+
3
+ export declare const Label: default_2.FC<LabelProps>;
4
+
5
+ export declare interface LabelProps {
6
+ required?: boolean;
7
+ label?: string;
8
+ isVisibleTooltip?: boolean;
9
+ tooltip?: JSX.Element;
10
+ classNameRoot?: string;
11
+ }
12
+
13
+ export { }
@@ -0,0 +1,45 @@
1
+ import { jsxs as L, jsx as _ } from "react/jsx-runtime";
2
+ const m = "_spLabel_jeojr_31", u = "_spLabel__text_jeojr_37", d = "_spLabel__tooltip_jeojr_45", f = "_spLabel__required_jeojr_50", o = {
3
+ spLabel: m,
4
+ spLabel__text: u,
5
+ spLabel__tooltip: d,
6
+ spLabel__required: f
7
+ };
8
+ function i(e) {
9
+ var t, l, s = "";
10
+ if (typeof e == "string" || typeof e == "number") s += e;
11
+ else if (typeof e == "object") if (Array.isArray(e)) {
12
+ var a = e.length;
13
+ for (t = 0; t < a; t++) e[t] && (l = i(e[t])) && (s && (s += " "), s += l);
14
+ } else for (l in e) e[l] && (s && (s += " "), s += l);
15
+ return s;
16
+ }
17
+ function r() {
18
+ for (var e, t, l = 0, s = "", a = arguments.length; l < a; l++) (e = arguments[l]) && (t = i(e)) && (s && (s += " "), s += t);
19
+ return s;
20
+ }
21
+ const N = (e) => {
22
+ const {
23
+ required: t,
24
+ label: l,
25
+ isVisibleTooltip: s = !0,
26
+ tooltip: a
27
+ } = e, c = r(
28
+ o.spLabel,
29
+ e.classNameRoot && e.classNameRoot
30
+ ), n = r(
31
+ o.spLabel__text
32
+ ), b = r(
33
+ t && o.spLabel__required
34
+ ), p = r(
35
+ o.spLabel__tooltip
36
+ );
37
+ return /* @__PURE__ */ L("div", { className: c, children: [
38
+ /* @__PURE__ */ _("label", { className: n, children: l }),
39
+ t && /* @__PURE__ */ _("div", { className: b, children: "*" }),
40
+ a && s && /* @__PURE__ */ _("div", { className: p, children: a })
41
+ ] });
42
+ };
43
+ export {
44
+ N as Label
45
+ };
@@ -0,0 +1 @@
1
+ (function(o,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react/jsx-runtime")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime"],a):(o=typeof globalThis<"u"?globalThis:o||self,a(o["test-stpr-ui-kit"]={},o.jsxRuntime))})(this,function(o,a){"use strict";const i={spLabel:"_spLabel_jeojr_31",spLabel__text:"_spLabel__text_jeojr_37",spLabel__tooltip:"_spLabel__tooltip_jeojr_45",spLabel__required:"_spLabel__required_jeojr_50"};function _(e){var s,l,t="";if(typeof e=="string"||typeof e=="number")t+=e;else if(typeof e=="object")if(Array.isArray(e)){var r=e.length;for(s=0;s<r;s++)e[s]&&(l=_(e[s]))&&(t&&(t+=" "),t+=l)}else for(l in e)e[l]&&(t&&(t+=" "),t+=l);return t}function n(){for(var e,s,l=0,t="",r=arguments.length;l<r;l++)(e=arguments[l])&&(s=_(e))&&(t&&(t+=" "),t+=s);return t}const c=e=>{const{required:s,label:l,isVisibleTooltip:t=!0,tooltip:r}=e,p=n(i.spLabel,e.classNameRoot&&e.classNameRoot),b=n(i.spLabel__text),u=n(s&&i.spLabel__required),d=n(i.spLabel__tooltip);return a.jsxs("div",{className:p,children:[a.jsx("label",{className:b,children:l}),s&&a.jsx("div",{className:u,children:"*"}),r&&t&&a.jsx("div",{className:d,children:r})]})};o.Label=c,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "test-stpr-ui-kit",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "files": ["dist"],
6
+ "main": "./dist/test-stpr-ui-kit.umd.js",
7
+ "module": "./dist/test-stpr-ui-kit.es.js",
8
+ "types": "./dist/test-stpr-ui-kit.es.d.ts",
9
+ "exports": {
10
+ "./package.json": "./package.json",
11
+ ".": {
12
+ "types": "./dist/test-stpr-ui-kit.es.d.ts",
13
+ "import": "./dist/test-stpr-ui-kit.es.js"
14
+ },
15
+ "./styles": "./dist/style.css"
16
+ },
17
+ "peerDependencies": {
18
+ "react": "^18.2.0",
19
+ "react-dom": "^18.2.0"
20
+ },
21
+ "scripts": {
22
+ "dev": "vite",
23
+ "build": "tsc && vite build",
24
+ "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
25
+ "preview": "vite preview",
26
+ "storybook": "storybook dev -p 6006",
27
+ "build-storybook": "storybook build"
28
+ },
29
+ "dependencies": {
30
+ "clsx": "^2.1.1",
31
+ "react": "^18.2.0",
32
+ "react-dom": "^18.2.0"
33
+ },
34
+ "devDependencies": {
35
+ "@chromatic-com/storybook": "^1.5.0",
36
+ "@storybook/addon-essentials": "^8.1.4",
37
+ "@storybook/addon-interactions": "^8.1.4",
38
+ "@storybook/addon-links": "^8.1.4",
39
+ "@storybook/addon-onboarding": "^8.1.4",
40
+ "@storybook/blocks": "^8.1.4",
41
+ "@storybook/react": "^8.1.4",
42
+ "@storybook/react-vite": "^8.1.4",
43
+ "@storybook/test": "^8.1.4",
44
+ "@types/node": "^24.0.14",
45
+ "@types/react": "^18.2.66",
46
+ "@types/react-dom": "^18.2.22",
47
+ "@types/storybook__react": "^4.0.2",
48
+ "@typescript-eslint/eslint-plugin": "^7.2.0",
49
+ "@typescript-eslint/parser": "^7.2.0",
50
+ "@vitejs/plugin-react": "^4.2.1",
51
+ "eslint": "^8.57.0",
52
+ "eslint-plugin-react-hooks": "^4.6.0",
53
+ "eslint-plugin-react-refresh": "^0.4.6",
54
+ "eslint-plugin-storybook": "^0.8.0",
55
+ "sass": "^1.89.2",
56
+ "storybook": "^8.1.4",
57
+ "styled-components": "^6.1.11",
58
+ "typescript": "^5.2.2",
59
+ "vite": "^5.2.0",
60
+ "vite-plugin-dts": "^3.9.1"
61
+ }
62
+ }