@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.
Files changed (59) hide show
  1. package/dist/components/combobox/combobox-button.d.ts +1 -1
  2. package/dist/components/combobox/combobox-button.d.ts.map +1 -1
  3. package/dist/components/combobox/combobox-button.js +85 -69
  4. package/dist/components/combobox/combobox-item.d.ts +2 -1
  5. package/dist/components/combobox/combobox-item.d.ts.map +1 -1
  6. package/dist/components/combobox/combobox-item.js +10 -10
  7. package/dist/components/combobox/combobox-menu.js +68 -69
  8. package/dist/components/combobox/combobox.d.ts.map +1 -1
  9. package/dist/components/combobox/combobox.js +120 -123
  10. package/dist/components/combobox/types.d.ts +2 -0
  11. package/dist/components/combobox/types.d.ts.map +1 -1
  12. package/dist/components/date-picker/base-date-picker.js +175 -176
  13. package/dist/components/date-picker/date-picker-header.js +10 -10
  14. package/dist/components/date-picker/helper.js +9 -9
  15. package/dist/components/image-upload/image-cropper.js +112 -113
  16. package/dist/components/image-upload/image-upload-dropzone.js +35 -36
  17. package/dist/components/menu/menu-group.js +44 -45
  18. package/dist/components/segmented-control/segmented-control.js +29 -29
  19. package/dist/components/table/table-cell.js +25 -26
  20. package/dist/components/table/table-header-dropdown.js +60 -60
  21. package/dist/components/table/table-header-row.js +19 -20
  22. package/dist/components/table/table-toolbar.js +63 -64
  23. package/dist/components/table/use-controllable-state.js +7 -7
  24. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -1
  25. package/dist/node_modules/@tanstack/table-core/build/lib/index.js +41 -41
  26. package/dist/node_modules/date-fns/addDays.js +7 -7
  27. package/dist/node_modules/date-fns/addMonths.js +13 -13
  28. package/dist/node_modules/date-fns/differenceInCalendarDays.js +11 -11
  29. package/dist/node_modules/date-fns/endOfDay.js +6 -6
  30. package/dist/node_modules/date-fns/endOfMonth.js +6 -6
  31. package/dist/node_modules/date-fns/format.js +46 -47
  32. package/dist/node_modules/date-fns/getDayOfYear.js +8 -8
  33. package/dist/node_modules/date-fns/getISOWeek.js +9 -9
  34. package/dist/node_modules/date-fns/getISOWeekYear.js +10 -10
  35. package/dist/node_modules/date-fns/getWeek.js +9 -9
  36. package/dist/node_modules/date-fns/getWeekYear.js +13 -14
  37. package/dist/node_modules/date-fns/isSameDay.js +9 -9
  38. package/dist/node_modules/date-fns/isSameMonth.js +9 -9
  39. package/dist/node_modules/date-fns/isSameWeek.js +8 -8
  40. package/dist/node_modules/date-fns/isSameYear.js +9 -9
  41. package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +12 -12
  42. package/dist/node_modules/date-fns/locale/da/_lib/formatDistance.js +4 -4
  43. package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +3 -3
  44. package/dist/node_modules/date-fns/locale/es/_lib/formatDistance.js +4 -4
  45. package/dist/node_modules/date-fns/locale/et/_lib/formatDistance.js +6 -6
  46. package/dist/node_modules/date-fns/locale/fi/_lib/formatDistance.js +17 -17
  47. package/dist/node_modules/date-fns/locale/lt/_lib/formatDistance.js +47 -47
  48. package/dist/node_modules/date-fns/locale/lv/_lib/formatDistance.js +11 -11
  49. package/dist/node_modules/date-fns/locale/nb/_lib/formatDistance.js +3 -3
  50. package/dist/node_modules/date-fns/locale/nl/_lib/formatDistance.js +4 -4
  51. package/dist/node_modules/date-fns/locale/sv/_lib/formatDistance.js +5 -5
  52. package/dist/node_modules/date-fns/startOfDay.js +6 -6
  53. package/dist/node_modules/date-fns/startOfMonth.js +6 -6
  54. package/dist/node_modules/date-fns/startOfWeek.js +7 -8
  55. package/dist/node_modules/date-fns/startOfWeekYear.js +9 -10
  56. package/dist/node_modules/date-fns/startOfYear.js +5 -5
  57. package/dist/theme/theme-config/components/modal-theme.js +13 -15
  58. package/dist/theme/theme-config/components/select-theme.js +15 -19
  59. package/package.json +3 -3
