@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.
Files changed (87) hide show
  1. package/README.md +1 -1
  2. package/dist/_virtual/_commonjsHelpers.js +6 -0
  3. package/dist/_virtual/index.js +4 -0
  4. package/dist/client.d.ts +7 -0
  5. package/dist/client.js +16 -0
  6. package/dist/components/Logo/Logo.js +121 -0
  7. package/dist/components/Logo3d/Logo3d.js +61 -0
  8. package/dist/components/checkbox/Checked.js +47 -0
  9. package/dist/components/checkbox/Unchecked.js +70 -0
  10. package/dist/components/chip-list/ChipList.js +97 -0
  11. package/dist/components/container-grid/ContainerGrid.js +110 -0
  12. package/dist/components/date-picker/DatePicker/DatePicker.js +62 -0
  13. package/dist/components/date-picker/PeriodPicker/PeriodPicker.js +374 -0
  14. package/dist/components/date-picker/utils.js +27 -0
  15. package/dist/components/filters/Checked.js +26 -0
  16. package/dist/components/filters/FilterList.js +121 -0
  17. package/dist/components/filters/Unchecked.js +26 -0
  18. package/dist/components/index.d.ts +0 -9
  19. package/dist/components/radio/Checked.js +34 -0
  20. package/dist/components/radio/Unchecked.js +48 -0
  21. package/dist/components/trending-chip/TrendingChip.js +93 -0
  22. package/dist/helpers/suitCx.js +17 -0
  23. package/dist/helpers/utils.js +11 -0
  24. package/dist/hooks/useContainerDimension.js +23 -0
  25. package/dist/index.d.ts +3 -2
  26. package/dist/index.js +13 -37197
  27. package/dist/node_modules/.pnpm/classnames@2.5.1/node_modules/classnames/index.js +42 -0
  28. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/addLeadingZeros.js +7 -0
  29. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/defaultOptions.js +7 -0
  30. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/formatters.js +515 -0
  31. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/lightFormatters.js +59 -0
  32. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/format/longFormatters.js +52 -0
  33. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +18 -0
  34. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/normalizeDates.js +11 -0
  35. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/_lib/protectedTokens.js +20 -0
  36. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constants.js +6 -0
  37. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/constructFrom.js +8 -0
  38. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/differenceInCalendarDays.js +16 -0
  39. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/format.js +59 -0
  40. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getDayOfYear.js +11 -0
  41. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getISOWeek.js +12 -0
  42. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getISOWeekYear.js +15 -0
  43. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getWeek.js +12 -0
  44. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/getWeekYear.js +17 -0
  45. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isDate.js +7 -0
  46. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isSameDay.js +14 -0
  47. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isSameMonth.js +13 -0
  48. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isSameYear.js +13 -0
  49. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/isValid.js +9 -0
  50. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +9 -0
  51. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +18 -0
  52. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +31 -0
  53. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +15 -0
  54. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +70 -0
  55. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatLong.js +33 -0
  56. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +11 -0
  57. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/localize.js +155 -0
  58. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US/_lib/match.js +110 -0
  59. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/en-US.js +21 -0
  60. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfDay.js +9 -0
  61. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfISOWeek.js +8 -0
  62. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfISOWeekYear.js +11 -0
  63. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfWeek.js +11 -0
  64. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfWeekYear.js +13 -0
  65. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/startOfYear.js +9 -0
  66. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/toDate.js +8 -0
  67. package/dist/styles/alert/alert.js +70 -0
  68. package/dist/styles/button/button.js +195 -0
  69. package/dist/styles/card/card.js +16 -0
  70. package/dist/styles/checkbox/checkbox.js +46 -0
  71. package/dist/styles/chip/chip.js +115 -0
  72. package/dist/styles/colors.js +435 -0
  73. package/dist/styles/dialog/dialog.js +34 -0
  74. package/dist/styles/form/form.js +18 -0
  75. package/dist/styles/index.js +53 -0
  76. package/dist/styles/input/input.js +127 -0
  77. package/dist/styles/list/list.js +42 -0
  78. package/dist/styles/palette.js +150 -0
  79. package/dist/styles/radio/radio.js +37 -0
  80. package/dist/styles/slider/slider.js +55 -0
  81. package/dist/styles/switch/switch.js +63 -0
  82. package/dist/styles/tab/tab.js +70 -0
  83. package/dist/styles/tooltip/tooltip.js +19 -0
  84. package/dist/styles/typography.js +139 -0
  85. package/dist/themes.js +35 -0
  86. package/package.json +6 -1
  87. /package/dist/components/{TrendingChip → trending-chip}/TrendingChip.d.ts +0 -0
