@pismo/marola 0.0.1-alpha.4 → 0.0.1-alpha.5
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/README.md +4 -3
- package/dist/{Button-C3Qm852g.js → Button-D--uN90N.js} +6 -5
- package/dist/Dialog.module-BKWFakxu.js +15 -0
- package/dist/{ListContext-D6-YwtZn.js → ListContext-Dj2Va7Iv.js} +2 -2
- package/dist/{Tabs.module-_kSbSyth.js → Tabs.module-BKlNuSPH.js} +20 -20
- package/dist/assets/Button.css +1 -0
- package/dist/assets/Dialog.css +1 -1
- package/dist/assets/IconButton.css +1 -0
- package/dist/assets/LoadingSpinner.css +1 -1
- package/dist/assets/PageHeader.css +1 -0
- package/dist/assets/Pagination.css +1 -0
- package/dist/assets/Tabs.css +1 -1
- package/dist/assets/Typography.css +1 -1
- package/dist/assets/main.css +1 -1
- package/dist/components/Button/Button.d.ts +21 -0
- package/dist/components/Button/Button.js +54 -0
- package/dist/components/Dialog/Actions.js +1 -1
- package/dist/components/Dialog/Backdrop.js +2 -9
- package/dist/components/Dialog/CloseIconButton.js +3 -3
- package/dist/components/Dialog/Dialog.d.ts +2 -2
- package/dist/components/Dialog/Dialog.js +22 -26
- package/dist/components/Dialog/Title.js +22 -7
- package/dist/components/IconButton/IconButton.d.ts +22 -0
- package/dist/components/IconButton/IconButton.js +79 -0
- package/dist/components/LoadingSpinner/LoadingSpinner.js +12 -13
- package/dist/components/PageHeader/PageHeader.d.ts +26 -0
- package/dist/components/PageHeader/PageHeader.js +69 -0
- package/dist/components/Pagination/Pagination.d.ts +36 -0
- package/dist/components/Pagination/Pagination.js +219 -0
- package/dist/components/SortTooltip/SortTooltip.d.ts +0 -0
- package/dist/components/SortTooltip/SortTooltip.js +1 -0
- package/dist/components/Table/Table.d.ts +0 -0
- package/dist/components/Table/Table.js +1 -0
- package/dist/components/Table/TableContext.d.ts +0 -0
- package/dist/components/Table/TableContext.js +1 -0
- package/dist/components/Tabs/Tab.js +42 -37
- package/dist/components/Tabs/TabPanel.js +20 -21
- package/dist/components/Tabs/Tabs.js +185 -214
- package/dist/components/Tooltip/Tooltip.d.ts +0 -0
- package/dist/components/Tooltip/Tooltip.js +1 -0
- package/dist/components/Typography/Typography.d.ts +1 -1
- package/dist/components/Typography/Typography.js +38 -47
- package/dist/{index-BZ1lkM_M.js → index-BvA1HyDs.js} +274 -293
- package/dist/main.d.ts +4 -1
- package/dist/main.js +22 -15
- package/dist/objectWithoutPropertiesLoose-ClNcje2_.js +22 -0
- package/dist/types/helpers.d.ts +6 -7
- package/dist/{useButton-CbmjmH5z.js → useButton-abQpo0za.js} +17 -16
- package/dist/{useCompoundItem-B7wfGDHQ.js → useCompoundItem-wTwXbURC.js} +1 -1
- package/dist/useControlled-CCMYYdCM.js +31 -0
- package/package.json +26 -6
- package/dist/Dialog.module-BO0mdB7d.js +0 -15
- package/dist/assets/CallToActionButton.css +0 -1
- package/dist/components/CallToActionButton/CallToActionButton.d.ts +0 -21
- package/dist/components/CallToActionButton/CallToActionButton.js +0 -57
- package/src/playground/Playground.tsx +0 -20
package/dist/main.d.ts
CHANGED
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
export * from './components/Dialog/Dialog';
|
|
3
3
|
export * from './components/Typography/Typography';
|
|
4
4
|
export * from './components/LoadingSpinner/LoadingSpinner';
|
|
5
|
-
export * from './components/CallToActionButton/CallToActionButton';
|
|
6
5
|
export * from './components/Tabs/Tabs';
|
|
7
6
|
export * from './components/Tabs/Tab';
|
|
8
7
|
export * from './components/Tabs/TabPanel';
|
|
8
|
+
export * from './components/Pagination/Pagination';
|
|
9
|
+
export * from './components/PageHeader/PageHeader';
|
|
10
|
+
export * from './components/Button/Button';
|
|
11
|
+
export * from './components/IconButton/IconButton';
|
package/dist/main.js
CHANGED
|
@@ -2,22 +2,29 @@ import './assets/main.css';
|
|
|
2
2
|
import { Dialog as t } from "./components/Dialog/Dialog.js";
|
|
3
3
|
import { Typography as a } from "./components/Typography/Typography.js";
|
|
4
4
|
import { LoadingSpinner as p } from "./components/LoadingSpinner/LoadingSpinner.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
5
|
+
import { Tabs as m } from "./components/Tabs/Tabs.js";
|
|
6
|
+
import { Tab as i } from "./components/Tabs/Tab.js";
|
|
7
|
+
import { TabPanel as s } from "./components/Tabs/TabPanel.js";
|
|
8
|
+
import { Pagination as g, defaultTranslations as u } from "./components/Pagination/Pagination.js";
|
|
9
|
+
import { PageHeader as b } from "./components/PageHeader/PageHeader.js";
|
|
10
|
+
import { Button as c } from "./components/Button/Button.js";
|
|
11
|
+
import { IconButton as B } from "./components/IconButton/IconButton.js";
|
|
12
|
+
import { default as h } from "./components/Dialog/Title.js";
|
|
13
|
+
import { default as C } from "./components/Dialog/Content.js";
|
|
14
|
+
import { default as I } from "./components/Dialog/Actions.js";
|
|
12
15
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
+
I as Actions,
|
|
17
|
+
c as Button,
|
|
18
|
+
C as Content,
|
|
16
19
|
t as Dialog,
|
|
17
|
-
|
|
20
|
+
h as DialogTitle,
|
|
21
|
+
B as IconButton,
|
|
18
22
|
p as LoadingSpinner,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
+
b as PageHeader,
|
|
24
|
+
g as Pagination,
|
|
25
|
+
i as Tab,
|
|
26
|
+
s as TabPanel,
|
|
27
|
+
m as Tabs,
|
|
28
|
+
a as Typography,
|
|
29
|
+
u as defaultTranslations
|
|
23
30
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function o() {
|
|
2
|
+
return o = Object.assign ? Object.assign.bind() : function(t) {
|
|
3
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
4
|
+
var n = arguments[e];
|
|
5
|
+
for (var r in n)
|
|
6
|
+
Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
}, o.apply(this, arguments);
|
|
10
|
+
}
|
|
11
|
+
function s(t, e) {
|
|
12
|
+
if (t == null)
|
|
13
|
+
return {};
|
|
14
|
+
var n = {}, r = Object.keys(t), a, i;
|
|
15
|
+
for (i = 0; i < r.length; i++)
|
|
16
|
+
a = r[i], !(e.indexOf(a) >= 0) && (n[a] = t[a]);
|
|
17
|
+
return n;
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
s as _,
|
|
21
|
+
o as a
|
|
22
|
+
};
|
package/dist/types/helpers.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
/// <reference types="vite-plugin-svgr/client" />
|
|
2
|
+
|
|
1
3
|
// Saves having to declare 'never' for every property that exists on the 'other' type
|
|
2
4
|
// Creates a new type that 'only' has properties in the first type and not in the second, if the property does not
|
|
3
5
|
// exist in the second type, it is given the value of 'never' so it can never be set
|
|
4
|
-
type Only<T, U> = { [P in keyof T]: T[P] } & Omit<
|
|
5
|
-
{ [P in keyof U]?: never },
|
|
6
|
-
keyof T
|
|
7
|
-
>;
|
|
6
|
+
type Only<T, U> = { [P in keyof T]: T[P] } & Omit<{ [P in keyof U]?: never }, keyof T>;
|
|
8
7
|
|
|
9
8
|
// Usage MyNewType = Either<TypeA, TypeB>
|
|
10
9
|
// Creates a new type via union based on two types
|
|
@@ -15,6 +14,6 @@ export type Either<T, U> = Only<T, U> | Only<U, T>;
|
|
|
15
14
|
// note these arguments must be declared in MyType as optional '?'
|
|
16
15
|
type RequireAllOrNone<T, U extends keyof T = never> = (
|
|
17
16
|
| Required<Pick<T, U>> // Require all properties
|
|
18
|
-
| Partial<Record<U, never>>
|
|
19
|
-
|
|
20
|
-
Omit<T, U>; // remaining keys not listed in U
|
|
17
|
+
| Partial<Record<U, never>> // Require none
|
|
18
|
+
) &
|
|
19
|
+
Omit<T, U>; // remaining keys not listed in U
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as k } from "./objectWithoutPropertiesLoose-ClNcje2_.js";
|
|
2
2
|
import * as l from "react";
|
|
3
|
-
|
|
3
|
+
import { f as A, h as I } from "./index-BvA1HyDs.js";
|
|
4
|
+
function _(r) {
|
|
4
5
|
const {
|
|
5
6
|
rootElementName: n = "",
|
|
6
7
|
componentName: o
|
|
7
|
-
} = r, [
|
|
8
|
+
} = r, [s, i] = l.useState(n.toUpperCase());
|
|
8
9
|
process.env.NODE_ENV !== "production" && l.useEffect(() => {
|
|
9
|
-
n &&
|
|
10
|
-
}, [n,
|
|
10
|
+
n && s !== n.toUpperCase() && console.error(`useRootElementName: the \`rootElementName\` prop of ${o ? `the ${o} component` : "a component"} expected the '${n}' element, but a '${s.toLowerCase()}' was rendered instead`, "This may cause hydration issues in an SSR context, for example in a Next.js app");
|
|
11
|
+
}, [n, s, o]);
|
|
11
12
|
const c = l.useCallback((b) => {
|
|
12
13
|
var f;
|
|
13
14
|
i((f = b == null ? void 0 : b.tagName) != null ? f : "");
|
|
14
15
|
}, []);
|
|
15
|
-
return [
|
|
16
|
+
return [s, c];
|
|
16
17
|
}
|
|
17
18
|
class F {
|
|
18
19
|
constructor() {
|
|
@@ -86,21 +87,21 @@ function Q() {
|
|
|
86
87
|
w = !1;
|
|
87
88
|
}), n.current = !1, !0) : !1;
|
|
88
89
|
}
|
|
89
|
-
function
|
|
90
|
+
function s(i) {
|
|
90
91
|
return J(i) ? (n.current = !0, !0) : !1;
|
|
91
92
|
}
|
|
92
93
|
return {
|
|
93
94
|
isFocusVisibleRef: n,
|
|
94
|
-
onFocus:
|
|
95
|
+
onFocus: s,
|
|
95
96
|
onBlur: o,
|
|
96
97
|
ref: r
|
|
97
98
|
};
|
|
98
99
|
}
|
|
99
|
-
function
|
|
100
|
+
function ee(r = {}) {
|
|
100
101
|
const {
|
|
101
102
|
disabled: n = !1,
|
|
102
103
|
focusableWhenDisabled: o,
|
|
103
|
-
href:
|
|
104
|
+
href: s,
|
|
104
105
|
rootRef: i,
|
|
105
106
|
tabIndex: c,
|
|
106
107
|
to: b,
|
|
@@ -115,8 +116,8 @@ function H(r = {}) {
|
|
|
115
116
|
n && !o && p && N(!1), l.useEffect(() => {
|
|
116
117
|
h.current = p;
|
|
117
118
|
}, [p, h]);
|
|
118
|
-
const [m, M] =
|
|
119
|
-
rootElementName: V ?? (
|
|
119
|
+
const [m, M] = _({
|
|
120
|
+
rootElementName: V ?? (s || b ? "a" : void 0),
|
|
120
121
|
componentName: "Button"
|
|
121
122
|
}), U = (t) => (e) => {
|
|
122
123
|
var u;
|
|
@@ -158,12 +159,12 @@ function H(r = {}) {
|
|
|
158
159
|
var d;
|
|
159
160
|
(d = t.onClick) == null || d.call(t, e);
|
|
160
161
|
}
|
|
161
|
-
}, D =
|
|
162
|
-
return c !== void 0 && (
|
|
162
|
+
}, D = A(M, i, v, y), a = {};
|
|
163
|
+
return c !== void 0 && (a.tabIndex = c), m === "BUTTON" ? (a.type = f ?? "button", o ? a["aria-disabled"] = n : a.disabled = n) : m === "INPUT" ? f && ["button", "submit", "reset"].includes(f) && (o ? a["aria-disabled"] = n : a.disabled = n) : m !== "" && (!s && !b && (a.role = "button", a.tabIndex = c ?? 0), n && (a["aria-disabled"] = n, a.tabIndex = o ? c ?? 0 : -1)), {
|
|
163
164
|
getRootProps: (t = {}) => {
|
|
164
165
|
const e = k({}, I(r), I(t)), u = k({
|
|
165
166
|
type: f
|
|
166
|
-
}, e,
|
|
167
|
+
}, e, a, t, {
|
|
167
168
|
onBlur: L(e),
|
|
168
169
|
onClick: C(e),
|
|
169
170
|
onFocus: P(e),
|
|
@@ -182,5 +183,5 @@ function H(r = {}) {
|
|
|
182
183
|
};
|
|
183
184
|
}
|
|
184
185
|
export {
|
|
185
|
-
|
|
186
|
+
ee as u
|
|
186
187
|
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as n from "react";
|
|
2
|
+
function d({
|
|
3
|
+
controlled: o,
|
|
4
|
+
default: r,
|
|
5
|
+
name: t,
|
|
6
|
+
state: s = "value"
|
|
7
|
+
}) {
|
|
8
|
+
const {
|
|
9
|
+
current: e
|
|
10
|
+
} = n.useRef(o !== void 0), [l, c] = n.useState(r), u = e ? o : l;
|
|
11
|
+
if (process.env.NODE_ENV !== "production") {
|
|
12
|
+
n.useEffect(() => {
|
|
13
|
+
e !== (o !== void 0) && console.error([`MUI: A component is changing the ${e ? "" : "un"}controlled ${s} state of ${t} to be ${e ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${t} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
|
|
14
|
+
`));
|
|
15
|
+
}, [s, t, o]);
|
|
16
|
+
const {
|
|
17
|
+
current: i
|
|
18
|
+
} = n.useRef(r);
|
|
19
|
+
n.useEffect(() => {
|
|
20
|
+
!e && i !== r && console.error([`MUI: A component is changing the default ${s} state of an uncontrolled ${t} after being initialized. To suppress this warning opt to use a controlled ${t}.`].join(`
|
|
21
|
+
`));
|
|
22
|
+
}, [JSON.stringify(r)]);
|
|
23
|
+
}
|
|
24
|
+
const f = n.useCallback((i) => {
|
|
25
|
+
e || c(i);
|
|
26
|
+
}, []);
|
|
27
|
+
return [u, f];
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
d as u
|
|
31
|
+
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pismo/marola",
|
|
3
3
|
"description": "CDX tribe component library",
|
|
4
|
-
"version": "0.0.1-alpha.
|
|
4
|
+
"version": "0.0.1-alpha.5",
|
|
5
|
+
"private": false,
|
|
5
6
|
"type": "module",
|
|
6
7
|
"main": "dist/main.js",
|
|
7
8
|
"types": "dist/main.d.ts",
|
|
@@ -18,36 +19,55 @@
|
|
|
18
19
|
"scripts": {
|
|
19
20
|
"dev": "vite",
|
|
20
21
|
"build": "tsc --p ./tsconfig-build.json && vite build",
|
|
21
|
-
"lint": "eslint . --
|
|
22
|
+
"lint": "eslint . --report-unused-disable-directives --max-warnings 0",
|
|
23
|
+
"lint:fix": "yarn lint --fix",
|
|
24
|
+
"lint:scss": "stylelint \"**/*.scss\" --fix",
|
|
25
|
+
"prettier": "prettier . --write",
|
|
22
26
|
"preview": "vite preview",
|
|
23
|
-
"prepublishOnly": "npm run build"
|
|
27
|
+
"prepublishOnly": "npm run build",
|
|
28
|
+
"test": "vitest",
|
|
29
|
+
"coverage": "vitest run --coverage"
|
|
24
30
|
},
|
|
25
31
|
"peerDependencies": {
|
|
26
32
|
"react": "^18.2.0",
|
|
27
33
|
"react-dom": "^18.2.0"
|
|
28
34
|
},
|
|
29
35
|
"devDependencies": {
|
|
36
|
+
"@ianvs/prettier-plugin-sort-imports": "^4.2.1",
|
|
30
37
|
"@types/node": "^20.12.2",
|
|
31
38
|
"@types/react": "^18.2.66",
|
|
32
39
|
"@types/react-dom": "^18.2.22",
|
|
33
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
34
|
-
"@typescript-eslint/parser": "^7.
|
|
40
|
+
"@typescript-eslint/eslint-plugin": "^7.6.0",
|
|
41
|
+
"@typescript-eslint/parser": "^7.6.0",
|
|
35
42
|
"@vitejs/plugin-react": "^4.2.1",
|
|
36
43
|
"clsx": "^2.1.0",
|
|
44
|
+
"commitlint": "^19.2.1",
|
|
37
45
|
"eslint": "^8.57.0",
|
|
46
|
+
"eslint-config-prettier": "^9.1.0",
|
|
47
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
38
48
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
39
49
|
"eslint-plugin-react-refresh": "^0.4.6",
|
|
50
|
+
"eslint-plugin-simple-import-sort": "^12.0.0",
|
|
40
51
|
"glob": "^10.3.12",
|
|
52
|
+
"husky": "^9.0.11",
|
|
53
|
+
"prettier": "^3.2.5",
|
|
41
54
|
"react": "^18.2.0",
|
|
42
55
|
"react-dom": "^18.2.0",
|
|
43
56
|
"sass": "^1.72.0",
|
|
57
|
+
"stylelint": "^16.3.1",
|
|
58
|
+
"stylelint-config-recess-order": "^5.0.0",
|
|
59
|
+
"stylelint-config-standard-scss": "^13.1.0",
|
|
60
|
+
"stylelint-prettier": "^5.0.0",
|
|
44
61
|
"typescript": "^5.2.2",
|
|
45
62
|
"vite": "^5.2.0",
|
|
46
63
|
"vite-plugin-dts": "^3.8.1",
|
|
47
|
-
"vite-plugin-lib-inject-css": "^2.0.1"
|
|
64
|
+
"vite-plugin-lib-inject-css": "^2.0.1",
|
|
65
|
+
"vite-plugin-svgr": "^4.2.0",
|
|
66
|
+
"vitest": "^1.4.0"
|
|
48
67
|
},
|
|
49
68
|
"dependencies": {
|
|
50
69
|
"@mui/base": "^5.0.0-beta.40",
|
|
70
|
+
"@mui/material": "^5.15.15",
|
|
51
71
|
"@pismo/waves-icons": "^1.3.3"
|
|
52
72
|
}
|
|
53
73
|
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import './assets/Dialog.css';
|
|
2
|
-
const _ = "_dialog_cknma_1", a = "_dialog__backdrop_cknma_11", i = "_dialog__panel_cknma_19", o = "_dialog__title_cknma_35", l = "_dialog__subtitle_cknma_42", d = "_dialog__divider_cknma_51", t = "_dialog__actions_cknma_64", c = {
|
|
3
|
-
dialog: _,
|
|
4
|
-
dialog__backdrop: a,
|
|
5
|
-
dialog__panel: i,
|
|
6
|
-
dialog__title: o,
|
|
7
|
-
"dialog__title--small": "_dialog__title--small_cknma_39",
|
|
8
|
-
dialog__subtitle: l,
|
|
9
|
-
dialog__divider: d,
|
|
10
|
-
"dialog__close-icon": "_dialog__close-icon_cknma_55",
|
|
11
|
-
dialog__actions: t
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
c as s
|
|
15
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
._h1_j1yzk_1{font-size:var(--heading-font-size-xl);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-xl);margin:0}._h1--bold_j1yzk_7{font-weight:var(--typography-heading-bold)}._h2_j1yzk_11{font-size:var(--heading-font-size-l);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-l);margin:0}._h2--bold_j1yzk_17{font-weight:var(--typography-heading-bold)}._h3_j1yzk_21{font-size:var(--heading-font-size);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height);margin:0}._h3--bold_j1yzk_27{font-weight:var(--typography-heading-bold)}._h4_j1yzk_31{font-size:var(--heading-font-size-s);font-weight:var(--heading-font-weight);line-height:var(--heading-line-height-s);margin:0}._h4--bold_j1yzk_37{font-weight:var(--typography-heading-bold)}._body_j1yzk_41{font-size:var(--body-font-size);line-height:var(--body-line-height);font-weight:var(--body-weight)}._body--large_j1yzk_46{font-size:var(--body-font-size-large);line-height:var(--body-line-height-large)}._body--medium_j1yzk_50{font-size:var(--body-font-size-medium);line-height:var(--body-line-height-medium)}._body--small_j1yzk_54{font-size:var(--body-font-size-small);line-height:var(--body-line-height-small)}._body--tiny_j1yzk_58{font-size:var(--body-font-size-tiny);line-height:var(--body-line-height-tiny)}._body--bold_j1yzk_62{font-weight:var(--body-bold)}._body--strikethrough_j1yzk_65{text-decoration:line-through}._body--underlined_j1yzk_68{text-decoration:underline}._body--strikethrough-underlined_j1yzk_71{text-decoration:underline line-through}._quote_j1yzk_75{font-size:var(--quote-font-size);line-height:var(--quote-line-height);font-weight:var(--quote-font-weight)}._quote--large_j1yzk_80{font-size:var(--quote-font-size-large);line-height:var(--quote-line-height-large);font-weight:var(--quote-font-weight-large)}._form__input_j1yzk_86{font-size:var(--form-input-font-size);line-height:var(--form-input-line-height);font-weight:var(--form-input-font-weight)}._form__hint_j1yzk_91{font-size:var(--form-hint-font-size);line-height:var(--form-hint-line-height);font-weight:var(--form-hint-font-weight)}._form__label_j1yzk_96{font-size:var(--form-label-font-size);line-height:var(--form-label-line-height);font-weight:var(--form-label-font-weight)}._form__dropdown_j1yzk_101{font-size:var(--form-dropdown-font-size);line-height:var(--form-dropdown-line-height);font-weight:var(--form-dropdown-font-weight)}._table__header_j1yzk_107{font-size:var(--table-font-size);line-height:var(--table-line-height);font-weight:var(--table-header-font-weight)}._table__body_j1yzk_112{font-size:var(--table-font-size);line-height:var(--table-line-height);font-weight:var(--table-body-font-weight)}._table__body--secondary_j1yzk_117{font-size:var(--table-font-size);line-height:var(--table-line-height);line-height:var(--table-body-secondary-line-height)}._button_j1yzk_123{font-size:var(--button-font-size);line-height:var(--button-line-height);font-weight:var(--button-font-weight)}._button_j1yzk_123{font-size:var(--button-font-size);line-height:var(--button-line-height);font-weight:var(--button-font-weight);padding:calc(var(--spacing) * 1.25) calc(var(--spacing) * 4.375);border-radius:calc(var(--spacing) * 12.5);border:none;cursor:pointer}._button--primary_j1yzk_138{background-color:var(--accent);color:var(--white-100)}._button--primary_j1yzk_138:hover{background-color:var(--accent-dark)}._button--primary_j1yzk_138:focus{background-color:var(--accent-lighter);color:var(--black-100)}._button--primary_j1yzk_138:active{background-color:var(--accent-light)}._button--primary_j1yzk_138:disabled{background-color:var(--black-10);color:var(--gray-50);cursor:default}._button--secondary_j1yzk_157{background-color:var(--white-100);color:var(--accent)}._button--secondary_j1yzk_157:hover{background-color:var(--gray-5)}._button--secondary_j1yzk_157:focus{color:var(--black-100)}._button--secondary_j1yzk_157:active{color:var(--accent-light)}._button--secondary_j1yzk_157:disabled{color:var(--gray-50);cursor:default}._button__loading-container_j1yzk_174{align-items:center;display:flex;gap:var(--spacing)}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Either } from '../../types/helpers';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
|
|
4
|
-
type variation = "primary" | "secondary";
|
|
5
|
-
type CallToActionButtonCoreProps = {
|
|
6
|
-
isLoading?: boolean;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
className?: string;
|
|
9
|
-
children: ReactNode;
|
|
10
|
-
variation?: variation;
|
|
11
|
-
};
|
|
12
|
-
interface CallToActionButtonPropsWithLink extends CallToActionButtonCoreProps {
|
|
13
|
-
link: string;
|
|
14
|
-
}
|
|
15
|
-
interface CallToActionButtonPropsWithOnClick extends CallToActionButtonCoreProps {
|
|
16
|
-
onClick: () => void;
|
|
17
|
-
type?: HTMLButtonElement["type"];
|
|
18
|
-
}
|
|
19
|
-
export type CallToActionButtonProps = Either<CallToActionButtonPropsWithLink, CallToActionButtonPropsWithOnClick>;
|
|
20
|
-
export declare const CallToActionButton: import('react').ForwardRefExoticComponent<CallToActionButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
21
|
-
export default CallToActionButton;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import '../../assets/CallToActionButton.css';
|
|
2
|
-
import { jsx as d, jsxs as h } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef as u, useMemo as c } from "react";
|
|
4
|
-
import { LoadingSpinner as k } from "../LoadingSpinner/LoadingSpinner.js";
|
|
5
|
-
import { c as m } from "../../clsx-DB4S2d7J.js";
|
|
6
|
-
import { B as j } from "../../Button-C3Qm852g.js";
|
|
7
|
-
const z = "_h1_j1yzk_1", f = "_h2_j1yzk_11", p = "_h3_j1yzk_21", g = "_h4_j1yzk_31", q = "_body_j1yzk_41", w = "_quote_j1yzk_75", x = "_form__input_j1yzk_86", N = "_form__hint_j1yzk_91", v = "_form__label_j1yzk_96", B = "_form__dropdown_j1yzk_101", C = "_table__header_j1yzk_107", L = "_table__body_j1yzk_112", A = "_button_j1yzk_123", _ = {
|
|
8
|
-
h1: z,
|
|
9
|
-
"h1--bold": "_h1--bold_j1yzk_7",
|
|
10
|
-
h2: f,
|
|
11
|
-
"h2--bold": "_h2--bold_j1yzk_17",
|
|
12
|
-
h3: p,
|
|
13
|
-
"h3--bold": "_h3--bold_j1yzk_27",
|
|
14
|
-
h4: g,
|
|
15
|
-
"h4--bold": "_h4--bold_j1yzk_37",
|
|
16
|
-
body: q,
|
|
17
|
-
"body--large": "_body--large_j1yzk_46",
|
|
18
|
-
"body--medium": "_body--medium_j1yzk_50",
|
|
19
|
-
"body--small": "_body--small_j1yzk_54",
|
|
20
|
-
"body--tiny": "_body--tiny_j1yzk_58",
|
|
21
|
-
"body--bold": "_body--bold_j1yzk_62",
|
|
22
|
-
"body--strikethrough": "_body--strikethrough_j1yzk_65",
|
|
23
|
-
"body--underlined": "_body--underlined_j1yzk_68",
|
|
24
|
-
"body--strikethrough-underlined": "_body--strikethrough-underlined_j1yzk_71",
|
|
25
|
-
quote: w,
|
|
26
|
-
"quote--large": "_quote--large_j1yzk_80",
|
|
27
|
-
form__input: x,
|
|
28
|
-
form__hint: N,
|
|
29
|
-
form__label: v,
|
|
30
|
-
form__dropdown: B,
|
|
31
|
-
table__header: C,
|
|
32
|
-
table__body: L,
|
|
33
|
-
"table__body--secondary": "_table__body--secondary_j1yzk_117",
|
|
34
|
-
button: A,
|
|
35
|
-
"button--primary": "_button--primary_j1yzk_138",
|
|
36
|
-
"button--secondary": "_button--secondary_j1yzk_157",
|
|
37
|
-
"button__loading-container": "_button__loading-container_j1yzk_174"
|
|
38
|
-
}, D = u((r, e) => {
|
|
39
|
-
const {
|
|
40
|
-
onClick: y,
|
|
41
|
-
link: b,
|
|
42
|
-
isLoading: l,
|
|
43
|
-
children: o,
|
|
44
|
-
type: a = "button",
|
|
45
|
-
disabled: s,
|
|
46
|
-
className: t,
|
|
47
|
-
variation: n = "primary"
|
|
48
|
-
} = r, i = c(() => m([_.button, _[`button--${n}`], t]), [t]);
|
|
49
|
-
return /* @__PURE__ */ d(j, { type: a, href: b, onClick: y, disabled: s, className: i, ref: e, children: l ? /* @__PURE__ */ h("div", { className: _["button__loading-container"], children: [
|
|
50
|
-
/* @__PURE__ */ d(k, { ...n === "secondary" && { invert: !0 } }),
|
|
51
|
-
o
|
|
52
|
-
] }) : o });
|
|
53
|
-
});
|
|
54
|
-
export {
|
|
55
|
-
D as CallToActionButton,
|
|
56
|
-
D as default
|
|
57
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { Tab, Tabs, TabPanel } from "../../lib/main";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const Playground = () => {
|
|
6
|
-
return <>
|
|
7
|
-
<Tabs>
|
|
8
|
-
<Tab value="1">Tab 1 with a very big name ajahsuahdifsadgfiasgfdioafuu</Tab>
|
|
9
|
-
<Tab value="2">Tab 2</Tab>
|
|
10
|
-
<Tab value="3">Tab 3</Tab>
|
|
11
|
-
<Tab value="4">Tab 4</Tab>
|
|
12
|
-
<TabPanel value="1">Tab 1 content</TabPanel>
|
|
13
|
-
<TabPanel value="2">Tab 2 content</TabPanel>
|
|
14
|
-
<TabPanel value="3">Tab 3 content</TabPanel>
|
|
15
|
-
<TabPanel value="4">Tab 4 content</TabPanel>
|
|
16
|
-
</Tabs>
|
|
17
|
-
</>;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export default Playground;
|