@tedi-design-system/react 19.0.0-rc.1 → 19.0.0-rc.11
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/README.md +27 -1
- package/_virtual/index.es13.js +2 -2
- package/_virtual/index.es14.js +2 -2
- package/bundle-stats.html +1 -1
- package/external/react-is/index.cjs.js +1 -1
- package/external/react-is/index.es.js +1 -1
- package/external/toposort/index.cjs.js +1 -1
- package/external/toposort/index.es.js +1 -1
- package/fonts/material-symbols-outlined.woff2 +0 -0
- package/fonts/material-symbols-rounded.woff2 +0 -0
- package/fonts/material-symbols-sharp.woff2 +0 -0
- package/index.css +1 -1
- package/package.json +6 -4
- package/src/community/components/card/card.cjs.js +1 -1
- package/src/community/components/card/card.es.js +20 -19
- package/src/community/components/color-tokens.cjs.js +1 -0
- package/src/community/components/color-tokens.d.ts +14 -0
- package/src/community/components/color-tokens.es.js +35 -0
- package/src/community/components/layout/header/components/header-role/header-role.cjs.js +1 -1
- package/src/community/components/layout/header/components/header-role/header-role.es.js +19 -19
- package/src/community/components/layout/header/components/header-role/header-role.module.scss.cjs.js +1 -1
- package/src/community/components/layout/header/components/header-role/header-role.module.scss.es.js +2 -1
- package/src/community/components/tooltip/tooltip.cjs.js +1 -1
- package/src/community/components/tooltip/tooltip.es.js +31 -30
- package/src/tedi/components/content/calendar/calendar.cjs.js +1 -1
- package/src/tedi/components/content/calendar/calendar.d.ts +12 -0
- package/src/tedi/components/content/calendar/calendar.es.js +39 -35
- package/src/tedi/components/content/calendar/components/calendar-header/calendar-header.cjs.js +1 -1
- package/src/tedi/components/content/calendar/components/calendar-header/calendar-header.d.ts +13 -1
- package/src/tedi/components/content/calendar/components/calendar-header/calendar-header.es.js +40 -35
- package/src/tedi/components/content/table/table.cjs.js +1 -1
- package/src/tedi/components/content/table/table.d.ts +6 -0
- package/src/tedi/components/content/table/table.es.js +431 -413
- package/src/tedi/components/content/table/table.module.scss.cjs.js +1 -1
- package/src/tedi/components/content/table/table.module.scss.es.js +3 -0
- package/src/tedi/components/form/date-field/date-field.cjs.js +1 -1
- package/src/tedi/components/form/date-field/date-field.d.ts +10 -0
- package/src/tedi/components/form/date-field/date-field.es.js +176 -170
- package/src/tedi/components/form/date-field/date-picker-modal/date-picker-modal.cjs.js +1 -1
- package/src/tedi/components/form/date-field/date-picker-modal/date-picker-modal.d.ts +4 -0
- package/src/tedi/components/form/date-field/date-picker-modal/date-picker-modal.es.js +47 -43
- package/src/tedi/components/form/date-time-field/date-time-field.cjs.js +1 -1
- package/src/tedi/components/form/date-time-field/date-time-field.d.ts +10 -0
- package/src/tedi/components/form/date-time-field/date-time-field.es.js +92 -88
- package/src/tedi/components/form/file-upload/file-upload.cjs.js +1 -1
- package/src/tedi/components/form/file-upload/file-upload.es.js +11 -11
- package/src/tedi/components/form/select/components/select-multi-option.cjs.js +1 -1
- package/src/tedi/components/form/select/components/select-multi-option.es.js +24 -23
- package/src/tedi/components/form/select/components/select-single-option.cjs.js +1 -1
- package/src/tedi/components/form/select/components/select-single-option.es.js +11 -10
- package/src/tedi/components/form/select/select.module.scss.cjs.js +1 -1
- package/src/tedi/components/form/select/select.module.scss.es.js +2 -1
- package/src/tedi/components/misc/ellipsis/ellipsis.cjs.js +1 -1
- package/src/tedi/components/misc/ellipsis/ellipsis.es.js +20 -19
- package/src/tedi/components/misc/timeline/components/timeline-description/timeline-description.cjs.js +1 -0
- package/src/tedi/components/misc/timeline/components/timeline-description/timeline-description.d.ts +23 -0
- package/src/tedi/components/misc/timeline/components/timeline-description/timeline-description.es.js +12 -0
- package/src/tedi/components/misc/timeline/components/timeline-item/timeline-item.cjs.js +1 -0
- package/src/tedi/components/misc/timeline/components/timeline-item/timeline-item.d.ts +34 -0
- package/src/tedi/components/misc/timeline/components/timeline-item/timeline-item.es.js +63 -0
- package/src/tedi/components/misc/timeline/components/timeline-title/timeline-title.cjs.js +1 -0
- package/src/tedi/components/misc/timeline/components/timeline-title/timeline-title.d.ts +24 -0
- package/src/tedi/components/misc/timeline/components/timeline-title/timeline-title.es.js +8 -0
- package/src/tedi/components/misc/timeline/index.d.ts +4 -0
- package/src/tedi/components/misc/timeline/timeline.cjs.js +1 -0
- package/src/tedi/components/misc/timeline/timeline.d.ts +48 -0
- package/src/tedi/components/misc/timeline/timeline.es.js +38 -0
- package/src/tedi/components/misc/timeline/timeline.module.scss.cjs.js +1 -0
- package/src/tedi/components/misc/timeline/timeline.module.scss.es.js +18 -0
- package/src/tedi/components/navigation/breadcrumbs/breadcrumbs.cjs.js +1 -1
- package/src/tedi/components/navigation/breadcrumbs/breadcrumbs.es.js +35 -32
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-collapsible/table-of-contents-collapsible.cjs.js +1 -1
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-collapsible/table-of-contents-collapsible.d.ts +1 -1
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-collapsible/table-of-contents-collapsible.es.js +33 -33
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-item/table-of-contents-item.d.ts +0 -10
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-list/table-of-contents-list.cjs.js +1 -1
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-list/table-of-contents-list.es.js +27 -18
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-row/table-of-contents-row.cjs.js +1 -1
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-row/table-of-contents-row.es.js +21 -35
- package/src/tedi/components/navigation/table-of-contents/table-of-contents.cjs.js +1 -1
- package/src/tedi/components/navigation/table-of-contents/table-of-contents.d.ts +17 -10
- package/src/tedi/components/navigation/table-of-contents/table-of-contents.es.js +51 -52
- package/src/tedi/components/navigation/table-of-contents/table-of-contents.module.scss.cjs.js +1 -1
- package/src/tedi/components/navigation/table-of-contents/table-of-contents.module.scss.es.js +0 -1
- package/src/tedi/components/overlays/dropdown/dropdown-item/dropdown-item.cjs.js +1 -1
- package/src/tedi/components/overlays/dropdown/dropdown-item/dropdown-item.d.ts +8 -4
- package/src/tedi/components/overlays/dropdown/dropdown-item/dropdown-item.es.js +85 -54
- package/src/tedi/components/overlays/overlay/overlay-content.cjs.js +1 -1
- package/src/tedi/components/overlays/overlay/overlay-content.d.ts +6 -1
- package/src/tedi/components/overlays/overlay/overlay-content.es.js +28 -27
- package/src/tedi/components/overlays/popover/popover-content.cjs.js +1 -1
- package/src/tedi/components/overlays/popover/popover-content.d.ts +7 -0
- package/src/tedi/components/overlays/popover/popover-content.es.js +47 -36
- package/src/tedi/index.d.ts +1 -0
- package/src/tedi/providers/label-provider/labels-map.cjs.js +1 -1
- package/src/tedi/providers/label-provider/labels-map.d.ts +0 -21
- package/src/tedi/providers/label-provider/labels-map.es.js +2 -23
- package/tedi.cjs.js +1 -1
- package/tedi.es.js +88 -80
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tedi-design-system/react",
|
|
3
|
-
"version": "19.0.0-rc.
|
|
3
|
+
"version": "19.0.0-rc.11",
|
|
4
|
+
"description": "TEDI Design System React component library — accessible, reusable UI components. Docs & live examples: https://storybook.tedi.ee/react/rc/",
|
|
4
5
|
"type": "module",
|
|
5
6
|
"sideEffects": false,
|
|
6
7
|
"exports": {
|
|
@@ -20,7 +21,7 @@
|
|
|
20
21
|
"prepare": "husky",
|
|
21
22
|
"start": "storybook dev -p 4400 -c .storybook",
|
|
22
23
|
"build": "rm -rf dist && vite build --config vite.lib.config.ts && replace-in-file //fonts//g \"./fonts/\" dist/index.css --isRegex",
|
|
23
|
-
"build:sb": "storybook build -c .storybook -o dist/storybook-static --stats-json",
|
|
24
|
+
"build:sb": "storybook build -c .storybook -o dist/storybook-static --stats-json && replace-in-file //fonts//g \"../fonts/\" \"dist/storybook-static/assets/*.css\" --isRegex",
|
|
24
25
|
"lint": "npx stylelint \"src/**/*.scss\" --fix && eslint \"src/**/*.{ts,tsx}\" --no-ignore --fix",
|
|
25
26
|
"lint:ci": "npx stylelint \"src/**/*.scss\" --quiet && npx eslint . --quiet",
|
|
26
27
|
"test": "jest --config ./jest.config.ts --passWithNoTests",
|
|
@@ -28,7 +29,8 @@
|
|
|
28
29
|
"test-storybook": "test-storybook",
|
|
29
30
|
"test-storybook:ci": "concurrently -k -s first -n \"SB,A11Y\" -c \"magenta,blue\" \"http-server dist/storybook-static --port 6006 --silent\" \"wait-on tcp:127.0.0.1:6006 && test-storybook --index-json --url http://127.0.0.1:6006 --junit\"",
|
|
30
31
|
"release": "npx semantic-release",
|
|
31
|
-
"chromatic": "npx chromatic --project-token=$CHROMATIC_PROJECT_TOKEN"
|
|
32
|
+
"chromatic": "npx chromatic --project-token=$CHROMATIC_PROJECT_TOKEN",
|
|
33
|
+
"design:build": "node design-docs/build.js"
|
|
32
34
|
},
|
|
33
35
|
"repository": {
|
|
34
36
|
"type": "git",
|
|
@@ -45,7 +47,7 @@
|
|
|
45
47
|
"@mui/material": "^5.15.13",
|
|
46
48
|
"@mui/x-date-pickers": "^5.0.20",
|
|
47
49
|
"@tanstack/react-table": "^8.13.2",
|
|
48
|
-
"@tedi-design-system/core": "6.
|
|
50
|
+
"@tedi-design-system/core": "^6.6.0",
|
|
49
51
|
"classnames": "^2.5.1",
|
|
50
52
|
"draft-js": "^0.11.7",
|
|
51
53
|
"draftjs-md-converter": "^1.5.2",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react/jsx-runtime"),p=require("../../../../external/classnames/index.cjs.js"),q=require("react"),v=require("../color-tokens.cjs.js"),r=require("./card.module.scss.cjs.js"),P=require("./card-context.cjs.js"),k=require("./utility.cjs.js"),x=require("../../helpers/hooks/use-breakpoint-props.cjs.js"),t=q.forwardRef((o,s)=>{const{getCurrentBreakpointProps:n}=x.useBreakpointProps(o.defaultServerBreakpoint),{children:c,className:u,padding:i,background:f="bg-default",borderRadius:e,borderless:C,border:b="border-default",...g}=n(o,{padding:1}),[a,d]=k.getCardBorderPlacementColor(b),m=p.default(r.default.card,u,{[r.default[`card--border-${a}`]]:a,[r.default["card--borderless"]]:C,[r.default["card--no-border-radius-top"]]:e===!1||(e==null?void 0:e.top)===!1,[r.default["card--no-border-radius-right"]]:e===!1||(e==null?void 0:e.right)===!1,[r.default["card--no-border-radius-bottom"]]:e===!1||(e==null?void 0:e.bottom)===!1,[r.default["card--no-border-radius-left"]]:e===!1||(e==null?void 0:e.left)===!1});return l.jsx(P.CardContext.Provider,{value:{padding:i,background:f},children:l.jsx("div",{"data-name":"card",...g,className:m,ref:s,style:d?{"--card-border-color":v.legacyColorToCore(d)}:void 0,children:c})})});t.displayName="Card";exports.Card=t;exports.default=t;
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import g from "../../../../external/classnames/index.es.js";
|
|
3
3
|
import { forwardRef as u } from "react";
|
|
4
|
+
import { legacyColorToCore as v } from "../color-tokens.es.js";
|
|
4
5
|
import o from "./card.module.scss.es.js";
|
|
5
|
-
import { CardContext as
|
|
6
|
-
import { getCardBorderPlacementColor as
|
|
7
|
-
import { useBreakpointProps as
|
|
8
|
-
const
|
|
9
|
-
const { getCurrentBreakpointProps: s } =
|
|
10
|
-
children:
|
|
11
|
-
className:
|
|
12
|
-
padding:
|
|
6
|
+
import { CardContext as B } from "./card-context.es.js";
|
|
7
|
+
import { getCardBorderPlacementColor as P } from "./utility.es.js";
|
|
8
|
+
import { useBreakpointProps as h } from "../../helpers/hooks/use-breakpoint-props.es.js";
|
|
9
|
+
const k = u((e, l) => {
|
|
10
|
+
const { getCurrentBreakpointProps: s } = h(e.defaultServerBreakpoint), {
|
|
11
|
+
children: m,
|
|
12
|
+
className: c,
|
|
13
|
+
padding: f,
|
|
13
14
|
background: n = "bg-default",
|
|
14
15
|
borderRadius: r,
|
|
15
16
|
borderless: i,
|
|
16
17
|
border: p = "border-default",
|
|
17
|
-
...
|
|
18
|
+
...C
|
|
18
19
|
} = s(e, {
|
|
19
20
|
padding: 1
|
|
20
|
-
}), [a, t] =
|
|
21
|
+
}), [a, t] = P(p), b = g(o.card, c, {
|
|
21
22
|
[o[`card--border-${a}`]]: a,
|
|
22
23
|
[o["card--borderless"]]: i,
|
|
23
24
|
[o["card--no-border-radius-top"]]: r === !1 || (r == null ? void 0 : r.top) === !1,
|
|
@@ -25,20 +26,20 @@ const h = u((e, l) => {
|
|
|
25
26
|
[o["card--no-border-radius-bottom"]]: r === !1 || (r == null ? void 0 : r.bottom) === !1,
|
|
26
27
|
[o["card--no-border-radius-left"]]: r === !1 || (r == null ? void 0 : r.left) === !1
|
|
27
28
|
});
|
|
28
|
-
return /* @__PURE__ */ d(
|
|
29
|
+
return /* @__PURE__ */ d(B.Provider, { value: { padding: f, background: n }, children: /* @__PURE__ */ d(
|
|
29
30
|
"div",
|
|
30
31
|
{
|
|
31
32
|
"data-name": "card",
|
|
32
|
-
...
|
|
33
|
-
className:
|
|
33
|
+
...C,
|
|
34
|
+
className: b,
|
|
34
35
|
ref: l,
|
|
35
|
-
style: t ? { "--card-border-color":
|
|
36
|
-
children:
|
|
36
|
+
style: t ? { "--card-border-color": v(t) } : void 0,
|
|
37
|
+
children: m
|
|
37
38
|
}
|
|
38
39
|
) });
|
|
39
40
|
});
|
|
40
|
-
|
|
41
|
+
k.displayName = "Card";
|
|
41
42
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
k as Card,
|
|
44
|
+
k as default
|
|
44
45
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r={"primary-main":"var(--general-surface-brand-primary)","primary-active":"var(--general-surface-brand-secondary)","primary-active-subtle":"var(--tedi-primary-400)","primary-highlight":"var(--general-surface-brand-tertiary)","primary-highlight-subtle":"var(--general-surface-brand-quaternary)","accent-main":"var(--tedi-accent-600)","accent-highlight":"var(--tedi-accent-200)","bg-default":"var(--general-surface-primary)","bg-muted":"var(--general-surface-secondary)","bg-subtle":"var(--general-surface-tertiary)","bg-disabled":"var(--general-surface-disabled)","bg-inverted":"var(--general-surface-inverted-primary)","bg-inverted-contrast":"var(--general-surface-inverted-secondary)",black:"var(--tedi-neutral-900)",white:"var(--general-surface-primary)","positive-main":"var(--tedi-green-600)","positive-active":"var(--tedi-green-700)","positive-highlight":"var(--tedi-green-100)","important-main":"var(--tedi-red-600)","important-active":"var(--tedi-red-700)","important-highlight":"var(--tedi-red-100)","info-main":"var(--tedi-primary-600)","info-active":"var(--tedi-primary-700)","info-highlight":"var(--tedi-primary-100)","warning-main":"var(--tedi-yellow-700)","warning-highlight":"var(--tedi-yellow-200)",transparent:"transparent","border-default":"var(--general-border-primary)","border-contrast":"var(--general-border-secondary)"},a=e=>r[e];exports.LEGACY_COLOR_TO_CORE=r;exports.legacyColorToCore=a;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TColorsBackground, TColorsBorder } from './commonTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Maps a legacy community colour name to its TEDI-Ready (core) CSS value.
|
|
4
|
+
*
|
|
5
|
+
* Used where a colour is chosen dynamically from a prop (e.g. `Card`'s
|
|
6
|
+
* `border` / `background`, and `Tooltip`'s arrow) instead of a static class.
|
|
7
|
+
* Strong fills use the core primitive scale (there is no semantic "strong
|
|
8
|
+
* status fill" token — the `--general-status-*-background-*` tokens are pale
|
|
9
|
+
* surfaces), matching the legacy appearance. Community is deprecated; do not
|
|
10
|
+
* use this in new code.
|
|
11
|
+
*/
|
|
12
|
+
export declare const LEGACY_COLOR_TO_CORE: Record<TColorsBackground | TColorsBorder, string>;
|
|
13
|
+
/** Returns the core CSS value for a legacy colour name. */
|
|
14
|
+
export declare const legacyColorToCore: (name: TColorsBackground | TColorsBorder) => string;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
const a = {
|
|
2
|
+
"primary-main": "var(--general-surface-brand-primary)",
|
|
3
|
+
"primary-active": "var(--general-surface-brand-secondary)",
|
|
4
|
+
"primary-active-subtle": "var(--tedi-primary-400)",
|
|
5
|
+
"primary-highlight": "var(--general-surface-brand-tertiary)",
|
|
6
|
+
"primary-highlight-subtle": "var(--general-surface-brand-quaternary)",
|
|
7
|
+
"accent-main": "var(--tedi-accent-600)",
|
|
8
|
+
"accent-highlight": "var(--tedi-accent-200)",
|
|
9
|
+
"bg-default": "var(--general-surface-primary)",
|
|
10
|
+
"bg-muted": "var(--general-surface-secondary)",
|
|
11
|
+
"bg-subtle": "var(--general-surface-tertiary)",
|
|
12
|
+
"bg-disabled": "var(--general-surface-disabled)",
|
|
13
|
+
"bg-inverted": "var(--general-surface-inverted-primary)",
|
|
14
|
+
"bg-inverted-contrast": "var(--general-surface-inverted-secondary)",
|
|
15
|
+
black: "var(--tedi-neutral-900)",
|
|
16
|
+
white: "var(--general-surface-primary)",
|
|
17
|
+
"positive-main": "var(--tedi-green-600)",
|
|
18
|
+
"positive-active": "var(--tedi-green-700)",
|
|
19
|
+
"positive-highlight": "var(--tedi-green-100)",
|
|
20
|
+
"important-main": "var(--tedi-red-600)",
|
|
21
|
+
"important-active": "var(--tedi-red-700)",
|
|
22
|
+
"important-highlight": "var(--tedi-red-100)",
|
|
23
|
+
"info-main": "var(--tedi-primary-600)",
|
|
24
|
+
"info-active": "var(--tedi-primary-700)",
|
|
25
|
+
"info-highlight": "var(--tedi-primary-100)",
|
|
26
|
+
"warning-main": "var(--tedi-yellow-700)",
|
|
27
|
+
"warning-highlight": "var(--tedi-yellow-200)",
|
|
28
|
+
transparent: "transparent",
|
|
29
|
+
"border-default": "var(--general-border-primary)",
|
|
30
|
+
"border-contrast": "var(--general-border-secondary)"
|
|
31
|
+
}, e = (r) => a[r];
|
|
32
|
+
export {
|
|
33
|
+
a as LEGACY_COLOR_TO_CORE,
|
|
34
|
+
e as legacyColorToCore
|
|
35
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),g=require("react"),h=require("../../../../../../tedi/components/base/typography/text/text.cjs.js"),j=require("../../../../../../tedi/components/content/collapse/collapse.cjs.js"),m=require("../../../../../../tedi/components/misc/scroll-fade/scroll-fade.cjs.js"),b=require("../../../../tag/tag.cjs.js"),y=require("../header-dropdown/header-dropdown.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),g=require("react"),h=require("../../../../../../tedi/components/base/typography/text/text.cjs.js"),j=require("../../../../../../tedi/components/content/collapse/collapse.cjs.js"),m=require("../../../../../../tedi/components/misc/scroll-fade/scroll-fade.cjs.js"),b=require("../../../../tag/tag.cjs.js"),y=require("../header-dropdown/header-dropdown.cjs.js"),o=require("./header-role.module.scss.cjs.js"),x=require("../../../../../../tedi/providers/label-provider/use-labels.cjs.js"),T=require("../../../../card/card.cjs.js"),q=require("../../../../card/card-content/card-content.cjs.js"),p=t=>{const{renderModal:s=!1,...r}=t,[a,l]=g.useState(!1);return s?e.jsx(R,{...r,open:a,onToggle:l}):e.jsx(v,{...r,open:a,onToggle:l})};p.displayName="HeaderRole";const v=t=>{const{getLabel:s}=x.useLabels(),{children:r,open:a,onToggle:l,primaryInfo:i,secondaryInfo:n,label:d=s("header.role-label")}=t,u=()=>d===s("header.role-label")?e.jsx("div",{children:e.jsx(b.Tag,{color:"primary",type:"secondary",children:d})}):e.jsxs(h.Text,{color:"secondary",modifiers:["bold","small"],children:[d,!!n&&e.jsxs(e.Fragment,{children:[" ",e.jsxs(h.Text,{element:"span",modifiers:["small","normal"],children:[e.jsx("span",{className:o.default["header-role-separator"],children:"|"})," ",n]})]})]}),c=typeof r=="function"?r({onToggle:l}):r,f=e.jsx(y.HeaderDropdown,{shouldAnimate:!0,open:a,onToggle:l,tooltipProps:{cardProps:{padding:0},maxWidth:"medium"},triggerProps:{children:i,"aria-label":`${d??""} ${n??""} ${i??""}`,visualType:"link",iconRight:{name:"expand_more",color:"primary",size:24}},children:e.jsx("div",{className:o.default["header-role-wrapper"],children:e.jsx(m.ScrollFade,{fadeSize:0,children:e.jsx("div",{className:o.default["header-role-children"],children:c})})})});return e.jsxs("div",{children:[u(),c?f:i]})},R=t=>{const{getLabel:s}=x.useLabels(),{children:r,open:a,onToggle:l,primaryInfo:i,secondaryInfo:n,label:d=s("header.role-label")}=t,u=e.jsxs(h.Text,{element:"span",color:"secondary",modifiers:"bold",children:[d," ",i,n&&e.jsx(h.Text,{element:"span",modifiers:"normal",children:` | ${n}`})]}),c=typeof r=="function"?r({onToggle:l}):r;return e.jsx(T.Card,{background:"bg-muted",borderRadius:!1,borderless:!0,children:e.jsx(q.CardContent,{padding:0,children:c?e.jsx(j.Collapse,{id:"role-collapse",open:a,onToggle:l,className:o.default["header-role-collapse"],hideCollapseText:!0,title:u,children:e.jsx("div",{className:o.default["header-role-wrapper"],children:e.jsx(m.ScrollFade,{fadeSize:0,children:e.jsx("div",{className:o.default["header-role-children"],children:c})})})}):e.jsx("div",{className:o.default["header-role-children"],children:u})})})};exports.HeaderRole=p;exports.default=p;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { jsx as e, jsxs as m, Fragment as b } from "react/jsx-runtime";
|
|
2
2
|
import y from "react";
|
|
3
3
|
import { Text as h } from "../../../../../../tedi/components/base/typography/text/text.es.js";
|
|
4
|
-
import { Collapse as
|
|
4
|
+
import { Collapse as T } from "../../../../../../tedi/components/content/collapse/collapse.es.js";
|
|
5
5
|
import { ScrollFade as f } from "../../../../../../tedi/components/misc/scroll-fade/scroll-fade.es.js";
|
|
6
|
-
import { Tag as
|
|
6
|
+
import { Tag as v } from "../../../../tag/tag.es.js";
|
|
7
7
|
import { HeaderDropdown as x } from "../header-dropdown/header-dropdown.es.js";
|
|
8
|
-
import
|
|
8
|
+
import l from "./header-role.module.scss.es.js";
|
|
9
9
|
import { useLabels as g } from "../../../../../../tedi/providers/label-provider/use-labels.es.js";
|
|
10
|
-
import { Card as
|
|
11
|
-
import { CardContent as
|
|
10
|
+
import { Card as N } from "../../../../card/card.es.js";
|
|
11
|
+
import { CardContent as C } from "../../../../card/card-content/card-content.es.js";
|
|
12
12
|
const R = (s) => {
|
|
13
|
-
const { renderModal:
|
|
14
|
-
return
|
|
13
|
+
const { renderModal: a = !1, ...r } = s, [n, o] = y.useState(!1);
|
|
14
|
+
return a ? /* @__PURE__ */ e(H, { ...r, open: n, onToggle: o }) : /* @__PURE__ */ e(w, { ...r, open: n, onToggle: o });
|
|
15
15
|
};
|
|
16
16
|
R.displayName = "HeaderRole";
|
|
17
17
|
const w = (s) => {
|
|
18
|
-
const { getLabel:
|
|
19
|
-
|
|
18
|
+
const { getLabel: a } = g(), { children: r, open: n, onToggle: o, primaryInfo: t, secondaryInfo: d, label: i = a("header.role-label") } = s, p = () => i === a("header.role-label") ? /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(v, { color: "primary", type: "secondary", children: i }) }) : /* @__PURE__ */ m(h, { color: "secondary", modifiers: ["bold", "small"], children: [
|
|
19
|
+
i,
|
|
20
20
|
!!d && /* @__PURE__ */ m(b, { children: [
|
|
21
21
|
" ",
|
|
22
22
|
/* @__PURE__ */ m(h, { element: "span", modifiers: ["small", "normal"], children: [
|
|
23
|
-
/* @__PURE__ */ e("span", {
|
|
23
|
+
/* @__PURE__ */ e("span", { className: l["header-role-separator"], children: "|" }),
|
|
24
24
|
" ",
|
|
25
25
|
d
|
|
26
26
|
] })
|
|
@@ -34,11 +34,11 @@ const w = (s) => {
|
|
|
34
34
|
tooltipProps: { cardProps: { padding: 0 }, maxWidth: "medium" },
|
|
35
35
|
triggerProps: {
|
|
36
36
|
children: t,
|
|
37
|
-
"aria-label": `${
|
|
37
|
+
"aria-label": `${i ?? ""} ${d ?? ""} ${t ?? ""}`,
|
|
38
38
|
visualType: "link",
|
|
39
39
|
iconRight: { name: "expand_more", color: "primary", size: 24 }
|
|
40
40
|
},
|
|
41
|
-
children: /* @__PURE__ */ e("div", { className:
|
|
41
|
+
children: /* @__PURE__ */ e("div", { className: l["header-role-wrapper"], children: /* @__PURE__ */ e(f, { fadeSize: 0, children: /* @__PURE__ */ e("div", { className: l["header-role-children"], children: c }) }) })
|
|
42
42
|
}
|
|
43
43
|
);
|
|
44
44
|
return /* @__PURE__ */ m("div", { children: [
|
|
@@ -46,24 +46,24 @@ const w = (s) => {
|
|
|
46
46
|
c ? u : t
|
|
47
47
|
] });
|
|
48
48
|
}, H = (s) => {
|
|
49
|
-
const { getLabel:
|
|
50
|
-
|
|
49
|
+
const { getLabel: a } = g(), { children: r, open: n, onToggle: o, primaryInfo: t, secondaryInfo: d, label: i = a("header.role-label") } = s, p = /* @__PURE__ */ m(h, { element: "span", color: "secondary", modifiers: "bold", children: [
|
|
50
|
+
i,
|
|
51
51
|
" ",
|
|
52
52
|
t,
|
|
53
53
|
d && /* @__PURE__ */ e(h, { element: "span", modifiers: "normal", children: ` | ${d}` })
|
|
54
54
|
] }), c = typeof r == "function" ? r({ onToggle: o }) : r;
|
|
55
|
-
return /* @__PURE__ */ e(
|
|
56
|
-
|
|
55
|
+
return /* @__PURE__ */ e(N, { background: "bg-muted", borderRadius: !1, borderless: !0, children: /* @__PURE__ */ e(C, { padding: 0, children: c ? /* @__PURE__ */ e(
|
|
56
|
+
T,
|
|
57
57
|
{
|
|
58
58
|
id: "role-collapse",
|
|
59
59
|
open: n,
|
|
60
60
|
onToggle: o,
|
|
61
|
-
className:
|
|
61
|
+
className: l["header-role-collapse"],
|
|
62
62
|
hideCollapseText: !0,
|
|
63
63
|
title: p,
|
|
64
|
-
children: /* @__PURE__ */ e("div", { className:
|
|
64
|
+
children: /* @__PURE__ */ e("div", { className: l["header-role-wrapper"], children: /* @__PURE__ */ e(f, { fadeSize: 0, children: /* @__PURE__ */ e("div", { className: l["header-role-children"], children: c }) }) })
|
|
65
65
|
}
|
|
66
|
-
) : /* @__PURE__ */ e("div", { className:
|
|
66
|
+
) : /* @__PURE__ */ e("div", { className: l["header-role-children"], children: p }) }) });
|
|
67
67
|
};
|
|
68
68
|
export {
|
|
69
69
|
R as HeaderRole,
|
package/src/community/components/layout/header/components/header-role/header-role.module.scss.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"header-role-collapse":"header-role-collapse-7664165f","header-role-wrapper":"header-role-wrapper-c65bcd63","header-role-children":"header-role-children-3fdd2c2c"};exports.default=e;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"header-role-collapse":"header-role-collapse-7664165f","header-role-wrapper":"header-role-wrapper-c65bcd63","header-role-children":"header-role-children-3fdd2c2c","header-role-separator":"header-role-separator-14bcefed"};exports.default=e;
|
package/src/community/components/layout/header/components/header-role/header-role.module.scss.es.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
const e = {
|
|
2
2
|
"header-role-collapse": "header-role-collapse-7664165f",
|
|
3
3
|
"header-role-wrapper": "header-role-wrapper-c65bcd63",
|
|
4
|
-
"header-role-children": "header-role-children-3fdd2c2c"
|
|
4
|
+
"header-role-children": "header-role-children-3fdd2c2c",
|
|
5
|
+
"header-role-separator": "header-role-separator-14bcefed"
|
|
5
6
|
};
|
|
6
7
|
export {
|
|
7
8
|
e as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),r=require("../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),u=require("../../../../external/classnames/index.cjs.js"),F=require("react"),W=require("../card/utility.cjs.js"),d=require("../color-tokens.cjs.js"),o=require("./tooltip.module.scss.cjs.js"),n=require("./tooltip-provider.cjs.js"),v=require("../card/card.cjs.js"),S=require("../card/card-content/card-content.cjs.js"),B=g=>{const{children:f,maxWidth:l="medium",cardProps:e,className:p}=g,{open:m,x:C,y:x,strategy:h,focusManager:q,floating:T,arrowRef:y,getFloatingProps:j,placement:k,context:a}=F.useContext(n.TooltipContext),[w,i]=W.getCardBorderPlacementColor(e==null?void 0:e.border),c=()=>w&&i?d.legacyColorToCore(i):"none",s=c()!=="none",_=()=>e!=null&&e.background?d.legacyColorToCore(e.background):"var(--general-surface-primary)",R=()=>{const b=t.jsx(r.FloatingFocusManager,{...q,context:a,children:t.jsxs("div",{...j({ref:T,style:{position:h,left:C??0,top:x??0},className:u.default(o.default.tooltip,p,{[o.default[`tooltip--${l}`]]:l})}),"data-placement":k,children:[t.jsx(r.FloatingArrow,{ref:A=>y.current=A,context:a,fill:_(),stroke:c(),strokeWidth:s?4:0,className:u.default(o.default.tooltip__arrow,{[o.default["tooltip__arrow--stroke"]]:s}),height:n.ARROW_HEIGHT,width:n.ARROW_WIDTH}),t.jsx(v.Card,{padding:.5,borderless:!0,...e,children:t.jsx(S.CardContent,{children:f})})]})});return m?b:null};return t.jsx(r.FloatingPortal,{"data-name":"tooltip",children:R()})};exports.Tooltip=B;
|
|
@@ -1,49 +1,50 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { FloatingPortal as
|
|
1
|
+
import { jsx as r, jsxs as R } from "react/jsx-runtime";
|
|
2
|
+
import { FloatingPortal as W, FloatingFocusManager as b, FloatingArrow as N } from "../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
|
|
3
3
|
import s from "../../../../external/classnames/index.es.js";
|
|
4
|
-
import
|
|
5
|
-
import { getCardBorderPlacementColor as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
import B from "react";
|
|
5
|
+
import { getCardBorderPlacementColor as H } from "../card/utility.es.js";
|
|
6
|
+
import { legacyColorToCore as m } from "../color-tokens.es.js";
|
|
7
|
+
import t from "./tooltip.module.scss.es.js";
|
|
8
|
+
import { TooltipContext as j, ARROW_WIDTH as v, ARROW_HEIGHT as I } from "./tooltip-provider.es.js";
|
|
9
|
+
import { Card as M } from "../card/card.es.js";
|
|
10
|
+
import { CardContent as O } from "../card/card-content/card-content.es.js";
|
|
11
|
+
const Q = (c) => {
|
|
12
|
+
const { children: d, maxWidth: e = "medium", cardProps: o, className: p } = c, { open: f, x: g, y: u, strategy: h, focusManager: C, floating: w, arrowRef: x, getFloatingProps: _, placement: k, context: n } = B.useContext(j), [T, a] = H(o == null ? void 0 : o.border), l = () => T && a ? m(a) : "none", i = l() !== "none", y = () => o != null && o.background ? m(o.background) : "var(--general-surface-primary)";
|
|
13
|
+
return /* @__PURE__ */ r(W, { "data-name": "tooltip", children: (() => {
|
|
14
|
+
const A = /* @__PURE__ */ r(b, { ...C, context: n, children: /* @__PURE__ */ R(
|
|
14
15
|
"div",
|
|
15
16
|
{
|
|
16
|
-
...
|
|
17
|
-
ref:
|
|
17
|
+
..._({
|
|
18
|
+
ref: w,
|
|
18
19
|
style: {
|
|
19
|
-
position:
|
|
20
|
-
left:
|
|
21
|
-
top:
|
|
20
|
+
position: h,
|
|
21
|
+
left: g ?? 0,
|
|
22
|
+
top: u ?? 0
|
|
22
23
|
},
|
|
23
|
-
className: s(
|
|
24
|
+
className: s(t.tooltip, p, { [t[`tooltip--${e}`]]: e })
|
|
24
25
|
}),
|
|
25
|
-
"data-placement":
|
|
26
|
+
"data-placement": k,
|
|
26
27
|
children: [
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
|
|
28
|
+
/* @__PURE__ */ r(
|
|
29
|
+
N,
|
|
29
30
|
{
|
|
30
|
-
ref: (
|
|
31
|
+
ref: (F) => x.current = F,
|
|
31
32
|
context: n,
|
|
32
|
-
fill:
|
|
33
|
-
stroke:
|
|
33
|
+
fill: y(),
|
|
34
|
+
stroke: l(),
|
|
34
35
|
strokeWidth: i ? 4 : 0,
|
|
35
|
-
className: s(
|
|
36
|
-
height:
|
|
37
|
-
width:
|
|
36
|
+
className: s(t.tooltip__arrow, { [t["tooltip__arrow--stroke"]]: i }),
|
|
37
|
+
height: I,
|
|
38
|
+
width: v
|
|
38
39
|
}
|
|
39
40
|
),
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
+
/* @__PURE__ */ r(M, { padding: 0.5, borderless: !0, ...o, children: /* @__PURE__ */ r(O, { children: d }) })
|
|
41
42
|
]
|
|
42
43
|
}
|
|
43
44
|
) });
|
|
44
|
-
return
|
|
45
|
+
return f ? A : null;
|
|
45
46
|
})() });
|
|
46
47
|
};
|
|
47
48
|
export {
|
|
48
|
-
|
|
49
|
+
Q as Tooltip
|
|
49
50
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),N=require("../../../../../external/classnames/index.cjs.js"),a=require("./calendar.module.scss.cjs.js"),T=require("./components/calendar-header/calendar-header.cjs.js"),V=require("./components/calendar-month-grid/calendar-month-grid.cjs.js"),z=require("./components/calendar-year-grid/calendar-year-grid.cjs.js"),R=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),U=require("../../../../../external/react-day-picker/dist/esm/locale/et.cjs.js"),J=require("../../../../../external/react-day-picker/dist/esm/DayPicker.cjs.js"),S=require("../../../../../external/react-day-picker/dist/esm/components/DayButton.cjs.js"),K=require("../../tags/status-indicator/status-indicator.cjs.js"),k=_=>{const{getCurrentBreakpointProps:C}=R.useBreakpointProps(_.defaultServerBreakpoint),{view:c="days",selectionLevel:m="days",currentMonth:u,setCurrentMonth:s,setView:i=()=>"days",mode:q="single",value:d,locale:M=U.et,localeCode:y="et-EE",showOutsideDays:A=!0,disabledMatchers:Y,required:G,availableDays:n,unavailableDays:l,footer:B,monthYearSelectType:P,minYear:O,maxYear:W,dayStatus:h,handleSelect:E,applyValue:b,showNavigation:f=!0,className:v,bordered:F=!0,fullWidth:g=!1,...H}=C(_),p=F?void 0:a.default["tedi-calendar--borderless"],D=g?a.default["tedi-calendar--full-width"]:void 0,w=N.default(p,D,v),j=e=>n?Array.isArray(n)?n.some(r=>r.toDateString()===e.toDateString()):n(e):!0,x=e=>l?Array.isArray(l)?l.some(r=>r.toDateString()===e.toDateString()):l(e):!1,o=[...Y??[],...n?[e=>!j(e)]:[],...l?[e=>x(e)]:[]],I=(()=>{switch(q){case"multiple":return{mode:"multiple",selected:Array.isArray(d)?d:void 0};case"range":return{mode:"range",selected:d&&!Array.isArray(d)&&!(d instanceof Date)?d:void 0};default:return{mode:"single",selected:d instanceof Date?d:void 0}}})();return t.jsxs("div",{className:a.default["tedi-calendar__wrapper"],children:[c==="years"&&t.jsx(z.YearGrid,{currentMonth:u,onNavigate:s,showNavigation:f,onSelectYear:e=>{s(e),m==="years"?b(new Date(e.getFullYear(),0,1)):i("months")},className:w}),c==="months"&&t.jsx(V.MonthGrid,{currentMonth:u,onNavigate:s,showNavigation:f,localeCode:y,onSelectMonth:e=>{s(e),m==="months"?b(e):i("days")},className:w}),c==="days"&&t.jsx(J.DayPicker,{...H,...I,locale:M,month:u,onMonthChange:s,showOutsideDays:A,disabled:o.length?o:void 0,required:G,components:{MonthCaption:e=>t.jsx(T.CalendarHeader,{...e,monthYearSelectType:P,onOpenMonthGrid:()=>i("months"),onOpenYearGrid:()=>i("years"),showNavigation:f,localeCode:y,disabledMatchers:o.length?o:void 0,minYear:O,maxYear:W}),Nav:()=>t.jsx(t.Fragment,{}),...h?{DayButton:e=>{const r=h(e.day.date);if(!r)return t.jsx(S.DayButton,{...e});const L=[e["aria-label"],r.label].filter(Boolean).join(", ");return t.jsxs(S.DayButton,{...e,"aria-label":L,children:[e.children,t.jsx(K.StatusIndicator,{type:r.type,size:"sm",className:a.default["tedi-calendar__day-status"]})]})}}:{},...g?{Weekday:({children:e,...r})=>t.jsx("th",{...r,children:t.jsx("span",{className:a.default["tedi-calendar__weekday-inner"],children:e})})}:{}},footer:B,classNames:{root:N.default(a.default["tedi-calendar"],p,D,v),month_caption:a.default["tedi-calendar__caption"],head:a.default["tedi-calendar__head"],row:a.default["tedi-calendar__row"],day:a.default["tedi-calendar__day"],selected:a.default["tedi-calendar__day--selected"],weekday:a.default["tedi-calendar__weekday"],outside:a.default["tedi-calendar__outside-days"],range_start:a.default["tedi-calendar__range-start"],range_middle:a.default["tedi-calendar__range-middle"],range_end:a.default["tedi-calendar__range-end"],today:a.default["tedi-calendar__today"],disabled:a.default["tedi-calendar__disabled"],month:a.default["tedi-calendar__month"],months:a.default["tedi-calendar__months-container"],footer:a.default["tedi-calendar__footer"],week_number:a.default["tedi-calendar__week-number"]},modifiers:{available:e=>n?j(e):!1,unavailable:e=>l?x(e):!1},modifiersClassNames:{available:a.default["tedi-calendar__available-day"],unavailable:a.default["tedi-calendar__unavailable-day"]},onSelect:E})]})};k.displayName="Calendar";exports.Calendar=k;
|
|
@@ -118,6 +118,18 @@ interface CalendarBreakpointProps extends Omit<DayPickerProps, 'mode' | 'selecte
|
|
|
118
118
|
* no status.
|
|
119
119
|
*/
|
|
120
120
|
dayStatus?: DayStatusFn;
|
|
121
|
+
/**
|
|
122
|
+
* Earliest year offered in the calendar header's year dropdown.
|
|
123
|
+
* Forwarded to the internal `CalendarHeader`.
|
|
124
|
+
* @default currentYear - 100
|
|
125
|
+
*/
|
|
126
|
+
minYear?: number;
|
|
127
|
+
/**
|
|
128
|
+
* Latest year offered in the calendar header's year dropdown.
|
|
129
|
+
* Forwarded to the internal `CalendarHeader`.
|
|
130
|
+
* @default currentYear + 20
|
|
131
|
+
*/
|
|
132
|
+
maxYear?: number;
|
|
121
133
|
/**
|
|
122
134
|
* Callback fired when a date or date range is selected. Receives the selected value, day, modifiers, and event.
|
|
123
135
|
*/
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsxs as S, jsx as t, Fragment as
|
|
1
|
+
import { jsxs as S, jsx as t, Fragment as H } from "react/jsx-runtime";
|
|
2
2
|
import k from "../../../../../external/classnames/index.es.js";
|
|
3
3
|
import a from "./calendar.module.scss.es.js";
|
|
4
|
-
import { CalendarHeader as
|
|
5
|
-
import { MonthGrid as
|
|
6
|
-
import { YearGrid as
|
|
7
|
-
import { useBreakpointProps as
|
|
8
|
-
import { et as
|
|
9
|
-
import { DayPicker as
|
|
4
|
+
import { CalendarHeader as I } from "./components/calendar-header/calendar-header.es.js";
|
|
5
|
+
import { MonthGrid as T } from "./components/calendar-month-grid/calendar-month-grid.es.js";
|
|
6
|
+
import { YearGrid as U } from "./components/calendar-year-grid/calendar-year-grid.es.js";
|
|
7
|
+
import { useBreakpointProps as J } from "../../../helpers/hooks/use-breakpoint-props.es.js";
|
|
8
|
+
import { et as K } from "../../../../../external/react-day-picker/dist/esm/locale/et.es.js";
|
|
9
|
+
import { DayPicker as Q } from "../../../../../external/react-day-picker/dist/esm/DayPicker.es.js";
|
|
10
10
|
import { DayButton as A } from "../../../../../external/react-day-picker/dist/esm/components/DayButton.es.js";
|
|
11
|
-
import { StatusIndicator as
|
|
12
|
-
const
|
|
13
|
-
const { getCurrentBreakpointProps: M } =
|
|
11
|
+
import { StatusIndicator as R } from "../../tags/status-indicator/status-indicator.es.js";
|
|
12
|
+
const X = (u) => {
|
|
13
|
+
const { getCurrentBreakpointProps: M } = J(u.defaultServerBreakpoint), {
|
|
14
14
|
view: c = "days",
|
|
15
15
|
selectionLevel: y = "days",
|
|
16
16
|
currentMonth: m,
|
|
@@ -18,28 +18,30 @@ const Q = (u) => {
|
|
|
18
18
|
setView: s = () => "days",
|
|
19
19
|
mode: Y = "single",
|
|
20
20
|
value: n,
|
|
21
|
-
locale:
|
|
21
|
+
locale: x = K,
|
|
22
22
|
localeCode: h = "et-EE",
|
|
23
|
-
showOutsideDays:
|
|
24
|
-
disabledMatchers:
|
|
23
|
+
showOutsideDays: G = !0,
|
|
24
|
+
disabledMatchers: j,
|
|
25
25
|
required: O,
|
|
26
26
|
availableDays: i,
|
|
27
27
|
unavailableDays: d,
|
|
28
28
|
footer: W,
|
|
29
29
|
monthYearSelectType: B,
|
|
30
|
+
minYear: E,
|
|
31
|
+
maxYear: F,
|
|
30
32
|
dayStatus: f,
|
|
31
|
-
handleSelect:
|
|
33
|
+
handleSelect: L,
|
|
32
34
|
applyValue: p,
|
|
33
35
|
showNavigation: _ = !0,
|
|
34
36
|
className: v,
|
|
35
|
-
bordered:
|
|
37
|
+
bordered: P = !0,
|
|
36
38
|
fullWidth: b = !1,
|
|
37
|
-
...
|
|
38
|
-
} = M(u), g =
|
|
39
|
-
...
|
|
39
|
+
...V
|
|
40
|
+
} = M(u), g = P ? void 0 : a["tedi-calendar--borderless"], w = b ? a["tedi-calendar--full-width"] : void 0, N = k(g, w, v), D = (e) => i ? Array.isArray(i) ? i.some((r) => r.toDateString() === e.toDateString()) : i(e) : !0, C = (e) => d ? Array.isArray(d) ? d.some((r) => r.toDateString() === e.toDateString()) : d(e) : !1, o = [
|
|
41
|
+
...j ?? [],
|
|
40
42
|
...i ? [(e) => !D(e)] : [],
|
|
41
43
|
...d ? [(e) => C(e)] : []
|
|
42
|
-
],
|
|
44
|
+
], q = (() => {
|
|
43
45
|
switch (Y) {
|
|
44
46
|
case "multiple":
|
|
45
47
|
return { mode: "multiple", selected: Array.isArray(n) ? n : void 0 };
|
|
@@ -54,7 +56,7 @@ const Q = (u) => {
|
|
|
54
56
|
})();
|
|
55
57
|
return /* @__PURE__ */ S("div", { className: a["tedi-calendar__wrapper"], children: [
|
|
56
58
|
c === "years" && /* @__PURE__ */ t(
|
|
57
|
-
|
|
59
|
+
U,
|
|
58
60
|
{
|
|
59
61
|
currentMonth: m,
|
|
60
62
|
onNavigate: l,
|
|
@@ -66,7 +68,7 @@ const Q = (u) => {
|
|
|
66
68
|
}
|
|
67
69
|
),
|
|
68
70
|
c === "months" && /* @__PURE__ */ t(
|
|
69
|
-
|
|
71
|
+
T,
|
|
70
72
|
{
|
|
71
73
|
currentMonth: m,
|
|
72
74
|
onNavigate: l,
|
|
@@ -79,19 +81,19 @@ const Q = (u) => {
|
|
|
79
81
|
}
|
|
80
82
|
),
|
|
81
83
|
c === "days" && /* @__PURE__ */ t(
|
|
82
|
-
|
|
84
|
+
Q,
|
|
83
85
|
{
|
|
84
|
-
...
|
|
85
|
-
...
|
|
86
|
-
locale:
|
|
86
|
+
...V,
|
|
87
|
+
...q,
|
|
88
|
+
locale: x,
|
|
87
89
|
month: m,
|
|
88
90
|
onMonthChange: l,
|
|
89
|
-
showOutsideDays:
|
|
91
|
+
showOutsideDays: G,
|
|
90
92
|
disabled: o.length ? o : void 0,
|
|
91
93
|
required: O,
|
|
92
94
|
components: {
|
|
93
95
|
MonthCaption: (e) => /* @__PURE__ */ t(
|
|
94
|
-
|
|
96
|
+
I,
|
|
95
97
|
{
|
|
96
98
|
...e,
|
|
97
99
|
monthYearSelectType: B,
|
|
@@ -99,19 +101,21 @@ const Q = (u) => {
|
|
|
99
101
|
onOpenYearGrid: () => s("years"),
|
|
100
102
|
showNavigation: _,
|
|
101
103
|
localeCode: h,
|
|
102
|
-
disabledMatchers: o.length ? o : void 0
|
|
104
|
+
disabledMatchers: o.length ? o : void 0,
|
|
105
|
+
minYear: E,
|
|
106
|
+
maxYear: F
|
|
103
107
|
}
|
|
104
108
|
),
|
|
105
|
-
Nav: () => /* @__PURE__ */ t(
|
|
109
|
+
Nav: () => /* @__PURE__ */ t(H, {}),
|
|
106
110
|
...f ? {
|
|
107
111
|
DayButton: (e) => {
|
|
108
112
|
const r = f(e.day.date);
|
|
109
113
|
if (!r)
|
|
110
114
|
return /* @__PURE__ */ t(A, { ...e });
|
|
111
|
-
const
|
|
112
|
-
return /* @__PURE__ */ S(A, { ...e, "aria-label":
|
|
115
|
+
const z = [e["aria-label"], r.label].filter(Boolean).join(", ");
|
|
116
|
+
return /* @__PURE__ */ S(A, { ...e, "aria-label": z, children: [
|
|
113
117
|
e.children,
|
|
114
|
-
/* @__PURE__ */ t(
|
|
118
|
+
/* @__PURE__ */ t(R, { type: r.type, size: "sm", className: a["tedi-calendar__day-status"] })
|
|
115
119
|
] });
|
|
116
120
|
}
|
|
117
121
|
} : {},
|
|
@@ -147,12 +151,12 @@ const Q = (u) => {
|
|
|
147
151
|
available: a["tedi-calendar__available-day"],
|
|
148
152
|
unavailable: a["tedi-calendar__unavailable-day"]
|
|
149
153
|
},
|
|
150
|
-
onSelect:
|
|
154
|
+
onSelect: L
|
|
151
155
|
}
|
|
152
156
|
)
|
|
153
157
|
] });
|
|
154
158
|
};
|
|
155
|
-
|
|
159
|
+
X.displayName = "Calendar";
|
|
156
160
|
export {
|
|
157
|
-
|
|
161
|
+
X as Calendar
|
|
158
162
|
};
|