@@ -1,13 +1,12 @@
1
- import { getDefaultOptions as W } from "./_lib/defaultOptions.js";
2
- import { constructFrom as n } from "./constructFrom.js";
3
- import { getWeekYear as u } from "./getWeekYear.js";
4
- import { startOfWeek as D } from "./startOfWeek.js";
5
- function g(r, e) {
6
- var f, s, c, k;
7
- const a = W(), l = (e == null ? void 0 : e.firstWeekContainsDate) ?? ((s = (f = e == null ? void 0 : e.locale) == null ? void 0 : f.options) == null ? void 0 : s.firstWeekContainsDate) ?? a.firstWeekContainsDate ?? ((k = (c = a.locale) == null ? void 0 : c.options) == null ? void 0 : k.firstWeekContainsDate) ?? 1, m = u(r, e), t = n((e == null ? void 0 : e.in) || r, 0);
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
- g as default,
12
- g as startOfWeekYear
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 l(t, r) {
3
- const e = a(t, r == null ? void 0 : r.in);
4
- return e.setFullYear(e.getFullYear(), 0, 1), e.setHours(0, 0, 0, 0), e;
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
- l as default,
8
- l as startOfYear
7
+ s as default,
8
+ s as startOfYear
9
9
  };
@@ -1,10 +1,8 @@
1
- import { createMultiStyleConfigHelpers as d } from "@chakra-ui/react";
2
- import { ThemeColorToken as o, ThemeRadiusToken as a, ThemeFontToken as r, ThemeFontSizeToken as n } from "../theme-tokens.js";
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 m } from "../../../packages/casper-ui-library/node_modules/@chakra-ui/anatomy/dist/esm/components.js";
5
- const { definePartsStyle: e, defineMultiStyleConfig: l } = d(m.keys);
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: n.XLarge,
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
- ...(i = t.variants) == null ? void 0 : i.secondary
57
+ ...t.variants?.secondary
60
58
  }
61
- }), s = {
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
- }, g = {
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
- }, h = l({
117
- baseStyle: x,
118
- variants: g,
119
- sizes: s
114
+ }, b = m({
115
+ baseStyle: l,
116
+ variants: s,
117
+ sizes: x
120
118
  });
121
119
  export {
122
- h as modalConfig
120
+ b as modalConfig
123
121
  };
@@ -1,15 +1,13 @@
1
- import { createMultiStyleConfigHelpers as c } from "@chakra-ui/react";
2
- import { ThemeColorToken as o, ThemeFontSizeToken as f } from "../theme-tokens.js";
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 s } from "../../../packages/casper-ui-library/node_modules/@chakra-ui/anatomy/dist/esm/components.js";
5
- const { defineMultiStyleConfig: u, definePartsStyle: a } = c(s.keys);
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
- ...(t = e.variants) == null ? void 0 : t.outline,
7
+ ...e.variants?.outline,
10
8
  field: {
11
9
  // Apply input theme, as Select and Input share most of their appearances
12
- ...(n = e.variants) == null ? void 0 : n.outline.field,
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: f.Small,
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
- ...(i = e.variants) == null ? void 0 : i.ghost,
28
+ ...e.variants?.ghost,
33
29
  field: {
34
30
  // Apply input theme, as Select and Input share most of their appearances
35
- ...(r = e.variants) == null ? void 0 : r.ghost.field,
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
- ...l.icon
40
+ ...n.icon
45
41
  }
46
- }), y = u({
42
+ }), S = l({
47
43
  defaultProps: {
48
44
  variant: "outline"
49
45
  },
50
46
  variants: {
51
- outline: l,
52
- ghost: p
47
+ outline: n,
48
+ ghost: c
53
49
  }
54
50
  });
55
51
  export {
56
- y as selectConfig
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.0.0",
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.2.1",
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": "^6.3.5",
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"