@caspeco/casper-ui-library 4.0.0 → 4.1.0
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/components/combobox/combobox-button.d.ts +1 -1
- package/dist/components/combobox/combobox-button.d.ts.map +1 -1
- package/dist/components/combobox/combobox-button.js +85 -69
- package/dist/components/combobox/combobox-item.d.ts +2 -1
- package/dist/components/combobox/combobox-item.d.ts.map +1 -1
- package/dist/components/combobox/combobox-item.js +10 -10
- package/dist/components/combobox/combobox-menu.js +68 -69
- package/dist/components/combobox/combobox.d.ts.map +1 -1
- package/dist/components/combobox/combobox.js +120 -123
- package/dist/components/combobox/types.d.ts +2 -0
- package/dist/components/combobox/types.d.ts.map +1 -1
- package/dist/components/date-picker/base-date-picker.js +175 -176
- package/dist/components/date-picker/date-picker-header.js +10 -10
- package/dist/components/date-picker/helper.js +9 -9
- package/dist/components/image-upload/image-cropper.js +112 -113
- package/dist/components/image-upload/image-upload-dropzone.js +35 -36
- package/dist/components/menu/menu-group.js +44 -45
- package/dist/components/segmented-control/segmented-control.js +29 -29
- package/dist/components/table/table-cell.js +25 -26
- package/dist/components/table/table-header-dropdown.js +60 -60
- package/dist/components/table/table-header-row.js +19 -20
- package/dist/components/table/table-toolbar.js +63 -64
- package/dist/components/table/use-controllable-state.js +7 -7
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -1
- package/dist/node_modules/@tanstack/table-core/build/lib/index.js +41 -41
- package/dist/node_modules/date-fns/addDays.js +7 -7
- package/dist/node_modules/date-fns/addMonths.js +13 -13
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +11 -11
- package/dist/node_modules/date-fns/endOfDay.js +6 -6
- package/dist/node_modules/date-fns/endOfMonth.js +6 -6
- package/dist/node_modules/date-fns/format.js +46 -47
- package/dist/node_modules/date-fns/getDayOfYear.js +8 -8
- package/dist/node_modules/date-fns/getISOWeek.js +9 -9
- package/dist/node_modules/date-fns/getISOWeekYear.js +10 -10
- package/dist/node_modules/date-fns/getWeek.js +9 -9
- package/dist/node_modules/date-fns/getWeekYear.js +13 -14
- package/dist/node_modules/date-fns/isSameDay.js +9 -9
- package/dist/node_modules/date-fns/isSameMonth.js +9 -9
- package/dist/node_modules/date-fns/isSameWeek.js +8 -8
- package/dist/node_modules/date-fns/isSameYear.js +9 -9
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +12 -12
- package/dist/node_modules/date-fns/locale/da/_lib/formatDistance.js +4 -4
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +3 -3
- package/dist/node_modules/date-fns/locale/es/_lib/formatDistance.js +4 -4
- package/dist/node_modules/date-fns/locale/et/_lib/formatDistance.js +6 -6
- package/dist/node_modules/date-fns/locale/fi/_lib/formatDistance.js +17 -17
- package/dist/node_modules/date-fns/locale/lt/_lib/formatDistance.js +47 -47
- package/dist/node_modules/date-fns/locale/lv/_lib/formatDistance.js +11 -11
- package/dist/node_modules/date-fns/locale/nb/_lib/formatDistance.js +3 -3
- package/dist/node_modules/date-fns/locale/nl/_lib/formatDistance.js +4 -4
- package/dist/node_modules/date-fns/locale/sv/_lib/formatDistance.js +5 -5
- package/dist/node_modules/date-fns/startOfDay.js +6 -6
- package/dist/node_modules/date-fns/startOfMonth.js +6 -6
- package/dist/node_modules/date-fns/startOfWeek.js +7 -8
- package/dist/node_modules/date-fns/startOfWeekYear.js +9 -10
- package/dist/node_modules/date-fns/startOfYear.js +5 -5
- package/dist/theme/theme-config/components/modal-theme.js +13 -15
- package/dist/theme/theme-config/components/select-theme.js +15 -19
- package/package.json +3 -3
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { getDefaultOptions as
|
|
2
|
-
import { constructFrom as
|
|
3
|
-
import { getWeekYear as
|
|
4
|
-
import { startOfWeek as
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return t.setFullYear(m, 0, l), t.setHours(0, 0, 0, 0), D(t, e);
|
|
1
|
+
import { getDefaultOptions as n } from "./_lib/defaultOptions.js";
|
|
2
|
+
import { constructFrom as i } from "./constructFrom.js";
|
|
3
|
+
import { getWeekYear as f } from "./getWeekYear.js";
|
|
4
|
+
import { startOfWeek as c } from "./startOfWeek.js";
|
|
5
|
+
function D(r, t) {
|
|
6
|
+
const a = n(), o = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? a.firstWeekContainsDate ?? a.locale?.options?.firstWeekContainsDate ?? 1, s = f(r, t), e = i(t?.in || r, 0);
|
|
7
|
+
return e.setFullYear(s, 0, o), e.setHours(0, 0, 0, 0), c(e, t);
|
|
9
8
|
}
|
|
10
9
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
D as default,
|
|
11
|
+
D as startOfWeekYear
|
|
13
12
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { toDate as a } from "./toDate.js";
|
|
2
|
-
function
|
|
3
|
-
const
|
|
4
|
-
return
|
|
2
|
+
function s(e, r) {
|
|
3
|
+
const t = a(e, r?.in);
|
|
4
|
+
return t.setFullYear(t.getFullYear(), 0, 1), t.setHours(0, 0, 0, 0), t;
|
|
5
5
|
}
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
s as default,
|
|
8
|
+
s as startOfYear
|
|
9
9
|
};
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { createMultiStyleConfigHelpers as
|
|
2
|
-
import { ThemeColorToken as o, ThemeRadiusToken as a, ThemeFontToken as r, ThemeFontSizeToken as
|
|
1
|
+
import { createMultiStyleConfigHelpers as i } from "@chakra-ui/react";
|
|
2
|
+
import { ThemeColorToken as o, ThemeRadiusToken as a, ThemeFontToken as r, ThemeFontSizeToken as d } from "../theme-tokens.js";
|
|
3
3
|
import { buttonConfig as t } from "./button-theme.js";
|
|
4
|
-
import { modalAnatomy as
|
|
5
|
-
const { definePartsStyle: e, defineMultiStyleConfig:
|
|
6
|
-
var i;
|
|
7
|
-
const x = e({
|
|
4
|
+
import { modalAnatomy as n } from "../../../packages/casper-ui-library/node_modules/@chakra-ui/anatomy/dist/esm/components.js";
|
|
5
|
+
const { definePartsStyle: e, defineMultiStyleConfig: m } = i(n.keys), l = e({
|
|
8
6
|
overlay: {
|
|
9
7
|
// Non white label-overridable color based on black, always
|
|
10
8
|
bg: "rgba(0, 0, 0, 0.32)"
|
|
@@ -12,7 +10,7 @@ const x = e({
|
|
|
12
10
|
header: {
|
|
13
11
|
bg: o.Surface,
|
|
14
12
|
position: "relative",
|
|
15
|
-
fontSize:
|
|
13
|
+
fontSize: d.XLarge,
|
|
16
14
|
fontFamily: r.SubHeader,
|
|
17
15
|
color: o.OnSurfaceHeader,
|
|
18
16
|
fontWeight: "medium",
|
|
@@ -56,9 +54,9 @@ const x = e({
|
|
|
56
54
|
top: "unset",
|
|
57
55
|
alignSelf: "flex-start",
|
|
58
56
|
...t.baseStyle,
|
|
59
|
-
...
|
|
57
|
+
...t.variants?.secondary
|
|
60
58
|
}
|
|
61
|
-
}),
|
|
59
|
+
}), x = {
|
|
62
60
|
sm: e({
|
|
63
61
|
dialog: {
|
|
64
62
|
maxW: "384px"
|
|
@@ -96,7 +94,7 @@ const x = e({
|
|
|
96
94
|
borderRadius: 0
|
|
97
95
|
}
|
|
98
96
|
})
|
|
99
|
-
},
|
|
97
|
+
}, s = {
|
|
100
98
|
/** Custom variant appearing as a mobile app "bottom sheet",
|
|
101
99
|
* filling 100% of view width and max 100% - 88px view height. */
|
|
102
100
|
bottomSheet: e({
|
|
@@ -113,11 +111,11 @@ const x = e({
|
|
|
113
111
|
alignItems: "flex-end"
|
|
114
112
|
}
|
|
115
113
|
})
|
|
116
|
-
},
|
|
117
|
-
baseStyle:
|
|
118
|
-
variants:
|
|
119
|
-
sizes:
|
|
114
|
+
}, b = m({
|
|
115
|
+
baseStyle: l,
|
|
116
|
+
variants: s,
|
|
117
|
+
sizes: x
|
|
120
118
|
});
|
|
121
119
|
export {
|
|
122
|
-
|
|
120
|
+
b as modalConfig
|
|
123
121
|
};
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
import { createMultiStyleConfigHelpers as
|
|
2
|
-
import { ThemeColorToken as o, ThemeFontSizeToken as
|
|
1
|
+
import { createMultiStyleConfigHelpers as i } from "@chakra-ui/react";
|
|
2
|
+
import { ThemeColorToken as o, ThemeFontSizeToken as r } from "../theme-tokens.js";
|
|
3
3
|
import { inputConfig as e } from "./input-theme.js";
|
|
4
|
-
import { selectAnatomy as
|
|
5
|
-
const { defineMultiStyleConfig:
|
|
6
|
-
var t, n;
|
|
7
|
-
const l = a({
|
|
4
|
+
import { selectAnatomy as a } from "../../../packages/casper-ui-library/node_modules/@chakra-ui/anatomy/dist/esm/components.js";
|
|
5
|
+
const { defineMultiStyleConfig: l, definePartsStyle: t } = i(a.keys), n = t({
|
|
8
6
|
// Apply input theme, as Select and Input share most of their appearances
|
|
9
|
-
...
|
|
7
|
+
...e.variants?.outline,
|
|
10
8
|
field: {
|
|
11
9
|
// Apply input theme, as Select and Input share most of their appearances
|
|
12
|
-
...
|
|
10
|
+
...e.variants?.outline.field,
|
|
13
11
|
// Give nested option elements color styles to match the select element.
|
|
14
12
|
// Only applicable to Microsoft desktop browsers, will be ignored by browsers that use their own native styles.
|
|
15
13
|
"> option, > optgroup": {
|
|
@@ -18,21 +16,19 @@ const l = a({
|
|
|
18
16
|
}
|
|
19
17
|
},
|
|
20
18
|
icon: {
|
|
21
|
-
fontSize:
|
|
19
|
+
fontSize: r.Small,
|
|
22
20
|
color: o.OnSurface,
|
|
23
21
|
_disabled: {
|
|
24
22
|
opacity: 1,
|
|
25
23
|
color: o.OnSurfaceSubdued
|
|
26
24
|
}
|
|
27
25
|
}
|
|
28
|
-
})
|
|
29
|
-
var i, r;
|
|
30
|
-
const p = a({
|
|
26
|
+
}), c = t({
|
|
31
27
|
// Apply input theme, as Select and Input share most of their appearances
|
|
32
|
-
...
|
|
28
|
+
...e.variants?.ghost,
|
|
33
29
|
field: {
|
|
34
30
|
// Apply input theme, as Select and Input share most of their appearances
|
|
35
|
-
...
|
|
31
|
+
...e.variants?.ghost.field,
|
|
36
32
|
// Give nested option elements color styles to match the select element.
|
|
37
33
|
// Only applicable to Microsoft desktop browsers, will be ignored by browsers that use their own native styles.
|
|
38
34
|
"> option, > optgroup": {
|
|
@@ -41,17 +37,17 @@ const p = a({
|
|
|
41
37
|
}
|
|
42
38
|
},
|
|
43
39
|
icon: {
|
|
44
|
-
...
|
|
40
|
+
...n.icon
|
|
45
41
|
}
|
|
46
|
-
}),
|
|
42
|
+
}), S = l({
|
|
47
43
|
defaultProps: {
|
|
48
44
|
variant: "outline"
|
|
49
45
|
},
|
|
50
46
|
variants: {
|
|
51
|
-
outline:
|
|
52
|
-
ghost:
|
|
47
|
+
outline: n,
|
|
48
|
+
ghost: c
|
|
53
49
|
}
|
|
54
50
|
});
|
|
55
51
|
export {
|
|
56
|
-
|
|
52
|
+
S as selectConfig
|
|
57
53
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@caspeco/casper-ui-library",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"prettier": "@caspeco/prettier-config",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@testing-library/jest-dom": "^6.7.0",
|
|
30
30
|
"@testing-library/react": "^16.3.0",
|
|
31
31
|
"@types/jest": "^30.0.0",
|
|
32
|
-
"@types/node": "^24.
|
|
32
|
+
"@types/node": "^24.3.0",
|
|
33
33
|
"@types/react": "^18.3.12",
|
|
34
34
|
"@types/react-dom": "^18.3.1",
|
|
35
35
|
"@vitejs/plugin-react-swc": "^4.0.0",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"tsc-alias": "^1.8.16",
|
|
42
42
|
"typescript": "~5.9.2",
|
|
43
43
|
"typescript-eslint": "^8.39.1",
|
|
44
|
-
"vite": "^
|
|
44
|
+
"vite": "^7.1.2",
|
|
45
45
|
"vite-plugin-dts": "^4.5.4",
|
|
46
46
|
"vite-tsconfig-paths": "^5.1.4",
|
|
47
47
|
"vitest": "^3.2.4"
|