fina-react-ds 1.0.40 → 1.0.42

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 (67) hide show
  1. package/dist/components/alert-dialog.js +1 -166
  2. package/dist/components/alert.js +1 -73
  3. package/dist/components/avatar.js +1 -58
  4. package/dist/components/badge.js +1 -44
  5. package/dist/components/button.js +1 -153
  6. package/dist/components/calendar.js +1 -205
  7. package/dist/components/card.js +1 -99
  8. package/dist/components/checkbox.js +1 -34
  9. package/dist/components/data-loader.js +1 -24
  10. package/dist/components/date-picker.js +1 -64
  11. package/dist/components/dialog.js +1 -145
  12. package/dist/components/dropdown-menu.js +1 -248
  13. package/dist/components/file-uploader.js +1 -108
  14. package/dist/components/form-color-picker.js +1 -29
  15. package/dist/components/form-date.js +1 -30
  16. package/dist/components/form-file-uploader.js +1 -32
  17. package/dist/components/form-image-uploader.js +1 -40
  18. package/dist/components/form-input.js +1 -35
  19. package/dist/components/form-select.js +1 -51
  20. package/dist/components/form-switch.js +1 -35
  21. package/dist/components/form-textarea.js +1 -35
  22. package/dist/components/form.js +1 -110
  23. package/dist/components/hover-card.js +1 -43
  24. package/dist/components/image-uploader.js +1 -130
  25. package/dist/components/index.js +1 -200
  26. package/dist/components/input.js +1 -26
  27. package/dist/components/label.js +1 -32
  28. package/dist/components/mode-toggle.js +1 -26
  29. package/dist/components/pagination.js +1 -128
  30. package/dist/components/password-rules-checker.js +1 -44
  31. package/dist/components/popover.js +1 -50
  32. package/dist/components/select.js +1 -53
  33. package/dist/components/separator.js +1 -29
  34. package/dist/components/sheet.js +1 -160
  35. package/dist/components/sidebar.js +1 -624
  36. package/dist/components/simple-pagination.js +1 -34
  37. package/dist/components/simple-tooltip.js +1 -17
  38. package/dist/components/skeleton.js +1 -18
  39. package/dist/components/sonner.js +1 -24
  40. package/dist/components/switch.js +1 -34
  41. package/dist/components/table.js +1 -124
  42. package/dist/components/tabs.js +1 -73
  43. package/dist/components/textarea.js +1 -23
  44. package/dist/components/tooltip.js +1 -61
  45. package/dist/hooks/index.js +1 -4
  46. package/dist/hooks/use-mobile.js +1 -17
  47. package/dist/index.js +1 -225
  48. package/dist/lib/arrays.js +1 -7
  49. package/dist/lib/dates.js +1 -21
  50. package/dist/lib/http.js +1 -56
  51. package/dist/lib/index.js +1 -27
  52. package/dist/lib/strings.js +1 -6
  53. package/dist/lib/utils.js +2 -31
  54. package/dist/lib/yup.js +1 -88
  55. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +1 -12
  56. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +1 -21
  57. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchFn.js +1 -36
  58. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +1 -18
  59. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatDistance.js +1 -72
  60. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatLong.js +1 -33
  61. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/formatRelative.js +1 -13
  62. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/localize.js +1 -123
  63. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr/_lib/match.js +1 -112
  64. package/dist/node_modules/.pnpm/date-fns@4.1.0/node_modules/date-fns/locale/fr.js +1 -21
  65. package/dist/providers/loader-provider.js +1 -34
  66. package/dist/providers/theme-provider.js +1 -45
  67. package/package.json +1 -9
