@telia/teddy 0.0.36 → 0.0.38
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/badge/badge.cjs +10 -10
- package/dist/components/badge/badge.js +10 -10
- package/dist/components/card/card-button.cjs +42 -0
- package/dist/components/card/card-button.d.ts +35 -0
- package/dist/components/card/card-button.js +42 -0
- package/dist/components/card/card-content.cjs +15 -0
- package/dist/components/card/card-content.d.ts +6 -0
- package/dist/components/card/card-content.js +15 -0
- package/dist/components/card/card-footer.cjs +15 -0
- package/dist/components/card/card-footer.d.ts +6 -0
- package/dist/components/card/card-footer.js +15 -0
- package/dist/components/card/card-heading.cjs +25 -0
- package/dist/components/card/card-heading.d.ts +6 -0
- package/dist/components/card/card-heading.js +25 -0
- package/dist/components/card/card-illustration.cjs +22 -0
- package/dist/components/card/card-illustration.d.ts +15 -0
- package/dist/components/card/card-illustration.js +22 -0
- package/dist/components/card/card-line.cjs +13 -0
- package/dist/components/card/card-line.d.ts +5 -0
- package/dist/components/card/card-line.js +13 -0
- package/dist/components/card/card-link.cjs +18 -0
- package/dist/components/card/card-link.d.ts +11 -0
- package/dist/components/card/card-link.js +18 -0
- package/dist/components/card/card-slot.cjs +36 -0
- package/dist/components/card/card-slot.d.ts +8 -0
- package/dist/components/card/card-slot.js +36 -0
- package/dist/components/card/card.cjs +56 -173
- package/dist/components/card/card.d.ts +16 -98
- package/dist/components/card/card.js +57 -174
- package/dist/components/card/index.cjs +28 -1
- package/dist/components/card/index.d.ts +64 -2
- package/dist/components/card/index.js +28 -1
- package/dist/components/card/utils.cjs +4 -0
- package/dist/components/card/utils.d.ts +2 -0
- package/dist/components/card/utils.js +4 -0
- package/dist/components/date-picker/css.cjs +59 -0
- package/dist/components/date-picker/css.d.ts +1 -0
- package/dist/components/date-picker/css.js +59 -0
- package/dist/components/date-picker/date-picker-day.cjs +67 -0
- package/dist/components/date-picker/date-picker-day.d.ts +13 -0
- package/dist/components/date-picker/date-picker-day.js +67 -0
- package/dist/components/date-picker/date-picker-input.cjs +89 -0
- package/dist/components/date-picker/date-picker-input.d.ts +27 -0
- package/dist/components/date-picker/date-picker-input.js +90 -0
- package/dist/components/date-picker/date-picker-localization.cjs +31 -0
- package/dist/components/date-picker/date-picker-localization.d.ts +20 -0
- package/dist/components/date-picker/date-picker-localization.js +32 -0
- package/dist/components/date-picker/date-picker-month.cjs +42 -0
- package/dist/components/date-picker/date-picker-month.d.ts +20 -0
- package/dist/components/date-picker/date-picker-month.js +43 -0
- package/dist/components/date-picker/date-picker-navigation-key.cjs +15 -0
- package/dist/components/date-picker/date-picker-navigation-key.d.ts +14 -0
- package/dist/components/date-picker/date-picker-navigation-key.js +16 -0
- package/dist/components/date-picker/date-picker-props.cjs +1 -0
- package/dist/components/date-picker/date-picker-props.d.ts +23 -0
- package/dist/components/date-picker/date-picker-props.js +1 -0
- package/dist/components/date-picker/date-picker-unique-id.cjs +4 -0
- package/dist/components/date-picker/date-picker-unique-id.d.ts +1 -0
- package/dist/components/date-picker/date-picker-unique-id.js +4 -0
- package/dist/components/date-picker/date-picker-year-print.cjs +61 -0
- package/dist/components/date-picker/date-picker-year-print.d.ts +12 -0
- package/dist/components/date-picker/date-picker-year-print.js +61 -0
- package/dist/components/date-picker/date-picker-year.cjs +36 -0
- package/dist/components/date-picker/date-picker-year.d.ts +16 -0
- package/dist/components/date-picker/date-picker-year.js +37 -0
- package/dist/components/date-picker/date-picker.cjs +597 -0
- package/dist/components/date-picker/date-picker.d.ts +5 -0
- package/dist/components/date-picker/date-picker.js +597 -0
- package/dist/components/date-picker/date-utils.cjs +340 -0
- package/dist/components/date-picker/date-utils.d.ts +29 -0
- package/dist/components/date-picker/date-utils.js +340 -0
- package/dist/components/date-picker/date-year-range.cjs +1 -0
- package/dist/components/date-picker/date-year-range.d.ts +4 -0
- package/dist/components/date-picker/date-year-range.js +1 -0
- package/dist/components/date-picker/dialog-utils.cjs +36 -0
- package/dist/components/date-picker/dialog-utils.d.ts +3 -0
- package/dist/components/date-picker/dialog-utils.js +36 -0
- package/dist/components/date-picker/index.cjs +4 -0
- package/dist/components/date-picker/index.d.ts +2 -0
- package/dist/components/date-picker/index.js +4 -0
- package/dist/components/drawer/drawer-close.cjs +1 -1
- package/dist/components/drawer/drawer-close.js +1 -1
- package/dist/components/drawer/drawer-content.cjs +2 -2
- package/dist/components/drawer/drawer-content.js +2 -2
- package/dist/components/drawer/drawer-description.cjs +1 -1
- package/dist/components/drawer/drawer-description.js +1 -1
- package/dist/components/drawer/drawer-footer.cjs +1 -1
- package/dist/components/drawer/drawer-footer.js +1 -1
- package/dist/components/drawer/drawer-overlay.cjs +1 -1
- package/dist/components/drawer/drawer-overlay.js +1 -1
- package/dist/components/drawer/drawer-title.cjs +1 -1
- package/dist/components/drawer/drawer-title.js +1 -1
- package/dist/components/expandable-card/expandable-card-root.cjs +15 -15
- package/dist/components/expandable-card/expandable-card-root.js +15 -15
- package/dist/components/image/image.cjs +1 -1
- package/dist/components/image/image.js +1 -1
- package/dist/components/index.cjs +4 -2
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +3 -1
- package/dist/components/modal/modal.cjs +4 -4
- package/dist/components/modal/modal.js +4 -4
- package/dist/components/navigation-menu/global-navigation/global-navigation-desktop-simplified.cjs +9 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-desktop-simplified.d.ts +8 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-desktop-simplified.js +9 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-mobile-simplified.cjs +12 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-mobile-simplified.d.ts +7 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-mobile-simplified.js +12 -0
- package/dist/components/navigation-menu/global-navigation/global-navigation-my-pages.cjs +57 -7
- package/dist/components/navigation-menu/global-navigation/global-navigation-my-pages.js +58 -8
- package/dist/components/navigation-menu/global-navigation/global-navigation-root.d.ts +2 -1
- package/dist/components/navigation-menu/global-navigation/global-navigation-root.js +2 -2
- package/dist/components/navigation-menu/global-navigation/utils.cjs +127 -126
- package/dist/components/navigation-menu/global-navigation/utils.d.ts +227 -219
- package/dist/components/navigation-menu/global-navigation/utils.js +127 -126
- package/dist/components/notification/notification.cjs +2 -2
- package/dist/components/notification/notification.d.ts +7 -4
- package/dist/components/notification/notification.js +1 -1
- package/dist/drawer.module-BNPErv-x.js +16 -0
- package/dist/drawer.module-CTowTFmf.cjs +15 -0
- package/dist/main.cjs +4 -2
- package/dist/main.js +3 -1
- package/dist/style.css +690 -227
- package/package.json +1 -1
- package/dist/drawer.module-BPXo6-Q2.js +0 -15
- package/dist/drawer.module-_pUdp_M1.cjs +0 -14
|
@@ -1,51 +1,48 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import React__default from "react";
|
|
3
3
|
import clsx from "clsx";
|
|
4
|
-
import { composeRefs } from "../../utils/composeRefs.js";
|
|
5
4
|
import { composeEventHandlers } from "../../utils/composeEventHandlers.js";
|
|
6
|
-
import { Box } from "../box/box.js";
|
|
7
|
-
import { Heading as Heading$1 } from "../heading/heading.js";
|
|
8
|
-
import { Button as Button$1 } from "../button/button.js";
|
|
9
|
-
import { Link as Link$1 } from "../link/link.js";
|
|
10
|
-
import { teddySpacing50 } from "../../tokens/spacing/variables.js";
|
|
11
5
|
import { Grid } from "../grid/grid.js";
|
|
6
|
+
import { teddyColorTransparentWhite850, teddyColorTransparentWhite800, teddyColorTransparentWhite100, teddyColorTransparentBlack600, teddyColorTransparentBlack200 } from "../../tokens/color/variables.js";
|
|
12
7
|
const styles = {
|
|
13
|
-
"teddy-card": "_teddy-
|
|
14
|
-
"teddy-card__slot": "_teddy-
|
|
15
|
-
"teddy-card__slot--bottom": "_teddy-card__slot--
|
|
16
|
-
"teddy-card__slot--center": "_teddy-card__slot--
|
|
17
|
-
"teddy-card--shadow": "_teddy-card--
|
|
18
|
-
"teddy-card__action": "_teddy-
|
|
19
|
-
"teddy-card__action--disabled": "_teddy-card__action--
|
|
20
|
-
"teddy-card--border": "_teddy-card--
|
|
21
|
-
"teddy-card--layout": "_teddy-card--
|
|
22
|
-
"teddy-card__illustration": "_teddy-
|
|
23
|
-
"teddy-card__content": "_teddy-
|
|
24
|
-
"teddy-card__heading": "_teddy-
|
|
25
|
-
"teddy-
|
|
26
|
-
"teddy-card--
|
|
27
|
-
"teddy-card--navigation-
|
|
28
|
-
"teddy-card--
|
|
29
|
-
"teddy-
|
|
30
|
-
"teddy-card--
|
|
31
|
-
"teddy-
|
|
32
|
-
"teddy-card--
|
|
33
|
-
"teddy-card--
|
|
34
|
-
"teddy-card--
|
|
35
|
-
"teddy-
|
|
36
|
-
"teddy-card--
|
|
37
|
-
"teddy-
|
|
38
|
-
"teddy-
|
|
39
|
-
"teddy-
|
|
40
|
-
"teddy-card__inset
|
|
41
|
-
"teddy-card__inset--
|
|
8
|
+
"teddy-card": "_teddy-card_141ee_3",
|
|
9
|
+
"teddy-card__slot": "_teddy-card__slot_141ee_13",
|
|
10
|
+
"teddy-card__slot--bottom": "_teddy-card__slot--bottom_141ee_16",
|
|
11
|
+
"teddy-card__slot--center": "_teddy-card__slot--center_141ee_19",
|
|
12
|
+
"teddy-card--shadow": "_teddy-card--shadow_141ee_41",
|
|
13
|
+
"teddy-card__action": "_teddy-card__action_141ee_45",
|
|
14
|
+
"teddy-card__action--disabled": "_teddy-card__action--disabled_141ee_45",
|
|
15
|
+
"teddy-card--border": "_teddy-card--border_141ee_52",
|
|
16
|
+
"teddy-card--layout": "_teddy-card--layout_141ee_55",
|
|
17
|
+
"teddy-card__illustration": "_teddy-card__illustration_141ee_55",
|
|
18
|
+
"teddy-card__content": "_teddy-card__content_141ee_58",
|
|
19
|
+
"teddy-card__heading": "_teddy-card__heading_141ee_61",
|
|
20
|
+
"teddy-card__footer": "_teddy-card__footer_141ee_67",
|
|
21
|
+
"teddy-card--default": "_teddy-card--default_141ee_70",
|
|
22
|
+
"teddy-card--navigation-vertical": "_teddy-card--navigation-vertical_141ee_75",
|
|
23
|
+
"teddy-card--navigation-horizontal-small": "_teddy-card--navigation-horizontal-small_141ee_94",
|
|
24
|
+
"teddy-card--navigation-horizontal-large": "_teddy-card--navigation-horizontal-large_141ee_106",
|
|
25
|
+
"teddy-card--rich-card": "_teddy-card--rich-card_141ee_118",
|
|
26
|
+
"teddy-card__line": "_teddy-card__line_141ee_136",
|
|
27
|
+
"teddy-card--purple-light": "_teddy-card--purple-light_141ee_140",
|
|
28
|
+
"teddy-card--purple-dark": "_teddy-card--purple-dark_141ee_154",
|
|
29
|
+
"teddy-card--white": "_teddy-card--white_141ee_173",
|
|
30
|
+
"teddy-card--gray": "_teddy-card--gray_141ee_187",
|
|
31
|
+
"teddy-card--beige": "_teddy-card--beige_141ee_201",
|
|
32
|
+
"teddy-card__image--as-background": "_teddy-card__image--as-background_141ee_215",
|
|
33
|
+
"teddy-card--background-image": "_teddy-card--background-image_141ee_221",
|
|
34
|
+
"teddy-card__illustration--rounded": "_teddy-card__illustration--rounded_141ee_226",
|
|
35
|
+
"teddy-card__inset": "_teddy-card__inset_141ee_230",
|
|
36
|
+
"teddy-card__inset--top": "_teddy-card__inset--top_141ee_233",
|
|
37
|
+
"teddy-card__inset--left": "_teddy-card__inset--left_141ee_236",
|
|
38
|
+
"teddy-card__inset--right": "_teddy-card__inset--right_141ee_239",
|
|
39
|
+
"teddy-card__inset--bottom": "_teddy-card__inset--bottom_141ee_242"
|
|
42
40
|
};
|
|
43
41
|
const rootClassName = "teddy-card";
|
|
44
42
|
const actionElementIdentifier = `${rootClassName}__action`;
|
|
45
|
-
const variantOptions = ["purple-light", "purple-dark", "gray", "white", "beige"];
|
|
46
43
|
const RootContext = React__default.createContext(void 0);
|
|
47
44
|
const Root = React__default.forwardRef(
|
|
48
|
-
({ className, children, shadow, backgroundImageSrc, layout, variant, bordered, ...props }, forwardRef) => {
|
|
45
|
+
({ className, children, shadow, backgroundImageSrc, imageGradient, layout, variant, bordered, ...props }, forwardRef) => {
|
|
49
46
|
const buttonRef = React__default.useRef(null);
|
|
50
47
|
const linkRef = React__default.useRef(null);
|
|
51
48
|
const classes = clsx(
|
|
@@ -55,17 +52,32 @@ const Root = React__default.forwardRef(
|
|
|
55
52
|
[styles[`${rootClassName}--border`]]: bordered,
|
|
56
53
|
[styles[`${rootClassName}--shadow`]]: shadow,
|
|
57
54
|
[styles[`${rootClassName}--background-image`]]: backgroundImageSrc,
|
|
55
|
+
[styles[`${rootClassName}--background-image--${layout}`]]: layout,
|
|
58
56
|
[styles[`${rootClassName}--layout`]]: layout,
|
|
59
57
|
[styles[`${rootClassName}--${layout}`]]: layout
|
|
60
58
|
},
|
|
61
59
|
className
|
|
62
60
|
);
|
|
61
|
+
const customStyle = backgroundImageSrc ? imageGradient === "light" ? {
|
|
62
|
+
backgroundImage: `
|
|
63
|
+
linear-gradient(${teddyColorTransparentWhite850} 0%,
|
|
64
|
+
${teddyColorTransparentWhite800} 50%,
|
|
65
|
+
${teddyColorTransparentWhite100} 100%),
|
|
66
|
+
url(${backgroundImageSrc})`,
|
|
67
|
+
...props.style
|
|
68
|
+
} : {
|
|
69
|
+
backgroundImage: `
|
|
70
|
+
linear-gradient(${teddyColorTransparentBlack600} 0%,
|
|
71
|
+
${teddyColorTransparentBlack200} 100%),
|
|
72
|
+
url(${backgroundImageSrc})`,
|
|
73
|
+
...props.style
|
|
74
|
+
} : props.style;
|
|
63
75
|
return /* @__PURE__ */ jsx(RootContext.Provider, { value: { buttonRef, linkRef, variant, layout }, children: /* @__PURE__ */ jsx(
|
|
64
76
|
Grid,
|
|
65
77
|
{
|
|
66
78
|
...props,
|
|
67
79
|
className: classes,
|
|
68
|
-
style:
|
|
80
|
+
style: customStyle,
|
|
69
81
|
onClick: composeEventHandlers(props.onClick, (e) => {
|
|
70
82
|
var _a;
|
|
71
83
|
if (e.isDefaultPrevented())
|
|
@@ -80,140 +92,11 @@ const Root = React__default.forwardRef(
|
|
|
80
92
|
) });
|
|
81
93
|
}
|
|
82
94
|
);
|
|
83
|
-
Root.displayName = "
|
|
84
|
-
const Heading = React__default.forwardRef(
|
|
85
|
-
({ className, as = "h2", ...props }, forwardRef) => {
|
|
86
|
-
const classes = clsx([styles[`${rootClassName}__heading`]], className);
|
|
87
|
-
const variant = props.variant ?? "title-200";
|
|
88
|
-
return /* @__PURE__ */ jsx(
|
|
89
|
-
Heading$1,
|
|
90
|
-
{
|
|
91
|
-
...props,
|
|
92
|
-
...!props.asChild ? { as, asChild: false } : { as: void 0, asChild: true },
|
|
93
|
-
variant,
|
|
94
|
-
ref: forwardRef,
|
|
95
|
-
className: classes
|
|
96
|
-
}
|
|
97
|
-
);
|
|
98
|
-
}
|
|
99
|
-
);
|
|
100
|
-
Heading.displayName = "Card.Heading";
|
|
101
|
-
const Content = React__default.forwardRef(({ className, ...props }, forwardRef) => {
|
|
102
|
-
const classes = clsx([styles[`${rootClassName}__content`]], className);
|
|
103
|
-
return /* @__PURE__ */ jsx(Box, { ...props, ref: forwardRef, className: classes });
|
|
104
|
-
});
|
|
105
|
-
Content.displayName = "Card.Content";
|
|
106
|
-
const Slot = React__default.forwardRef(({ className, align, ...props }, forwardRef) => {
|
|
107
|
-
const classes = clsx(
|
|
108
|
-
[
|
|
109
|
-
styles[`${rootClassName}__slot`],
|
|
110
|
-
{
|
|
111
|
-
[styles[`${rootClassName}__slot--center`]]: align === "top" || align === "bottom",
|
|
112
|
-
[styles[`${rootClassName}__slot--bottom`]]: align == null ? void 0 : align.includes("bottom")
|
|
113
|
-
}
|
|
114
|
-
],
|
|
115
|
-
className
|
|
116
|
-
);
|
|
117
|
-
return /* @__PURE__ */ jsx(
|
|
118
|
-
Box,
|
|
119
|
-
{
|
|
120
|
-
position: "absolute",
|
|
121
|
-
top: (align == null ? void 0 : align.includes("top")) ? "0" : void 0,
|
|
122
|
-
bottom: (align == null ? void 0 : align.includes("bottom")) ? "0" : void 0,
|
|
123
|
-
left: (align == null ? void 0 : align.includes("left")) ? "200" : (align == null ? void 0 : align.includes("right")) ? void 0 : "50%",
|
|
124
|
-
right: (align == null ? void 0 : align.includes("right")) ? "200" : void 0,
|
|
125
|
-
...props,
|
|
126
|
-
ref: forwardRef,
|
|
127
|
-
className: classes
|
|
128
|
-
}
|
|
129
|
-
);
|
|
130
|
-
});
|
|
131
|
-
const insetOptions = [
|
|
132
|
-
"top",
|
|
133
|
-
"bottom",
|
|
134
|
-
"left",
|
|
135
|
-
"right",
|
|
136
|
-
"all",
|
|
137
|
-
"top-right-left",
|
|
138
|
-
"bottom-left-right",
|
|
139
|
-
"top-left",
|
|
140
|
-
"top-right",
|
|
141
|
-
"bottom-left",
|
|
142
|
-
"bottom-right",
|
|
143
|
-
"top-bottom",
|
|
144
|
-
"left-right"
|
|
145
|
-
];
|
|
146
|
-
const Illustration = React__default.forwardRef(
|
|
147
|
-
({ className, children, ...props }, forwardRef) => {
|
|
148
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
149
|
-
const classes = clsx([styles[`${rootClassName}__illustration`]], className, [styles[`${rootClassName}__inset`]], {
|
|
150
|
-
[styles[`${rootClassName}__inset--top`]]: ((_a = props.inset) == null ? void 0 : _a.includes("top")) || ((_b = props.inset) == null ? void 0 : _b.includes("all")),
|
|
151
|
-
[styles[`${rootClassName}__inset--bottom`]]: ((_c = props.inset) == null ? void 0 : _c.includes("bottom")) || ((_d = props.inset) == null ? void 0 : _d.includes("all")),
|
|
152
|
-
[styles[`${rootClassName}__inset--left`]]: ((_e = props.inset) == null ? void 0 : _e.includes("left")) || ((_f = props.inset) == null ? void 0 : _f.includes("all")),
|
|
153
|
-
[styles[`${rootClassName}__inset--right`]]: ((_g = props.inset) == null ? void 0 : _g.includes("right")) || ((_h = props.inset) == null ? void 0 : _h.includes("all"))
|
|
154
|
-
});
|
|
155
|
-
return /* @__PURE__ */ jsx("div", { ...props, className: classes, ref: forwardRef, children });
|
|
156
|
-
}
|
|
157
|
-
);
|
|
158
|
-
Illustration.displayName = "Card.Illustration";
|
|
159
|
-
function getButtonVariant(variant) {
|
|
160
|
-
switch (variant) {
|
|
161
|
-
case "purple-dark":
|
|
162
|
-
return "primary-negative";
|
|
163
|
-
default:
|
|
164
|
-
return "primary";
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
const Button = React__default.forwardRef(
|
|
168
|
-
({ className, iconOnly = false, ...props }, forwardRef) => {
|
|
169
|
-
const context = React__default.useContext(RootContext);
|
|
170
|
-
const classes = clsx(
|
|
171
|
-
[styles[`${rootClassName}__button`]],
|
|
172
|
-
styles[actionElementIdentifier],
|
|
173
|
-
{
|
|
174
|
-
[styles[`${actionElementIdentifier}--disabled`]]: props.disabled
|
|
175
|
-
},
|
|
176
|
-
className
|
|
177
|
-
);
|
|
178
|
-
const ref = composeRefs(context == null ? void 0 : context.buttonRef, forwardRef);
|
|
179
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
|
|
180
|
-
Button$1,
|
|
181
|
-
{
|
|
182
|
-
...!iconOnly || !props["aria-label"] ? { iconOnly: false, "aria-label": void 0 } : { iconOnly: true, "aria-label": props["aria-label"] },
|
|
183
|
-
ref,
|
|
184
|
-
variant: getButtonVariant(context == null ? void 0 : context.variant),
|
|
185
|
-
...props,
|
|
186
|
-
className: classes
|
|
187
|
-
}
|
|
188
|
-
) });
|
|
189
|
-
}
|
|
190
|
-
);
|
|
191
|
-
Button.displayName = "Card.Button";
|
|
192
|
-
const Link = React__default.forwardRef(
|
|
193
|
-
({ className, ...props }, forwardRef) => {
|
|
194
|
-
const context = React__default.useContext(RootContext);
|
|
195
|
-
const classes = clsx([styles[`${rootClassName}__link`]], styles[actionElementIdentifier], className);
|
|
196
|
-
const ref = composeRefs(context == null ? void 0 : context.linkRef, forwardRef);
|
|
197
|
-
return /* @__PURE__ */ jsx(Link$1, { ...props, ref, className: classes });
|
|
198
|
-
}
|
|
199
|
-
);
|
|
200
|
-
Link.displayName = "Card.Link";
|
|
201
|
-
const Line = React__default.forwardRef(({ className, ...props }, forwardRef) => {
|
|
202
|
-
const classes = clsx([styles[`${rootClassName}__line`]], className);
|
|
203
|
-
return /* @__PURE__ */ jsx(Box, { width: "100%", p: "0", m: `${teddySpacing50} 0`, ...props, ref: forwardRef, className: classes, asChild: true, children: /* @__PURE__ */ jsx("hr", {}) });
|
|
204
|
-
});
|
|
205
|
-
const Card = Object.assign(Root, {
|
|
206
|
-
Root,
|
|
207
|
-
Heading,
|
|
208
|
-
Content,
|
|
209
|
-
Illustration,
|
|
210
|
-
Button,
|
|
211
|
-
Link,
|
|
212
|
-
Slot,
|
|
213
|
-
Line,
|
|
214
|
-
variantOptions,
|
|
215
|
-
insetOptions
|
|
216
|
-
});
|
|
95
|
+
Root.displayName = "Root";
|
|
217
96
|
export {
|
|
218
|
-
|
|
97
|
+
Root,
|
|
98
|
+
RootContext,
|
|
99
|
+
actionElementIdentifier,
|
|
100
|
+
rootClassName,
|
|
101
|
+
styles as s
|
|
219
102
|
};
|
|
@@ -1,4 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const components_card_cardHeading = require("./card-heading.cjs");
|
|
3
4
|
const components_card_card = require("./card.cjs");
|
|
4
|
-
|
|
5
|
+
const components_card_cardButton = require("./card-button.cjs");
|
|
6
|
+
const components_card_cardContent = require("./card-content.cjs");
|
|
7
|
+
const components_card_cardIllustration = require("./card-illustration.cjs");
|
|
8
|
+
const components_card_cardLine = require("./card-line.cjs");
|
|
9
|
+
const components_card_cardLink = require("./card-link.cjs");
|
|
10
|
+
const components_card_cardSlot = require("./card-slot.cjs");
|
|
11
|
+
const components_card_cardFooter = require("./card-footer.cjs");
|
|
12
|
+
components_card_card.Root.displayName = "Card";
|
|
13
|
+
components_card_cardButton.Button.displayName = "Card.Button";
|
|
14
|
+
components_card_cardContent.Content.displayName = "Card.Content";
|
|
15
|
+
components_card_cardHeading.Heading.displayName = "Card.Heading";
|
|
16
|
+
components_card_cardIllustration.Illustration.displayName = "Card.Illustration";
|
|
17
|
+
components_card_cardLine.Line.displayName = "Card.Line";
|
|
18
|
+
components_card_cardLink.Link.displayName = "Card.Link";
|
|
19
|
+
components_card_cardSlot.Slot.displayName = "Card.Slot";
|
|
20
|
+
components_card_cardFooter.Footer.displayName = "Card.Footer";
|
|
21
|
+
const Card = Object.assign(components_card_card.Root, {
|
|
22
|
+
Heading: components_card_cardHeading.Heading,
|
|
23
|
+
Button: components_card_cardButton.Button,
|
|
24
|
+
Content: components_card_cardContent.Content,
|
|
25
|
+
Illustration: components_card_cardIllustration.Illustration,
|
|
26
|
+
Line: components_card_cardLine.Line,
|
|
27
|
+
Link: components_card_cardLink.Link,
|
|
28
|
+
Slot: components_card_cardSlot.Slot,
|
|
29
|
+
Footer: components_card_cardFooter.Footer
|
|
30
|
+
});
|
|
31
|
+
exports.Card = Card;
|
|
@@ -1,2 +1,64 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { HeadingProps } from './card-heading';
|
|
2
|
+
import { RootProps } from './card';
|
|
3
|
+
import { ButtonProps } from './card-button';
|
|
4
|
+
import { ContentProps } from './card-content';
|
|
5
|
+
import { IllustrationProps } from './card-illustration';
|
|
6
|
+
import { LineProps } from './card-line';
|
|
7
|
+
import { LinkProps } from './card-link';
|
|
8
|
+
import { SlotProps } from './card-slot';
|
|
9
|
+
import { FooterProps } from './card-footer';
|
|
10
|
+
|
|
11
|
+
export declare const Card: import('react').ForwardRefExoticComponent<RootProps & import('react').RefAttributes<HTMLDivElement>> & {
|
|
12
|
+
Heading: import('react').ForwardRefExoticComponent<HeadingProps & import('react').RefAttributes<HTMLHeadingElement>>;
|
|
13
|
+
Button: import('react').ForwardRefExoticComponent<Omit<Omit<Omit<import('react').ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & {
|
|
14
|
+
display?: import('../../utils/generate-styling').DisplayChildren | undefined;
|
|
15
|
+
} & {
|
|
16
|
+
asChild?: boolean | undefined;
|
|
17
|
+
loading?: boolean | undefined;
|
|
18
|
+
fullWidth?: boolean | undefined;
|
|
19
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
20
|
+
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
21
|
+
} & {
|
|
22
|
+
iconOnly: true;
|
|
23
|
+
"aria-label": string;
|
|
24
|
+
} & import('react').RefAttributes<HTMLButtonElement>, "ref"> | Omit<Omit<import('react').ButtonHTMLAttributes<HTMLButtonElement>, "aria-label"> & import('../../utils/generate-styling/flex').FlexChildren & import('../../utils/generate-styling/grid').GridChildren & import('../../utils/generate-styling/position').PositionProps & import('../../utils/generate-styling/inset').InsetProps & import('../../utils/generate-styling/margin').MarginProps & import('../../utils/generate-styling/padding').PaddingProps & import('../../utils/generate-styling/width').WidthProps & import('../../utils/generate-styling/height').HeightProps & import('../../utils/generate-styling/color').ColorProps & {
|
|
25
|
+
display?: import('../../utils/generate-styling').DisplayChildren | undefined;
|
|
26
|
+
} & {
|
|
27
|
+
asChild?: boolean | undefined;
|
|
28
|
+
loading?: boolean | undefined;
|
|
29
|
+
fullWidth?: boolean | undefined;
|
|
30
|
+
size?: "sm" | "md" | "lg" | undefined;
|
|
31
|
+
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
32
|
+
} & {
|
|
33
|
+
iconOnly?: false | undefined;
|
|
34
|
+
"aria-label"?: string | undefined;
|
|
35
|
+
} & import('react').RefAttributes<HTMLButtonElement>, "ref">, "variant"> & {
|
|
36
|
+
variant?: "text" | "list-item" | "primary" | "secondary" | "destructive" | "tertiary-purple" | "expressive" | "primary-negative" | "secondary-negative" | "destructive-negative" | "tertiary-purple-negative" | "text-negative" | "expressive-negative" | undefined;
|
|
37
|
+
} & import('react').RefAttributes<HTMLButtonElement>>;
|
|
38
|
+
Content: import('react').ForwardRefExoticComponent<ContentProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
39
|
+
Illustration: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
40
|
+
inset?: "top" | "bottom" | "left" | "right" | "all" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top-right-left" | "bottom-left-right" | "top-bottom" | "left-right" | undefined;
|
|
41
|
+
rounded?: boolean | undefined;
|
|
42
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
43
|
+
Line: import('react').ForwardRefExoticComponent<LineProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
44
|
+
Link: import('react').ForwardRefExoticComponent<Omit<Omit<import('react').DetailedHTMLProps<import('react').AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
|
|
45
|
+
asChild?: boolean | undefined;
|
|
46
|
+
disableVisited?: boolean | undefined;
|
|
47
|
+
ensureTargetArea?: boolean | undefined;
|
|
48
|
+
silent?: boolean | undefined;
|
|
49
|
+
variant: "text" | "navigation" | "text-negative" | "standalone" | "standalone-negative" | "navigation-negative";
|
|
50
|
+
} & import('react').RefAttributes<HTMLAnchorElement>, "ref"> & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
51
|
+
Slot: import('react').ForwardRefExoticComponent<SlotProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
52
|
+
Footer: import('react').ForwardRefExoticComponent<FooterProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
53
|
+
};
|
|
54
|
+
export type CardProps = {
|
|
55
|
+
Root: RootProps;
|
|
56
|
+
Heading: HeadingProps;
|
|
57
|
+
Button: ButtonProps;
|
|
58
|
+
Content: ContentProps;
|
|
59
|
+
Illustration: IllustrationProps;
|
|
60
|
+
Line: LineProps;
|
|
61
|
+
Link: LinkProps;
|
|
62
|
+
Slot: SlotProps;
|
|
63
|
+
Footer: FooterProps;
|
|
64
|
+
};
|
|
@@ -1,4 +1,31 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Heading } from "./card-heading.js";
|
|
2
|
+
import { Root } from "./card.js";
|
|
3
|
+
import { Button } from "./card-button.js";
|
|
4
|
+
import { Content } from "./card-content.js";
|
|
5
|
+
import { Illustration } from "./card-illustration.js";
|
|
6
|
+
import { Line } from "./card-line.js";
|
|
7
|
+
import { Link } from "./card-link.js";
|
|
8
|
+
import { Slot } from "./card-slot.js";
|
|
9
|
+
import { Footer } from "./card-footer.js";
|
|
10
|
+
Root.displayName = "Card";
|
|
11
|
+
Button.displayName = "Card.Button";
|
|
12
|
+
Content.displayName = "Card.Content";
|
|
13
|
+
Heading.displayName = "Card.Heading";
|
|
14
|
+
Illustration.displayName = "Card.Illustration";
|
|
15
|
+
Line.displayName = "Card.Line";
|
|
16
|
+
Link.displayName = "Card.Link";
|
|
17
|
+
Slot.displayName = "Card.Slot";
|
|
18
|
+
Footer.displayName = "Card.Footer";
|
|
19
|
+
const Card = Object.assign(Root, {
|
|
20
|
+
Heading,
|
|
21
|
+
Button,
|
|
22
|
+
Content,
|
|
23
|
+
Illustration,
|
|
24
|
+
Line,
|
|
25
|
+
Link,
|
|
26
|
+
Slot,
|
|
27
|
+
Footer
|
|
28
|
+
});
|
|
2
29
|
export {
|
|
3
30
|
Card
|
|
4
31
|
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const clsx = require("clsx");
|
|
4
|
+
const styles = {
|
|
5
|
+
"date-picker": "_date-picker_1vj0x_1",
|
|
6
|
+
"date-picker__container": "_date-picker__container_1vj0x_7",
|
|
7
|
+
"date-picker__input": "_date-picker__input_1vj0x_20",
|
|
8
|
+
"date-picker__input--touched": "_date-picker__input--touched_1vj0x_38",
|
|
9
|
+
"date-picker__input-icon-container": "_date-picker__input-icon-container_1vj0x_46",
|
|
10
|
+
"date-picker__toggle-button": "_date-picker__toggle-button_1vj0x_52",
|
|
11
|
+
"date-picker__additional": "_date-picker__additional_1vj0x_59",
|
|
12
|
+
"date-picker__error": "_date-picker__error_1vj0x_62",
|
|
13
|
+
"date-picker__toggle-icon": "_date-picker__toggle-icon_1vj0x_70",
|
|
14
|
+
"date-picker__dialog-container": "_date-picker__dialog-container_1vj0x_79",
|
|
15
|
+
"date-picker__dialog": "_date-picker__dialog_1vj0x_79",
|
|
16
|
+
"is-active": "_is-active_1vj0x_108",
|
|
17
|
+
"date-picker__dialog-content": "_date-picker__dialog-content_1vj0x_113",
|
|
18
|
+
"date-picker__table-scrollable": "_date-picker__table-scrollable_1vj0x_137",
|
|
19
|
+
"date-picker__table-wrapper": "_date-picker__table-wrapper_1vj0x_142",
|
|
20
|
+
"date-picker__table": "_date-picker__table_1vj0x_137",
|
|
21
|
+
"date-picker__table-header": "_date-picker__table-header_1vj0x_156",
|
|
22
|
+
"date-picker__row": "_date-picker__row_1vj0x_167",
|
|
23
|
+
"date-picker__cell": "_date-picker__cell_1vj0x_170",
|
|
24
|
+
"date-picker__year-button": "_date-picker__year-button_1vj0x_175",
|
|
25
|
+
"date-picker__year-chevron": "_date-picker__year-chevron_1vj0x_204",
|
|
26
|
+
"date-picker__year": "_date-picker__year_1vj0x_175",
|
|
27
|
+
"is-today": "_is-today_1vj0x_226",
|
|
28
|
+
"is-focused": "_is-focused_1vj0x_230",
|
|
29
|
+
"date-picker__day": "_date-picker__day_1vj0x_259",
|
|
30
|
+
"is-month": "_is-month_1vj0x_280",
|
|
31
|
+
"date-picker__header": "_date-picker__header_1vj0x_311",
|
|
32
|
+
"date-picker__nav": "_date-picker__nav_1vj0x_317",
|
|
33
|
+
"date-picker__nav-month": "_date-picker__nav-month_1vj0x_323",
|
|
34
|
+
"date-picker__prev": "_date-picker__prev_1vj0x_331",
|
|
35
|
+
"date-picker__next": "_date-picker__next_1vj0x_331",
|
|
36
|
+
"date-picker__prev-icon": "_date-picker__prev-icon_1vj0x_362",
|
|
37
|
+
"date-picker__next-icon": "_date-picker__next-icon_1vj0x_367",
|
|
38
|
+
"date-picker__select": "_date-picker__select_1vj0x_372",
|
|
39
|
+
"date-picker__select-label": "_date-picker__select-label_1vj0x_386",
|
|
40
|
+
"date-picker__select-icon": "_date-picker__select-icon_1vj0x_389",
|
|
41
|
+
"date-picker__close_year": "_date-picker__close_year_1vj0x_408",
|
|
42
|
+
"date-picker__vhidden": "_date-picker__vhidden_1vj0x_422"
|
|
43
|
+
};
|
|
44
|
+
const rootClassName = "date-picker";
|
|
45
|
+
const css = (suffix) => {
|
|
46
|
+
if (suffix == null)
|
|
47
|
+
return "";
|
|
48
|
+
let tmp = null;
|
|
49
|
+
if (suffix.startsWith("_") || suffix.startsWith("-") || suffix === "") {
|
|
50
|
+
tmp = clsx([styles[`${rootClassName + suffix}`]], "");
|
|
51
|
+
} else {
|
|
52
|
+
tmp = clsx([styles[`${suffix}`]], "");
|
|
53
|
+
}
|
|
54
|
+
if (!tmp) {
|
|
55
|
+
console.warn("Could not find css class " + suffix + " for the root " + rootClassName);
|
|
56
|
+
}
|
|
57
|
+
return tmp;
|
|
58
|
+
};
|
|
59
|
+
exports.css = css;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const css: (suffix: string | null) => string;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import clsx from "clsx";
|
|
2
|
+
const styles = {
|
|
3
|
+
"date-picker": "_date-picker_1vj0x_1",
|
|
4
|
+
"date-picker__container": "_date-picker__container_1vj0x_7",
|
|
5
|
+
"date-picker__input": "_date-picker__input_1vj0x_20",
|
|
6
|
+
"date-picker__input--touched": "_date-picker__input--touched_1vj0x_38",
|
|
7
|
+
"date-picker__input-icon-container": "_date-picker__input-icon-container_1vj0x_46",
|
|
8
|
+
"date-picker__toggle-button": "_date-picker__toggle-button_1vj0x_52",
|
|
9
|
+
"date-picker__additional": "_date-picker__additional_1vj0x_59",
|
|
10
|
+
"date-picker__error": "_date-picker__error_1vj0x_62",
|
|
11
|
+
"date-picker__toggle-icon": "_date-picker__toggle-icon_1vj0x_70",
|
|
12
|
+
"date-picker__dialog-container": "_date-picker__dialog-container_1vj0x_79",
|
|
13
|
+
"date-picker__dialog": "_date-picker__dialog_1vj0x_79",
|
|
14
|
+
"is-active": "_is-active_1vj0x_108",
|
|
15
|
+
"date-picker__dialog-content": "_date-picker__dialog-content_1vj0x_113",
|
|
16
|
+
"date-picker__table-scrollable": "_date-picker__table-scrollable_1vj0x_137",
|
|
17
|
+
"date-picker__table-wrapper": "_date-picker__table-wrapper_1vj0x_142",
|
|
18
|
+
"date-picker__table": "_date-picker__table_1vj0x_137",
|
|
19
|
+
"date-picker__table-header": "_date-picker__table-header_1vj0x_156",
|
|
20
|
+
"date-picker__row": "_date-picker__row_1vj0x_167",
|
|
21
|
+
"date-picker__cell": "_date-picker__cell_1vj0x_170",
|
|
22
|
+
"date-picker__year-button": "_date-picker__year-button_1vj0x_175",
|
|
23
|
+
"date-picker__year-chevron": "_date-picker__year-chevron_1vj0x_204",
|
|
24
|
+
"date-picker__year": "_date-picker__year_1vj0x_175",
|
|
25
|
+
"is-today": "_is-today_1vj0x_226",
|
|
26
|
+
"is-focused": "_is-focused_1vj0x_230",
|
|
27
|
+
"date-picker__day": "_date-picker__day_1vj0x_259",
|
|
28
|
+
"is-month": "_is-month_1vj0x_280",
|
|
29
|
+
"date-picker__header": "_date-picker__header_1vj0x_311",
|
|
30
|
+
"date-picker__nav": "_date-picker__nav_1vj0x_317",
|
|
31
|
+
"date-picker__nav-month": "_date-picker__nav-month_1vj0x_323",
|
|
32
|
+
"date-picker__prev": "_date-picker__prev_1vj0x_331",
|
|
33
|
+
"date-picker__next": "_date-picker__next_1vj0x_331",
|
|
34
|
+
"date-picker__prev-icon": "_date-picker__prev-icon_1vj0x_362",
|
|
35
|
+
"date-picker__next-icon": "_date-picker__next-icon_1vj0x_367",
|
|
36
|
+
"date-picker__select": "_date-picker__select_1vj0x_372",
|
|
37
|
+
"date-picker__select-label": "_date-picker__select-label_1vj0x_386",
|
|
38
|
+
"date-picker__select-icon": "_date-picker__select-icon_1vj0x_389",
|
|
39
|
+
"date-picker__close_year": "_date-picker__close_year_1vj0x_408",
|
|
40
|
+
"date-picker__vhidden": "_date-picker__vhidden_1vj0x_422"
|
|
41
|
+
};
|
|
42
|
+
const rootClassName = "date-picker";
|
|
43
|
+
const css = (suffix) => {
|
|
44
|
+
if (suffix == null)
|
|
45
|
+
return "";
|
|
46
|
+
let tmp = null;
|
|
47
|
+
if (suffix.startsWith("_") || suffix.startsWith("-") || suffix === "") {
|
|
48
|
+
tmp = clsx([styles[`${rootClassName + suffix}`]], "");
|
|
49
|
+
} else {
|
|
50
|
+
tmp = clsx([styles[`${suffix}`]], "");
|
|
51
|
+
}
|
|
52
|
+
if (!tmp) {
|
|
53
|
+
console.warn("Could not find css class " + suffix + " for the root " + rootClassName);
|
|
54
|
+
}
|
|
55
|
+
return tmp;
|
|
56
|
+
};
|
|
57
|
+
export {
|
|
58
|
+
css
|
|
59
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const React = require("react");
|
|
5
|
+
const components_datePicker_dateUtils = require("./date-utils.cjs");
|
|
6
|
+
const components_datePicker_css = require("./css.cjs");
|
|
7
|
+
const DatePickerDay = ({
|
|
8
|
+
focusedDay,
|
|
9
|
+
today,
|
|
10
|
+
day,
|
|
11
|
+
onDaySelect,
|
|
12
|
+
disabled,
|
|
13
|
+
inRange,
|
|
14
|
+
isSelected,
|
|
15
|
+
dateFormatter
|
|
16
|
+
}) => {
|
|
17
|
+
const isToday = components_datePicker_dateUtils.isEqual(day, today);
|
|
18
|
+
const isMonth = components_datePicker_dateUtils.isEqualMonth(day, focusedDay);
|
|
19
|
+
const isFocused = components_datePicker_dateUtils.isEqual(day, focusedDay);
|
|
20
|
+
const isOutsideRange = !inRange;
|
|
21
|
+
const isDisabled = disabled || isOutsideRange;
|
|
22
|
+
const handleClick = (e) => {
|
|
23
|
+
onDaySelect(e, day);
|
|
24
|
+
};
|
|
25
|
+
const buttonRef = React.useRef(null);
|
|
26
|
+
React.useEffect(() => {
|
|
27
|
+
if (isFocused && buttonRef.current) {
|
|
28
|
+
setTimeout(() => {
|
|
29
|
+
var _a;
|
|
30
|
+
return (_a = buttonRef.current) == null ? void 0 : _a.focus();
|
|
31
|
+
}, 3);
|
|
32
|
+
}
|
|
33
|
+
}, [isFocused, buttonRef]);
|
|
34
|
+
let dayClass = components_datePicker_css.css("__day");
|
|
35
|
+
if (isDisabled) {
|
|
36
|
+
dayClass += " " + components_datePicker_css.css("is-disabled");
|
|
37
|
+
} else {
|
|
38
|
+
if (isToday) {
|
|
39
|
+
dayClass += " " + components_datePicker_css.css("is-today");
|
|
40
|
+
}
|
|
41
|
+
if (isMonth) {
|
|
42
|
+
dayClass += " " + components_datePicker_css.css("is-month");
|
|
43
|
+
}
|
|
44
|
+
if (isFocused) {
|
|
45
|
+
dayClass += " " + components_datePicker_css.css("is-focused");
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
49
|
+
"button",
|
|
50
|
+
{
|
|
51
|
+
className: dayClass,
|
|
52
|
+
tabIndex: isFocused ? 0 : void 0,
|
|
53
|
+
onClick: handleClick,
|
|
54
|
+
"aria-disabled": isDisabled ? "true" : void 0,
|
|
55
|
+
disabled: isOutsideRange,
|
|
56
|
+
type: "button",
|
|
57
|
+
"aria-label": day.getDate().toString(),
|
|
58
|
+
"aria-pressed": isSelected ? "true" : "false",
|
|
59
|
+
ref: buttonRef,
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, children: day.getDate() }),
|
|
62
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: components_datePicker_css.css("__vhidden"), children: dateFormatter == null ? void 0 : dateFormatter.format(day) })
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
exports.DatePickerDay = DatePickerDay;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type DatePickerDayProps = {
|
|
4
|
+
focusedDay: Date;
|
|
5
|
+
today: Date;
|
|
6
|
+
day: Date;
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
inRange: boolean;
|
|
9
|
+
isSelected: boolean;
|
|
10
|
+
dateFormatter: Intl.DateTimeFormat | undefined;
|
|
11
|
+
onDaySelect: (event: React.MouseEvent<HTMLButtonElement>, day: Date) => void;
|
|
12
|
+
};
|
|
13
|
+
export declare const DatePickerDay: React.FC<DatePickerDayProps>;
|