diff --git a/lib/Frame.d.ts.map b/lib/Frame.d.ts.map index bcc6563..14a68f6 100644 --- a/lib/Frame.d.ts.map +++ b/lib/Frame.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Frame.d.ts","sourceRoot":"","sources":["../src/Frame.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAQxC,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE;QACN,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,EAAE,CAAA;KACrC,CAAA;IACD,aAAa,CAAC,EAAE;QACd,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAA;KACzB,CAAA;IACD,KAAK,EAAE,IAAI,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,UAAU,CAAC,EAAE;QACX,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;IACD,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC7B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,eA6GtD"} \ No newline at end of file +{"version":3,"file":"Frame.d.ts","sourceRoot":"","sources":["../src/Frame.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAOxC,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE;QACN,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,EAAE,CAAA;KACrC,CAAA;IACD,aAAa,CAAC,EAAE;QACd,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAA;KACzB,CAAA;IACD,KAAK,EAAE,IAAI,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,UAAU,CAAC,EAAE;QACX,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAA;IACD,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAC7B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,eA6GtD"} \ No newline at end of file diff --git a/lib/Frame.js b/lib/Frame.js index 2c61b12..935ab27 100644 --- a/lib/Frame.js +++ b/lib/Frame.js @@ -2,7 +2,6 @@ import React from 'react'; import cx from 'classnames'; import { getDisplayTime, getEventDate } from './utils'; import { useMemo } from 'react'; -const defaultStyles = require('./css/frame.module.css'); const defaultDayLabels = ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN']; const defaultWeeks = 4; export function CalendarFrame(props) { @@ -11,9 +10,9 @@ export function CalendarFrame(props) { days.indexOf(props.startIndex) : props.startIndex || 0; const styles = useMemo(() => { - let s = Object.assign({}, defaultStyles); + let s = {}; for (let [k, v] of Object.entries(props.classNames || {})) { - s[k] += ' ' + v; + s[k] += k + ' ' + v; } return s; }, []); diff --git a/lib/Frame.js.map b/lib/Frame.js.map index a58ca18..d100108 100644 --- a/lib/Frame.js.map +++ b/lib/Frame.js.map @@ -1 +1 @@ -{"version":3,"file":"Frame.js","sourceRoot":"","sources":["../src/Frame.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,YAAY,CAAC;AAG5B,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,O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AC;QACR,CAAC,CAAC,CACI,CACF,CACT,CAAC;AAEJ,CAAC"} \ No newline at end of file diff --git a/lib/Key.d.ts.map b/lib/Key.d.ts.map index 95e68d5..b62e09a 100644 --- a/lib/Key.d.ts.map +++ b/lib/Key.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"Key.d.ts","sourceRoot":"","sources":["../src/Key.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,gBAAgB;IAC/B,UAAU,CAAC,EAAE;QACX,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KACtB,CAAA;IACD,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;KACxB,CAAA;IACD,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5C,aAAa,EAAE;QACb,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAA;KACzB,CAAA;CACF;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,eAmClD"} \ No newline at end of file +{"version":3,"file":"Key.d.ts","sourceRoot":"","sources":["../src/Key.tsx"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,UAAU,CAAC,EAAE;QACX,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KACtB,CAAA;IACD,UAAU,EAAE;QACV,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAA;KACxB,CAAA;IACD,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5C,aAAa,EAAE;QACb,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAA;KACzB,CAAA;CACF;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,eAmClD"} \ No newline at end of file diff --git a/lib/Key.js b/lib/Key.js index 3709ee6..5b72c29 100644 --- a/lib/Key.js +++ b/lib/Key.js @@ -1,11 +1,10 @@ import React from 'react'; import { useMemo } from 'react'; -const defaultStyles = require('./css/key.module.css'); export function CalendarKey(props) { const styles = useMemo(() => { - let s = Object.assign({}, defaultStyles); + let s = {}; for (let [k, v] of Object.entries(props.classNames || {})) { - s[k] += ' ' + v; + s[k] += k + ' ' + v; } return s; }, []); diff --git a/lib/Key.js.map b/lib/Key.js.map index b4cfd78..f02c7b2 100644 --- a/lib/Key.js.map +++ b/lib/Key.js.map @@ -1 +1 @@ -{"version":3,"file":"Key.js","sourceRoot":"","sources":["../src/Key.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,MAAM,aAAa,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAC;AAetD,MAAM,UAAU,WAAW,CAAC,KAAuB;IAEjD,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE;QAC1B,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,aAAa,CAAC,CAAC;QACzC,KAAK,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,IAAI,EAAE,CAAC,EAAE;YACzD,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,GAAG,CAAC,CAAC;SACjB;QACD,OAAO,CAAC,CAAC;IACX,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,IAAI,EAAE,CAAC;IAEhD,IAAI,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC1D,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAAE,OAAO,CAAC,CAAC,CAAC;aACtB,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAAE,OAAO,CAAC,CA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AC,aAAa,IAAI,EAAE,CAAC;IAEhD,IAAI,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QAC1D,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAAE,OAAO,CAAC,CAAC,CAAC;aACtB,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAAE,OAAO,CAAC,CAAC;;YAC1B,OAAO,CAAC,CAAC;IAChB,CAAC,CAAC,CAAC;IAEH,OAAO,CACL,6BAAK,SAAS,EAAE,MAAM,CAAC,GAAG,IACvB,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,YAAY,CAAC,EAAE,CAAC,EAAE,EAAE;QACvC,OAAO,6BAAK,SAAS,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;YACjE,8BAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,mBAAmB,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,IAC9F,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;gBACrB,QAAQ,CAAC,CAAC;gBACV,QAAQ,CAEL;YACP,gCACG,SAAS,GAAG,YAAY,CACtB,CACD,CAAC;IACT,CAAC,CAAC,CACE,CACP,CAAC;AACJ,CAAC"} \ No newline at end of file diff --git a/lib/css/frame.module.css b/lib/css/frame.module.css deleted file mode 100644 index e69de29..0000000 diff --git a/lib/css/key.module.css b/lib/css/key.module.css deleted file mode 100644 index e69de29..0000000 diff --git a/src/Frame.tsx b/src/Frame.tsx index 45724e9..72eec9a 100644 --- a/src/Frame.tsx +++ b/src/Frame.tsx @@ -4,7 +4,6 @@ import cx from 'classnames'; import { CalendarEvent } from './Event'; import { getDisplayTime, getEventDate } from './utils'; import { useMemo } from 'react'; -const defaultStyles = require('./css/frame.module.css'); const defaultDayLabels = ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN']; const defaultWeeks = 4; @@ -38,9 +37,9 @@ export function CalendarFrame(props: CalendarFrameProps) { props.startIndex || 0; const styles = useMemo(() => { - let s = Object.assign({}, defaultStyles); + let s = {} as {[key: string]: string}; for (let [k, v] of Object.entries(props.classNames || {})) { - s[k] += ' ' + v; + s[k] += k + ' ' + v; } return s; }, []); diff --git a/src/Key.tsx b/src/Key.tsx index e8f07c4..75390a7 100644 --- a/src/Key.tsx +++ b/src/Key.tsx @@ -1,6 +1,5 @@ import React from 'react'; import { useMemo } from 'react'; -const defaultStyles = require('./css/key.module.css'); export interface CalendarKeyProps { classNames?: { @@ -18,9 +17,9 @@ export interface CalendarKeyProps { export function CalendarKey(props: CalendarKeyProps) { const styles = useMemo(() => { - let s = Object.assign({}, defaultStyles); + let s = {} as {[key: string]: string}; for (let [k, v] of Object.entries(props.classNames || {})) { - s[k] += ' ' + v; + s[k] += k + ' ' + v; } return s; }, []); diff --git a/src/css/frame.module.css b/src/css/frame.module.css deleted file mode 100644 index e69de29..0000000 diff --git a/src/css/key.module.css b/src/css/key.module.css deleted file mode 100644 index e69de29..0000000