@uva-glass/component-library 1.57.0 → 1.59.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/MenuLink/MenuLink.js +19 -11
- package/dist/components/MenuLink/MenuLink.js.map +1 -1
- package/dist/components/Periods/Periods.d.ts +8 -3
- package/dist/components/Periods/Periods.js +36 -29
- package/dist/components/Periods/Periods.js.map +1 -1
- package/dist/components/Periods/Periods.stories.js +16 -11
- package/dist/components/Periods/Periods.stories.js.map +1 -1
- package/package.json +22 -22
|
@@ -1,17 +1,25 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
3
|
-
import { NavLink as
|
|
4
|
-
import '../../assets/MenuLink.css';const
|
|
2
|
+
import { c as u } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { useLocation as k, NavLink as h } from "react-router-dom";
|
|
4
|
+
import '../../assets/MenuLink.css';const i = {
|
|
5
5
|
"menu-link": "_menu-link_8gjhh_1",
|
|
6
6
|
"menu-link--active": "_menu-link--active_8gjhh_8"
|
|
7
|
-
},
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
}, f = (t) => {
|
|
8
|
+
const o = k(), e = (n) => n.replace(/s$/, ""), s = (n) => {
|
|
9
|
+
const l = o.pathname.split("/").filter(Boolean), a = n.split("/").filter(Boolean).slice(-1)[0], c = e(a);
|
|
10
|
+
return l.some((r) => e(r) === c);
|
|
11
|
+
};
|
|
12
|
+
return /* @__PURE__ */ m(
|
|
13
|
+
h,
|
|
14
|
+
{
|
|
15
|
+
...t,
|
|
16
|
+
className: ({ isActive: n }) => u(i["menu-link"], {
|
|
17
|
+
[i["menu-link--active"]]: n || s(t.to)
|
|
18
|
+
})
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
};
|
|
14
22
|
export {
|
|
15
|
-
|
|
23
|
+
f as MenuLink
|
|
16
24
|
};
|
|
17
25
|
//# sourceMappingURL=MenuLink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuLink.js","sources":["../../../src/components/MenuLink/MenuLink.tsx"],"sourcesContent":["import classNames from 'clsx';\nimport { NavLink } from 'react-router-dom';\n\nimport type { NavLinkProps } from 'react-router-dom';\n\nimport styles from './MenuLink.module.css';\n\n/** Represents a component for a [NavLink](https://reactrouter.com/en/main/components/nav-link) with styling. */\n// Omit style so it cannot be accidentally used\nexport const MenuLink = (props: Omit<NavLinkProps, 'style'>) => (\n <NavLink\n
|
|
1
|
+
{"version":3,"file":"MenuLink.js","sources":["../../../src/components/MenuLink/MenuLink.tsx"],"sourcesContent":["import classNames from 'clsx';\nimport { NavLink, useLocation } from 'react-router-dom';\n\nimport type { NavLinkProps } from 'react-router-dom';\n\nimport styles from './MenuLink.module.css';\n\n/** Represents a component for a [NavLink](https://reactrouter.com/en/main/components/nav-link) with styling. */\n// Omit style so it cannot be accidentally used\nexport const MenuLink = (props: Omit<NavLinkProps, 'style'>) => {\n const location = useLocation();\n\n // Helper function to remove trailing 's' from a string\n const singularize = (str: string) => str.replace(/s$/, '');\n\n // Check if 'to' path (singular version) matches any segment (singular version)\n const isActiveSingular = (to: string) => {\n const currentSegments = location.pathname.split('/').filter(Boolean);\n const latestToPath = to.split('/').filter(Boolean).slice(-1)[0]; // return only lates path removing any prepend path\n const singularizedToPath = singularize(latestToPath);\n\n return currentSegments.some((segment) => singularize(segment) === singularizedToPath);\n };\n\n return (\n <NavLink\n {...props}\n className={({ isActive }) =>\n classNames(styles['menu-link'], {\n [styles['menu-link--active']]: isActive || isActiveSingular(props.to as string),\n })\n }\n />\n );\n};\n"],"names":["MenuLink","props","location","useLocation","singularize","str","isActiveSingular","to","currentSegments","latestToPath","singularizedToPath","segment","jsx","NavLink","isActive","classNames","styles"],"mappings":";;;;;;GASaA,IAAW,CAACC,MAAuC;AAC9D,QAAMC,IAAWC,KAGXC,IAAc,CAACC,MAAgBA,EAAI,QAAQ,MAAM,EAAE,GAGnDC,IAAmB,CAACC,MAAe;AACvC,UAAMC,IAAkBN,EAAS,SAAS,MAAM,GAAG,EAAE,OAAO,OAAO,GAC7DO,IAAeF,EAAG,MAAM,GAAG,EAAE,OAAO,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,GACxDG,IAAqBN,EAAYK,CAAY;AAEnD,WAAOD,EAAgB,KAAK,CAACG,MAAYP,EAAYO,CAAO,MAAMD,CAAkB;AAAA,EAAA;AAIpF,SAAA,gBAAAE;AAAA,IAACC;AAAA,IAAA;AAAA,MACE,GAAGZ;AAAA,MACJ,WAAW,CAAC,EAAE,UAAAa,EAAA,MACZC,EAAWC,EAAO,WAAW,GAAG;AAAA,QAC9B,CAACA,EAAO,mBAAmB,CAAC,GAAGF,KAAYR,EAAiBL,EAAM,EAAY;AAAA,MAAA,CAC/E;AAAA,IAAA;AAAA,EAAA;AAIT;"}
|
|
@@ -4,14 +4,19 @@ interface Period {
|
|
|
4
4
|
semesterNumber: number;
|
|
5
5
|
periodInSemester: number;
|
|
6
6
|
}
|
|
7
|
+
interface TooltipTranslations {
|
|
8
|
+
period: string;
|
|
9
|
+
periods: string;
|
|
10
|
+
and: string;
|
|
11
|
+
}
|
|
7
12
|
export interface PeriodsProps {
|
|
8
13
|
/** Indicates which periods are selected. */
|
|
9
14
|
periods: Period[] | number[];
|
|
10
15
|
/** Indicates the maximum number of periods to show in the selector. */
|
|
11
16
|
maxPeriods?: 6 | 7;
|
|
12
|
-
/** A
|
|
13
|
-
|
|
17
|
+
/** A object of translations for the tooltip. */
|
|
18
|
+
tooltipTranslations?: TooltipTranslations;
|
|
14
19
|
}
|
|
15
20
|
/** Represents a component for a period indicator. */
|
|
16
|
-
export declare const Periods: ({ periods,
|
|
21
|
+
export declare const Periods: ({ periods, tooltipTranslations, maxPeriods }: PeriodsProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
22
|
export {};
|
|
@@ -1,35 +1,42 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import { useId as
|
|
4
|
-
import '../../assets/Periods.css';const
|
|
5
|
-
period__container:
|
|
6
|
-
period__item:
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { c as P } from "../../clsx-OuTLNxxd.js";
|
|
3
|
+
import { useId as j } from "react";
|
|
4
|
+
import '../../assets/Periods.css';const N = "_period__container_1ilj5_1", g = "_period__item_1ilj5_6", _ = {
|
|
5
|
+
period__container: N,
|
|
6
|
+
period__item: g,
|
|
7
7
|
"period__item--active": "_period__item--active_1ilj5_19"
|
|
8
|
-
},
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
return
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
8
|
+
}, v = 6, O = ({ periods: s, tooltipTranslations: u, maxPeriods: p = v }) => {
|
|
9
|
+
const f = Array.from({ length: p }, (e, t) => t + 1), $ = j(), a = s.some((e) => typeof e == "number"), b = (e) => {
|
|
10
|
+
const t = {};
|
|
11
|
+
return a ? s.forEach((i) => {
|
|
12
|
+
if (typeof i == "number") {
|
|
13
|
+
const r = Math.ceil(i / 3), o = (i - 1) % 3 + 1;
|
|
14
|
+
t[r] || (t[r] = []), t[r].push(o);
|
|
15
|
+
}
|
|
16
|
+
}) : s.forEach((i) => {
|
|
17
|
+
const { semesterNumber: r, periodInSemester: o } = i;
|
|
18
|
+
t[r] || (t[r] = []), t[r].push(o);
|
|
19
|
+
}), Object.keys(t).reduce((i, r, o) => {
|
|
20
|
+
const c = Number(r), n = t[c];
|
|
21
|
+
let m = "";
|
|
22
|
+
const d = n.length > 1 ? e.periods : e.period;
|
|
23
|
+
if (n.length > 1) {
|
|
24
|
+
const y = n.pop();
|
|
25
|
+
m = `Semester ${c} ${d} ${n.join(", ")} ${e.and} ${y}`;
|
|
26
|
+
} else
|
|
27
|
+
m = `Semester ${c} ${d} ${n[0]}`;
|
|
28
|
+
return `${i}${o > 0 ? ". " : ""}${m}`;
|
|
29
|
+
}, "").trim() + ".";
|
|
30
|
+
}, h = (e) => a ? s.includes(e) : !!s.find((t) => t.number === e);
|
|
31
|
+
return /* @__PURE__ */ l("div", { className: _.period__container, title: u ? b(u) : "", children: f.map((e) => /* @__PURE__ */ l(
|
|
32
|
+
"span",
|
|
19
33
|
{
|
|
20
|
-
className:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
{
|
|
25
|
-
className: N(n.period__item, f(e) ? n["period__item--active"] : "")
|
|
26
|
-
},
|
|
27
|
-
`${u}-${e}`
|
|
28
|
-
))
|
|
29
|
-
}
|
|
30
|
-
);
|
|
34
|
+
className: P(_.period__item, h(e) ? _["period__item--active"] : "")
|
|
35
|
+
},
|
|
36
|
+
`${$}-${e}`
|
|
37
|
+
)) });
|
|
31
38
|
};
|
|
32
39
|
export {
|
|
33
|
-
|
|
40
|
+
O as Periods
|
|
34
41
|
};
|
|
35
42
|
//# sourceMappingURL=Periods.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Periods.js","sources":["../../../src/components/Periods/Periods.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport { useId } from 'react';\n\nimport styles from './Periods.module.css';\n\ninterface Period {\n id: string;\n number: number;\n semesterNumber: number;\n periodInSemester: number;\n}\n\nexport interface PeriodsProps {\n /** Indicates which periods are selected. */\n periods: Period[] | number[];\n /** Indicates the maximum number of periods to show in the selector. */\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers\n maxPeriods?: 6 | 7;\n /** A
|
|
1
|
+
{"version":3,"file":"Periods.js","sources":["../../../src/components/Periods/Periods.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport { useId } from 'react';\n\nimport styles from './Periods.module.css';\n\ninterface Period {\n id: string;\n number: number;\n semesterNumber: number;\n periodInSemester: number;\n}\n\ninterface TooltipTranslations {\n period: string;\n periods: string;\n and: string;\n}\n\nexport interface PeriodsProps {\n /** Indicates which periods are selected. */\n periods: Period[] | number[];\n /** Indicates the maximum number of periods to show in the selector. */\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers\n maxPeriods?: 6 | 7;\n /** A object of translations for the tooltip. */\n tooltipTranslations?: TooltipTranslations;\n}\n\nconst MAX_PERIODS = 6;\n\n/** Represents a component for a period indicator. */\nexport const Periods = ({ periods, tooltipTranslations, maxPeriods = MAX_PERIODS }: PeriodsProps) => {\n const maxPeriodsList = Array.from({ length: maxPeriods }, (_, index) => index + 1);\n const idPrefix = useId();\n\n const isArrayOfNumbers = periods.some((value) => {\n return typeof value === 'number';\n });\n\n const getTitles = (tooltipTranslations: TooltipTranslations): string => {\n const semesterPeriods: Record<number, number[]> = {};\n\n // Group periods by semester\n isArrayOfNumbers\n ? periods.forEach((period) => {\n if (typeof period === 'number') {\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers\n const groupKey = Math.ceil(period / 3); // Determine the semester (1, 2, or 3)\n // eslint-disable-next-line @typescript-eslint/no-magic-numbers\n const mappedValue = ((period - 1) % 3) + 1; // Map period to semester\n\n if (!semesterPeriods[groupKey]) {\n semesterPeriods[groupKey] = [];\n }\n semesterPeriods[groupKey].push(mappedValue);\n }\n })\n : periods.forEach((period) => {\n const { semesterNumber, periodInSemester } = period as Period;\n\n if (!semesterPeriods[semesterNumber]) {\n semesterPeriods[semesterNumber] = [];\n }\n semesterPeriods[semesterNumber].push(periodInSemester);\n });\n\n // Build the title string\n const title = Object.keys(semesterPeriods).reduce((acc, semesterKey, index) => {\n const semesterNumber = Number(semesterKey);\n const periodsInSemester = semesterPeriods[semesterNumber];\n let periodTitle = '';\n\n // Determine if we need singular or plural form for \"period\"\n const blokLabel = periodsInSemester.length > 1 ? tooltipTranslations.periods : tooltipTranslations.period;\n\n // Build period sequence for the current semester\n if (periodsInSemester.length > 1) {\n const lastPeriod = periodsInSemester.pop();\n periodTitle = `Semester ${semesterNumber} ${blokLabel} ${periodsInSemester.join(', ')} ${tooltipTranslations.and} ${lastPeriod}`;\n } else {\n periodTitle = `Semester ${semesterNumber} ${blokLabel} ${periodsInSemester[0]}`;\n }\n\n // Add proper spacing and periods\n return `${acc}${index > 0 ? '. ' : ''}${periodTitle}`;\n }, '');\n\n return title.trim() + '.';\n };\n\n const isPeriodActive = (periodIndex: number): boolean => {\n if (isArrayOfNumbers) {\n return (periods as number[]).includes(periodIndex);\n } else {\n return periods.find((period) => (period as Period).number === periodIndex) ? true : false;\n }\n };\n\n return (\n <div className={styles['period__container']} title={tooltipTranslations ? getTitles(tooltipTranslations) : ''}>\n {maxPeriodsList.map((periodIndex) => {\n return (\n <span\n className={clsx(styles['period__item'], isPeriodActive(periodIndex) ? styles['period__item--active'] : '')}\n key={`${idPrefix}-${periodIndex}`}\n />\n );\n })}\n </div>\n );\n};\n"],"names":["MAX_PERIODS","Periods","periods","tooltipTranslations","maxPeriods","maxPeriodsList","_","index","idPrefix","useId","isArrayOfNumbers","value","getTitles","semesterPeriods","period","groupKey","mappedValue","semesterNumber","periodInSemester","acc","semesterKey","periodsInSemester","periodTitle","blokLabel","lastPeriod","isPeriodActive","periodIndex","jsx","styles","clsx"],"mappings":";;;;;;;GA4BMA,IAAc,GAGPC,IAAU,CAAC,EAAE,SAAAC,GAAS,qBAAAC,GAAqB,YAAAC,IAAaJ,QAAgC;AAC7F,QAAAK,IAAiB,MAAM,KAAK,EAAE,QAAQD,KAAc,CAACE,GAAGC,MAAUA,IAAQ,CAAC,GAC3EC,IAAWC,KAEXC,IAAmBR,EAAQ,KAAK,CAACS,MAC9B,OAAOA,KAAU,QACzB,GAEKC,IAAY,CAACT,MAAqD;AACtE,UAAMU,IAA4C,CAAA;AAI9C,WAAAH,IAAAR,EAAQ,QAAQ,CAACY,MAAW;AACtB,UAAA,OAAOA,KAAW,UAAU;AAE9B,cAAMC,IAAW,KAAK,KAAKD,IAAS,CAAC,GAE/BE,KAAgBF,IAAS,KAAK,IAAK;AAErC,QAACD,EAAgBE,CAAQ,MACXF,EAAAE,CAAQ,IAAI,KAEdF,EAAAE,CAAQ,EAAE,KAAKC,CAAW;AAAA,MAC5C;AAAA,IACD,CAAA,IACDd,EAAQ,QAAQ,CAACY,MAAW;AACpB,YAAA,EAAE,gBAAAG,GAAgB,kBAAAC,EAAqB,IAAAJ;AAEzC,MAACD,EAAgBI,CAAc,MACjBJ,EAAAI,CAAc,IAAI,KAEpBJ,EAAAI,CAAc,EAAE,KAAKC,CAAgB;AAAA,IAAA,CACtD,GAGS,OAAO,KAAKL,CAAe,EAAE,OAAO,CAACM,GAAKC,GAAab,MAAU;AACvE,YAAAU,IAAiB,OAAOG,CAAW,GACnCC,IAAoBR,EAAgBI,CAAc;AACxD,UAAIK,IAAc;AAGlB,YAAMC,IAAYF,EAAkB,SAAS,IAAIlB,EAAoB,UAAUA,EAAoB;AAG/F,UAAAkB,EAAkB,SAAS,GAAG;AAC1B,cAAAG,IAAaH,EAAkB;AACrC,QAAAC,IAAc,YAAYL,CAAc,IAAIM,CAAS,IAAIF,EAAkB,KAAK,IAAI,CAAC,IAAIlB,EAAoB,GAAG,IAAIqB,CAAU;AAAA,MAAA;AAE9H,QAAAF,IAAc,YAAYL,CAAc,IAAIM,CAAS,IAAIF,EAAkB,CAAC,CAAC;AAIxE,aAAA,GAAGF,CAAG,GAAGZ,IAAQ,IAAI,OAAO,EAAE,GAAGe,CAAW;AAAA,OAClD,EAAE,EAEQ,KAAS,IAAA;AAAA,EAAA,GAGlBG,IAAiB,CAACC,MAClBhB,IACMR,EAAqB,SAASwB,CAAW,IAE1C,EAAAxB,EAAQ,KAAK,CAACY,MAAYA,EAAkB,WAAWY,CAAW;AAI7E,SACG,gBAAAC,EAAA,OAAA,EAAI,WAAWC,EAAO,mBAAsB,OAAOzB,IAAsBS,EAAUT,CAAmB,IAAI,IACxG,UAAeE,EAAA,IAAI,CAACqB,MAEjB,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWE,EAAKD,EAAO,cAAiBH,EAAeC,CAAW,IAAIE,EAAO,sBAAsB,IAAI,EAAE;AAAA,IAAA;AAAA,IACpG,GAAGpB,CAAQ,IAAIkB,CAAW;AAAA,EAAA,CAGpC,EACH,CAAA;AAEJ;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { Periods as e } from "./Periods.js";
|
|
3
|
-
const
|
|
3
|
+
const o = "<Periods periods={periods} />", t = [
|
|
4
4
|
{
|
|
5
5
|
id: "2023P1",
|
|
6
6
|
number: 1,
|
|
@@ -13,6 +13,12 @@ const t = "<Periods periods={periods} />", o = [
|
|
|
13
13
|
semesterNumber: 1,
|
|
14
14
|
periodInSemester: 2
|
|
15
15
|
},
|
|
16
|
+
{
|
|
17
|
+
id: "2023P3",
|
|
18
|
+
number: 3,
|
|
19
|
+
semesterNumber: 1,
|
|
20
|
+
periodInSemester: 3
|
|
21
|
+
},
|
|
16
22
|
{
|
|
17
23
|
id: "2023P5",
|
|
18
24
|
number: 5,
|
|
@@ -26,10 +32,9 @@ const t = "<Periods periods={periods} />", o = [
|
|
|
26
32
|
periodInSemester: 1
|
|
27
33
|
}
|
|
28
34
|
], i = {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
35
|
+
period: "blok",
|
|
36
|
+
periods: "blokken",
|
|
37
|
+
and: "en"
|
|
33
38
|
}, a = {
|
|
34
39
|
title: "Atoms/Periods",
|
|
35
40
|
component: e,
|
|
@@ -43,16 +48,16 @@ const t = "<Periods periods={periods} />", o = [
|
|
|
43
48
|
},
|
|
44
49
|
parameters: {
|
|
45
50
|
inspectComponent: e,
|
|
46
|
-
codeString:
|
|
51
|
+
codeString: o
|
|
47
52
|
}
|
|
48
|
-
}, m = (r) => /* @__PURE__ */ s(e, { ...r }),
|
|
49
|
-
|
|
50
|
-
periods:
|
|
53
|
+
}, m = (r) => /* @__PURE__ */ s(e, { ...r }), n = m.bind({});
|
|
54
|
+
n.args = {
|
|
55
|
+
periods: t,
|
|
51
56
|
maxPeriods: 7,
|
|
52
|
-
|
|
57
|
+
tooltipTranslations: i
|
|
53
58
|
};
|
|
54
59
|
export {
|
|
55
|
-
|
|
60
|
+
n as PeriodsExample,
|
|
56
61
|
a as default
|
|
57
62
|
};
|
|
58
63
|
//# sourceMappingURL=Periods.stories.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Periods.stories.js","sources":["../../../src/components/Periods/Periods.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { PeriodsProps } from './Periods';\n\nimport { Periods } from './Periods';\n\nconst codeString = '<Periods periods={periods} />';\n\nconst PERIODS = [\n {\n id: '2023P1',\n number: 1,\n semesterNumber: 1,\n periodInSemester: 1,\n },\n {\n id: '2023P2',\n number: 2,\n semesterNumber: 1,\n periodInSemester: 2,\n },\n {\n id: '2023P5',\n number: 5,\n semesterNumber: 2,\n periodInSemester: 2,\n },\n {\n id: '2023P7',\n number: 7,\n semesterNumber: 3,\n periodInSemester: 1,\n },\n];\n\nconst
|
|
1
|
+
{"version":3,"file":"Periods.stories.js","sources":["../../../src/components/Periods/Periods.stories.tsx"],"sourcesContent":["import type { Meta, StoryFn } from '@storybook/react';\nimport type { PeriodsProps } from './Periods';\n\nimport { Periods } from './Periods';\n\nconst codeString = '<Periods periods={periods} />';\n\nconst PERIODS = [\n {\n id: '2023P1',\n number: 1,\n semesterNumber: 1,\n periodInSemester: 1,\n },\n {\n id: '2023P2',\n number: 2,\n semesterNumber: 1,\n periodInSemester: 2,\n },\n {\n id: '2023P3',\n number: 3,\n semesterNumber: 1,\n periodInSemester: 3,\n },\n {\n id: '2023P5',\n number: 5,\n semesterNumber: 2,\n periodInSemester: 2,\n },\n {\n id: '2023P7',\n number: 7,\n semesterNumber: 3,\n periodInSemester: 1,\n },\n];\n\nconst TOOLTIP_PERIODS = {\n period: 'blok',\n periods: 'blokken',\n and: 'en',\n};\n\n// eslint-disable-next-line import/no-default-export\nexport default {\n title: 'Atoms/Periods',\n component: Periods,\n argTypes: {\n expanded: {\n // Hide the expanded prop. Changing the value in Storybook doesn't update the state of the component.\n table: {\n disable: true,\n },\n },\n },\n parameters: {\n inspectComponent: Periods,\n codeString: codeString,\n },\n} as Meta<PeriodsProps>;\n\nconst Template: StoryFn<PeriodsProps> = (args) => <Periods {...args} />;\n\nexport const PeriodsExample = Template.bind({});\n\nPeriodsExample.args = {\n periods: PERIODS,\n maxPeriods: 7,\n tooltipTranslations: TOOLTIP_PERIODS,\n};\n"],"names":["codeString","PERIODS","TOOLTIP_PERIODS","Periods_stories","Periods","Template","args","jsx","PeriodsExample"],"mappings":";;AAKA,MAAMA,IAAa,iCAEbC,IAAU;AAAA,EACd;AAAA,IACE,IAAI;AAAA,IACJ,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,EACpB;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,EACpB;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,EACpB;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,EACpB;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,QAAQ;AAAA,IACR,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,EACpB;AACF,GAEMC,IAAkB;AAAA,EACtB,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,KAAK;AACP,GAGeC,IAAA;AAAA,EACb,OAAO;AAAA,EACP,WAAWC;AAAA,EACX,UAAU;AAAA,IACR,UAAU;AAAA;AAAA,MAER,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,EACF;AAAA,EACA,YAAY;AAAA,IACV,kBAAkBA;AAAA,IAClB,YAAAJ;AAAA,EACF;AACF,GAEMK,IAAkC,CAACC,MAAU,gBAAAC,EAAAH,GAAA,EAAS,GAAGE,EAAM,CAAA,GAExDE,IAAiBH,EAAS,KAAK,EAAE;AAE9CG,EAAe,OAAO;AAAA,EACpB,SAASP;AAAA,EACT,YAAY;AAAA,EACZ,qBAAqBC;AACvB;"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@uva-glass/component-library",
|
|
3
3
|
"author": "Team Glass - Frontend vrienden",
|
|
4
4
|
"private": false,
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.59.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
@@ -48,48 +48,48 @@
|
|
|
48
48
|
"@semantic-release/git": "^10.0.1",
|
|
49
49
|
"@semantic-release/gitlab": "^13.2.1",
|
|
50
50
|
"@semantic-release/npm": "^12.0.1",
|
|
51
|
-
"@storybook/addon-a11y": "^8.3.
|
|
52
|
-
"@storybook/addon-essentials": "^8.3.
|
|
53
|
-
"@storybook/addon-links": "^8.3.
|
|
54
|
-
"@storybook/blocks": "^8.3.
|
|
55
|
-
"@storybook/manager-api": "^8.3.
|
|
56
|
-
"@storybook/preview-api": "^8.3.
|
|
57
|
-
"@storybook/react": "^8.3.
|
|
58
|
-
"@storybook/react-vite": "^8.3.
|
|
59
|
-
"@storybook/test": "^8.3.
|
|
60
|
-
"@types/node": "^20.16.
|
|
61
|
-
"@types/react": "^18.3.
|
|
51
|
+
"@storybook/addon-a11y": "^8.3.6",
|
|
52
|
+
"@storybook/addon-essentials": "^8.3.6",
|
|
53
|
+
"@storybook/addon-links": "^8.3.6",
|
|
54
|
+
"@storybook/blocks": "^8.3.6",
|
|
55
|
+
"@storybook/manager-api": "^8.3.6",
|
|
56
|
+
"@storybook/preview-api": "^8.3.6",
|
|
57
|
+
"@storybook/react": "^8.3.6",
|
|
58
|
+
"@storybook/react-vite": "^8.3.6",
|
|
59
|
+
"@storybook/test": "^8.3.6",
|
|
60
|
+
"@types/node": "^20.16.15",
|
|
61
|
+
"@types/react": "^18.3.12",
|
|
62
62
|
"@types/react-dom": "^18.3.1",
|
|
63
63
|
"@uva-glass/eslint-config": "^1.3.1",
|
|
64
64
|
"@uva-glass/stylelint-config": "^1.1.0",
|
|
65
|
-
"@vitejs/plugin-react": "^4.3.
|
|
65
|
+
"@vitejs/plugin-react": "^4.3.3",
|
|
66
66
|
"clsx": "^2.1.1",
|
|
67
67
|
"eslint": "^8.57.1",
|
|
68
68
|
"eslint-config-prettier": "^9.1.0",
|
|
69
69
|
"eslint-plugin-prettier": "^5.2.1",
|
|
70
|
-
"eslint-plugin-react": "^7.37.
|
|
70
|
+
"eslint-plugin-react": "^7.37.2",
|
|
71
71
|
"eslint-plugin-react-hooks": "^5.0.0",
|
|
72
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
73
|
-
"eslint-plugin-storybook": "^0.
|
|
72
|
+
"eslint-plugin-react-refresh": "^0.4.13",
|
|
73
|
+
"eslint-plugin-storybook": "^0.10.1",
|
|
74
74
|
"glob": "^11.0.0",
|
|
75
75
|
"jest": "^29.7.0",
|
|
76
76
|
"jest-environment-jsdom": "^29.7.0",
|
|
77
77
|
"jest-junit": "^16.0.0",
|
|
78
78
|
"jsdom": "^25.0.1",
|
|
79
|
-
"npm-run-all2": "^
|
|
79
|
+
"npm-run-all2": "^7.0.0",
|
|
80
80
|
"react": "^18.3.1",
|
|
81
81
|
"react-dom": "^18.3.1",
|
|
82
82
|
"react-router-dom": "^6.27.0",
|
|
83
|
-
"semantic-release": "^24.1.
|
|
84
|
-
"storybook": "^8.3.
|
|
85
|
-
"style-dictionary": "^4.1.
|
|
83
|
+
"semantic-release": "^24.1.3",
|
|
84
|
+
"storybook": "^8.3.6",
|
|
85
|
+
"style-dictionary": "^4.1.4",
|
|
86
86
|
"stylelint": "^16.10.0",
|
|
87
87
|
"stylelint-config-recommended": "^14.0.1",
|
|
88
88
|
"stylelint-config-standard": "^36.0.1",
|
|
89
89
|
"stylelint-order": "^6.0.4",
|
|
90
90
|
"typescript": "^5.6.3",
|
|
91
|
-
"vite": "^5.4.
|
|
92
|
-
"vite-plugin-dts": "^4.
|
|
91
|
+
"vite": "^5.4.10",
|
|
92
|
+
"vite-plugin-dts": "^4.3.0",
|
|
93
93
|
"vite-plugin-lib-inject-css": "^2.1.1",
|
|
94
94
|
"vite-plugin-static-copy": "^2.0.0",
|
|
95
95
|
"vite-plugin-svgr": "^4.2.0",
|