@@ -1,72 +1 @@
1
- var u = Object.defineProperty;
2
- var r = (s, n) => u(s, "name", { value: n, configurable: !0 });
3
- const i = {
4
- lessThanXSeconds: {
5
- one: "moins d’une seconde",
6
- other: "moins de {{count}} secondes"
7
- },
8
- xSeconds: {
9
- one: "1 seconde",
10
- other: "{{count}} secondes"
11
- },
12
- halfAMinute: "30 secondes",
13
- lessThanXMinutes: {
14
- one: "moins d’une minute",
15
- other: "moins de {{count}} minutes"
16
- },
17
- xMinutes: {
18
- one: "1 minute",
19
- other: "{{count}} minutes"
20
- },
21
- aboutXHours: {
22
- one: "environ 1 heure",
23
- other: "environ {{count}} heures"
24
- },
25
- xHours: {
26
- one: "1 heure",
27
- other: "{{count}} heures"
28
- },
29
- xDays: {
30
- one: "1 jour",
31
- other: "{{count}} jours"
32
- },
33
- aboutXWeeks: {
34
- one: "environ 1 semaine",
35
- other: "environ {{count}} semaines"
36
- },
37
- xWeeks: {
38
- one: "1 semaine",
39
- other: "{{count}} semaines"
40
- },
41
- aboutXMonths: {
42
- one: "environ 1 mois",
43
- other: "environ {{count}} mois"
44
- },
45
- xMonths: {
46
- one: "1 mois",
47
- other: "{{count}} mois"
48
- },
49
- aboutXYears: {
50
- one: "environ 1 an",
51
- other: "environ {{count}} ans"
52
- },
53
- xYears: {
54
- one: "1 an",
55
- other: "{{count}} ans"
56
- },
57
- overXYears: {
58
- one: "plus d’un an",
59
- other: "plus de {{count}} ans"
60
- },
61
- almostXYears: {
62
- one: "presqu’un an",
63
- other: "presque {{count}} ans"
64
- }
65
- }, c = /* @__PURE__ */ r((s, n, t) => {
66
- let e;
67
- const o = i[s];
68
- return typeof o == "string" ? e = o : n === 1 ? e = o.one : e = o.other.replace("{{count}}", String(n)), t?.addSuffix ? t.comparison && t.comparison > 0 ? "dans " + e : "il y a " + e : e;
69
- }, "formatDistance");
70
- export {
71
- c as formatDistance
72
- };
1
+ var u=Object.defineProperty;var r=(s,n)=>u(s,"name",{value:n,configurable:!0});const i={lessThanXSeconds:{one:"moins d’une seconde",other:"moins de {{count}} secondes"},xSeconds:{one:"1 seconde",other:"{{count}} secondes"},halfAMinute:"30 secondes",lessThanXMinutes:{one:"moins d’une minute",other:"moins de {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"environ 1 heure",other:"environ {{count}} heures"},xHours:{one:"1 heure",other:"{{count}} heures"},xDays:{one:"1 jour",other:"{{count}} jours"},aboutXWeeks:{one:"environ 1 semaine",other:"environ {{count}} semaines"},xWeeks:{one:"1 semaine",other:"{{count}} semaines"},aboutXMonths:{one:"environ 1 mois",other:"environ {{count}} mois"},xMonths:{one:"1 mois",other:"{{count}} mois"},aboutXYears:{one:"environ 1 an",other:"environ {{count}} ans"},xYears:{one:"1 an",other:"{{count}} ans"},overXYears:{one:"plus d’un an",other:"plus de {{count}} ans"},almostXYears:{one:"presqu’un an",other:"presque {{count}} ans"}},c=r((s,n,t)=>{let e;const o=i[s];return typeof o=="string"?e=o:n===1?e=o.one:e=o.other.replace("{{count}}",String(n)),t?.addSuffix?t.comparison&&t.comparison>0?"dans "+e:"il y a "+e:e},"formatDistance");export{c as formatDistance};
@@ -1,33 +1 @@
1
- import { buildFormatLongFn as t } from "../../_lib/buildFormatLongFn.js";
2
- const m = {
3
- full: "EEEE d MMMM y",
4
- long: "d MMMM y",
5
- medium: "d MMM y",
6
- short: "dd/MM/y"
7
- }, d = {
8
- full: "HH:mm:ss zzzz",
9
- long: "HH:mm:ss z",
10
- medium: "HH:mm:ss",
11
- short: "HH:mm"
12
- }, e = {
13
- full: "{{date}} 'à' {{time}}",
14
- long: "{{date}} 'à' {{time}}",
15
- medium: "{{date}}, {{time}}",
16
- short: "{{date}}, {{time}}"
17
- }, a = {
18
- date: t({
19
- formats: m,
20
- defaultWidth: "full"
21
- }),
22
- time: t({
23
- formats: d,
24
- defaultWidth: "full"
25
- }),
26
- dateTime: t({
27
- formats: e,
28
- defaultWidth: "full"
29
- })
30
- };
31
- export {
32
- a as formatLong
33
- };
1
+ import{buildFormatLongFn as t}from"../../_lib/buildFormatLongFn.js";const m={full:"EEEE d MMMM y",long:"d MMMM y",medium:"d MMM y",short:"dd/MM/y"},d={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},e={full:"{{date}} 'à' {{time}}",long:"{{date}} 'à' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},a={date:t({formats:m,defaultWidth:"full"}),time:t({formats:d,defaultWidth:"full"}),dateTime:t({formats:e,defaultWidth:"full"})};export{a as formatLong};
@@ -1,13 +1 @@
1
- var a = Object.defineProperty;
2
- var o = (e, t) => a(e, "name", { value: t, configurable: !0 });
3
- const r = {
4
- lastWeek: "eeee 'dernier à' p",
5
- yesterday: "'hier à' p",
6
- today: "'aujourd’hui à' p",
7
- tomorrow: "'demain à' p'",
8
- nextWeek: "eeee 'prochain à' p",
9
- other: "P"
10
- }, d = /* @__PURE__ */ o((e, t, i, p) => r[e], "formatRelative");
11
- export {
12
- d as formatRelative
13
- };
1
+ var a=Object.defineProperty;var o=(e,t)=>a(e,"name",{value:t,configurable:!0});const r={lastWeek:"eeee 'dernier à' p",yesterday:"'hier à' p",today:"'aujourd’hui à' p",tomorrow:"'demain à' p'",nextWeek:"eeee 'prochain à' p",other:"P"},d=o((e,t,i,p)=>r[e],"formatRelative");export{d as formatRelative};
@@ -1,123 +1 @@
1
- var d = Object.defineProperty;
2
- var t = (n, i) => d(n, "name", { value: i, configurable: !0 });
3
- import { buildLocalizeFn as r } from "../../_lib/buildLocalizeFn.js";
4
- const s = {
5
- narrow: ["av. J.-C", "ap. J.-C"],
6
- abbreviated: ["av. J.-C", "ap. J.-C"],
7
- wide: ["avant Jésus-Christ", "après Jésus-Christ"]
8
- }, u = {
9
- narrow: ["T1", "T2", "T3", "T4"],
10
- abbreviated: ["1er trim.", "2ème trim.", "3ème trim.", "4ème trim."],
11
- wide: ["1er trimestre", "2ème trimestre", "3ème trimestre", "4ème trimestre"]
12
- }, l = {
13
- narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
14
- abbreviated: [
15
- "janv.",
16
- "févr.",
17
- "mars",
18
- "avr.",
19
- "mai",
20
- "juin",
21
- "juil.",
22
- "août",
23
- "sept.",
24
- "oct.",
25
- "nov.",
26
- "déc."
27
- ],
28
- wide: [
29
- "janvier",
30
- "février",
31
- "mars",
32
- "avril",
33
- "mai",
34
- "juin",
35
- "juillet",
36
- "août",
37
- "septembre",
38
- "octobre",
39
- "novembre",
40
- "décembre"
41
- ]
42
- }, v = {
43
- narrow: ["D", "L", "M", "M", "J", "V", "S"],
44
- short: ["di", "lu", "ma", "me", "je", "ve", "sa"],
45
- abbreviated: ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."],
46
- wide: [
47
- "dimanche",
48
- "lundi",
49
- "mardi",
50
- "mercredi",
51
- "jeudi",
52
- "vendredi",
53
- "samedi"
54
- ]
55
- }, c = {
56
- narrow: {
57
- am: "AM",
58
- pm: "PM",
59
- midnight: "minuit",
60
- noon: "midi",
61
- morning: "mat.",
62
- afternoon: "ap.m.",
63
- evening: "soir",
64
- night: "mat."
65
- },
66
- abbreviated: {
67
- am: "AM",
68
- pm: "PM",
69
- midnight: "minuit",
70
- noon: "midi",
71
- morning: "matin",
72
- afternoon: "après-midi",
73
- evening: "soir",
74
- night: "matin"
75
- },
76
- wide: {
77
- am: "AM",
78
- pm: "PM",
79
- midnight: "minuit",
80
- noon: "midi",
81
- morning: "du matin",
82
- afternoon: "de l’après-midi",
83
- evening: "du soir",
84
- night: "du matin"
85
- }
86
- }, h = /* @__PURE__ */ t((n, i) => {
87
- const a = Number(n), e = i?.unit;
88
- if (a === 0) return "0";
89
- const o = ["year", "week", "hour", "minute", "second"];
90
- let m;
91
- return a === 1 ? m = e && o.includes(e) ? "ère" : "er" : m = "ème", a + m;
92
- }, "ordinalNumber"), M = ["MMM", "MMMM"], g = {
93
- preprocessor: /* @__PURE__ */ t((n, i) => n.getDate() === 1 || !i.some(
94
- (e) => e.isToken && M.includes(e.value)
95
- ) ? i : i.map(
96
- (e) => e.isToken && e.value === "do" ? { isToken: !0, value: "d" } : e
97
- ), "preprocessor"),
98
- ordinalNumber: h,
99
- era: r({
100
- values: s,
101
- defaultWidth: "wide"
102
- }),
103
- quarter: r({
104
- values: u,
105
- defaultWidth: "wide",
106
- argumentCallback: /* @__PURE__ */ t((n) => n - 1, "argumentCallback")
107
- }),
108
- month: r({
109
- values: l,
110
- defaultWidth: "wide"
111
- }),
112
- day: r({
113
- values: v,
114
- defaultWidth: "wide"
115
- }),
116
- dayPeriod: r({
117
- values: c,
118
- defaultWidth: "wide"
119
- })
120
- };
121
- export {
122
- g as localize
123
- };
1
+ var d=Object.defineProperty;var t=(n,i)=>d(n,"name",{value:i,configurable:!0});import{buildLocalizeFn as r}from"../../_lib/buildLocalizeFn.js";const s={narrow:["av. J.-C","ap. J.-C"],abbreviated:["av. J.-C","ap. J.-C"],wide:["avant Jésus-Christ","après Jésus-Christ"]},u={narrow:["T1","T2","T3","T4"],abbreviated:["1er trim.","2ème trim.","3ème trim.","4ème trim."],wide:["1er trimestre","2ème trimestre","3ème trimestre","4ème trimestre"]},l={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],wide:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"]},v={narrow:["D","L","M","M","J","V","S"],short:["di","lu","ma","me","je","ve","sa"],abbreviated:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],wide:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},c={narrow:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"mat.",afternoon:"ap.m.",evening:"soir",night:"mat."},abbreviated:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"matin",afternoon:"après-midi",evening:"soir",night:"matin"},wide:{am:"AM",pm:"PM",midnight:"minuit",noon:"midi",morning:"du matin",afternoon:"de l’après-midi",evening:"du soir",night:"du matin"}},h=t((n,i)=>{const a=Number(n),e=i?.unit;if(a===0)return"0";const o=["year","week","hour","minute","second"];let m;return a===1?m=e&&o.includes(e)?"ère":"er":m="ème",a+m},"ordinalNumber"),M=["MMM","MMMM"],g={preprocessor:t((n,i)=>n.getDate()===1||!i.some(e=>e.isToken&&M.includes(e.value))?i:i.map(e=>e.isToken&&e.value==="do"?{isToken:!0,value:"d"}:e),"preprocessor"),ordinalNumber:h,era:r({values:s,defaultWidth:"wide"}),quarter:r({values:u,defaultWidth:"wide",argumentCallback:t(n=>n-1,"argumentCallback")}),month:r({values:l,defaultWidth:"wide"}),day:r({values:v,defaultWidth:"wide"}),dayPeriod:r({values:c,defaultWidth:"wide"})};export{g as localize};
@@ -1,112 +1 @@
1
- var r = Object.defineProperty;
2
- var t = (a, e) => r(a, "name", { value: e, configurable: !0 });
3
- import { buildMatchFn as i } from "../../_lib/buildMatchFn.js";
4
- import { buildMatchPatternFn as n } from "../../_lib/buildMatchPatternFn.js";
5
- const s = /^(\d+)(ième|ère|ème|er|e)?/i, d = /\d+/i, m = {
6
- narrow: /^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,
7
- abbreviated: /^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,
8
- wide: /^(avant Jésus-Christ|après Jésus-Christ)/i
9
- }, o = {
10
- any: [/^av/i, /^ap/i]
11
- }, c = {
12
- narrow: /^T?[1234]/i,
13
- abbreviated: /^[1234](er|ème|e)? trim\.?/i,
14
- wide: /^[1234](er|ème|e)? trimestre/i
15
- }, u = {
16
- any: [/1/i, /2/i, /3/i, /4/i]
17
- }, h = {
18
- narrow: /^[jfmasond]/i,
19
- abbreviated: /^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,
20
- wide: /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i
21
- }, l = {
22
- narrow: [
23
- /^j/i,
24
- /^f/i,
25
- /^m/i,
26
- /^a/i,
27
- /^m/i,
28
- /^j/i,
29
- /^j/i,
30
- /^a/i,
31
- /^s/i,
32
- /^o/i,
33
- /^n/i,
34
- /^d/i
35
- ],
36
- any: [
37
- /^ja/i,
38
- /^f/i,
39
- /^mar/i,
40
- /^av/i,
41
- /^ma/i,
42
- /^juin/i,
43
- /^juil/i,
44
- /^ao/i,
45
- /^s/i,
46
- /^o/i,
47
- /^n/i,
48
- /^d/i
49
- ]
50
- }, P = {
51
- narrow: /^[lmjvsd]/i,
52
- short: /^(di|lu|ma|me|je|ve|sa)/i,
53
- abbreviated: /^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,
54
- wide: /^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i
55
- }, p = {
56
- narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
57
- any: [/^di/i, /^lu/i, /^ma/i, /^me/i, /^je/i, /^ve/i, /^sa/i]
58
- }, v = {
59
- narrow: /^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,
60
- any: /^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i
61
- }, j = {
62
- any: {
63
- am: /^a/i,
64
- pm: /^p/i,
65
- midnight: /^min/i,
66
- noon: /^mid/i,
67
- morning: /mat/i,
68
- afternoon: /ap/i,
69
- evening: /soir/i,
70
- night: /nuit/i
71
- }
72
- }, w = {
73
- ordinalNumber: n({
74
- matchPattern: s,
75
- parsePattern: d,
76
- valueCallback: /* @__PURE__ */ t((a) => parseInt(a), "valueCallback")
77
- }),
78
- era: i({
79
- matchPatterns: m,
80
- defaultMatchWidth: "wide",
81
- parsePatterns: o,
82
- defaultParseWidth: "any"
83
- }),
84
- quarter: i({
85
- matchPatterns: c,
86
- defaultMatchWidth: "wide",
87
- parsePatterns: u,
88
- defaultParseWidth: "any",
89
- valueCallback: /* @__PURE__ */ t((a) => a + 1, "valueCallback")
90
- }),
91
- month: i({
92
- matchPatterns: h,
93
- defaultMatchWidth: "wide",
94
- parsePatterns: l,
95
- defaultParseWidth: "any"
96
- }),
97
- day: i({
98
- matchPatterns: P,
99
- defaultMatchWidth: "wide",
100
- parsePatterns: p,
101
- defaultParseWidth: "any"
102
- }),
103
- dayPeriod: i({
104
- matchPatterns: v,
105
- defaultMatchWidth: "any",
106
- parsePatterns: j,
107
- defaultParseWidth: "any"
108
- })
109
- };
110
- export {
111
- w as match
112
- };
1
+ var r=Object.defineProperty;var t=(a,e)=>r(a,"name",{value:e,configurable:!0});import{buildMatchFn as i}from"../../_lib/buildMatchFn.js";import{buildMatchPatternFn as n}from"../../_lib/buildMatchPatternFn.js";const s=/^(\d+)(ième|ère|ème|er|e)?/i,d=/\d+/i,m={narrow:/^(av\.J\.C|ap\.J\.C|ap\.J\.-C)/i,abbreviated:/^(av\.J\.-C|av\.J-C|apr\.J\.-C|apr\.J-C|ap\.J-C)/i,wide:/^(avant Jésus-Christ|après Jésus-Christ)/i},o={any:[/^av/i,/^ap/i]},c={narrow:/^T?[1234]/i,abbreviated:/^[1234](er|ème|e)? trim\.?/i,wide:/^[1234](er|ème|e)? trimestre/i},u={any:[/1/i,/2/i,/3/i,/4/i]},h={narrow:/^[jfmasond]/i,abbreviated:/^(janv|févr|mars|avr|mai|juin|juill|juil|août|sept|oct|nov|déc)\.?/i,wide:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i},l={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^av/i,/^ma/i,/^juin/i,/^juil/i,/^ao/i,/^s/i,/^o/i,/^n/i,/^d/i]},P={narrow:/^[lmjvsd]/i,short:/^(di|lu|ma|me|je|ve|sa)/i,abbreviated:/^(dim|lun|mar|mer|jeu|ven|sam)\.?/i,wide:/^(dimanche|lundi|mardi|mercredi|jeudi|vendredi|samedi)/i},p={narrow:[/^d/i,/^l/i,/^m/i,/^m/i,/^j/i,/^v/i,/^s/i],any:[/^di/i,/^lu/i,/^ma/i,/^me/i,/^je/i,/^ve/i,/^sa/i]},v={narrow:/^(a|p|minuit|midi|mat\.?|ap\.?m\.?|soir|nuit)/i,any:/^([ap]\.?\s?m\.?|du matin|de l'après[-\s]midi|du soir|de la nuit)/i},j={any:{am:/^a/i,pm:/^p/i,midnight:/^min/i,noon:/^mid/i,morning:/mat/i,afternoon:/ap/i,evening:/soir/i,night:/nuit/i}},w={ordinalNumber:n({matchPattern:s,parsePattern:d,valueCallback:t(a=>parseInt(a),"valueCallback")}),era:i({matchPatterns:m,defaultMatchWidth:"wide",parsePatterns:o,defaultParseWidth:"any"}),quarter:i({matchPatterns:c,defaultMatchWidth:"wide",parsePatterns:u,defaultParseWidth:"any",valueCallback:t(a=>a+1,"valueCallback")}),month:i({matchPatterns:h,defaultMatchWidth:"wide",parsePatterns:l,defaultParseWidth:"any"}),day:i({matchPatterns:P,defaultMatchWidth:"wide",parsePatterns:p,defaultParseWidth:"any"}),dayPeriod:i({matchPatterns:v,defaultMatchWidth:"any",parsePatterns:j,defaultParseWidth:"any"})};export{w as match};
@@ -1,21 +1 @@
1
- import { formatDistance as o } from "./fr/_lib/formatDistance.js";
2
- import { formatLong as t } from "./fr/_lib/formatLong.js";
3
- import { formatRelative as r } from "./fr/_lib/formatRelative.js";
4
- import { localize as a } from "./fr/_lib/localize.js";
5
- import { match as m } from "./fr/_lib/match.js";
6
- const s = {
7
- code: "fr",
8
- formatDistance: o,
9
- formatLong: t,
10
- formatRelative: r,
11
- localize: a,
12
- match: m,
13
- options: {
14
- weekStartsOn: 1,
15
- firstWeekContainsDate: 4
16
- }
17
- };
18
- export {
19
- s as default,
20
- s as fr
21
- };
1
+ import{formatDistance as o}from"./fr/_lib/formatDistance.js";import{formatLong as t}from"./fr/_lib/formatLong.js";import{formatRelative as r}from"./fr/_lib/formatRelative.js";import{localize as a}from"./fr/_lib/localize.js";import{match as m}from"./fr/_lib/match.js";const s={code:"fr",formatDistance:o,formatLong:t,formatRelative:r,localize:a,match:m,options:{weekStartsOn:1,firstWeekContainsDate:4}};export{s as default,s as fr};
@@ -1,34 +1 @@
1
- var l = Object.defineProperty;
2
- var t = (e, o) => l(e, "name", { value: o, configurable: !0 });
3
- import { jsxs as u, jsx as c } from "react/jsx-runtime";
4
- import { useState as f, createContext as m, useContext as g } from "react";
5
- import { toast as h } from "sonner";
6
- const v = {
7
- isLoading: !1,
8
- loadingWithToast: /* @__PURE__ */ t(() => null, "loadingWithToast")
9
- }, s = m(v);
10
- function P({ children: e, ...o }) {
11
- const [r, i] = f(!1), d = {
12
- isLoading: r,
13
- loadingWithToast: /* @__PURE__ */ t((a, n) => {
14
- i(!0), n.loading || (n.loading = "Chargement en cours"), h.promise(a, n), a.finally(() => {
15
- i(!1);
16
- });
17
- }, "loadingWithToast")
18
- };
19
- return /* @__PURE__ */ u(s.Provider, { ...o, value: d, children: [
20
- e,
21
- r && /* @__PURE__ */ c("div", { className: "fixed inset-0 z-9999 bg-transparent pointer-events-auto" })
22
- ] });
23
- }
24
- t(P, "LoaderProvider");
25
- const w = /* @__PURE__ */ t(() => {
26
- const e = g(s);
27
- if (e === void 0)
28
- throw new Error("useTheme must be used within a ThemeProvider");
29
- return e;
30
- }, "useLoader");
31
- export {
32
- P as LoaderProvider,
33
- w as useLoader
34
- };
1
+ var l=Object.defineProperty;var t=(e,o)=>l(e,"name",{value:o,configurable:!0});import{jsxs as u,jsx as c}from"react/jsx-runtime";import{useState as f,createContext as m,useContext as g}from"react";import{toast as h}from"sonner";const v={isLoading:!1,loadingWithToast:t(()=>null,"loadingWithToast")},s=m(v);function P({children:e,...o}){const[r,i]=f(!1),d={isLoading:r,loadingWithToast:t((a,n)=>{i(!0),n.loading||(n.loading="Chargement en cours"),h.promise(a,n),a.finally(()=>{i(!1)})},"loadingWithToast")};return u(s.Provider,{...o,value:d,children:[e,r&&c("div",{className:"fixed inset-0 z-9999 bg-transparent pointer-events-auto"})]})}t(P,"LoaderProvider");const w=t(()=>{const e=g(s);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},"useLoader");export{P as LoaderProvider,w as useLoader};
@@ -1,45 +1 @@
1
- var h = Object.defineProperty;
2
- var s = (e, r) => h(e, "name", { value: r, configurable: !0 });
3
- import { jsx as u } from "react/jsx-runtime";
4
- import { useState as l, useEffect as T, createContext as f, useContext as v } from "react";
5
- const w = {
6
- theme: "system",
7
- setTheme: /* @__PURE__ */ s(() => null, "setTheme")
8
- }, n = f(w);
9
- function P({
10
- children: e,
11
- defaultTheme: r = "system",
12
- storageKey: m = "vite-ui-theme",
13
- ...i
14
- }) {
15
- const [o, c] = l(
16
- () => localStorage.getItem(m) || r
17
- );
18
- T(() => {
19
- const t = window.document.documentElement;
20
- if (t.classList.remove("light", "dark"), o === "system") {
21
- const d = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
22
- t.classList.add(d);
23
- return;
24
- }
25
- t.classList.add(o);
26
- }, [o]);
27
- const a = {
28
- theme: o,
29
- setTheme: /* @__PURE__ */ s((t) => {
30
- localStorage.setItem(m, t), c(t);
31
- }, "setTheme")
32
- };
33
- return /* @__PURE__ */ u(n.Provider, { ...i, value: a, children: e });
34
- }
35
- s(P, "ThemeProvider");
36
- const S = /* @__PURE__ */ s(() => {
37
- const e = v(n);
38
- if (e === void 0)
39
- throw new Error("useTheme must be used within a ThemeProvider");
40
- return e;
41
- }, "useTheme");
42
- export {
43
- P as ThemeProvider,
44
- S as useTheme
45
- };
1
+ var h=Object.defineProperty;var s=(e,r)=>h(e,"name",{value:r,configurable:!0});import{jsx as u}from"react/jsx-runtime";import{useState as l,useEffect as T,createContext as f,useContext as v}from"react";const w={theme:"system",setTheme:s(()=>null,"setTheme")},n=f(w);function P({children:e,defaultTheme:r="system",storageKey:m="vite-ui-theme",...i}){const[o,c]=l(()=>localStorage.getItem(m)||r);T(()=>{const t=window.document.documentElement;if(t.classList.remove("light","dark"),o==="system"){const d=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";t.classList.add(d);return}t.classList.add(o)},[o]);const a={theme:o,setTheme:s(t=>{localStorage.setItem(m,t),c(t)},"setTheme")};return u(n.Provider,{...i,value:a,children:e})}s(P,"ThemeProvider");const S=s(()=>{const e=v(n);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},"useTheme");export{P as ThemeProvider,S as useTheme};
package/package.json CHANGED
@@ -5,20 +5,12 @@
5
5
  "url": "https://github.com/F1na/fina-react-ds"
6
6
  },
7
7
  "private": false,
8
- "version": "1.0.40",
8
+ "version": "1.0.42",
9
9
  "type": "module",
10
10
  "files": [
11
11
  "dist"
12
12
  ],
13
- "main": "dist/index.js",
14
- "module": "dist/index.js",
15
- "types": "dist/index.d.ts",
16
13
  "exports": {
17
- ".": {
18
- "types": "./dist/index.d.ts",
19
- "import": "./dist/index.js",
20
- "require": "./dist/index.js"
21
- },
22
14
  "./components": {
23
15
  "types": "./dist/components/index.d.ts",
24
16
  "import": "./dist/components/index.js",