@spesia/ui 1.8.21 → 1.9.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.
- package/README.md +1 -1
- package/dist/_virtual/_commonjsHelpers.js +6 -0
- package/dist/_virtual/index.js +4 -0
- package/dist/client.d.ts +7 -0
- package/dist/client.js +16 -0
- package/dist/components/Logo/Logo.js +121 -0
- package/dist/components/Logo3d/Logo3d.js +61 -0
- package/dist/components/checkbox/Checked.js +47 -0
- package/dist/components/checkbox/Unchecked.js +70 -0
- package/dist/components/chip-list/ChipList.js +97 -0
- package/dist/components/container-grid/ContainerGrid.js +110 -0
- package/dist/components/date-picker/DatePicker/DatePicker.js +62 -0
- package/dist/components/date-picker/PeriodPicker/PeriodPicker.js +374 -0
- package/dist/components/date-picker/utils.js +27 -0
- package/dist/components/filters/Checked.js +26 -0
- package/dist/components/filters/FilterList.js +121 -0
- package/dist/components/filters/Unchecked.js +26 -0
- package/dist/components/index.d.ts +0 -9
- package/dist/components/radio/Checked.js +34 -0
- package/dist/components/radio/Unchecked.js +48 -0
- package/dist/components/trending-chip/TrendingChip.js +93 -0
- package/dist/helpers/suitCx.js +17 -0
- package/dist/helpers/utils.js +11 -0
- package/dist/hooks/useContainerDimension.js +23 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +13 -37197
- package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js +42 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/addLeadingZeros.js +7 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/defaultOptions.js +7 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/formatters.js +515 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/lightFormatters.js +59 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/longFormatters.js +52 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +18 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/normalizeDates.js +11 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/protectedTokens.js +20 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constants.js +6 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constructFrom.js +8 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInCalendarDays.js +16 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/format.js +59 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getDayOfYear.js +11 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getISOWeek.js +12 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getISOWeekYear.js +15 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getWeek.js +12 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getWeekYear.js +17 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isDate.js +7 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isSameDay.js +14 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isSameMonth.js +13 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isSameYear.js +13 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isValid.js +9 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +9 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +18 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +31 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +15 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +70 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js +33 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/localize.js +155 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/match.js +110 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US.js +21 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfDay.js +9 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfISOWeek.js +8 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfISOWeekYear.js +11 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfWeek.js +11 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfWeekYear.js +13 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfYear.js +9 -0
- package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/toDate.js +8 -0
- package/dist/styles/alert/alert.js +70 -0
- package/dist/styles/button/button.js +195 -0
- package/dist/styles/card/card.js +16 -0
- package/dist/styles/checkbox/checkbox.js +46 -0
- package/dist/styles/chip/chip.js +115 -0
- package/dist/styles/colors.js +435 -0
- package/dist/styles/dialog/dialog.js +34 -0
- package/dist/styles/form/form.js +18 -0
- package/dist/styles/index.js +53 -0
- package/dist/styles/input/input.js +127 -0
- package/dist/styles/list/list.js +42 -0
- package/dist/styles/palette.js +150 -0
- package/dist/styles/radio/radio.js +37 -0
- package/dist/styles/slider/slider.js +55 -0
- package/dist/styles/switch/switch.js +63 -0
- package/dist/styles/tab/tab.js +70 -0
- package/dist/styles/tooltip/tooltip.js +19 -0
- package/dist/styles/typography.js +139 -0
- package/dist/themes.js +35 -0
- package/package.json +6 -1
- /package/dist/components/{TrendingChip → trending-chip}/TrendingChip.d.ts +0 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { tokens as t, colors as a } from "./colors.js";
|
|
2
|
+
const y = {
|
|
3
|
+
mainShade: 50,
|
|
4
|
+
lighter: 10,
|
|
5
|
+
lighterAlt: 20,
|
|
6
|
+
light: 30,
|
|
7
|
+
hover: 60,
|
|
8
|
+
focus: 40,
|
|
9
|
+
dark: 100,
|
|
10
|
+
darkAlt: 80,
|
|
11
|
+
text: 80,
|
|
12
|
+
transparent: 10,
|
|
13
|
+
activeText: a.neutral.white
|
|
14
|
+
}, s = {
|
|
15
|
+
mainShade: 40,
|
|
16
|
+
lighter: 100,
|
|
17
|
+
lighterAlt: 80,
|
|
18
|
+
light: 70,
|
|
19
|
+
hover: 40,
|
|
20
|
+
focus: 60,
|
|
21
|
+
dark: 10,
|
|
22
|
+
darkAlt: 20,
|
|
23
|
+
text: 20,
|
|
24
|
+
transparent: 90,
|
|
25
|
+
activeText: a.neutral.black
|
|
26
|
+
}, d = {
|
|
27
|
+
10: "#FEE7E2",
|
|
28
|
+
20: "#FEDBD3",
|
|
29
|
+
30: "#FDCFC5",
|
|
30
|
+
40: "#FCAC99",
|
|
31
|
+
50: "#FB886D",
|
|
32
|
+
60: "#DE785C",
|
|
33
|
+
70: "#A25945",
|
|
34
|
+
80: "#6A3C30",
|
|
35
|
+
90: "#36211B",
|
|
36
|
+
100: "#180702"
|
|
37
|
+
}, k = (r) => {
|
|
38
|
+
const n = r === "dark" ? s : y;
|
|
39
|
+
return {
|
|
40
|
+
mode: r,
|
|
41
|
+
primary: e(d, n),
|
|
42
|
+
secondary: e(a.primary.brown, n),
|
|
43
|
+
error: e(a.primary.red, n),
|
|
44
|
+
success: e(a.primary.green, n),
|
|
45
|
+
warning: e(
|
|
46
|
+
a.primary.yellow,
|
|
47
|
+
n,
|
|
48
|
+
a.neutral.black,
|
|
49
|
+
a.neutral.black
|
|
50
|
+
),
|
|
51
|
+
info: e(a.primary.beige, n),
|
|
52
|
+
neutral: r === "dark" ? g(a.secondary.grey) : u(a.secondary.grey),
|
|
53
|
+
grey: {
|
|
54
|
+
50: a.secondary.grey[r === "dark" ? 80 : 20],
|
|
55
|
+
100: a.secondary.grey[r === "dark" ? 70 : 30],
|
|
56
|
+
200: a.secondary.grey[r === "dark" ? 60 : 40],
|
|
57
|
+
300: a.secondary.grey[50],
|
|
58
|
+
400: a.secondary.grey[r === "dark" ? 40 : 60],
|
|
59
|
+
700: a.secondary.grey[r === "dark" ? 30 : 70],
|
|
60
|
+
900: a.secondary.grey[r === "dark" ? 20 : 80]
|
|
61
|
+
},
|
|
62
|
+
text: {
|
|
63
|
+
primary: t.content.text.primary[r],
|
|
64
|
+
secondary: t.content.text.secondary[r],
|
|
65
|
+
tertiary: t.content.text.tertiary[r],
|
|
66
|
+
disabled: t.content.text.disabled[r],
|
|
67
|
+
contrastText: t.core.white[r],
|
|
68
|
+
primaryIcon: t.content.icon.primary[r],
|
|
69
|
+
secondaryIcon: t.content.icon.secondary[r],
|
|
70
|
+
tertiaryIcon: t.content.icon.tertiary[r]
|
|
71
|
+
},
|
|
72
|
+
background: {
|
|
73
|
+
default: t.content.background.primary[r],
|
|
74
|
+
paper: t.content.background.primary[r],
|
|
75
|
+
secondary: t.content.background.secondary[r],
|
|
76
|
+
secondaryPaper: t.content.background.coral[r],
|
|
77
|
+
coralBold: t.content.background.coralBold[r],
|
|
78
|
+
brownBold: t.content.background.brownBold[r],
|
|
79
|
+
alphaBrown: t.content.background.alphaBrown[r],
|
|
80
|
+
primaryButton: t.content.background.primaryButton[r],
|
|
81
|
+
secondaryButton: t.content.background.secondaryButton[r],
|
|
82
|
+
tertiaryButton: t.content.background.tertiaryButton[r],
|
|
83
|
+
transparent: t.content.background.transparent[r],
|
|
84
|
+
primaryLighter: t.semantic.primary.lighter[r],
|
|
85
|
+
primaryLight: t.semantic.primary.light[r],
|
|
86
|
+
primaryMain: t.semantic.primary.main[r],
|
|
87
|
+
primaryDark: t.semantic.primary.dark[r],
|
|
88
|
+
secondaryLighter: t.semantic.secondary.lighter[r],
|
|
89
|
+
secondaryLight: t.semantic.secondary.light[r],
|
|
90
|
+
secondaryMain: t.semantic.secondary.main[r],
|
|
91
|
+
secondaryDark: t.semantic.secondary.dark[r]
|
|
92
|
+
},
|
|
93
|
+
divider: t.content.border.tertiary[r],
|
|
94
|
+
border: {
|
|
95
|
+
primary: t.content.border.primary[r],
|
|
96
|
+
secondary: t.content.border.secondary[r]
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
};
|
|
100
|
+
function e(r, n, i = a.neutral.white, c = i) {
|
|
101
|
+
return {
|
|
102
|
+
lighter: r[n.lighter] ?? r[n.lighterAlt],
|
|
103
|
+
light: r[n.light],
|
|
104
|
+
main: r[n.mainShade],
|
|
105
|
+
hover: r[n.hover],
|
|
106
|
+
focus: r[n.focus],
|
|
107
|
+
dark: r[n.dark] ?? r[n.darkAlt],
|
|
108
|
+
text: r[n.text],
|
|
109
|
+
border: r[50],
|
|
110
|
+
active: n.activeText,
|
|
111
|
+
contrastText: i,
|
|
112
|
+
contrastTextAlt: c,
|
|
113
|
+
transparent: r[n.transparent]
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
function u(r) {
|
|
117
|
+
return {
|
|
118
|
+
lighter: r[20],
|
|
119
|
+
light: r[30],
|
|
120
|
+
main: r[70],
|
|
121
|
+
hover: r[80],
|
|
122
|
+
focus: r[80],
|
|
123
|
+
border: t.content.border.tertiary.light,
|
|
124
|
+
active: a.neutral.white,
|
|
125
|
+
contrastText: a.neutral.white,
|
|
126
|
+
text: r[80],
|
|
127
|
+
contrastTextAlt: a.neutral.white,
|
|
128
|
+
dark: r[100] ?? r[90] ?? r[80],
|
|
129
|
+
transparent: r[10] ?? r[20]
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
function g(r) {
|
|
133
|
+
return {
|
|
134
|
+
lighter: r[80],
|
|
135
|
+
light: r[70],
|
|
136
|
+
main: r[30],
|
|
137
|
+
hover: r[20],
|
|
138
|
+
focus: r[20],
|
|
139
|
+
border: t.content.border.tertiary.light,
|
|
140
|
+
active: a.neutral.black,
|
|
141
|
+
contrastText: a.neutral.black,
|
|
142
|
+
text: r[20],
|
|
143
|
+
contrastTextAlt: a.neutral.black,
|
|
144
|
+
dark: r[10] ?? r[20],
|
|
145
|
+
transparent: r[100]
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
export {
|
|
149
|
+
k as createPalette
|
|
150
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import n from "../../components/radio/Checked.js";
|
|
3
|
+
import c from "../../components/radio/Unchecked.js";
|
|
4
|
+
const R = {
|
|
5
|
+
MuiRadio: {
|
|
6
|
+
defaultProps: {
|
|
7
|
+
icon: /* @__PURE__ */ t(c, {}),
|
|
8
|
+
checkedIcon: /* @__PURE__ */ t(n, {})
|
|
9
|
+
},
|
|
10
|
+
styleOverrides: {
|
|
11
|
+
root: (o) => {
|
|
12
|
+
var r, e, i, a, d;
|
|
13
|
+
return {
|
|
14
|
+
border: "none",
|
|
15
|
+
"&.MuiRadio-colorError svg.Radio-icon .Radio-border": {
|
|
16
|
+
borderColor: (r = o.theme.vars) == null ? void 0 : r.palette.error.main
|
|
17
|
+
},
|
|
18
|
+
"&.MuiRadio-colorInfo svg.Radio-icon .Radio-border": {
|
|
19
|
+
borderColor: (e = o.theme.vars) == null ? void 0 : e.palette.info.main
|
|
20
|
+
},
|
|
21
|
+
"&.MuiRadio-colorSuccess svg.Radio-icon .Radio-border": {
|
|
22
|
+
borderColor: (i = o.theme.vars) == null ? void 0 : i.palette.success.main
|
|
23
|
+
},
|
|
24
|
+
"&.MuiRadio-colorWarning svg.Radio-icon .Radio-border": {
|
|
25
|
+
borderColor: (a = o.theme.vars) == null ? void 0 : a.palette.warning.main
|
|
26
|
+
},
|
|
27
|
+
"&.Mui-disabled svg.Radio-icon .Radio-border": {
|
|
28
|
+
borderColor: (d = o.theme.vars) == null ? void 0 : d.palette.primary.lighter
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
R as radioStyles
|
|
37
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { colors as e } from "../colors.js";
|
|
2
|
+
const t = {
|
|
3
|
+
MuiSlider: {
|
|
4
|
+
styleOverrides: {
|
|
5
|
+
rail: ({ theme: r }) => {
|
|
6
|
+
var o;
|
|
7
|
+
return {
|
|
8
|
+
backgroundColor: (o = r.vars) == null ? void 0 : o.palette.background.secondary,
|
|
9
|
+
opacity: 1,
|
|
10
|
+
borderRadius: r.spacing(3),
|
|
11
|
+
height: "8px"
|
|
12
|
+
};
|
|
13
|
+
},
|
|
14
|
+
track: ({ theme: r }) => ({
|
|
15
|
+
borderRadius: r.spacing(3),
|
|
16
|
+
height: "6px"
|
|
17
|
+
}),
|
|
18
|
+
thumb: () => ({
|
|
19
|
+
borderColor: "currentcolor",
|
|
20
|
+
borderWidth: "4px",
|
|
21
|
+
borderStyle: "solid",
|
|
22
|
+
background: "white",
|
|
23
|
+
boxShadow: "none",
|
|
24
|
+
height: "18px",
|
|
25
|
+
width: "18px",
|
|
26
|
+
transition: "box-shadow 0.2s ease",
|
|
27
|
+
// Smooth movement between steps
|
|
28
|
+
"&:hover, &.Mui-focusVisible": {
|
|
29
|
+
boxShadow: "0px 0px 8px 8px rgba(25, 118, 210, 0.26)"
|
|
30
|
+
// Blue circle with 16% opacity
|
|
31
|
+
},
|
|
32
|
+
"&:active": {
|
|
33
|
+
boxShadow: "0px 0px 8px 8px rgba(25, 118, 210, 0.26)",
|
|
34
|
+
// Blue circle with 16% opacity
|
|
35
|
+
transition: "box-shadow 0.2s ease"
|
|
36
|
+
// Disable position transition while actively dragging
|
|
37
|
+
}
|
|
38
|
+
}),
|
|
39
|
+
valueLabel: () => ({
|
|
40
|
+
background: "white",
|
|
41
|
+
color: e.neutral.black,
|
|
42
|
+
boxShadow: "0px 4px 6px -2px rgba(16, 24, 40, 0.03), 0px 12px 16px -4px rgba(16, 24, 40, 0.08)",
|
|
43
|
+
borderColor: e.secondary.grey[20],
|
|
44
|
+
borderStyle: "solid",
|
|
45
|
+
borderWidth: "1px",
|
|
46
|
+
fontWeight: 600,
|
|
47
|
+
fontSize: "12px",
|
|
48
|
+
borderRadius: 4
|
|
49
|
+
})
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
export {
|
|
54
|
+
t as sliderStyles
|
|
55
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
const d = {
|
|
2
|
+
MuiSwitch: {
|
|
3
|
+
styleOverrides: {
|
|
4
|
+
root: (t) => {
|
|
5
|
+
var e, r, o, c;
|
|
6
|
+
let i = t.ownerState.color;
|
|
7
|
+
(!i || i === "default") && (i = "primary");
|
|
8
|
+
const a = t.theme.palette[i];
|
|
9
|
+
return {
|
|
10
|
+
width: 48,
|
|
11
|
+
height: 32,
|
|
12
|
+
padding: 6,
|
|
13
|
+
"& .MuiSwitch-switchBase": {
|
|
14
|
+
padding: 6,
|
|
15
|
+
margin: 2,
|
|
16
|
+
transitionDuration: "300ms",
|
|
17
|
+
"&.Mui-checked": {
|
|
18
|
+
transform: "translateX(16px)",
|
|
19
|
+
color: "#fff",
|
|
20
|
+
"& + .MuiSwitch-track": {
|
|
21
|
+
backgroundColor: (a == null ? void 0 : a.main) ?? ((e = t.theme.vars) == null ? void 0 : e.palette.primary.main),
|
|
22
|
+
opacity: 1,
|
|
23
|
+
border: 0
|
|
24
|
+
},
|
|
25
|
+
"&.Mui-disabled + .MuiSwitch-track": {
|
|
26
|
+
opacity: 0.5
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"&.Mui-focusVisible .MuiSwitch-thumb": {
|
|
30
|
+
color: (r = t.theme.vars) == null ? void 0 : r.palette.background.default,
|
|
31
|
+
boxShadow: "0 0 0 8px rgba(0, 0, 0, 0.16)"
|
|
32
|
+
},
|
|
33
|
+
"&.Mui-disabled .MuiSwitch-thumb": {
|
|
34
|
+
color: (o = t.theme.vars) == null ? void 0 : o.palette.background.default
|
|
35
|
+
},
|
|
36
|
+
"&.Mui-disabled + .MuiSwitch-track": {
|
|
37
|
+
opacity: 0.7,
|
|
38
|
+
...t.theme.applyStyles("dark", {
|
|
39
|
+
opacity: 0.3
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"& .MuiSwitch-thumb": {
|
|
44
|
+
boxSizing: "border-box",
|
|
45
|
+
width: 16,
|
|
46
|
+
height: 16
|
|
47
|
+
},
|
|
48
|
+
"& .MuiSwitch-track": {
|
|
49
|
+
borderRadius: 13,
|
|
50
|
+
backgroundColor: (c = t.theme.vars) == null ? void 0 : c.palette.background.secondary,
|
|
51
|
+
opacity: 1,
|
|
52
|
+
transition: t.theme.transitions.create(["background-color"], {
|
|
53
|
+
duration: 500
|
|
54
|
+
})
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
export {
|
|
62
|
+
d as switchStyles
|
|
63
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { colors as o } from "../colors.js";
|
|
2
|
+
const i = {
|
|
3
|
+
MuiTab: {
|
|
4
|
+
styleOverrides: {
|
|
5
|
+
root: ({ theme: t }) => ({
|
|
6
|
+
color: t.vars.palette.text.primary,
|
|
7
|
+
borderRadius: 0,
|
|
8
|
+
padding: "0 12px 0 0px",
|
|
9
|
+
marginRight: t.spacing(6),
|
|
10
|
+
textTransform: "initial",
|
|
11
|
+
display: "flex",
|
|
12
|
+
alignItems: "center",
|
|
13
|
+
flexDirection: "row",
|
|
14
|
+
gap: 20,
|
|
15
|
+
justifyContent: "flex-start",
|
|
16
|
+
opacity: 0.2,
|
|
17
|
+
"&.Mui-selected": {
|
|
18
|
+
color: t.vars.palette.text.primary,
|
|
19
|
+
opacity: 1
|
|
20
|
+
},
|
|
21
|
+
".MuiTabs-numbered &": {
|
|
22
|
+
"&::before": {
|
|
23
|
+
fontFamily: t.typography.mono.fontFamily,
|
|
24
|
+
content: 'counter(MuiTab-root, decimal-leading-zero) "."',
|
|
25
|
+
counterIncrement: "MuiTab-root",
|
|
26
|
+
fontSize: t.typography.caption.fontSize,
|
|
27
|
+
color: t.vars.palette.text.primary,
|
|
28
|
+
padding: t.spacing(0.5, 1),
|
|
29
|
+
display: "flex",
|
|
30
|
+
alignItems: "center"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}, a = {
|
|
37
|
+
MuiTabs: {
|
|
38
|
+
styleOverrides: {
|
|
39
|
+
root: () => ({}),
|
|
40
|
+
list: () => ({
|
|
41
|
+
counterReset: "MuiTab-root"
|
|
42
|
+
}),
|
|
43
|
+
indicator: (t) => ({
|
|
44
|
+
backgroundColor: o.primary.beige[10],
|
|
45
|
+
height: "5px",
|
|
46
|
+
top: 0,
|
|
47
|
+
bottom: "auto",
|
|
48
|
+
borderRadius: t.theme.spacing(2),
|
|
49
|
+
"&:after": {
|
|
50
|
+
content: '""',
|
|
51
|
+
position: "absolute",
|
|
52
|
+
left: 0,
|
|
53
|
+
right: "auto",
|
|
54
|
+
top: 0,
|
|
55
|
+
bottom: 0,
|
|
56
|
+
margin: "auto",
|
|
57
|
+
width: "28%",
|
|
58
|
+
height: "100%",
|
|
59
|
+
borderRadius: t.theme.spacing(2),
|
|
60
|
+
backgroundColor: o.primary.coral[100],
|
|
61
|
+
transition: "width 0.3s ease"
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
export {
|
|
68
|
+
i as tabStyles,
|
|
69
|
+
a as tabsStyles
|
|
70
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
MuiTooltip: {
|
|
3
|
+
styleOverrides: {
|
|
4
|
+
tooltip: (t) => ({
|
|
5
|
+
backgroundColor: t.theme.vars.palette.background.brownBold,
|
|
6
|
+
borderRadius: t.theme.spacing(3),
|
|
7
|
+
p: 1,
|
|
8
|
+
textAlign: "center",
|
|
9
|
+
color: t.theme.vars.palette.text.contrastText
|
|
10
|
+
}),
|
|
11
|
+
arrow: (t) => ({
|
|
12
|
+
color: t.theme.vars.palette.background.brownBold
|
|
13
|
+
})
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
e as tooltipStyles
|
|
19
|
+
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { primitives as t } from "./colors.js";
|
|
2
|
+
const l = (a) => `${a}px`, y = (a, i) => Math.round(a * i) / 100, n = (a, i, f) => ({
|
|
3
|
+
fontSize: l(a),
|
|
4
|
+
lineHeight: l(i),
|
|
5
|
+
...f !== void 0 && {
|
|
6
|
+
letterSpacing: l(y(a, f))
|
|
7
|
+
}
|
|
8
|
+
}), o = {
|
|
9
|
+
displayXL: {
|
|
10
|
+
fontFamily: t.fontFamily.serif,
|
|
11
|
+
...n(96, 90, -1),
|
|
12
|
+
fontWeight: "bold"
|
|
13
|
+
},
|
|
14
|
+
displayL: {
|
|
15
|
+
fontFamily: t.fontFamily.serif,
|
|
16
|
+
...n(68, 68, -1),
|
|
17
|
+
fontWeight: "bold"
|
|
18
|
+
},
|
|
19
|
+
displayM: {
|
|
20
|
+
fontFamily: t.fontFamily.serif,
|
|
21
|
+
...n(48, 48, -1),
|
|
22
|
+
fontWeight: "bold"
|
|
23
|
+
},
|
|
24
|
+
displayS: {
|
|
25
|
+
fontFamily: t.fontFamily.serif,
|
|
26
|
+
...n(42, 42 * 1.1, -1),
|
|
27
|
+
fontWeight: "bold"
|
|
28
|
+
},
|
|
29
|
+
displayXS: {
|
|
30
|
+
fontFamily: t.fontFamily.serif,
|
|
31
|
+
...n(32, 32 * 1.1, -1),
|
|
32
|
+
fontWeight: "bold"
|
|
33
|
+
},
|
|
34
|
+
headingL: {
|
|
35
|
+
fontFamily: t.fontFamily.sans,
|
|
36
|
+
...n(32, 38),
|
|
37
|
+
fontWeight: "bold"
|
|
38
|
+
},
|
|
39
|
+
headingM: {
|
|
40
|
+
fontFamily: t.fontFamily.sans,
|
|
41
|
+
...n(24, 32),
|
|
42
|
+
fontWeight: "bold"
|
|
43
|
+
},
|
|
44
|
+
headingS: {
|
|
45
|
+
fontFamily: t.fontFamily.sans,
|
|
46
|
+
...n(18, 22, 1),
|
|
47
|
+
fontWeight: "bold"
|
|
48
|
+
},
|
|
49
|
+
textBody: {
|
|
50
|
+
fontFamily: t.fontFamily.sans,
|
|
51
|
+
...n(24, 32, 1)
|
|
52
|
+
},
|
|
53
|
+
textXL: {
|
|
54
|
+
fontFamily: t.fontFamily.sans,
|
|
55
|
+
...n(20, 26, 1)
|
|
56
|
+
},
|
|
57
|
+
textL: {
|
|
58
|
+
fontFamily: t.fontFamily.sans,
|
|
59
|
+
...n(17, 17 * 1.15)
|
|
60
|
+
},
|
|
61
|
+
textM: {
|
|
62
|
+
fontFamily: t.fontFamily.sans,
|
|
63
|
+
...n(14, 20, 1)
|
|
64
|
+
},
|
|
65
|
+
textS: {
|
|
66
|
+
fontFamily: t.fontFamily.sans,
|
|
67
|
+
...n(12, 12 * 1.35, 1)
|
|
68
|
+
},
|
|
69
|
+
footnote: {
|
|
70
|
+
fontFamily: t.fontFamily.mono,
|
|
71
|
+
...n(12, 13.2, 0.25)
|
|
72
|
+
},
|
|
73
|
+
mono: {
|
|
74
|
+
fontFamily: t.fontFamily.mono,
|
|
75
|
+
...n(12, 22, 0.1)
|
|
76
|
+
},
|
|
77
|
+
button: {
|
|
78
|
+
fontFamily: t.fontFamily.sans,
|
|
79
|
+
...n(17, 16),
|
|
80
|
+
fontWeight: 500,
|
|
81
|
+
textTransform: "none"
|
|
82
|
+
},
|
|
83
|
+
buttonSmall: {
|
|
84
|
+
fontFamily: t.fontFamily.sans,
|
|
85
|
+
...n(15, 16),
|
|
86
|
+
fontWeight: 500,
|
|
87
|
+
textTransform: "none"
|
|
88
|
+
}
|
|
89
|
+
}, s = {
|
|
90
|
+
fontFamily: t.fontFamily.sans,
|
|
91
|
+
htmlFontSize: 14,
|
|
92
|
+
...o,
|
|
93
|
+
h1: o.headingL,
|
|
94
|
+
h2: o.headingM,
|
|
95
|
+
h3: o.headingS,
|
|
96
|
+
h4: {
|
|
97
|
+
...o.textBody,
|
|
98
|
+
fontWeight: 500
|
|
99
|
+
},
|
|
100
|
+
h5: {
|
|
101
|
+
...o.textXL,
|
|
102
|
+
fontWeight: 500
|
|
103
|
+
},
|
|
104
|
+
h6: {
|
|
105
|
+
...o.textL,
|
|
106
|
+
fontWeight: 500
|
|
107
|
+
},
|
|
108
|
+
body1: o.textL,
|
|
109
|
+
body2: o.textM
|
|
110
|
+
}, m = {
|
|
111
|
+
MuiTypography: {
|
|
112
|
+
defaultProps: {
|
|
113
|
+
variantMapping: {
|
|
114
|
+
displayXL: "h1",
|
|
115
|
+
displayL: "h2",
|
|
116
|
+
displayM: "h3",
|
|
117
|
+
displayS: "h4",
|
|
118
|
+
displayXS: "h5",
|
|
119
|
+
headingL: "h1",
|
|
120
|
+
headingM: "h2",
|
|
121
|
+
headingS: "h3",
|
|
122
|
+
textBody: "p",
|
|
123
|
+
textXL: "p",
|
|
124
|
+
textL: "p",
|
|
125
|
+
textM: "p",
|
|
126
|
+
textS: "p",
|
|
127
|
+
footnote: "span",
|
|
128
|
+
mono: "span",
|
|
129
|
+
button: "span",
|
|
130
|
+
buttonSmall: "span"
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
export {
|
|
136
|
+
l as toPx,
|
|
137
|
+
s as typography,
|
|
138
|
+
m as typographyStyles
|
|
139
|
+
};
|
package/dist/themes.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
spesiaTheme: {
|
|
3
|
+
name: "spesiaTheme",
|
|
4
|
+
primary: "#2e8898",
|
|
5
|
+
transparentPrimary: "rgb(88, 134, 150, 0.3)",
|
|
6
|
+
secondary: "#f5e9e8",
|
|
7
|
+
transparentSecondary: "rgb(210, 178, 162, 0.3)",
|
|
8
|
+
success: "#00f67e",
|
|
9
|
+
transparentSuccess: "#edf4ec",
|
|
10
|
+
inverted: "#F3EBEA",
|
|
11
|
+
contrastText: "#fff",
|
|
12
|
+
background: {
|
|
13
|
+
default: "#ffffff",
|
|
14
|
+
home: "#cdd2d8"
|
|
15
|
+
},
|
|
16
|
+
progress: {
|
|
17
|
+
bar: { xs: "#ccc", md: "#ffffff" },
|
|
18
|
+
steps: ["#498898", "#5c98a7", "#6ea2ae", "#7eaab4", "#98bac2"]
|
|
19
|
+
},
|
|
20
|
+
nav: {
|
|
21
|
+
home: {
|
|
22
|
+
background: "#cdd2d8",
|
|
23
|
+
contrastText: "#000"
|
|
24
|
+
},
|
|
25
|
+
default: {
|
|
26
|
+
background: "#588696",
|
|
27
|
+
contrastText: "#000"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}, a = "spesiaTheme";
|
|
32
|
+
export {
|
|
33
|
+
a as defaultTheme,
|
|
34
|
+
e as themes
|
|
35
|
+
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.
|
|
6
|
+
"version": "1.9.7",
|
|
7
7
|
"description": "The Spesia UI toolkit for React",
|
|
8
8
|
"files": [
|
|
9
9
|
"dist"
|
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
".": {
|
|
15
15
|
"types": "./dist/index.d.ts",
|
|
16
16
|
"import": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./client": {
|
|
19
|
+
"types": "./dist/client.d.ts",
|
|
20
|
+
"import": "./dist/client.js"
|
|
17
21
|
}
|
|
18
22
|
},
|
|
19
23
|
"type": "module",
|
|
@@ -92,6 +96,7 @@
|
|
|
92
96
|
"homepage": "https://ui.test.spesia.is",
|
|
93
97
|
"scripts": {
|
|
94
98
|
"build": "tsc && vite build",
|
|
99
|
+
"build:analyze": "vite build && npx vite-bundle-visualizer",
|
|
95
100
|
"test:ci": "vitest run",
|
|
96
101
|
"test:watch": "vitest",
|
|
97
102
|
"test-storybook": "test-storybook",
|
|
File without changes
|