maritime-ui 0.1.3
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/index.d.ts +37 -0
- package/dist/maritime-ui.cjs +1 -0
- package/dist/maritime-ui.js +187 -0
- package/dist/style.css +1 -0
- package/package.json +61 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { JSX } from 'react';
|
|
3
|
+
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
4
|
+
import { ReactElement } from 'react';
|
|
5
|
+
import { ReactNode } from 'react';
|
|
6
|
+
|
|
7
|
+
export declare const Badge: ({ type, title, icon }: Props) => JSX.Element;
|
|
8
|
+
|
|
9
|
+
export declare type BadgeType = 'default' | 'success' | 'warning' | 'info' | 'warning-with-icon' | 'success-with-icon' | 'info-with-icon' | 'danger' | 'primary' | 'azure' | 'pink' | 'purple';
|
|
10
|
+
|
|
11
|
+
export declare const Button: FC<ButtonProps>;
|
|
12
|
+
|
|
13
|
+
declare type ButtonProps = {
|
|
14
|
+
buttonStyle?: string;
|
|
15
|
+
buttonSize?: 'small' | 'medium' | 'large' | 'huge';
|
|
16
|
+
buttonColor?: 'primary' | 'secondary' | 'danger' | 'tertiary' | 'success';
|
|
17
|
+
buttonFill?: 'solid' | 'bordered' | 'link';
|
|
18
|
+
type?: 'button' | 'submit' | 'reset';
|
|
19
|
+
text?: ReactNode;
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
loadingText?: ReactNode;
|
|
22
|
+
success?: boolean;
|
|
23
|
+
successText?: ReactNode;
|
|
24
|
+
onClickFunc?: (e: MouseEvent_2<HTMLElement>) => void;
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
Icon?: FC;
|
|
27
|
+
iconPosition?: 'left' | 'right';
|
|
28
|
+
additionalClassName?: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
declare type Props = {
|
|
32
|
+
type: BadgeType;
|
|
33
|
+
title: string;
|
|
34
|
+
icon?: ReactElement;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export { }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("react");function x(t){var i,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var l=t.length;for(i=0;i<l;i++)t[i]&&(r=x(t[i]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function u(){for(var t,i,r=0,n="",l=arguments.length;r<l;r++)(t=arguments[r])&&(i=x(t))&&(n&&(n+=" "),n+=i);return n}const S=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",fill:"none",viewBox:"0 0 24 24",children:e.jsx("path",{fill:"#fff",fillRule:"evenodd",d:"M20.707 5.293a1 1 0 010 1.414l-11 11a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 15.586 19.293 5.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),N={"spinner-circular-white":"_spinner-circular-white_l3ar3_1"},B=()=>e.jsx("div",{className:N["spinner-circular-white"],children:e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"64",height:"64",fill:"none",color:"#ffffff",viewBox:"0 0 200 200",children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"spinner-secondHalf1",children:[e.jsx("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"0"}),e.jsx("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0.1"})]}),e.jsxs("linearGradient",{id:"spinner-firstHalf1",children:[e.jsx("stop",{offset:"0%",stopColor:"currentColor"}),e.jsx("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0.1"})]})]}),e.jsxs("g",{strokeWidth:"8",children:[e.jsx("path",{stroke:"url(#spinner-secondHalf1)",d:"M4 100a96 96 0 01192 0"}),e.jsx("path",{stroke:"url(#spinner-firstHalf1)",d:"M196 100a96 96 0 01-192 0"}),e.jsx("path",{stroke:"currentColor",strokeLinecap:"round",d:"M4 100a96 96 0 010-2"})]})]})}),$="_spinner_lkgy1_36",M="_success_lkgy1_48",H="_animate_lkgy1_56",O="_medium_lkgy1_66",z="_active_lkgy1_78",L="_bordered_lkgy1_96",R="_small_lkgy1_100",q="_large_lkgy1_120",A="_huge_lkgy1_125",E="_link_lkgy1_155",G="_primary_lkgy1_177",W="_loading_lkgy1_180",D="_solid_lkgy1_186",I="_tertiary_lkgy1_242",J="_danger_lkgy1_279",K="_secondary_lkgy1_307",s={"button-wrapper":"_button-wrapper_lkgy1_1","button-text-wrapper":"_button-text-wrapper_lkgy1_15","button-icon":"_button-icon_lkgy1_21",spinner:$,success:M,animate:H,"temp-icon-exist":"_temp-icon-exist_lkgy1_59","temp-icon-active":"_temp-icon-active_lkgy1_62",medium:O,"temp-icon":"_temp-icon_lkgy1_59",active:z,bordered:L,small:R,"single-icon":"_single-icon_lkgy1_105",large:q,huge:A,"icon-left":"_icon-left_lkgy1_130","no-text":"_no-text_lkgy1_140",link:E,"icon-right":"_icon-right_lkgy1_163",primary:G,loading:W,solid:D,tertiary:I,danger:J,secondary:K},P=({buttonStyle:t,buttonSize:i="large",buttonColor:r="primary",buttonFill:n="solid",type:l="button",text:c="",loading:o=!1,loadingText:_,success:f=!1,successText:p,onClickFunc:j,disabled:v=!1,Icon:m,iconPosition:y="left",additionalClassName:h=""})=>{const[g,k]=d.useState(!1),[a,b]=d.useState(!1);return d.useEffect(()=>{b(o)},[o]),d.useEffect(()=>{if(k(f),f){const C=setTimeout(()=>{k(!1)},2e3);return()=>clearTimeout(C)}},[a,f]),e.jsx("button",{type:l,onClick:j,className:u(s["button-wrapper"],t,{[s[i]]:i,[s[r]]:r,[s[n]]:n,[s.loading]:o||a,[s[`icon-${y}`]]:m&&y&&c,[h]:h,[s["single-icon"]]:!c,[s["temp-icon-exist"]]:!!p||!!_,[s["temp-icon-active"]]:o||a||g}),disabled:v,children:e.jsxs("div",{className:s["button-text-wrapper"],children:[_&&e.jsx("div",{className:u(s["temp-icon"],{[s.active]:o||a}),children:e.jsx(B,{})}),p&&e.jsx("div",{className:u(s["temp-icon"],{[s.active]:g&&!o&&!a}),children:e.jsx(S,{})}),m&&!o&&!g&&e.jsx("div",{className:u(s["button-icon"],{[s["no-text"]]:!c||c===""}),children:e.jsx(m,{})}),c&&e.jsx("div",{className:s["button-text"],children:(o||a)&&_?_:g&&p?p:c})]})})},Q="_success_1miog_23",U="_warning_1miog_27",V="_info_1miog_31",X="_danger_1miog_56",Y="_primary_1miog_60",Z="_azure_1miog_64",F="_pink_1miog_68",T="_purple_1miog_72",w={"badge-wrapper":"_badge-wrapper_1miog_1",default:"_default_1miog_19",success:Q,warning:U,info:V,"warning-with-icon":"_warning-with-icon_1miog_35","info-with-icon":"_info-with-icon_1miog_42","success-with-icon":"_success-with-icon_1miog_49",danger:X,primary:Y,azure:Z,pink:F,purple:T},ee=({type:t,title:i,icon:r})=>e.jsx("div",{className:w["badge-wrapper"],children:e.jsxs("span",{className:w[t],children:[r,i]})});exports.Badge=ee;exports.Button=P;
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import { jsx as e, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import { useState as w, useEffect as v } from "react";
|
|
3
|
+
function C(t) {
|
|
4
|
+
var o, i, r = "";
|
|
5
|
+
if (typeof t == "string" || typeof t == "number") r += t;
|
|
6
|
+
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
7
|
+
var _ = t.length;
|
|
8
|
+
for (o = 0; o < _; o++) t[o] && (i = C(t[o])) && (r && (r += " "), r += i);
|
|
9
|
+
} else for (i in t) t[i] && (r && (r += " "), r += i);
|
|
10
|
+
return r;
|
|
11
|
+
}
|
|
12
|
+
function m() {
|
|
13
|
+
for (var t, o, i = 0, r = "", _ = arguments.length; i < _; i++) (t = arguments[i]) && (o = C(t)) && (r && (r += " "), r += o);
|
|
14
|
+
return r;
|
|
15
|
+
}
|
|
16
|
+
const B = () => /* @__PURE__ */ e(
|
|
17
|
+
"svg",
|
|
18
|
+
{
|
|
19
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
20
|
+
width: "24",
|
|
21
|
+
height: "24",
|
|
22
|
+
fill: "none",
|
|
23
|
+
viewBox: "0 0 24 24",
|
|
24
|
+
children: /* @__PURE__ */ e(
|
|
25
|
+
"path",
|
|
26
|
+
{
|
|
27
|
+
fill: "#fff",
|
|
28
|
+
fillRule: "evenodd",
|
|
29
|
+
d: "M20.707 5.293a1 1 0 010 1.414l-11 11a1 1 0 01-1.414 0l-4-4a1 1 0 111.414-1.414L9 15.586 19.293 5.293a1 1 0 011.414 0z",
|
|
30
|
+
clipRule: "evenodd"
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
}
|
|
34
|
+
), H = {
|
|
35
|
+
"spinner-circular-white": "_spinner-circular-white_l3ar3_1"
|
|
36
|
+
}, M = () => /* @__PURE__ */ e("div", { className: H["spinner-circular-white"], children: /* @__PURE__ */ c(
|
|
37
|
+
"svg",
|
|
38
|
+
{
|
|
39
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
40
|
+
width: "64",
|
|
41
|
+
height: "64",
|
|
42
|
+
fill: "none",
|
|
43
|
+
color: "#ffffff",
|
|
44
|
+
viewBox: "0 0 200 200",
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ c("defs", { children: [
|
|
47
|
+
/* @__PURE__ */ c("linearGradient", { id: "spinner-secondHalf1", children: [
|
|
48
|
+
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: "currentColor", stopOpacity: "0" }),
|
|
49
|
+
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: "currentColor", stopOpacity: "0.1" })
|
|
50
|
+
] }),
|
|
51
|
+
/* @__PURE__ */ c("linearGradient", { id: "spinner-firstHalf1", children: [
|
|
52
|
+
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: "currentColor" }),
|
|
53
|
+
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: "currentColor", stopOpacity: "0.1" })
|
|
54
|
+
] })
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ c("g", { strokeWidth: "8", children: [
|
|
57
|
+
/* @__PURE__ */ e("path", { stroke: "url(#spinner-secondHalf1)", d: "M4 100a96 96 0 01192 0" }),
|
|
58
|
+
/* @__PURE__ */ e("path", { stroke: "url(#spinner-firstHalf1)", d: "M196 100a96 96 0 01-192 0" }),
|
|
59
|
+
/* @__PURE__ */ e("path", { stroke: "currentColor", strokeLinecap: "round", d: "M4 100a96 96 0 010-2" })
|
|
60
|
+
] })
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
) }), j = "_spinner_lkgy1_36", z = "_success_lkgy1_48", L = "_animate_lkgy1_56", O = "_medium_lkgy1_66", A = "_active_lkgy1_78", G = "_bordered_lkgy1_96", R = "_small_lkgy1_100", W = "_large_lkgy1_120", E = "_huge_lkgy1_125", q = "_link_lkgy1_155", D = "_primary_lkgy1_177", I = "_loading_lkgy1_180", J = "_solid_lkgy1_186", K = "_tertiary_lkgy1_242", Q = "_danger_lkgy1_279", U = "_secondary_lkgy1_307", n = {
|
|
64
|
+
"button-wrapper": "_button-wrapper_lkgy1_1",
|
|
65
|
+
"button-text-wrapper": "_button-text-wrapper_lkgy1_15",
|
|
66
|
+
"button-icon": "_button-icon_lkgy1_21",
|
|
67
|
+
spinner: j,
|
|
68
|
+
success: z,
|
|
69
|
+
animate: L,
|
|
70
|
+
"temp-icon-exist": "_temp-icon-exist_lkgy1_59",
|
|
71
|
+
"temp-icon-active": "_temp-icon-active_lkgy1_62",
|
|
72
|
+
medium: O,
|
|
73
|
+
"temp-icon": "_temp-icon_lkgy1_59",
|
|
74
|
+
active: A,
|
|
75
|
+
bordered: G,
|
|
76
|
+
small: R,
|
|
77
|
+
"single-icon": "_single-icon_lkgy1_105",
|
|
78
|
+
large: W,
|
|
79
|
+
huge: E,
|
|
80
|
+
"icon-left": "_icon-left_lkgy1_130",
|
|
81
|
+
"no-text": "_no-text_lkgy1_140",
|
|
82
|
+
link: q,
|
|
83
|
+
"icon-right": "_icon-right_lkgy1_163",
|
|
84
|
+
primary: D,
|
|
85
|
+
loading: I,
|
|
86
|
+
solid: J,
|
|
87
|
+
tertiary: K,
|
|
88
|
+
danger: Q,
|
|
89
|
+
secondary: U
|
|
90
|
+
}, re = ({
|
|
91
|
+
buttonStyle: t,
|
|
92
|
+
buttonSize: o = "large",
|
|
93
|
+
buttonColor: i = "primary",
|
|
94
|
+
buttonFill: r = "solid",
|
|
95
|
+
type: _ = "button",
|
|
96
|
+
text: l = "",
|
|
97
|
+
loading: s = !1,
|
|
98
|
+
loadingText: p,
|
|
99
|
+
success: f = !1,
|
|
100
|
+
successText: g,
|
|
101
|
+
onClickFunc: N,
|
|
102
|
+
disabled: x = !1,
|
|
103
|
+
Icon: u,
|
|
104
|
+
iconPosition: y = "left",
|
|
105
|
+
additionalClassName: h = ""
|
|
106
|
+
}) => {
|
|
107
|
+
const [d, k] = w(!1), [a, S] = w(!1);
|
|
108
|
+
return v(() => {
|
|
109
|
+
S(s);
|
|
110
|
+
}, [s]), v(() => {
|
|
111
|
+
if (k(f), f) {
|
|
112
|
+
const $ = setTimeout(() => {
|
|
113
|
+
k(!1);
|
|
114
|
+
}, 2e3);
|
|
115
|
+
return () => clearTimeout($);
|
|
116
|
+
}
|
|
117
|
+
}, [a, f]), /* @__PURE__ */ e(
|
|
118
|
+
"button",
|
|
119
|
+
{
|
|
120
|
+
type: _,
|
|
121
|
+
onClick: N,
|
|
122
|
+
className: m(n["button-wrapper"], t, {
|
|
123
|
+
[n[o]]: o,
|
|
124
|
+
[n[i]]: i,
|
|
125
|
+
[n[r]]: r,
|
|
126
|
+
[n.loading]: s || a,
|
|
127
|
+
[n[`icon-${y}`]]: u && y && l,
|
|
128
|
+
[h]: h,
|
|
129
|
+
[n["single-icon"]]: !l,
|
|
130
|
+
[n["temp-icon-exist"]]: !!g || !!p,
|
|
131
|
+
[n["temp-icon-active"]]: s || a || d
|
|
132
|
+
}),
|
|
133
|
+
disabled: x,
|
|
134
|
+
children: /* @__PURE__ */ c("div", { className: n["button-text-wrapper"], children: [
|
|
135
|
+
p && /* @__PURE__ */ e(
|
|
136
|
+
"div",
|
|
137
|
+
{
|
|
138
|
+
className: m(n["temp-icon"], {
|
|
139
|
+
[n.active]: s || a
|
|
140
|
+
}),
|
|
141
|
+
children: /* @__PURE__ */ e(M, {})
|
|
142
|
+
}
|
|
143
|
+
),
|
|
144
|
+
g && /* @__PURE__ */ e(
|
|
145
|
+
"div",
|
|
146
|
+
{
|
|
147
|
+
className: m(n["temp-icon"], {
|
|
148
|
+
[n.active]: d && !s && !a
|
|
149
|
+
}),
|
|
150
|
+
children: /* @__PURE__ */ e(B, {})
|
|
151
|
+
}
|
|
152
|
+
),
|
|
153
|
+
u && !s && !d && /* @__PURE__ */ e(
|
|
154
|
+
"div",
|
|
155
|
+
{
|
|
156
|
+
className: m(n["button-icon"], {
|
|
157
|
+
[n["no-text"]]: !l || l === ""
|
|
158
|
+
}),
|
|
159
|
+
children: /* @__PURE__ */ e(u, {})
|
|
160
|
+
}
|
|
161
|
+
),
|
|
162
|
+
l && /* @__PURE__ */ e("div", { className: n["button-text"], children: (s || a) && p ? p : d && g ? g : l })
|
|
163
|
+
] })
|
|
164
|
+
}
|
|
165
|
+
);
|
|
166
|
+
}, V = "_success_1miog_23", X = "_warning_1miog_27", Y = "_info_1miog_31", Z = "_danger_1miog_56", F = "_primary_1miog_60", P = "_azure_1miog_64", T = "_pink_1miog_68", ee = "_purple_1miog_72", b = {
|
|
167
|
+
"badge-wrapper": "_badge-wrapper_1miog_1",
|
|
168
|
+
default: "_default_1miog_19",
|
|
169
|
+
success: V,
|
|
170
|
+
warning: X,
|
|
171
|
+
info: Y,
|
|
172
|
+
"warning-with-icon": "_warning-with-icon_1miog_35",
|
|
173
|
+
"info-with-icon": "_info-with-icon_1miog_42",
|
|
174
|
+
"success-with-icon": "_success-with-icon_1miog_49",
|
|
175
|
+
danger: Z,
|
|
176
|
+
primary: F,
|
|
177
|
+
azure: P,
|
|
178
|
+
pink: T,
|
|
179
|
+
purple: ee
|
|
180
|
+
}, ie = ({ type: t, title: o, icon: i }) => /* @__PURE__ */ e("div", { className: b["badge-wrapper"], children: /* @__PURE__ */ c("span", { className: b[t], children: [
|
|
181
|
+
i,
|
|
182
|
+
o
|
|
183
|
+
] }) });
|
|
184
|
+
export {
|
|
185
|
+
ie as Badge,
|
|
186
|
+
re as Button
|
|
187
|
+
};
|
package/dist/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._spinner-circular-white_l3ar3_1{display:inline-block;animation:_spinning_l3ar3_1 2s linear infinite;transform-origin:32px 32px}@keyframes _spinning_l3ar3_1{0%{transform:rotate(0)}to{transform:rotate(360deg)}}._button-wrapper_lkgy1_1{padding:4px 16px;font-size:13px;font-weight:700;line-height:18px;border-radius:4px;border:none;display:inline-flex;justify-content:center;align-items:center;letter-spacing:.25px;min-height:32px;transition:all .4s ease-in-out}._button-wrapper_lkgy1_1 ._button-text-wrapper_lkgy1_15{width:100%;display:flex;align-items:center;justify-content:center}._button-wrapper_lkgy1_1 ._button-text-wrapper_lkgy1_15 ._button-icon_lkgy1_21{display:inline-flex;flex-shrink:0;position:relative}._button-wrapper_lkgy1_1 ._button-text-wrapper_lkgy1_15 ._button-icon_lkgy1_21:after{content:"";position:absolute;top:0;right:0;height:100%;width:100%;z-index:-1;transition:background-color .4s ease-in-out}._button-wrapper_lkgy1_1 ._button-text-wrapper_lkgy1_15 ._button-icon_lkgy1_21._spinner_lkgy1_36{margin-right:10px}._button-wrapper_lkgy1_1 ._button-text-wrapper_lkgy1_15 ._button-icon_lkgy1_21._spinner_lkgy1_36>div{display:inline-flex;transform-origin:12px 12px}._button-wrapper_lkgy1_1 ._button-text-wrapper_lkgy1_15 ._button-icon_lkgy1_21._spinner_lkgy1_36>div svg{width:24px;height:24px;color:#fff}._button-wrapper_lkgy1_1 ._button-text-wrapper_lkgy1_15 ._button-icon_lkgy1_21._success_lkgy1_48{margin-right:10px;position:relative}._button-wrapper_lkgy1_1 ._button-text-wrapper_lkgy1_15 ._button-icon_lkgy1_21._success_lkgy1_48:after{z-index:1;transition:width .4s ease-in-out,background-color .4s ease-in-out}._button-wrapper_lkgy1_1 ._button-text-wrapper_lkgy1_15 ._button-icon_lkgy1_21._success_lkgy1_48._animate_lkgy1_56:after{width:0}._button-wrapper_lkgy1_1._temp-icon-exist_lkgy1_59{position:relative}._button-wrapper_lkgy1_1._temp-icon-exist_lkgy1_59._temp-icon-active_lkgy1_62{padding-left:44px;pointer-events:none}._button-wrapper_lkgy1_1._temp-icon-exist_lkgy1_59._temp-icon-active_lkgy1_62._medium_lkgy1_66{padding-left:40px}._button-wrapper_lkgy1_1._temp-icon-exist_lkgy1_59 ._temp-icon_lkgy1_59{width:18px;height:18px;position:absolute;top:50%;transform:translateY(-50%);left:12px;transition:all .16s ease-in-out}._button-wrapper_lkgy1_1._temp-icon-exist_lkgy1_59 ._temp-icon_lkgy1_59:not(._active_lkgy1_78){visibility:hidden;opacity:0}._button-wrapper_lkgy1_1._temp-icon-exist_lkgy1_59 ._temp-icon_lkgy1_59._active_lkgy1_78{transition-delay:.2s}._button-wrapper_lkgy1_1._temp-icon-exist_lkgy1_59 ._temp-icon_lkgy1_59>div{transform-origin:9px 9px}._button-wrapper_lkgy1_1._temp-icon-exist_lkgy1_59 ._temp-icon_lkgy1_59>div svg{width:18px;height:18px}._button-wrapper_lkgy1_1._temp-icon-exist_lkgy1_59 ._temp-icon_lkgy1_59 svg{width:100%;height:100%}._button-wrapper_lkgy1_1._bordered_lkgy1_96{padding-right:12px;padding-left:12px}._button-wrapper_lkgy1_1._small_lkgy1_100{padding:5px 24px;border-radius:4px;min-height:24px}._button-wrapper_lkgy1_1._small_lkgy1_100._single-icon_lkgy1_105{width:24px;height:24px;min-height:24px}._button-wrapper_lkgy1_1._medium_lkgy1_66{padding:5px 24px;border-radius:6px;min-height:32px}._button-wrapper_lkgy1_1._medium_lkgy1_66._single-icon_lkgy1_105{width:32px;height:32px;min-height:32px}._button-wrapper_lkgy1_1._large_lkgy1_120{padding:5px 32px;border-radius:6px;min-height:48px}._button-wrapper_lkgy1_1._huge_lkgy1_125{padding:5px 32px;border-radius:6px;min-height:56px}._button-wrapper_lkgy1_1._icon-left_lkgy1_130{padding-left:12px}._button-wrapper_lkgy1_1._icon-left_lkgy1_130._medium_lkgy1_66{padding-left:16px}._button-wrapper_lkgy1_1._icon-left_lkgy1_130 ._button-text-wrapper_lkgy1_15 ._button-icon_lkgy1_21{margin-right:8px;margin-left:0}._button-wrapper_lkgy1_1._icon-left_lkgy1_130 ._button-text-wrapper_lkgy1_15 ._button-icon_lkgy1_21._no-text_lkgy1_140{margin-right:0}._button-wrapper_lkgy1_1._single-icon_lkgy1_105{display:inline-flex;align-items:center;justify-content:center;padding:0;border-radius:4px;color:transparent;background-color:transparent}._button-wrapper_lkgy1_1._single-icon_lkgy1_105 ._button-text-wrapper_lkgy1_15 ._button-icon_lkgy1_21{margin:0}._button-wrapper_lkgy1_1._link_lkgy1_155{padding:1px;min-height:0}._button-wrapper_lkgy1_1:active:not(:disabled){transform:scale(.98);transition:transform .15s ease-in-out,background-color .4s ease-in-out}._button-wrapper_lkgy1_1._icon-right_lkgy1_163{padding-left:12px}._button-wrapper_lkgy1_1._icon-right_lkgy1_163._medium_lkgy1_66{padding-right:16px}._button-wrapper_lkgy1_1._icon-right_lkgy1_163 ._button-text-wrapper_lkgy1_15 ._button-icon_lkgy1_21{order:2;margin-right:0;margin-left:8px}._button-wrapper_lkgy1_1._icon-right_lkgy1_163 ._button-text-wrapper_lkgy1_15 ._button-icon_lkgy1_21._no-text_lkgy1_140{margin-left:0}._button-wrapper_lkgy1_1._primary_lkgy1_177 ._button-text-wrapper_lkgy1_15 ._button-icon_lkgy1_21:after{background-color:#365eed}._button-wrapper_lkgy1_1._primary_lkgy1_177:hover:not(:disabled):not(._loading_lkgy1_180){background:#1b3cce}._button-wrapper_lkgy1_1._primary_lkgy1_177:hover:not(:disabled) ._button-text-wrapper_lkgy1_15 ._button-icon_lkgy1_21:after{background-color:#1b3cce}._button-wrapper_lkgy1_1._primary_lkgy1_177._solid_lkgy1_186{background:#365eed;color:#fff}._button-wrapper_lkgy1_1._primary_lkgy1_177._solid_lkgy1_186:hover{background:#1b3cce}._button-wrapper_lkgy1_1._primary_lkgy1_177._solid_lkgy1_186:disabled{background:#b3b3bc}._button-wrapper_lkgy1_1._primary_lkgy1_177._solid_lkgy1_186:disabled:hover{background:#b3b3bc;cursor:not-allowed}._button-wrapper_lkgy1_1._primary_lkgy1_177._link_lkgy1_155{color:#365eed;background-color:transparent}._button-wrapper_lkgy1_1._primary_lkgy1_177._link_lkgy1_155 ._button-text-wrapper_lkgy1_15 ._button-icon_lkgy1_21:after{background-color:transparent;width:0}._button-wrapper_lkgy1_1._primary_lkgy1_177._link_lkgy1_155:hover:not(:disabled){color:#1b3cce;background-color:transparent}._button-wrapper_lkgy1_1._primary_lkgy1_177._link_lkgy1_155:disabled{color:#dedee1;cursor:not-allowed;background-color:transparent}._button-wrapper_lkgy1_1._primary_lkgy1_177._link_lkgy1_155:disabled svg path{stroke:#dedee1}._button-wrapper_lkgy1_1._success_lkgy1_48:hover:not(:disabled):not(._loading_lkgy1_180){background:#08711d}._button-wrapper_lkgy1_1._success_lkgy1_48._solid_lkgy1_186{background:#0f860f;color:#fff}._button-wrapper_lkgy1_1._success_lkgy1_48._solid_lkgy1_186._loading_lkgy1_180{background:#0f860f}._button-wrapper_lkgy1_1._success_lkgy1_48._solid_lkgy1_186:hover{background:#08711d}._button-wrapper_lkgy1_1._success_lkgy1_48._solid_lkgy1_186:disabled{background:#dedee1;color:#9e9ea9}._button-wrapper_lkgy1_1._success_lkgy1_48._solid_lkgy1_186:disabled:hover{background:#dedee1;color:#9e9ea9;cursor:not-allowed}._button-wrapper_lkgy1_1._tertiary_lkgy1_242._solid_lkgy1_186{background:#ececee;color:#000}._button-wrapper_lkgy1_1._tertiary_lkgy1_242._solid_lkgy1_186:hover:not(:disabled):not(._loading_lkgy1_180){background:#b3b3bc}._button-wrapper_lkgy1_1._tertiary_lkgy1_242._solid_lkgy1_186._loading_lkgy1_180{background:#ececee}._button-wrapper_lkgy1_1._tertiary_lkgy1_242._solid_lkgy1_186:disabled{background:#b3b3bc}._button-wrapper_lkgy1_1._tertiary_lkgy1_242._solid_lkgy1_186:disabled:hover{background:#b3b3bc;cursor:not-allowed}._button-wrapper_lkgy1_1._tertiary_lkgy1_242._bordered_lkgy1_96{border:2px solid #DEDEE1;background:transparent;color:#18181b}._button-wrapper_lkgy1_1._tertiary_lkgy1_242._bordered_lkgy1_96:hover:not(:disabled):not(._loading_lkgy1_180){border-color:#b3b3bc}._button-wrapper_lkgy1_1._tertiary_lkgy1_242._bordered_lkgy1_96:active{border-color:#b3b3bc}._button-wrapper_lkgy1_1._tertiary_lkgy1_242._bordered_lkgy1_96:disabled{color:#b3b3bc}._button-wrapper_lkgy1_1._tertiary_lkgy1_242._bordered_lkgy1_96:disabled:hover{cursor:not-allowed}._button-wrapper_lkgy1_1._tertiary_lkgy1_242._bordered_lkgy1_96:disabled svg path{stroke:#b3b3bc}._button-wrapper_lkgy1_1._danger_lkgy1_279:hover:not(:disabled){background-color:#8f1100}._button-wrapper_lkgy1_1._danger_lkgy1_279._solid_lkgy1_186{background:#d71a00;color:#fff}._button-wrapper_lkgy1_1._danger_lkgy1_279._solid_lkgy1_186:active{background:#8f1100}._button-wrapper_lkgy1_1._danger_lkgy1_279._solid_lkgy1_186:disabled{color:#9e9ea9;background:#e4e4e7}._button-wrapper_lkgy1_1._danger_lkgy1_279._solid_lkgy1_186:disabled:hover{cursor:not-allowed}._button-wrapper_lkgy1_1._danger_lkgy1_279._link_lkgy1_155,._button-wrapper_lkgy1_1._danger_lkgy1_279._link_lkgy1_155:hover{color:#ff371c;background-color:transparent}._button-wrapper_lkgy1_1._danger_lkgy1_279._link_lkgy1_155:disabled{color:#ff371c}._button-wrapper_lkgy1_1._secondary_lkgy1_307._solid_lkgy1_186{background:#18181b;color:#fff}._button-wrapper_lkgy1_1._secondary_lkgy1_307._solid_lkgy1_186:hover:not(:disabled){background:#3a3a41}._button-wrapper_lkgy1_1._secondary_lkgy1_307._solid_lkgy1_186:disabled{background-color:#e4e4e7;color:#9e9ea9;cursor:not-allowed}._badge-wrapper_1miog_1 span{font-size:11px;font-weight:700;line-height:18px;display:inline-block;padding:1px 6px;border-radius:4px;white-space:nowrap;text-transform:lowercase;letter-spacing:.25px}@media (max-width: 599px){._badge-wrapper_1miog_1 span{font-size:12px;padding:1px 5px;text-wrap:unset}}._badge-wrapper_1miog_1 span._default_1miog_19{background-color:#ececee;color:#6a6a77}._badge-wrapper_1miog_1 span._success_1miog_23{background-color:#ddf2e1;color:#0f860f}._badge-wrapper_1miog_1 span._warning_1miog_27{background-color:#fff9cc;color:#eaad00}._badge-wrapper_1miog_1 span._info_1miog_31{background-color:#e2ecfe;color:#365eed}._badge-wrapper_1miog_1 span._warning-with-icon_1miog_35{display:inline-flex;align-items:center;gap:5px;background-color:#fff9cc;color:#eaad00}._badge-wrapper_1miog_1 span._info-with-icon_1miog_42{display:inline-flex;align-items:center;gap:5px;background-color:#e2ecfe;color:#365eed}._badge-wrapper_1miog_1 span._success-with-icon_1miog_49{display:inline-flex;align-items:center;gap:5px;background-color:#ddf2e1;color:#0f860f}._badge-wrapper_1miog_1 span._danger_1miog_56{background:#fce8f1;color:#ff371c}._badge-wrapper_1miog_1 span._primary_1miog_60{background-color:#b6cffc;color:#365eed}._badge-wrapper_1miog_1 span._azure_1miog_64{background-color:#94fff9;color:#00c3e7}._badge-wrapper_1miog_1 span._pink_1miog_68{background-color:#ffeaf3;color:#ff3087}._badge-wrapper_1miog_1 span._purple_1miog_72{background-color:#dcc9fd;color:#803cf2}
|
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "maritime-ui",
|
|
3
|
+
"version": "0.1.3",
|
|
4
|
+
"description": "Common UI components and util functions",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/maritime-ui.cjs",
|
|
7
|
+
"module": "./dist/maritime-ui.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/maritime-ui.js",
|
|
13
|
+
"require": "./dist/maritime-ui.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./styles": "./dist/style.css"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsc --noEmit && vite build",
|
|
22
|
+
"typecheck": "tsc --noEmit",
|
|
23
|
+
"storybook": "storybook dev -p 6006",
|
|
24
|
+
"build-storybook": "storybook build"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
28
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"@chromatic-com/storybook": "^5.2.1",
|
|
32
|
+
"@storybook/addon-a11y": "^10.4.2",
|
|
33
|
+
"@storybook/addon-docs": "^10.4.2",
|
|
34
|
+
"@storybook/addon-mcp": "^0.6.0",
|
|
35
|
+
"@storybook/addon-vitest": "^10.4.2",
|
|
36
|
+
"@storybook/react-vite": "^10.4.2",
|
|
37
|
+
"@types/react": "^19.0.0",
|
|
38
|
+
"@types/react-dom": "^19.0.0",
|
|
39
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
40
|
+
"@vitest/browser-playwright": "^4.1.8",
|
|
41
|
+
"@vitest/coverage-v8": "^4.1.8",
|
|
42
|
+
"playwright": "^1.60.0",
|
|
43
|
+
"react": "^19.2.3",
|
|
44
|
+
"react-dom": "^19.2.3",
|
|
45
|
+
"sass": "^1.93.3",
|
|
46
|
+
"storybook": "^10.4.2",
|
|
47
|
+
"typescript": "^5.4.0",
|
|
48
|
+
"vite": "^5.0.0",
|
|
49
|
+
"vite-plugin-dts": "^4.5.0",
|
|
50
|
+
"vitest": "^4.1.8"
|
|
51
|
+
},
|
|
52
|
+
"author": "nikoberetic",
|
|
53
|
+
"license": "ISC",
|
|
54
|
+
"repository": {
|
|
55
|
+
"type": "git",
|
|
56
|
+
"url": "git+https://github.com/nikoberetic/maritime-ui-package.git"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"clsx": "^2.1.1"
|
|
60
|
+
}
|
|
61
|
+
}
|