package/README.md CHANGED
@@ -23,7 +23,7 @@ Create your own provider file, i.e. SpesiaThemeProvider in your app:
23
23
  ```javascript
24
24
  'use client';
25
25
 
26
- import { theme } from '@spesia/ui';
26
+ import { theme } from '@spesia/ui/client';
27
27
  import { CssBaseline, ThemeProvider } from '@mui/material';
28
28
  import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns'
29
29
  import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
@@ -0,0 +1,6 @@
1
+ function e(t) {
2
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
3
+ }
4
+ export {
5
+ e as getDefaultExportFromCjs
6
+ };
@@ -0,0 +1,4 @@
1
+ var s = { exports: {} };
2
+ export {
3
+ s as __module
4
+ };
@@ -0,0 +1,7 @@
1
+ export { theme } from './styles';
2
+ export { TrendingChip } from './components/trending-chip/TrendingChip';
3
+ export { ContainerGrid } from './components/container-grid/ContainerGrid';
4
+ export { PeriodPicker } from './components/date-picker/PeriodPicker/PeriodPicker';
5
+ export { DatePicker } from './components/date-picker/DatePicker/DatePicker';
6
+ export { ChipList } from './components/chip-list/ChipList';
7
+ export { FilterList } from './components/filters/FilterList';
package/dist/client.js ADDED
@@ -0,0 +1,16 @@
1
+ import { theme as o } from "./styles/index.js";
2
+ import { TrendingChip as i } from "./components/trending-chip/TrendingChip.js";
3
+ import { ContainerGrid as m } from "./components/container-grid/ContainerGrid.js";
4
+ import { PeriodPicker as x } from "./components/date-picker/PeriodPicker/PeriodPicker.js";
5
+ import { DatePicker as d } from "./components/date-picker/DatePicker/DatePicker.js";
6
+ import { ChipList as C } from "./components/chip-list/ChipList.js";
7
+ import { FilterList as a } from "./components/filters/FilterList.js";
8
+ export {
9
+ C as ChipList,
10
+ m as ContainerGrid,
11
+ d as DatePicker,
12
+ a as FilterList,
13
+ x as PeriodPicker,
14
+ i as TrendingChip,
15
+ o as theme
16
+ };
@@ -0,0 +1,121 @@
1
+ import { jsx as C, jsxs as L } from "react/jsx-runtime";
2
+ import { colors as d } from "../../styles/colors.js";
3
+ const V = ({
4
+ withText: t,
5
+ color: i = "brown",
6
+ height: r,
7
+ width: n,
8
+ ...p
9
+ }) => {
10
+ const l = t ? 3.5 : 0.9682539682539683;
11
+ let e = r, a = n;
12
+ const o = i === "brown" ? d.primary.brown[90] : i === "coral" ? d.primary.coral[100] : i === "light" ? d.primary.coral[20] : d.neutral.black;
13
+ return n || r ? (n && r && (console.warn(
14
+ "Logo: Both width and height are specified. Width will be ignored in order to maintain correct aspect ratio."
15
+ ), a = void 0), e && !a ? a = e * l : a && !r && (e = a / l), /* @__PURE__ */ C(
16
+ "svg",
17
+ {
18
+ width: `${a}px`,
19
+ height: `${e}px`,
20
+ viewBox: `0 0 ${t ? 448 : 122} ${t ? 128 : 126}`,
21
+ fill: "none",
22
+ xmlns: "http://www.w3.org/2000/svg",
23
+ ...p,
24
+ children: /* @__PURE__ */ L("g", { "data-name": "Logo", children: [
25
+ /* @__PURE__ */ L("g", { "data-name": "Logo-Icon", children: [
26
+ /* @__PURE__ */ C(
27
+ "path",
28
+ {
29
+ d: "M60.8867 65.1024C61.2969 81.8293 74.343 95.3109 90.5293 95.7348L91.3146 95.7449C91.3145 113.117 77.6868 127.2 60.8762 127.2C44.3288 127.199 30.8652 113.554 30.4483 96.5574L30.4386 95.7457C47.2491 95.7457 60.8767 81.6626 60.877 64.2907L60.8867 65.1024Z",
30
+ fill: o
31
+ }
32
+ ),
33
+ /* @__PURE__ */ C(
34
+ "path",
35
+ {
36
+ d: "M30.4386 32.8349C30.4386 49.9357 43.644 63.8501 60.0917 64.2806L60.877 64.2907L60.0917 64.3007C43.644 64.7313 30.4386 78.6449 30.4386 95.7457L29.6533 95.7356C13.206 95.3049 0.000489131 81.3911 0.000244141 64.2907C0.000243294 46.9187 13.6282 32.8351 30.4386 32.8349Z",
37
+ fill: o
38
+ }
39
+ ),
40
+ /* @__PURE__ */ C(
41
+ "path",
42
+ {
43
+ d: "M91.3153 32.8349C108.126 32.8351 121.753 46.9182 121.754 64.2899C121.754 81.6619 108.125 95.7449 91.3146 95.7449C91.3144 78.3729 77.6875 64.2907 60.877 64.2907C77.4249 64.2906 90.889 50.6435 91.3056 33.6466L91.3153 32.8349Z",
44
+ fill: o
45
+ }
46
+ ),
47
+ /* @__PURE__ */ C(
48
+ "path",
49
+ {
50
+ d: "M60.877 1.37988C77.6875 1.37992 91.3152 15.4629 91.3153 32.8349L90.5293 32.8457C74.0819 33.2765 60.877 47.1901 60.877 64.2907C60.877 46.9185 47.2492 32.8349 30.4386 32.8349C30.4387 15.4629 44.0665 1.38 60.877 1.37988Z",
51
+ fill: o
52
+ }
53
+ )
54
+ ] }),
55
+ t && /* @__PURE__ */ L("g", { "data-name": "Logo-Text", children: [
56
+ /* @__PURE__ */ C(
57
+ "path",
58
+ {
59
+ d: "M445.535 94.1977L448.007 95.9747C445.965 102.416 441.236 105.415 435.863 105.415C430.167 105.415 426.191 102.194 425.438 95.3083H424.686C423.074 101.194 417.593 105.526 409.963 105.526C401.258 105.526 394.917 100.75 394.917 91.1992C394.917 82.2034 401.473 76.4283 414.692 73.7629L424.901 71.6527V68.6542C424.901 60.9911 421.247 56.6598 413.509 56.6598C406.631 56.6598 402.225 59.8805 399.861 65.4334L396.314 63.9897C398.249 55.3271 404.912 47.5529 417.916 47.5529C430.597 47.5529 437.69 54.8828 437.69 69.3205V91.4213C437.69 94.753 438.98 96.7521 441.559 96.7521C443.386 96.7521 444.676 95.7526 445.535 94.1977ZM416.411 97.8627C420.387 97.8627 423.289 95.5305 424.901 90.866V75.9841L419.958 76.9836C412.757 78.5384 408.351 82.0923 408.351 88.7558C408.351 94.3088 411.36 97.8627 416.411 97.8627Z",
60
+ fill: o
61
+ }
62
+ ),
63
+ /* @__PURE__ */ C(
64
+ "path",
65
+ {
66
+ d: "M391.465 100.306V104.193H361.803V100.306C368.467 99.8618 370.186 98.5291 370.186 92.754V63.2123C370.186 59.2142 368.681 57.6593 365.242 57.6593C364.168 57.6593 362.878 57.7704 361.266 57.9925V54.1054L378.784 48.8857H382.975V92.5319C382.975 98.6401 385.124 99.8618 391.465 100.306Z",
67
+ fill: o
68
+ }
69
+ ),
70
+ /* @__PURE__ */ C(
71
+ "path",
72
+ {
73
+ d: "M336.192 105.637C330.389 105.637 323.511 104.193 318.137 100.084V86.0904H322.436C324.37 95.1973 330.711 99.8618 338.019 99.8618C343.5 99.8618 347.691 97.3074 347.691 92.1987C347.691 88.4227 345.757 86.2015 341.35 84.5356L330.926 80.5375C323.618 77.9831 318.245 72.8744 318.245 64.8781C318.245 54.1054 326.95 47.5529 339.094 47.5529C344.682 47.5529 351.453 49.2188 355.536 51.3289V63.9897H351.238C349.411 57.2151 344.145 52.7727 337.267 52.7727C331.893 52.7727 328.562 55.5492 328.562 59.5473C328.562 63.2123 330.174 65.6556 334.687 67.3214L346.724 72.097C353.709 74.7624 357.793 79.5379 357.793 87.3121C357.793 98.6401 349.196 105.637 336.192 105.637Z",
74
+ fill: o
75
+ }
76
+ ),
77
+ /* @__PURE__ */ C(
78
+ "path",
79
+ {
80
+ d: "M294.855 93.6424C301.841 93.6424 306.032 91.0881 308.826 86.6457L312.158 88.4227C310.116 96.53 303.345 105.526 290.449 105.526C275.296 105.526 265.838 93.8646 265.838 77.761C265.838 60.3247 274.866 47.5529 290.449 47.5529C303.775 47.5529 312.158 56.7708 312.158 72.5412H276.8C277.66 86.2015 284.43 93.6424 294.855 93.6424ZM288.192 52.6616C281.206 52.6616 277.123 57.9925 276.693 67.6546H297.757C297.757 58.7699 295.285 52.6616 288.192 52.6616Z",
81
+ fill: o
82
+ }
83
+ ),
84
+ /* @__PURE__ */ C(
85
+ "path",
86
+ {
87
+ d: "M201.743 128V124.113C208.406 123.558 210.126 122.336 210.126 116.561V62.657C210.126 59.2141 208.621 57.8814 205.504 57.8814C204.322 57.8814 202.71 57.9925 201.206 58.1035V54.3275L217.648 48.8856H221.732V55.3271C221.732 56.993 221.195 59.6584 220.443 62.3238L221.087 62.5459C224.097 53.5501 230.975 47.5529 239.572 47.5529C252.254 47.5529 260.314 57.5482 260.314 73.0965C260.314 92.5319 248.277 105.526 232.372 105.526C228.933 105.526 225.816 104.859 222.914 103.194V116.339C222.914 122.78 225.494 123.558 233.984 124.113V128H201.743ZM232.157 100.528C241.184 100.528 246.773 91.7544 246.773 77.4278C246.773 64.656 242.259 57.4372 233.661 57.4372C228.933 57.4372 224.956 59.9915 222.914 63.3233V96.641C225.601 99.3065 228.395 100.528 232.157 100.528Z",
88
+ fill: o
89
+ }
90
+ ),
91
+ /* @__PURE__ */ C(
92
+ "path",
93
+ {
94
+ d: "M170.764 106.081C162.489 106.081 153.139 103.749 146.154 99.0845V77.7611H150.775C153.569 93.8647 162.274 100.084 173.236 100.084C180.866 100.084 187.099 96.9743 187.099 88.3117C187.099 81.6482 184.09 78.6496 177.105 75.3178L161.952 68.099C151.742 63.3234 146.691 55.9935 146.691 47.3309C146.691 34.5591 155.933 24.5638 174.525 24.5638C182.908 24.5638 190.431 26.4518 196.127 29.3394V48.8858H191.721C188.389 34.6702 180.544 30.3389 171.516 30.3389C162.704 30.3389 158.298 34.4481 158.298 41.0006C158.298 46.1093 161.092 50.2185 168.615 53.4392L183.66 60.4359C192.795 64.6562 199.028 70.4312 199.028 81.5371C199.028 95.6416 188.604 106.081 170.764 106.081Z",
95
+ fill: o
96
+ }
97
+ ),
98
+ /* @__PURE__ */ C(
99
+ "path",
100
+ {
101
+ d: "M382.284 44.9597C380.266 38.2334 382.889 34.8705 385.192 33.4969C388.031 31.8028 389.753 33.4192 391.696 35.432C393.22 37.0606 396.506 39.6466 400.42 37.3115C403.797 35.2968 404.714 31.2604 402.675 27.6123C400.017 22.854 393.944 21.5076 387.498 25.3537C378.289 30.8481 378.135 41.1107 382.284 44.9597Z",
102
+ fill: o
103
+ }
104
+ ),
105
+ /* @__PURE__ */ C(
106
+ "path",
107
+ {
108
+ d: "M194.067 58.1154L191.78 48.6636L196.125 48.6636L196.353 55.7525L201.498 54.2165V58.1154H194.067Z",
109
+ fill: o
110
+ }
111
+ )
112
+ ] })
113
+ ] })
114
+ }
115
+ )) : (console.error(
116
+ "Logo: You need to specify either a width or a height for the logo."
117
+ ), null);
118
+ };
119
+ export {
120
+ V as default
121
+ };