@forgedevstack/bear 1.0.1 → 1.0.3
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/ActiveBar/ActiveBar.cjs +8 -0
- package/dist/components/ActiveBar/ActiveBar.d.ts +2 -0
- package/dist/components/ActiveBar/ActiveBar.js +90 -0
- package/dist/components/ActiveBar/ActiveBar.types.d.ts +16 -0
- package/dist/components/ActiveBar/index.d.ts +2 -0
- package/dist/components/Alert/Alert.cjs +1 -1
- package/dist/components/Alert/Alert.js +38 -38
- package/dist/components/AppBar/AppBar.cjs +1 -1
- package/dist/components/AppBar/AppBar.js +15 -15
- package/dist/components/Badge/Badge.cjs +1 -1
- package/dist/components/Badge/Badge.constants.cjs +1 -0
- package/dist/components/Badge/Badge.constants.d.ts +6 -0
- package/dist/components/Badge/Badge.constants.js +34 -0
- package/dist/components/Badge/Badge.js +27 -52
- package/dist/components/Box/Box.cjs +1 -0
- package/dist/components/Box/Box.d.ts +2 -0
- package/dist/components/Box/Box.js +64 -0
- package/dist/components/Box/Box.types.d.ts +24 -0
- package/dist/components/Box/Box.utils.cjs +1 -0
- package/dist/components/Box/Box.utils.d.ts +3 -0
- package/dist/components/Box/Box.utils.js +21 -0
- package/dist/components/Box/index.d.ts +2 -0
- package/dist/components/Button/Button.cjs +1 -57
- package/dist/components/Button/Button.constants.cjs +57 -0
- package/dist/components/Button/Button.constants.d.ts +3 -0
- package/dist/components/Button/Button.constants.js +77 -0
- package/dist/components/Button/Button.js +55 -119
- package/dist/components/Button/Button.types.d.ts +6 -1
- package/dist/components/ButtonGroup/ButtonGroup.cjs +1 -1
- package/dist/components/ButtonGroup/ButtonGroup.js +17 -17
- package/dist/components/Calendar/Calendar.cjs +1 -0
- package/dist/components/Calendar/Calendar.const.cjs +1 -0
- package/dist/components/Calendar/Calendar.const.d.ts +18 -0
- package/dist/components/Calendar/Calendar.const.js +27 -0
- package/dist/components/Calendar/Calendar.d.ts +3 -0
- package/dist/components/Calendar/Calendar.js +189 -0
- package/dist/components/Calendar/Calendar.types.d.ts +128 -0
- package/dist/components/Calendar/Calendar.utils.cjs +1 -0
- package/dist/components/Calendar/Calendar.utils.d.ts +41 -0
- package/dist/components/Calendar/Calendar.utils.js +33 -0
- package/dist/components/Calendar/index.d.ts +4 -0
- package/dist/components/Card/Card.cjs +1 -1
- package/dist/components/Card/Card.js +65 -65
- package/dist/components/Checkbox/Checkbox.cjs +1 -1
- package/dist/components/Checkbox/Checkbox.js +48 -48
- package/dist/components/CodeBlock/CodeBlock.cjs +2 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts +2 -0
- package/dist/components/CodeBlock/CodeBlock.js +55 -0
- package/dist/components/CodeBlock/CodeBlock.types.d.ts +10 -0
- package/dist/components/CodeBlock/index.d.ts +2 -0
- package/dist/components/Columns/Columns.cjs +1 -0
- package/dist/components/Columns/Columns.d.ts +5 -0
- package/dist/components/Columns/Columns.js +54 -0
- package/dist/components/Columns/Columns.types.d.ts +17 -0
- package/dist/components/Columns/index.d.ts +2 -0
- package/dist/components/Container/Container.cjs +1 -1
- package/dist/components/Container/Container.js +15 -15
- package/dist/components/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/DatePicker/DatePicker.js +77 -85
- package/dist/components/DatePicker/DatePicker.types.d.ts +9 -0
- package/dist/components/DatePicker/DatePicker.utils.cjs +1 -0
- package/dist/components/DatePicker/DatePicker.utils.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.utils.js +9 -0
- package/dist/components/DateTimePicker/DateTimePicker.cjs +1 -0
- package/dist/components/DateTimePicker/DateTimePicker.d.ts +3 -0
- package/dist/components/DateTimePicker/DateTimePicker.js +178 -0
- package/dist/components/DateTimePicker/DateTimePicker.types.d.ts +26 -0
- package/dist/components/DateTimePicker/DateTimePicker.utils.cjs +1 -0
- package/dist/components/DateTimePicker/DateTimePicker.utils.d.ts +2 -0
- package/dist/components/DateTimePicker/DateTimePicker.utils.js +16 -0
- package/dist/components/DateTimePicker/index.d.ts +2 -0
- package/dist/components/Divider/Divider.cjs +1 -1
- package/dist/components/Divider/Divider.js +29 -29
- package/dist/components/Dropdown/Dropdown.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.js +70 -70
- package/dist/components/Editable/Editable.cjs +1 -0
- package/dist/components/Editable/Editable.d.ts +10 -0
- package/dist/components/Editable/Editable.js +194 -0
- package/dist/components/Editable/Editable.types.d.ts +39 -0
- package/dist/components/Editable/index.d.ts +2 -0
- package/dist/components/Em/Em.cjs +1 -0
- package/dist/components/Em/Em.d.ts +2 -0
- package/dist/components/Em/Em.js +24 -0
- package/dist/components/Em/Em.types.d.ts +5 -0
- package/dist/components/Em/index.d.ts +2 -0
- package/dist/components/Fab/Fab.cjs +1 -1
- package/dist/components/Fab/Fab.js +43 -43
- package/dist/components/FileUpload/FileUpload.cjs +1 -1
- package/dist/components/FileUpload/FileUpload.js +46 -49
- package/dist/components/FileUpload/FileUpload.utils.cjs +1 -0
- package/dist/components/FileUpload/FileUpload.utils.d.ts +1 -0
- package/dist/components/FileUpload/FileUpload.utils.js +9 -0
- package/dist/components/Flex/Flex.cjs +1 -1
- package/dist/components/Flex/Flex.js +58 -58
- package/dist/components/Grid/Grid.cjs +1 -1
- package/dist/components/Grid/Grid.js +60 -60
- package/dist/components/Highlight/Highlight.cjs +1 -0
- package/dist/components/Highlight/Highlight.d.ts +2 -0
- package/dist/components/Highlight/Highlight.js +28 -0
- package/dist/components/Highlight/Highlight.types.d.ts +6 -0
- package/dist/components/Highlight/index.d.ts +2 -0
- package/dist/components/HoverCard/HoverCard.cjs +6 -0
- package/dist/components/HoverCard/HoverCard.d.ts +2 -0
- package/dist/components/HoverCard/HoverCard.js +68 -0
- package/dist/components/HoverCard/HoverCard.types.d.ts +13 -0
- package/dist/components/HoverCard/HoverCard.utils.cjs +1 -0
- package/dist/components/HoverCard/HoverCard.utils.d.ts +2 -0
- package/dist/components/HoverCard/HoverCard.utils.js +23 -0
- package/dist/components/HoverCard/index.d.ts +2 -0
- package/dist/components/Icon/icons/status.js +1 -1
- package/dist/components/Icon/index.cjs +1 -1
- package/dist/components/Icon/index.d.ts +5 -0
- package/dist/components/Icon/index.js +28 -21
- package/dist/components/Link/Link.cjs +1 -1
- package/dist/components/Link/Link.js +47 -47
- package/dist/components/List/List.cjs +1 -1
- package/dist/components/List/List.js +117 -117
- package/dist/components/Mark/Mark.cjs +1 -0
- package/dist/components/Mark/Mark.d.ts +2 -0
- package/dist/components/Mark/Mark.js +26 -0
- package/dist/components/Mark/Mark.types.d.ts +5 -0
- package/dist/components/Mark/index.d.ts +2 -0
- package/dist/components/Menu/Menu.cjs +1 -1
- package/dist/components/Menu/Menu.js +58 -58
- package/dist/components/Paper/Paper.cjs +1 -1
- package/dist/components/Paper/Paper.js +36 -36
- package/dist/components/Radio/Radio.cjs +1 -1
- package/dist/components/Radio/Radio.js +79 -79
- package/dist/components/Rating/Rating.cjs +1 -1
- package/dist/components/Rating/Rating.js +37 -37
- package/dist/components/RichEditor/RichEditor.cjs +10 -0
- package/dist/components/RichEditor/RichEditor.d.ts +4 -0
- package/dist/components/RichEditor/RichEditor.icons.cjs +1 -0
- package/dist/components/RichEditor/RichEditor.icons.d.ts +16 -0
- package/dist/components/RichEditor/RichEditor.icons.js +62 -0
- package/dist/components/RichEditor/RichEditor.js +151 -0
- package/dist/components/RichEditor/RichEditor.types.d.ts +20 -0
- package/dist/components/RichEditor/RichEditor.utils.cjs +1 -0
- package/dist/components/RichEditor/RichEditor.utils.d.ts +3 -0
- package/dist/components/RichEditor/RichEditor.utils.js +22 -0
- package/dist/components/RichEditor/index.d.ts +2 -0
- package/dist/components/Sidebar/Sidebar.cjs +1 -0
- package/dist/components/Sidebar/Sidebar.d.ts +5 -0
- package/dist/components/Sidebar/Sidebar.js +158 -0
- package/dist/components/Sidebar/Sidebar.types.d.ts +40 -0
- package/dist/components/Sidebar/index.d.ts +2 -0
- package/dist/components/Slider/Slider.cjs +1 -1
- package/dist/components/Slider/Slider.js +8 -8
- package/dist/components/SpeedDial/SpeedDial.cjs +1 -1
- package/dist/components/SpeedDial/SpeedDial.js +40 -40
- package/dist/components/Spinner/Spinner.cjs +1 -1
- package/dist/components/Spinner/Spinner.js +24 -24
- package/dist/components/TimePicker/TimePicker.cjs +1 -1
- package/dist/components/TimePicker/TimePicker.constants.cjs +1 -0
- package/dist/components/TimePicker/TimePicker.constants.d.ts +5 -0
- package/dist/components/TimePicker/TimePicker.constants.js +16 -0
- package/dist/components/TimePicker/TimePicker.js +91 -70
- package/dist/components/TimePicker/TimePicker.types.d.ts +5 -2
- package/dist/components/TimePicker/TimePicker.utils.cjs +1 -0
- package/dist/components/TimePicker/TimePicker.utils.d.ts +1 -0
- package/dist/components/TimePicker/TimePicker.utils.js +7 -0
- package/dist/components/TransferList/TransferList.cjs +1 -1
- package/dist/components/TransferList/TransferList.js +74 -74
- package/dist/components/Typography/Typography.cjs +1 -1
- package/dist/components/Typography/Typography.js +52 -52
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +26 -0
- package/dist/components/index.js +119 -91
- package/dist/context/BearProvider.cjs +1 -1
- package/dist/context/BearProvider.d.ts +6 -1
- package/dist/context/BearProvider.js +42 -38
- package/dist/context/index.cjs +1 -1
- package/dist/context/index.d.ts +1 -1
- package/dist/context/index.js +6 -5
- package/dist/hooks/bearStyled.cjs +1 -0
- package/dist/hooks/bearStyled.d.ts +17 -0
- package/dist/hooks/bearStyled.js +17 -0
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +14 -10
- package/dist/hooks/useBearStyles.cjs +1 -0
- package/dist/hooks/useBearStyles.d.ts +11 -0
- package/dist/hooks/useBearStyles.js +14 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +146 -113
- package/dist/styles.css +1 -1
- package/dist/types/bis.types.d.ts +9 -0
- package/dist/types/component.types.d.ts +3 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as I, useRef as L, useId as j, useEffect as E } from "react";
|
|
3
|
-
import { cn as
|
|
3
|
+
import { cn as o } from "../../utils/cn.js";
|
|
4
4
|
const A = {
|
|
5
|
-
xs: "
|
|
6
|
-
sm: "
|
|
7
|
-
md: "
|
|
8
|
-
lg: "
|
|
9
|
-
xl: "
|
|
5
|
+
xs: "bear-w-3.5 bear-h-3.5",
|
|
6
|
+
sm: "bear-w-4 bear-h-4",
|
|
7
|
+
md: "bear-w-5 bear-h-5",
|
|
8
|
+
lg: "bear-w-6 bear-h-6",
|
|
9
|
+
xl: "bear-w-7 bear-h-7"
|
|
10
10
|
}, R = {
|
|
11
11
|
xs: 10,
|
|
12
12
|
sm: 12,
|
|
@@ -14,11 +14,11 @@ const A = {
|
|
|
14
14
|
lg: 18,
|
|
15
15
|
xl: 22
|
|
16
16
|
}, _ = {
|
|
17
|
-
xs: "
|
|
18
|
-
sm: "
|
|
19
|
-
md: "
|
|
20
|
-
lg: "
|
|
21
|
-
xl: "
|
|
17
|
+
xs: "bear-text-xs",
|
|
18
|
+
sm: "bear-text-sm",
|
|
19
|
+
md: "bear-text-base",
|
|
20
|
+
lg: "bear-text-lg",
|
|
21
|
+
xl: "bear-text-xl"
|
|
22
22
|
}, B = {
|
|
23
23
|
primary: "#ec4899",
|
|
24
24
|
secondary: "#6b7280",
|
|
@@ -32,28 +32,28 @@ const A = {
|
|
|
32
32
|
}, O = I(({
|
|
33
33
|
label: i,
|
|
34
34
|
size: b = "md",
|
|
35
|
-
variant:
|
|
35
|
+
variant: m = "primary",
|
|
36
36
|
color: p,
|
|
37
|
-
checked:
|
|
38
|
-
defaultChecked:
|
|
39
|
-
indeterminate:
|
|
37
|
+
checked: d,
|
|
38
|
+
defaultChecked: x,
|
|
39
|
+
indeterminate: a = !1,
|
|
40
40
|
disabled: c = !1,
|
|
41
|
-
error:
|
|
42
|
-
helperText:
|
|
41
|
+
error: t = !1,
|
|
42
|
+
helperText: f,
|
|
43
43
|
className: u,
|
|
44
44
|
testId: y,
|
|
45
45
|
onChange: g,
|
|
46
46
|
...k
|
|
47
47
|
}, w) => {
|
|
48
|
-
const S = L(null), r = w || S, v = j(),
|
|
48
|
+
const S = L(null), r = w || S, v = j(), h = p ?? B[m], s = R[b];
|
|
49
49
|
E(() => {
|
|
50
|
-
typeof r == "object" && (r != null && r.current) && (r.current.indeterminate =
|
|
51
|
-
}, [
|
|
50
|
+
typeof r == "object" && (r != null && r.current) && (r.current.indeterminate = a);
|
|
51
|
+
}, [a, r]);
|
|
52
52
|
const C = () => /* @__PURE__ */ e(
|
|
53
53
|
"svg",
|
|
54
54
|
{
|
|
55
|
-
width:
|
|
56
|
-
height:
|
|
55
|
+
width: s,
|
|
56
|
+
height: s,
|
|
57
57
|
viewBox: "0 0 24 24",
|
|
58
58
|
fill: "none",
|
|
59
59
|
stroke: "white",
|
|
@@ -65,8 +65,8 @@ const A = {
|
|
|
65
65
|
), N = () => /* @__PURE__ */ e(
|
|
66
66
|
"svg",
|
|
67
67
|
{
|
|
68
|
-
width:
|
|
69
|
-
height:
|
|
68
|
+
width: s,
|
|
69
|
+
height: s,
|
|
70
70
|
viewBox: "0 0 24 24",
|
|
71
71
|
fill: "none",
|
|
72
72
|
stroke: "white",
|
|
@@ -75,27 +75,27 @@ const A = {
|
|
|
75
75
|
strokeLinejoin: "round",
|
|
76
76
|
children: /* @__PURE__ */ e("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
77
77
|
}
|
|
78
|
-
), n =
|
|
79
|
-
return /* @__PURE__ */ l("div", { className:
|
|
78
|
+
), n = d ?? x;
|
|
79
|
+
return /* @__PURE__ */ l("div", { className: o("bear-flex bear-flex-col", u), children: [
|
|
80
80
|
/* @__PURE__ */ l(
|
|
81
81
|
"label",
|
|
82
82
|
{
|
|
83
|
-
className:
|
|
84
|
-
"
|
|
85
|
-
c && "
|
|
83
|
+
className: o(
|
|
84
|
+
"bear-inline-flex bear-items-center bear-gap-2 bear-cursor-pointer",
|
|
85
|
+
c && "bear-opacity-50 bear-cursor-not-allowed"
|
|
86
86
|
),
|
|
87
87
|
children: [
|
|
88
|
-
/* @__PURE__ */ l("div", { className: "
|
|
88
|
+
/* @__PURE__ */ l("div", { className: "bear-relative bear-flex bear-items-center bear-justify-center", children: [
|
|
89
89
|
/* @__PURE__ */ e(
|
|
90
90
|
"input",
|
|
91
91
|
{
|
|
92
92
|
ref: r,
|
|
93
93
|
type: "checkbox",
|
|
94
|
-
checked:
|
|
95
|
-
defaultChecked:
|
|
94
|
+
checked: d,
|
|
95
|
+
defaultChecked: x,
|
|
96
96
|
disabled: c,
|
|
97
97
|
onChange: g,
|
|
98
|
-
className: "
|
|
98
|
+
className: "bear-sr-only",
|
|
99
99
|
id: v,
|
|
100
100
|
"data-testid": y,
|
|
101
101
|
...k
|
|
@@ -104,33 +104,33 @@ const A = {
|
|
|
104
104
|
/* @__PURE__ */ e(
|
|
105
105
|
"div",
|
|
106
106
|
{
|
|
107
|
-
className:
|
|
107
|
+
className: o(
|
|
108
108
|
A[b],
|
|
109
|
-
"
|
|
110
|
-
|
|
111
|
-
(n ||
|
|
112
|
-
!c && "hover:
|
|
109
|
+
"bear-rounded bear-border-2 bear-transition-all bear-flex bear-items-center bear-justify-center",
|
|
110
|
+
t ? "bear-border-red-500" : "bear-border-gray-300 dark:bear-border-gray-600",
|
|
111
|
+
(n || a) && !t && "bear-border-transparent",
|
|
112
|
+
!c && "hover:bear-border-gray-400"
|
|
113
113
|
),
|
|
114
114
|
style: {
|
|
115
|
-
backgroundColor: n ||
|
|
116
|
-
borderColor: (n ||
|
|
115
|
+
backgroundColor: n || a ? t ? "#ef4444" : h : "transparent",
|
|
116
|
+
borderColor: (n || a) && !t ? h : void 0
|
|
117
117
|
},
|
|
118
|
-
children:
|
|
118
|
+
children: a ? /* @__PURE__ */ e(N, {}) : n ? /* @__PURE__ */ e(C, {}) : null
|
|
119
119
|
}
|
|
120
120
|
)
|
|
121
121
|
] }),
|
|
122
|
-
i && /* @__PURE__ */ e("span", { className:
|
|
122
|
+
i && /* @__PURE__ */ e("span", { className: o(
|
|
123
123
|
_[b],
|
|
124
|
-
"
|
|
125
|
-
|
|
124
|
+
"bear-text-gray-700 dark:bear-text-gray-300",
|
|
125
|
+
t && "bear-text-red-500"
|
|
126
126
|
), children: i })
|
|
127
127
|
]
|
|
128
128
|
}
|
|
129
129
|
),
|
|
130
|
-
|
|
131
|
-
"
|
|
132
|
-
|
|
133
|
-
), children:
|
|
130
|
+
f && /* @__PURE__ */ e("span", { className: o(
|
|
131
|
+
"bear-text-xs bear-mt-1 bear-ml-7",
|
|
132
|
+
t ? "bear-text-red-500" : "bear-text-gray-500"
|
|
133
|
+
), children: f })
|
|
134
134
|
] });
|
|
135
135
|
});
|
|
136
136
|
O.displayName = "Checkbox";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),x=c.forwardRef(({code:a,language:o="typescript",showLineNumbers:g=!0,title:s,copyable:d=!0,maxHeight:t,theme:r="dark",className:y="",...p},h)=>{const[n,i]=c.useState(!1),b=async()=>{await navigator.clipboard.writeText(a),i(!0),setTimeout(()=>i(!1),2e3)},u=a.split(`
|
|
2
|
+
`),j=r==="dark"?"bg-gray-900 text-gray-100":"bg-gray-50 text-gray-900 border border-gray-200";return e.jsxs("div",{className:`bear-code-block rounded-lg overflow-hidden ${j} ${y}`.trim(),children:[(s||d)&&e.jsxs("div",{className:`flex items-center justify-between px-4 py-2 ${r==="dark"?"bg-gray-800 border-b border-gray-700":"bg-gray-100 border-b border-gray-200"}`,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[s&&e.jsx("span",{className:`text-sm font-medium ${r==="dark"?"text-gray-300":"text-gray-700"}`,children:s}),o&&e.jsx("span",{className:`text-xs px-2 py-0.5 rounded ${r==="dark"?"bg-gray-700 text-gray-400":"bg-gray-200 text-gray-600"}`,children:o})]}),d&&e.jsx("button",{onClick:b,className:`p-1.5 rounded transition-colors ${r==="dark"?"hover:bg-gray-700 text-gray-400 hover:text-gray-200":"hover:bg-gray-200 text-gray-500 hover:text-gray-700"}`,title:n?"Copied!":"Copy code",children:n?e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:e.jsx("polyline",{points:"20 6 9 17 4 12"})}):e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[e.jsx("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),e.jsx("path",{d:"M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1"})]})})]}),e.jsx("pre",{ref:h,className:"overflow-x-auto p-4",style:{maxHeight:t?typeof t=="number"?`${t}px`:t:void 0},...p,children:e.jsx("code",{className:"text-sm font-mono",children:u.map((m,l)=>e.jsxs("div",{className:"flex",children:[g&&e.jsx("span",{className:`select-none w-8 flex-shrink-0 text-right pr-4 ${r==="dark"?"text-gray-600":"text-gray-400"}`,children:l+1}),e.jsx("span",{className:"flex-1",children:m||" "})]},l))})})]})});x.displayName="CodeBlock";exports.CodeBlock=x;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as f, useState as v } from "react";
|
|
3
|
+
const k = f(({
|
|
4
|
+
code: s,
|
|
5
|
+
language: d = "typescript",
|
|
6
|
+
showLineNumbers: g = !0,
|
|
7
|
+
title: o,
|
|
8
|
+
copyable: i = !0,
|
|
9
|
+
maxHeight: a,
|
|
10
|
+
theme: r = "dark",
|
|
11
|
+
className: y = "",
|
|
12
|
+
...x
|
|
13
|
+
}, p) => {
|
|
14
|
+
const [l, n] = v(!1), h = async () => {
|
|
15
|
+
await navigator.clipboard.writeText(s), n(!0), setTimeout(() => n(!1), 2e3);
|
|
16
|
+
}, m = s.split(`
|
|
17
|
+
`);
|
|
18
|
+
return /* @__PURE__ */ t("div", { className: `bear-code-block rounded-lg overflow-hidden ${r === "dark" ? "bg-gray-900 text-gray-100" : "bg-gray-50 text-gray-900 border border-gray-200"} ${y}`.trim(), children: [
|
|
19
|
+
(o || i) && /* @__PURE__ */ t("div", { className: `flex items-center justify-between px-4 py-2 ${r === "dark" ? "bg-gray-800 border-b border-gray-700" : "bg-gray-100 border-b border-gray-200"}`, children: [
|
|
20
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-2", children: [
|
|
21
|
+
o && /* @__PURE__ */ e("span", { className: `text-sm font-medium ${r === "dark" ? "text-gray-300" : "text-gray-700"}`, children: o }),
|
|
22
|
+
d && /* @__PURE__ */ e("span", { className: `text-xs px-2 py-0.5 rounded ${r === "dark" ? "bg-gray-700 text-gray-400" : "bg-gray-200 text-gray-600"}`, children: d })
|
|
23
|
+
] }),
|
|
24
|
+
i && /* @__PURE__ */ e(
|
|
25
|
+
"button",
|
|
26
|
+
{
|
|
27
|
+
onClick: h,
|
|
28
|
+
className: `p-1.5 rounded transition-colors ${r === "dark" ? "hover:bg-gray-700 text-gray-400 hover:text-gray-200" : "hover:bg-gray-200 text-gray-500 hover:text-gray-700"}`,
|
|
29
|
+
title: l ? "Copied!" : "Copy code",
|
|
30
|
+
children: l ? /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ e("polyline", { points: "20 6 9 17 4 12" }) }) : /* @__PURE__ */ t("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
31
|
+
/* @__PURE__ */ e("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
|
|
32
|
+
/* @__PURE__ */ e("path", { d: "M5 15H4a2 2 0 01-2-2V4a2 2 0 012-2h9a2 2 0 012 2v1" })
|
|
33
|
+
] })
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
] }),
|
|
37
|
+
/* @__PURE__ */ e(
|
|
38
|
+
"pre",
|
|
39
|
+
{
|
|
40
|
+
ref: p,
|
|
41
|
+
className: "overflow-x-auto p-4",
|
|
42
|
+
style: { maxHeight: a ? typeof a == "number" ? `${a}px` : a : void 0 },
|
|
43
|
+
...x,
|
|
44
|
+
children: /* @__PURE__ */ e("code", { className: "text-sm font-mono", children: m.map((b, c) => /* @__PURE__ */ t("div", { className: "flex", children: [
|
|
45
|
+
g && /* @__PURE__ */ e("span", { className: `select-none w-8 flex-shrink-0 text-right pr-4 ${r === "dark" ? "text-gray-600" : "text-gray-400"}`, children: c + 1 }),
|
|
46
|
+
/* @__PURE__ */ e("span", { className: "flex-1", children: b || " " })
|
|
47
|
+
] }, c)) })
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
] });
|
|
51
|
+
});
|
|
52
|
+
k.displayName = "CodeBlock";
|
|
53
|
+
export {
|
|
54
|
+
k as CodeBlock
|
|
55
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
export interface CodeBlockProps extends HTMLAttributes<HTMLPreElement> {
|
|
3
|
+
code: string;
|
|
4
|
+
language?: string;
|
|
5
|
+
showLineNumbers?: boolean;
|
|
6
|
+
title?: string;
|
|
7
|
+
copyable?: boolean;
|
|
8
|
+
maxHeight?: number | string;
|
|
9
|
+
theme?: 'dark' | 'light';
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),a=require("../../utils/cn.cjs"),c={none:"0",xs:"0.5rem",sm:"1rem",md:"1.5rem",lg:"2rem",xl:"3rem"},b=({children:l,count:e="auto",gap:n="md",fill:r=!1,minWidth:o,className:s,style:m})=>{const t={columnCount:e==="auto"?"auto":e,columnGap:c[n],columnFill:r?"balance":"auto",...o&&{columnWidth:typeof o=="number"?`${o}px`:o},...m};return u.jsx("div",{className:a.cn("bear-w-full",s),style:t,children:l})},i=({children:l,span:e="avoid",className:n,style:r})=>u.jsx("div",{className:a.cn("bear-inline-block bear-w-full bear-mb-4",e==="avoid"&&"bear-break-inside-avoid",n),style:r,children:l});exports.Column=i;exports.Columns=b;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { cn as n } from "../../utils/cn.js";
|
|
3
|
+
const c = {
|
|
4
|
+
none: "0",
|
|
5
|
+
xs: "0.5rem",
|
|
6
|
+
sm: "1rem",
|
|
7
|
+
md: "1.5rem",
|
|
8
|
+
lg: "2rem",
|
|
9
|
+
xl: "3rem"
|
|
10
|
+
}, d = ({
|
|
11
|
+
children: l,
|
|
12
|
+
count: o = "auto",
|
|
13
|
+
gap: a = "md",
|
|
14
|
+
fill: r = !1,
|
|
15
|
+
minWidth: e,
|
|
16
|
+
className: u,
|
|
17
|
+
style: s
|
|
18
|
+
}) => {
|
|
19
|
+
const t = {
|
|
20
|
+
columnCount: o === "auto" ? "auto" : o,
|
|
21
|
+
columnGap: c[a],
|
|
22
|
+
columnFill: r ? "balance" : "auto",
|
|
23
|
+
...e && { columnWidth: typeof e == "number" ? `${e}px` : e },
|
|
24
|
+
...s
|
|
25
|
+
};
|
|
26
|
+
return /* @__PURE__ */ m(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
className: n("bear-w-full", u),
|
|
30
|
+
style: t,
|
|
31
|
+
children: l
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}, f = ({
|
|
35
|
+
children: l,
|
|
36
|
+
span: o = "avoid",
|
|
37
|
+
className: a,
|
|
38
|
+
style: r
|
|
39
|
+
}) => /* @__PURE__ */ m(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
className: n(
|
|
43
|
+
"bear-inline-block bear-w-full bear-mb-4",
|
|
44
|
+
o === "avoid" && "bear-break-inside-avoid",
|
|
45
|
+
a
|
|
46
|
+
),
|
|
47
|
+
style: r,
|
|
48
|
+
children: l
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
export {
|
|
52
|
+
f as Column,
|
|
53
|
+
d as Columns
|
|
54
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode, CSSProperties } from 'react';
|
|
2
|
+
export interface ColumnsProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
count?: 1 | 2 | 3 | 4 | 5 | 6 | 'auto';
|
|
5
|
+
gap?: 'none' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
6
|
+
fill?: boolean;
|
|
7
|
+
minWidth?: string | number;
|
|
8
|
+
className?: string;
|
|
9
|
+
style?: CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
export interface ColumnProps {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
span?: 'avoid' | 'auto';
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: CSSProperties;
|
|
16
|
+
}
|
|
17
|
+
export type ColumnsCountType = 1 | 2 | 3 | 4 | 5 | 6 | 'auto';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),i=require("react"),o=require("../../utils/cn.cjs"),u={sm:"bear-max-w-screen-sm",md:"bear-max-w-screen-md",lg:"bear-max-w-screen-lg",xl:"bear-max-w-screen-xl","2xl":"bear-max-w-screen-2xl",full:"bear-max-w-full"},e=i.forwardRef(({size:r="xl",centered:a=!0,padding:s=!0,className:t,children:n,testId:l,...x},c)=>m.jsx("div",{ref:c,className:o.cn("bear-w-full",u[r],a&&"bear-mx-auto",s&&"bear-px-4 sm:bear-px-6 lg:bear-px-8",t),"data-testid":l,...x,children:n}));e.displayName="Container";exports.Container=e;
|
|
@@ -2,19 +2,19 @@ import { jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as o } from "react";
|
|
3
3
|
import { cn as b } from "../../utils/cn.js";
|
|
4
4
|
const c = {
|
|
5
|
-
sm: "
|
|
6
|
-
md: "
|
|
7
|
-
lg: "
|
|
8
|
-
xl: "
|
|
9
|
-
"2xl": "
|
|
10
|
-
full: "
|
|
5
|
+
sm: "bear-max-w-screen-sm",
|
|
6
|
+
md: "bear-max-w-screen-md",
|
|
7
|
+
lg: "bear-max-w-screen-lg",
|
|
8
|
+
xl: "bear-max-w-screen-xl",
|
|
9
|
+
"2xl": "bear-max-w-screen-2xl",
|
|
10
|
+
full: "bear-max-w-full"
|
|
11
11
|
}, i = o(
|
|
12
12
|
({
|
|
13
13
|
size: e = "xl",
|
|
14
|
-
centered:
|
|
15
|
-
padding:
|
|
16
|
-
className:
|
|
17
|
-
children:
|
|
14
|
+
centered: r = !0,
|
|
15
|
+
padding: a = !0,
|
|
16
|
+
className: m,
|
|
17
|
+
children: s,
|
|
18
18
|
testId: l,
|
|
19
19
|
...x
|
|
20
20
|
}, t) => /* @__PURE__ */ n(
|
|
@@ -22,15 +22,15 @@ const c = {
|
|
|
22
22
|
{
|
|
23
23
|
ref: t,
|
|
24
24
|
className: b(
|
|
25
|
-
"
|
|
25
|
+
"bear-w-full",
|
|
26
26
|
c[e],
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
r && "bear-mx-auto",
|
|
28
|
+
a && "bear-px-4 sm:bear-px-6 lg:bear-px-8",
|
|
29
|
+
m
|
|
30
30
|
),
|
|
31
31
|
"data-testid": l,
|
|
32
32
|
...x,
|
|
33
|
-
children:
|
|
33
|
+
children: s
|
|
34
34
|
}
|
|
35
35
|
)
|
|
36
36
|
);
|
|
@@ -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("react"),H=require("../Calendar/Calendar.cjs"),m=require("../../utils/cn.cjs"),I=require("../../hooks/useBearStyles.cjs"),W=require("./DatePicker.utils.cjs"),_=({value:s,onChange:e,minDate:x,maxDate:f,disabled:n=!1,placeholder:p="Select date",label:i,error:l,helperText:o,format:k="MM/DD/YYYY",clearable:w=!0,className:y,style:j,bis:z,showWeekNumbers:D=!1,disabledDates:S=[],highlightedDates:v=[],slots:q,weekdayLabels:N,firstDayOfWeek:V=0,size:h="md",variant:M="default"})=>{const[u,c]=r.useState(!1),[O,B]=r.useState(s??new Date),b=r.useRef(null),d=I.useBearStyles(z,j);r.useEffect(()=>{const a=T=>{b.current&&!b.current.contains(T.target)&&c(!1)};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[]);const L=r.useCallback(a=>{e==null||e(a),c(!1)},[e]),P=r.useCallback(()=>{e==null||e(null),c(!1)},[e]),R=r.useCallback(a=>{B(a)},[]),Y={sm:"bear-py-1.5 bear-px-3 bear-text-sm",md:"bear-py-2 bear-px-4",lg:"bear-py-2.5 bear-px-5 bear-text-lg"},E={default:"bear-bg-zinc-800 bear-border-zinc-600",filled:"bear-bg-zinc-700 bear-border-transparent",outline:"bear-bg-transparent bear-border-zinc-500"};return t.jsxs("div",{ref:b,className:m.cn("bear-relative",y),style:Object.keys(d).length?d:void 0,children:[i&&t.jsx("label",{className:"bear-block bear-text-sm bear-font-medium bear-text-zinc-300 bear-mb-1.5",children:i}),t.jsxs("button",{type:"button",onClick:()=>!n&&c(!u),disabled:n,className:m.cn("bear-w-full bear-flex bear-items-center bear-justify-between bear-rounded-lg bear-border bear-text-left bear-transition-colors",Y[h],E[M],l?"bear-border-red-500":"focus:bear-border-pink-500",n&&"bear-opacity-50 bear-cursor-not-allowed",s?"bear-text-white":"bear-text-zinc-500"),children:[t.jsx("span",{children:s?W.formatDate(s,k):p}),t.jsx("svg",{className:"bear-w-5 bear-h-5 bear-text-zinc-400 bear-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})]}),l&&t.jsx("p",{className:"bear-mt-1 bear-text-xs bear-text-red-400",children:l}),o&&!l&&t.jsx("p",{className:"bear-mt-1 bear-text-xs bear-text-zinc-500",children:o}),u&&t.jsx(H.Calendar,{viewDate:O,onViewChange:R,value:s??null,onSelect:L,minDate:x,maxDate:f,disabledDates:S,highlightedDates:v,slots:q,weekdayLabels:N,firstDayOfWeek:V,showWeekNumbers:D,clearable:w,onClear:P,showTodayButton:!0,onToday:()=>{e==null||e(new Date),c(!1)}})]})};exports.DatePicker=_;
|
|
@@ -1,111 +1,103 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsxs as u, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as f, useRef as q, useEffect as A, useCallback as c } from "react";
|
|
3
|
+
import { Calendar as F } from "../Calendar/Calendar.js";
|
|
3
4
|
import { cn as p } from "../../utils/cn.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
minDate: c,
|
|
12
|
-
maxDate: i,
|
|
5
|
+
import { useBearStyles as G } from "../../hooks/useBearStyles.js";
|
|
6
|
+
import { formatDate as J } from "./DatePicker.utils.js";
|
|
7
|
+
const $ = ({
|
|
8
|
+
value: a,
|
|
9
|
+
onChange: e,
|
|
10
|
+
minDate: x,
|
|
11
|
+
maxDate: w,
|
|
13
12
|
disabled: b = !1,
|
|
14
13
|
placeholder: k = "Select date",
|
|
15
|
-
label:
|
|
16
|
-
error:
|
|
17
|
-
helperText:
|
|
18
|
-
format:
|
|
19
|
-
clearable:
|
|
20
|
-
className:
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
label: o,
|
|
15
|
+
error: l,
|
|
16
|
+
helperText: i,
|
|
17
|
+
format: y = "MM/DD/YYYY",
|
|
18
|
+
clearable: z = !0,
|
|
19
|
+
className: v,
|
|
20
|
+
style: D,
|
|
21
|
+
bis: N,
|
|
22
|
+
showWeekNumbers: S = !1,
|
|
23
|
+
disabledDates: V = [],
|
|
24
|
+
highlightedDates: h = [],
|
|
25
|
+
slots: j,
|
|
26
|
+
weekdayLabels: L,
|
|
27
|
+
firstDayOfWeek: M = 0,
|
|
28
|
+
size: O = "md",
|
|
29
|
+
variant: Y = "default"
|
|
23
30
|
}) => {
|
|
24
|
-
const [
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
|
|
31
|
+
const [d, s] = f(!1), [B, E] = f(a ?? /* @__PURE__ */ new Date()), n = q(null), m = G(N, D);
|
|
32
|
+
A(() => {
|
|
33
|
+
const r = (W) => {
|
|
34
|
+
n.current && !n.current.contains(W.target) && s(!1);
|
|
28
35
|
};
|
|
29
|
-
return document.addEventListener("mousedown",
|
|
36
|
+
return document.addEventListener("mousedown", r), () => document.removeEventListener("mousedown", r);
|
|
30
37
|
}, []);
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return /* @__PURE__ */ l("div", { className: "bear-absolute bear-z-50 bear-mt-1 bear-bg-zinc-800 bear-border bear-border-zinc-700 bear-rounded-lg bear-shadow-xl bear-p-3 bear-w-72", children: [
|
|
42
|
-
/* @__PURE__ */ l("div", { className: "bear-flex bear-items-center bear-justify-between bear-mb-3", children: [
|
|
43
|
-
/* @__PURE__ */ t("button", { onClick: F, className: "bear-p-1 bear-rounded hover:bear-bg-zinc-700 bear-text-zinc-400", children: /* @__PURE__ */ t("svg", { className: "bear-w-5 bear-h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M15 19l-7-7 7-7" }) }) }),
|
|
44
|
-
/* @__PURE__ */ l("span", { className: "bear-font-medium bear-text-white", children: [
|
|
45
|
-
H[o],
|
|
46
|
-
" ",
|
|
47
|
-
s
|
|
48
|
-
] }),
|
|
49
|
-
/* @__PURE__ */ t("button", { onClick: L, className: "bear-p-1 bear-rounded hover:bear-bg-zinc-700 bear-text-zinc-400", children: /* @__PURE__ */ t("svg", { className: "bear-w-5 bear-h-5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) }) })
|
|
50
|
-
] }),
|
|
51
|
-
/* @__PURE__ */ t("div", { className: "bear-grid bear-grid-cols-7 bear-gap-1 bear-mb-2", children: J.map((a) => /* @__PURE__ */ t("div", { className: "bear-text-center bear-text-xs bear-text-zinc-500 bear-font-medium", children: a }, a)) }),
|
|
52
|
-
/* @__PURE__ */ t("div", { className: "bear-grid bear-grid-cols-7 bear-gap-1", children: h.map((a, A) => a === null ? /* @__PURE__ */ t("div", {}, `empty-${A}`) : /* @__PURE__ */ t(
|
|
53
|
-
"button",
|
|
54
|
-
{
|
|
55
|
-
onClick: () => S(a),
|
|
56
|
-
disabled: D(a),
|
|
57
|
-
className: p(
|
|
58
|
-
"bear-w-8 bear-h-8 bear-rounded bear-text-sm bear-transition-colors",
|
|
59
|
-
R(e ?? null, new Date(s, o, a)) ? "bear-bg-pink-500 bear-text-white" : "bear-text-zinc-300 hover:bear-bg-zinc-700",
|
|
60
|
-
D(a) && "bear-opacity-30 bear-cursor-not-allowed"
|
|
61
|
-
),
|
|
62
|
-
children: a
|
|
63
|
-
},
|
|
64
|
-
a
|
|
65
|
-
)) }),
|
|
66
|
-
v && e && /* @__PURE__ */ t(
|
|
67
|
-
"button",
|
|
68
|
-
{
|
|
69
|
-
onClick: () => {
|
|
70
|
-
r == null || r(null), u(!1);
|
|
71
|
-
},
|
|
72
|
-
className: "bear-w-full bear-mt-3 bear-py-1.5 bear-text-sm bear-text-zinc-400 hover:bear-text-white bear-border-t bear-border-zinc-700",
|
|
73
|
-
children: "Clear"
|
|
74
|
-
}
|
|
75
|
-
)
|
|
76
|
-
] });
|
|
77
|
-
}, O = { sm: "bear-py-1.5 bear-px-3 bear-text-sm", md: "bear-py-2 bear-px-4", lg: "bear-py-2.5 bear-px-5 bear-text-lg" }, C = {
|
|
38
|
+
const R = c(
|
|
39
|
+
(r) => {
|
|
40
|
+
e == null || e(r), s(!1);
|
|
41
|
+
},
|
|
42
|
+
[e]
|
|
43
|
+
), H = c(() => {
|
|
44
|
+
e == null || e(null), s(!1);
|
|
45
|
+
}, [e]), I = c((r) => {
|
|
46
|
+
E(r);
|
|
47
|
+
}, []), P = { sm: "bear-py-1.5 bear-px-3 bear-text-sm", md: "bear-py-2 bear-px-4", lg: "bear-py-2.5 bear-px-5 bear-text-lg" }, T = {
|
|
78
48
|
default: "bear-bg-zinc-800 bear-border-zinc-600",
|
|
79
49
|
filled: "bear-bg-zinc-700 bear-border-transparent",
|
|
80
50
|
outline: "bear-bg-transparent bear-border-zinc-500"
|
|
81
51
|
};
|
|
82
|
-
return /* @__PURE__ */
|
|
83
|
-
|
|
84
|
-
/* @__PURE__ */
|
|
52
|
+
return /* @__PURE__ */ u("div", { ref: n, className: p("bear-relative", v), style: Object.keys(m).length ? m : void 0, children: [
|
|
53
|
+
o && /* @__PURE__ */ t("label", { className: "bear-block bear-text-sm bear-font-medium bear-text-zinc-300 bear-mb-1.5", children: o }),
|
|
54
|
+
/* @__PURE__ */ u(
|
|
85
55
|
"button",
|
|
86
56
|
{
|
|
87
57
|
type: "button",
|
|
88
|
-
onClick: () => !b &&
|
|
58
|
+
onClick: () => !b && s(!d),
|
|
89
59
|
disabled: b,
|
|
90
60
|
className: p(
|
|
91
61
|
"bear-w-full bear-flex bear-items-center bear-justify-between bear-rounded-lg bear-border bear-text-left bear-transition-colors",
|
|
92
|
-
O
|
|
93
|
-
|
|
94
|
-
|
|
62
|
+
P[O],
|
|
63
|
+
T[Y],
|
|
64
|
+
l ? "bear-border-red-500" : "focus:bear-border-pink-500",
|
|
95
65
|
b && "bear-opacity-50 bear-cursor-not-allowed",
|
|
96
|
-
|
|
66
|
+
a ? "bear-text-white" : "bear-text-zinc-500"
|
|
97
67
|
),
|
|
98
68
|
children: [
|
|
99
|
-
/* @__PURE__ */ t("span", { children:
|
|
100
|
-
/* @__PURE__ */ t("svg", { className: "bear-w-5 bear-h-5 bear-text-zinc-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" }) })
|
|
69
|
+
/* @__PURE__ */ t("span", { children: a ? J(a, y) : k }),
|
|
70
|
+
/* @__PURE__ */ t("svg", { className: "bear-w-5 bear-h-5 bear-text-zinc-400 bear-shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" }) })
|
|
101
71
|
]
|
|
102
72
|
}
|
|
103
73
|
),
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
74
|
+
l && /* @__PURE__ */ t("p", { className: "bear-mt-1 bear-text-xs bear-text-red-400", children: l }),
|
|
75
|
+
i && !l && /* @__PURE__ */ t("p", { className: "bear-mt-1 bear-text-xs bear-text-zinc-500", children: i }),
|
|
76
|
+
d && /* @__PURE__ */ t(
|
|
77
|
+
F,
|
|
78
|
+
{
|
|
79
|
+
viewDate: B,
|
|
80
|
+
onViewChange: I,
|
|
81
|
+
value: a ?? null,
|
|
82
|
+
onSelect: R,
|
|
83
|
+
minDate: x,
|
|
84
|
+
maxDate: w,
|
|
85
|
+
disabledDates: V,
|
|
86
|
+
highlightedDates: h,
|
|
87
|
+
slots: j,
|
|
88
|
+
weekdayLabels: L,
|
|
89
|
+
firstDayOfWeek: M,
|
|
90
|
+
showWeekNumbers: S,
|
|
91
|
+
clearable: z,
|
|
92
|
+
onClear: H,
|
|
93
|
+
showTodayButton: !0,
|
|
94
|
+
onToday: () => {
|
|
95
|
+
e == null || e(/* @__PURE__ */ new Date()), s(!1);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
)
|
|
107
99
|
] });
|
|
108
100
|
};
|
|
109
101
|
export {
|
|
110
|
-
|
|
102
|
+
$ as DatePicker
|
|
111
103
|
};
|