@synnaxlabs/pluto 0.21.7 → 0.21.9
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/{Center-hbwH7rg9.js → Center-BK9Rcaa0.js} +2 -2
- package/dist/{Center-hbwH7rg9.js.map → Center-BK9Rcaa0.js.map} +1 -1
- package/dist/{Center-5NJ61qfA.cjs → Center-Cc_rR5pQ.cjs} +2 -2
- package/dist/{Center-5NJ61qfA.cjs.map → Center-Cc_rR5pQ.cjs.map} +1 -1
- package/dist/{Keyboard-DaFraUsQ.cjs → Keyboard-Byx8rGZt.cjs} +3 -3
- package/dist/{Keyboard-DaFraUsQ.cjs.map → Keyboard-Byx8rGZt.cjs.map} +1 -1
- package/dist/{Keyboard-nDIAR7Rj.js → Keyboard-D31SwhYT.js} +3 -3
- package/dist/{Keyboard-nDIAR7Rj.js.map → Keyboard-D31SwhYT.js.map} +1 -1
- package/dist/{LinePlot-BZDm4uxJ.cjs → LinePlot-Bnb8Ufob.cjs} +96 -65
- package/dist/LinePlot-Bnb8Ufob.cjs.map +1 -0
- package/dist/{LinePlot-tOiSUMjC.js → LinePlot-KYwy1D7H.js} +281 -250
- package/dist/LinePlot-KYwy1D7H.js.map +1 -0
- package/dist/{Link-BdWFvK8v.cjs → Link-Bq38h1dw.cjs} +2 -2
- package/dist/{Link-BdWFvK8v.cjs.map → Link-Bq38h1dw.cjs.map} +1 -1
- package/dist/{Link-d3CXVSaO.js → Link-DQKdkwWL.js} +2 -2
- package/dist/{Link-d3CXVSaO.js.map → Link-DQKdkwWL.js.map} +1 -1
- package/dist/{List-DcsWFiLT.js → List-BmP_se57.js} +3 -3
- package/dist/{List-DcsWFiLT.js.map → List-BmP_se57.js.map} +1 -1
- package/dist/{List-PlMTfEHi.cjs → List-BnB-C5vQ.cjs} +3 -3
- package/dist/{List-PlMTfEHi.cjs.map → List-BnB-C5vQ.cjs.map} +1 -1
- package/dist/{Toggle-C6Z8WPT3.cjs → Toggle-D3iCEbO1.cjs} +46 -46
- package/dist/{Toggle-C6Z8WPT3.cjs.map → Toggle-D3iCEbO1.cjs.map} +1 -1
- package/dist/{Toggle-DGLgYCOX.js → Toggle-bT5RpwfA.js} +399 -399
- package/dist/{Toggle-DGLgYCOX.js.map → Toggle-bT5RpwfA.js.map} +1 -1
- package/dist/Video-B4sma9fk.cjs +14 -0
- package/dist/Video-B4sma9fk.cjs.map +1 -0
- package/dist/Video-Cp6XjjOK.js +15 -0
- package/dist/Video-Cp6XjjOK.js.map +1 -0
- package/dist/{aggregator-BgImZc4o.js → aggregator-B8fg7W2s.js} +106 -106
- package/dist/aggregator-B8fg7W2s.js.map +1 -0
- package/dist/{aggregator-BpfMBUD1.cjs → aggregator-Bh2Kyzkg.cjs} +100 -100
- package/dist/aggregator-Bh2Kyzkg.cjs.map +1 -0
- package/dist/align.cjs +1 -1
- package/dist/align.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/{color-DV-YGUvp.js → color-CjdRh-aN.js} +2 -2
- package/dist/{color-DV-YGUvp.js.map → color-CjdRh-aN.js.map} +1 -1
- package/dist/{color-BVVyrgRF.cjs → color-DBNbbjJy.cjs} +2 -2
- package/dist/{color-BVVyrgRF.cjs.map → color-DBNbbjJy.cjs.map} +1 -1
- package/dist/color.cjs +1 -1
- package/dist/color.js +1 -1
- package/dist/{css-Pf9qxhQ4.cjs → css-Ci8WUD5E.cjs} +112 -108
- package/dist/css-Ci8WUD5E.cjs.map +1 -0
- package/dist/{css-DoalWJF6.js → css-DKKmdhSr.js} +114 -110
- package/dist/css-DKKmdhSr.js.map +1 -0
- package/dist/css.cjs +2 -2
- package/dist/css.js +2 -2
- package/dist/dropdown.cjs +1 -1
- package/dist/dropdown.js +1 -1
- package/dist/ether.cjs +3 -3
- package/dist/ether.js +5 -5
- package/dist/{external-Cu6T11fi.cjs → external-9_cqFQy3.cjs} +6 -6
- package/dist/{external-Cu6T11fi.cjs.map → external-9_cqFQy3.cjs.map} +1 -1
- package/dist/{external-Blx0rtt2.cjs → external-B-zN2e5z.cjs} +6 -6
- package/dist/{external-Blx0rtt2.cjs.map → external-B-zN2e5z.cjs.map} +1 -1
- package/dist/{external-DeheWVb-.js → external-BM82B8W2.js} +6 -6
- package/dist/{external-DeheWVb-.js.map → external-BM82B8W2.js.map} +1 -1
- package/dist/{external-96EinZfY.js → external-BYqTC99W.js} +3 -3
- package/dist/external-BYqTC99W.js.map +1 -0
- package/dist/{external-5przQjJD.js → external-BfZYUV3z.js} +11 -11
- package/dist/{external-5przQjJD.js.map → external-BfZYUV3z.js.map} +1 -1
- package/dist/{external-SxB9IH0p.js → external-BpqCp_M1.js} +2 -2
- package/dist/external-BpqCp_M1.js.map +1 -0
- package/dist/{external-C6GmnG49.js → external-BrW40HJx.js} +6 -6
- package/dist/{external-C6GmnG49.js.map → external-BrW40HJx.js.map} +1 -1
- package/dist/{external-1osPryUV.js → external-CAOQcoqL.js} +5 -5
- package/dist/{external-1osPryUV.js.map → external-CAOQcoqL.js.map} +1 -1
- package/dist/{external-D8dWmF4U.cjs → external-CIVsFXOp.cjs} +2 -2
- package/dist/external-CIVsFXOp.cjs.map +1 -0
- package/dist/{external-BAdU6u03.js → external-CnNdgPsB.js} +5 -5
- package/dist/{external-BAdU6u03.js.map → external-CnNdgPsB.js.map} +1 -1
- package/dist/{external-DiFhWWS-.js → external-CwjCCHPi.js} +7 -7
- package/dist/{external-DiFhWWS-.js.map → external-CwjCCHPi.js.map} +1 -1
- package/dist/{external-DarqsFzT.js → external-DNHMAfGi.js} +5 -5
- package/dist/{external-DarqsFzT.js.map → external-DNHMAfGi.js.map} +1 -1
- package/dist/{external-0PM7JrzG.cjs → external-DVQ2SRoH.cjs} +5 -5
- package/dist/{external-0PM7JrzG.cjs.map → external-DVQ2SRoH.cjs.map} +1 -1
- package/dist/{external-16K8slq8.cjs → external-D_yXh8rn.cjs} +11 -11
- package/dist/{external-16K8slq8.cjs.map → external-D_yXh8rn.cjs.map} +1 -1
- package/dist/{external-CPx8XA9-.cjs → external-Df0D1YYb.cjs} +7 -7
- package/dist/{external-CPx8XA9-.cjs.map → external-Df0D1YYb.cjs.map} +1 -1
- package/dist/{external-DvGqQHd8.cjs → external-DhPBdJpR.cjs} +3 -3
- package/dist/external-DhPBdJpR.cjs.map +1 -0
- package/dist/{external-D7XrxOVE.cjs → external-DhiN6pEk.cjs} +4 -4
- package/dist/{external-D7XrxOVE.cjs.map → external-DhiN6pEk.cjs.map} +1 -1
- package/dist/{external-CsO29OsF.cjs → external-DjYXzP7v.cjs} +7 -7
- package/dist/{external-CsO29OsF.cjs.map → external-DjYXzP7v.cjs.map} +1 -1
- package/dist/{external-B3ly2-jy.js → external-FWIwgLzc.js} +7 -7
- package/dist/{external-B3ly2-jy.js.map → external-FWIwgLzc.js.map} +1 -1
- package/dist/{external-B0z7uXZV.cjs → external-Iv2mRce8.cjs} +5 -5
- package/dist/{external-B0z7uXZV.cjs.map → external-Iv2mRce8.cjs.map} +1 -1
- package/dist/{external-CzJYG1hX.cjs → external-P6zP6dBA.cjs} +3 -3
- package/dist/external-P6zP6dBA.cjs.map +1 -0
- package/dist/{external-D4ur_D1S.cjs → external-d-vI8EHK.cjs} +5 -5
- package/dist/{external-D4ur_D1S.cjs.map → external-d-vI8EHK.cjs.map} +1 -1
- package/dist/{external-DQkw1ko0.js → external-giUMrk8w.js} +4 -4
- package/dist/{external-DQkw1ko0.js.map → external-giUMrk8w.js.map} +1 -1
- package/dist/{external-CgMwmBnF.js → external-zG96smqq.js} +3 -3
- package/dist/external-zG96smqq.js.map +1 -0
- package/dist/header.cjs +1 -1
- package/dist/header.js +1 -1
- package/dist/index.cjs +30 -30
- package/dist/index.js +55 -55
- package/dist/index.js.map +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/list.cjs +1 -1
- package/dist/list.js +1 -1
- package/dist/menu.cjs +1 -1
- package/dist/menu.js +1 -1
- package/dist/src/telem/client/cache/cache.d.ts +3 -8
- package/dist/src/telem/client/cache/cache.d.ts.map +1 -1
- package/dist/src/telem/client/cache/dynamic.d.ts +13 -3
- package/dist/src/telem/client/cache/dynamic.d.ts.map +1 -1
- package/dist/src/telem/client/client.d.ts +1 -1
- package/dist/src/video/Video.d.ts +2 -2
- package/dist/src/video/Video.d.ts.map +1 -1
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text.cjs +2 -2
- package/dist/text.js +2 -2
- package/dist/theming.cjs +2 -2
- package/dist/theming.js +2 -2
- package/dist/tree.cjs +1 -1
- package/dist/tree.js +1 -1
- package/dist/triggers.cjs +1 -1
- package/dist/triggers.js +1 -1
- package/dist/video.cjs +1 -1
- package/dist/video.js +1 -1
- package/package.json +1 -1
- package/dist/LinePlot-BZDm4uxJ.cjs.map +0 -1
- package/dist/LinePlot-tOiSUMjC.js.map +0 -1
- package/dist/Video-B1oW8NLd.js +0 -11
- package/dist/Video-B1oW8NLd.js.map +0 -1
- package/dist/Video-BGNx94bQ.cjs +0 -10
- package/dist/Video-BGNx94bQ.cjs.map +0 -1
- package/dist/aggregator-BgImZc4o.js.map +0 -1
- package/dist/aggregator-BpfMBUD1.cjs.map +0 -1
- package/dist/css-DoalWJF6.js.map +0 -1
- package/dist/css-Pf9qxhQ4.cjs.map +0 -1
- package/dist/external-96EinZfY.js.map +0 -1
- package/dist/external-CgMwmBnF.js.map +0 -1
- package/dist/external-CzJYG1hX.cjs.map +0 -1
- package/dist/external-D8dWmF4U.cjs.map +0 -1
- package/dist/external-DvGqQHd8.cjs.map +0 -1
- package/dist/external-SxB9IH0p.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"external-
|
|
1
|
+
{"version":3,"file":"external-BM82B8W2.js","sources":["../src/triggers/Status.tsx","../src/triggers/useDrag.ts","../src/triggers/Text.tsx"],"sourcesContent":["// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement, useEffect, useState } from \"react\";\n\nimport { Text } from \"@/text\";\nimport { useContext } from \"@/triggers/Provider\";\nimport { type Trigger } from \"@/triggers/triggers\";\n\nexport interface StatusProps extends Text.TextProps {}\n\nexport const Status = (props: StatusProps): ReactElement => {\n const { listen } = useContext();\n const [trigger, setTrigger] = useState<Trigger>([]);\n\n useEffect(\n () => listen(({ next: [trigger] }) => setTrigger(trigger ?? [])),\n [listen, setTrigger],\n );\n\n return <Text.Text {...props}>{trigger.join(\" \")}</Text.Text>;\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type RefObject, useCallback, useRef } from \"react\";\n\nimport { box, xy } from \"@synnaxlabs/x\";\n\nimport { use, type UseEvent } from \"@/triggers/hooks\";\nimport { type Stage, type Trigger } from \"@/triggers/triggers\";\n\nexport interface DragEvent {\n stage: Stage;\n box: box.Box;\n cursor: xy.XY;\n triggers: Trigger[];\n}\n\nexport type DragCallback = (props: DragEvent) => void;\n\nexport interface UseDragProps {\n bound: RefObject<HTMLElement>;\n triggers?: Trigger[];\n onDrag: DragCallback;\n loose?: boolean;\n}\n\nexport const useDrag = ({\n onDrag,\n triggers = [[\"MouseLeft\"], [\"MouseRight\"]],\n bound,\n loose = false,\n}: UseDragProps): void => {\n const triggerRef = useRef<UseEvent | null>(null);\n const startLoc = useRef<xy.XY>(xy.ZERO);\n const onMove = useCallback(\n (e: xy.Client & { buttons: number }) => {\n const cursor = xy.construct(e);\n if (triggerRef.current === null) return;\n const { triggers } = triggerRef.current;\n onDrag({\n box: box.construct(startLoc.current, cursor),\n cursor,\n triggers,\n stage: \"during\",\n });\n },\n [onDrag],\n );\n const handleTrigger = useCallback(\n (event: UseEvent): void => {\n const { stage, cursor } = event;\n if (stage === \"start\") {\n onDrag({ box: box.construct(cursor), ...event });\n window.addEventListener(\"mousemove\", onMove);\n triggerRef.current = event;\n startLoc.current = cursor;\n } else if (stage === \"end\" && triggerRef.current != null) {\n onDrag({ box: box.construct(startLoc.current, cursor), ...event });\n window.removeEventListener(\"mousemove\", onMove);\n triggerRef.current = null;\n startLoc.current = xy.ZERO;\n }\n },\n [onDrag],\n );\n use({ triggers, callback: handleTrigger, region: bound, loose });\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { Icon } from \"@synnaxlabs/media\";\n\nimport { Align } from \"@/align\";\nimport { Text as Core } from \"@/text\";\nimport { type Key, type Trigger } from \"@/triggers/triggers\";\nimport { RenderProp } from \"@/util/renderProp\";\n\nexport type TextProps<L extends Core.Level> = Core.KeyboardProps<L> & {\n trigger: Trigger;\n};\n\nconst CUSTOM_TEXT: Partial<Record<Key, (() => ReactElement) | string>> = {\n Control: () => <Core.Symbols.Meta key=\"control\" />,\n Alt: () => <Core.Symbols.Alt key=\"alt\" />,\n Shift: () => <Icon.Keyboard.Shift key=\"shift\" />,\n MouseLeft: \"Left Click\",\n MouseRight: \"Right Click\",\n MouseMiddle: \"Middle Click\",\n Enter: () => <Icon.Keyboard.Return key=\"enter\" />,\n};\n\nconst getCustomText = (trigger: Key): ReactElement | string => {\n const t = CUSTOM_TEXT[trigger];\n if (t != null) return typeof t === \"function\" ? t() : t;\n return trigger;\n};\n\nexport const toSymbols = (trigger: Trigger): (ReactElement | string)[] =>\n trigger.map((t) => getCustomText(t));\n\nexport const Text = <L extends Core.Level>({\n className,\n style,\n trigger,\n ...props\n}: TextProps<L>): ReactElement => {\n return (\n <Align.Space className={className} style={style} direction=\"x\">\n {trigger.map((t) => (\n // @ts-expect-error - issues with generic element types\n <Core.Keyboard<L> key={t} {...props}>\n {getCustomText(t)}\n </Core.Keyboard>\n ))}\n </Align.Space>\n );\n};\n"],"names":["trigger","jsx","Text.Text","xy","triggers","box","Core.Symbols","Icon","Align.Space","Core.Keyboard"],"mappings":";;;;;;;AAiBa,MAAA,SAAS,CAAC,UAAqC;AACpD,QAAA,EAAE,WAAW;AACnB,QAAM,CAAC,SAAS,UAAU,IAAI,SAAkB,CAAE,CAAA;AAElD;AAAA,IACE,MAAM,OAAO,CAAC,EAAE,MAAM,CAACA,QAAO,EAAA,MAAQ,WAAWA,YAAW,CAAA,CAAE,CAAC;AAAA,IAC/D,CAAC,QAAQ,UAAU;AAAA,EAAA;AAGd,SAAAC,kCAAA,IAACC,QAAA,EAAW,GAAG,OAAQ,UAAA,QAAQ,KAAK,GAAG,EAAE,CAAA;AAClD;ACKO,MAAM,UAAU,CAAC;AAAA,EACtB;AAAA,EACA,WAAW,CAAC,CAAC,WAAW,GAAG,CAAC,YAAY,CAAC;AAAA,EACzC;AAAA,EACA,QAAQ;AACV,MAA0B;AAClB,QAAA,aAAa,OAAwB,IAAI;AACzC,QAAA,WAAW,OAAcC,EAAG,IAAI;AACtC,QAAM,SAAS;AAAA,IACb,CAAC,MAAuC;AAChC,YAAA,SAASA,EAAG,UAAU,CAAC;AAC7B,UAAI,WAAW,YAAY;AAAM;AACjC,YAAM,EAAE,UAAAC,cAAa,WAAW;AACzB,aAAA;AAAA,QACL,KAAKC,GAAI,UAAU,SAAS,SAAS,MAAM;AAAA,QAC3C;AAAA,QACA,UAAAD;AAAAA,QACA,OAAO;AAAA,MAAA,CACR;AAAA,IACH;AAAA,IACA,CAAC,MAAM;AAAA,EAAA;AAET,QAAM,gBAAgB;AAAA,IACpB,CAAC,UAA0B;AACnB,YAAA,EAAE,OAAO,OAAW,IAAA;AAC1B,UAAI,UAAU,SA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sCAACQ,UAAA,EAA0B,GAAG,OAC3B,UAAA,cAAc,CAAC,EAAA,GADK,CAEvB;AAAA,GACD,EACH,CAAA;AAEJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as Provider, S as Switch, t as toCSSVars, u as use, a as useContext, b as useProvider, c as useTypography } from "./Toggle-
|
|
2
|
-
import { S as SYNNAX_DARK, a as SYNNAX_LIGHT, b as SYNNAX_THEMES, t as themeZ } from "./aggregator-
|
|
1
|
+
import { P as Provider, S as Switch, t as toCSSVars, u as use, a as useContext, b as useProvider, c as useTypography } from "./Toggle-bT5RpwfA.js";
|
|
2
|
+
import { S as SYNNAX_DARK, a as SYNNAX_LIGHT, b as SYNNAX_THEMES, t as themeZ } from "./aggregator-B8fg7W2s.js";
|
|
3
3
|
const external = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4
4
|
__proto__: null,
|
|
5
5
|
Provider,
|
|
@@ -20,4 +20,4 @@ const external = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
|
|
|
20
20
|
export {
|
|
21
21
|
external as e
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=external-
|
|
23
|
+
//# sourceMappingURL=external-BYqTC99W.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-BYqTC99W.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { e as Text, ah as Text$1, ai as Date, aj as DragButton, ak as Numeric, al as Switch, am as TextArea, an as Time, ao as combineDateAndTimeValue, ap as useDate, aq as useTime } from "./Toggle-
|
|
1
|
+
import { e as Text, ah as Text$1, ai as Date, aj as DragButton, ak as Numeric, al as Switch, am as TextArea, an as Time, ao as combineDateAndTimeValue, ap as useDate, aq as useTime } from "./Toggle-bT5RpwfA.js";
|
|
2
2
|
import { j as jsxRuntimeExports } from "./jsx-runtime-mMz73N64.js";
|
|
3
|
-
import { C as CSS, d as f } from "./css-
|
|
4
|
-
import {
|
|
3
|
+
import { C as CSS, d as f } from "./css-DKKmdhSr.js";
|
|
4
|
+
import { m, w } from "./aggregator-B8fg7W2s.js";
|
|
5
5
|
import { useState } from "react";
|
|
6
|
-
import { S as Space } from "./Center-
|
|
6
|
+
import { S as Space } from "./Center-BK9Rcaa0.js";
|
|
7
7
|
const HelpText = ({
|
|
8
8
|
className,
|
|
9
9
|
variant = "error",
|
|
@@ -86,7 +86,7 @@ const DateTime = ({
|
|
|
86
86
|
onBlur,
|
|
87
87
|
...props
|
|
88
88
|
}) => {
|
|
89
|
-
const ts = new
|
|
89
|
+
const ts = new m(value, "UTC");
|
|
90
90
|
const [internalValue, setInternalValue] = useState(
|
|
91
91
|
ts.fString("ISO", "local").slice(0, -1)
|
|
92
92
|
);
|
|
@@ -94,13 +94,13 @@ const DateTime = ({
|
|
|
94
94
|
const handleChange = (next) => {
|
|
95
95
|
let nextStr = next.toString();
|
|
96
96
|
setInternalValue(nextStr);
|
|
97
|
-
let ts2 = new
|
|
97
|
+
let ts2 = new m(next, "UTC");
|
|
98
98
|
if (nextStr.length < 23)
|
|
99
99
|
nextStr += ".000";
|
|
100
100
|
ts2 = ts2.add(
|
|
101
101
|
BigInt(
|
|
102
|
-
|
|
103
|
-
) *
|
|
102
|
+
m.now().date().getTimezoneOffset() - ts2.date().getTimezoneOffset()
|
|
103
|
+
) * w.MINUTE.valueOf()
|
|
104
104
|
);
|
|
105
105
|
let ok = false;
|
|
106
106
|
try {
|
|
@@ -118,7 +118,7 @@ const DateTime = ({
|
|
|
118
118
|
};
|
|
119
119
|
const handleBlur = (e) => {
|
|
120
120
|
setValueIsValid(true);
|
|
121
|
-
setInternalValue(new
|
|
121
|
+
setInternalValue(new m(value, "UTC").fString("ISO", "local").slice(0, -1));
|
|
122
122
|
onBlur == null ? void 0 : onBlur(e);
|
|
123
123
|
};
|
|
124
124
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
@@ -127,7 +127,7 @@ const DateTime = ({
|
|
|
127
127
|
type: "datetime-local",
|
|
128
128
|
onBlur: handleBlur,
|
|
129
129
|
required: false,
|
|
130
|
-
value: valueIsValid ? new
|
|
130
|
+
value: valueIsValid ? new m(value, "UTC").fString("ISO", "local").slice(0, -1) : internalValue,
|
|
131
131
|
onChange: handleChange,
|
|
132
132
|
...props
|
|
133
133
|
}
|
|
@@ -154,4 +154,4 @@ export {
|
|
|
154
154
|
Item as I,
|
|
155
155
|
external as e
|
|
156
156
|
};
|
|
157
|
-
//# sourceMappingURL=external-
|
|
157
|
+
//# sourceMappingURL=external-BfZYUV3z.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"external-5przQjJD.js","sources":["../src/input/HelpText.tsx","../src/input/Label.tsx","../src/input/Item.tsx","../src/input/DateTime.tsx"],"sourcesContent":["// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { CSS } from \"@/css\";\nimport { type Status } from \"@/status\";\nimport { Text } from \"@/text\";\n\nimport \"@/input/HelpText.css\";\n\n/** Props for the {@link HelpText} component. */\nexport interface HelpTextProps extends Omit<Text.TextProps<\"small\">, \"level\" | \"ref\"> {\n variant?: Status.Variant;\n}\n\n/**\n * Help text for an input component. We generally recommend using Input.Item with a\n * 'helpText' prop instead of this component. This component is useful for low-level\n * control over the help text element.\n *\n * @param props - Props for the help text component. Unlisted props are passed to the\n * underlying text element.\n * @param props.variant - The variant of the help text.\n * \"success\" | \"error\" | \"warning\" | \"info\" | \"loading\" | \"disabled\n * @default \"info\"\n */\nexport const HelpText = ({\n className,\n variant = \"error\",\n ...props\n}: HelpTextProps): ReactElement => (\n <Text.Text<\"small\">\n className={CSS(\n CSS.B(\"input-help-text\"),\n CSS.BM(\"input-help-text\", variant),\n className,\n )}\n level=\"small\"\n {...props}\n />\n);\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type DetailedHTMLProps, type HTMLAttributes, type ReactElement } from \"react\";\n\nimport { CSS } from \"@/css\";\n\nimport \"@/input/Label.css\";\n\n/** Props for the {@link Label} component. */\nexport interface LabelProps\n extends DetailedHTMLProps<HTMLAttributes<HTMLLabelElement>, HTMLLabelElement> {\n required?: boolean;\n}\n\n/**\n * A thin, styled wrapper for an input label. We generally recommend using Input.Item\n * with a 'label' prop instead of this component. This component is useful for\n * low-level control over the label element.\n *\n * @param props - Props for the label component. Unlisted props are passed to the\n * underlying label element.\n * @param props.required - Indicate whether the label is associated with a required\n * input.\n */\nexport const Label = ({\n className,\n required = false,\n children,\n ...props\n}: LabelProps): ReactElement => {\n return (\n <label className={CSS(CSS.B(\"input-label\"), className)} {...props}>\n {children} {required && <span className={CSS.B(\"required-indicator\")}>*</span>}\n </label>\n );\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { direction } from \"@synnaxlabs/x\";\n\nimport { Align } from \"@/align\";\nimport { CSS } from \"@/css\";\nimport { HelpText } from \"@/input/HelpText\";\nimport { Label } from \"@/input/Label\";\n\nimport \"@/input/Item.css\";\nimport { status } from \"@/status/aether\";\n\nexport interface ItemProps extends Align.SpaceProps {\n label?: string;\n required?: boolean;\n showLabel?: boolean;\n helpText?: string;\n padHelpText?: boolean;\n helpTextVariant?: status.Variant;\n showHelpText?: boolean;\n}\n\nconst maybeDefaultAlignment = (\n align?: Align.Alignment,\n dir: direction.Crude = \"x\",\n): Align.Alignment => {\n if (align != null) return align;\n return direction.construct(dir) === \"y\" ? \"stretch\" : \"center\";\n};\n\nexport const Item = ({\n label,\n showLabel = true,\n helpText,\n direction = \"y\",\n className,\n children,\n required,\n align,\n size = \"small\",\n padHelpText = false,\n helpTextVariant,\n showHelpText = true,\n ...props\n}: ItemProps): ReactElement => {\n let inputAndHelp: ReactElement;\n if (showHelpText === false && showLabel === false) return <>{children}</>;\n if (direction === \"x\")\n inputAndHelp = (\n <Align.Space direction=\"y\" size=\"small\">\n {children}\n {(padHelpText || (helpText != null && helpText.length > 0)) && (\n <HelpText variant={helpTextVariant}>{helpText}</HelpText>\n )}\n </Align.Space>\n );\n else\n inputAndHelp = (\n <Align.Space direction=\"y\" size={1 / 3}>\n {children}\n {(padHelpText || (helpText != null && helpText.length > 0)) && (\n <HelpText variant={helpTextVariant}>{helpText}</HelpText>\n )}\n </Align.Space>\n );\n\n return (\n <Align.Space\n className={CSS(CSS.B(\"input-item\"), className)}\n direction={direction}\n size={size}\n align={maybeDefaultAlignment(align, direction)}\n {...props}\n >\n {showLabel && <Label required={required}>{label}</Label>}\n {inputAndHelp}\n </Align.Space>\n );\n};\n","// Copyright 2024 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement, useState } from \"react\";\n\nimport { TimeSpan, TimeStamp } from \"@synnaxlabs/x\";\n\nimport { Text } from \"@/input/Text\";\nimport { type BaseProps } from \"@/input/types\";\n\nexport interface DateTimeProps extends BaseProps<number> {}\n\nexport const DateTime = ({\n value,\n onChange,\n onBlur,\n ...props\n}: DateTimeProps): ReactElement => {\n const ts = new TimeStamp(value, \"UTC\");\n const [internalValue, setInternalValue] = useState(\n ts.fString(\"ISO\", \"local\").slice(0, -1),\n );\n const [valueIsValid, setValueIsValid] = useState(true);\n\n const handleChange = (next: string | number): void => {\n let nextStr = next.toString();\n setInternalValue(nextStr);\n\n let ts = new TimeStamp(next, \"UTC\");\n if (nextStr.length < 23) nextStr += \".000\";\n\n ts = ts.add(\n BigInt(\n TimeStamp.now().date().getTimezoneOffset() - ts.date().getTimezoneOffset(),\n ) * TimeSpan.MINUTE.valueOf(),\n );\n let ok = false;\n try {\n const str = ts.fString(\"ISO\", \"local\");\n ok = str.slice(0, -1) === nextStr;\n } catch (_) {\n console.error(\"e\");\n }\n if (!ok) {\n setValueIsValid(false);\n return;\n }\n onChange(Number(ts.valueOf()));\n setValueIsValid(true);\n };\n\n const handleBlur: React.FocusEventHandler<HTMLInputElement> = (e) => {\n setValueIsValid(true);\n setInternalValue(new TimeStamp(value, \"UTC\").fString(\"ISO\", \"local\").slice(0, -1));\n onBlur?.(e);\n };\n\n return (\n <Text\n type=\"datetime-local\"\n onBlur={handleBlur}\n required={false}\n value={\n valueIsValid\n ? new TimeStamp(value, \"UTC\").fString(\"ISO\", \"local\").slice(0, -1)\n : internalValue\n }\n onChange={handleChange}\n {...props}\n />\n );\n};\n"],"names":["jsx","Text.Text","jsxs","direction","Align.Space","TimeStamp","ts","TimeSpan","Text"],"mappings":";;;;;;AAiCO,MAAM,WAAW,CAAC;AAAA,EACvB;AAAA,EACA,UAAU;AAAA,EACV,GAAG;AACL,MACEA,kCAAA;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC,WAAW;AAAA,MACT,IAAI,EAAE,iBAAiB;AAAA,MACvB,IAAI,GAAG,mBAAmB,OAAO;AAAA,MACjC;AAAA,IACF;AAAA,IACA,OAAM;AAAA,IACL,GAAG;AAAA,EAAA;AACN;ACfK,MAAM,QAAQ,CAAC;AAAA,EACpB;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA,GAAG;AACL,MAAgC;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MAAM,GAAG,EAAE,CAAC;AACjF,qCAAS;AAAA,EAAC;AAIV,SAAAL,kCAAA;AAAA,IAACQ;AAAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,OACE,eACI,IAAIH,EAAU,OAAO,KAAK,EAAE,QAAQ,OAAO,OAAO,EAAE,MAAM,GAAG,EAAE,IAC/D;AAAA,MAEN,UAAU;AAAA,MACT,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"external-BfZYUV3z.js","sources":["../src/input/HelpText.tsx","../src/input/Label.tsx","../src/input/Item.tsx","../src/input/DateTime.tsx"],"sourcesContent":["// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { CSS } from \"@/css\";\nimport { type Status } from \"@/status\";\nimport { Text } from \"@/text\";\n\nimport \"@/input/HelpText.css\";\n\n/** Props for the {@link HelpText} component. */\nexport interface HelpTextProps extends Omit<Text.TextProps<\"small\">, \"level\" | \"ref\"> {\n variant?: Status.Variant;\n}\n\n/**\n * Help text for an input component. We generally recommend using Input.Item with a\n * 'helpText' prop instead of this component. This component is useful for low-level\n * control over the help text element.\n *\n * @param props - Props for the help text component. Unlisted props are passed to the\n * underlying text element.\n * @param props.variant - The variant of the help text.\n * \"success\" | \"error\" | \"warning\" | \"info\" | \"loading\" | \"disabled\n * @default \"info\"\n */\nexport const HelpText = ({\n className,\n variant = \"error\",\n ...props\n}: HelpTextProps): ReactElement => (\n <Text.Text<\"small\">\n className={CSS(\n CSS.B(\"input-help-text\"),\n CSS.BM(\"input-help-text\", variant),\n className,\n )}\n level=\"small\"\n {...props}\n />\n);\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type DetailedHTMLProps, type HTMLAttributes, type ReactElement } from \"react\";\n\nimport { CSS } from \"@/css\";\n\nimport \"@/input/Label.css\";\n\n/** Props for the {@link Label} component. */\nexport interface LabelProps\n extends DetailedHTMLProps<HTMLAttributes<HTMLLabelElement>, HTMLLabelElement> {\n required?: boolean;\n}\n\n/**\n * A thin, styled wrapper for an input label. We generally recommend using Input.Item\n * with a 'label' prop instead of this component. This component is useful for\n * low-level control over the label element.\n *\n * @param props - Props for the label component. Unlisted props are passed to the\n * underlying label element.\n * @param props.required - Indicate whether the label is associated with a required\n * input.\n */\nexport const Label = ({\n className,\n required = false,\n children,\n ...props\n}: LabelProps): ReactElement => {\n return (\n <label className={CSS(CSS.B(\"input-label\"), className)} {...props}>\n {children} {required && <span className={CSS.B(\"required-indicator\")}>*</span>}\n </label>\n );\n};\n","// Copyright 2023 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement } from \"react\";\n\nimport { direction } from \"@synnaxlabs/x\";\n\nimport { Align } from \"@/align\";\nimport { CSS } from \"@/css\";\nimport { HelpText } from \"@/input/HelpText\";\nimport { Label } from \"@/input/Label\";\n\nimport \"@/input/Item.css\";\nimport { status } from \"@/status/aether\";\n\nexport interface ItemProps extends Align.SpaceProps {\n label?: string;\n required?: boolean;\n showLabel?: boolean;\n helpText?: string;\n padHelpText?: boolean;\n helpTextVariant?: status.Variant;\n showHelpText?: boolean;\n}\n\nconst maybeDefaultAlignment = (\n align?: Align.Alignment,\n dir: direction.Crude = \"x\",\n): Align.Alignment => {\n if (align != null) return align;\n return direction.construct(dir) === \"y\" ? \"stretch\" : \"center\";\n};\n\nexport const Item = ({\n label,\n showLabel = true,\n helpText,\n direction = \"y\",\n className,\n children,\n required,\n align,\n size = \"small\",\n padHelpText = false,\n helpTextVariant,\n showHelpText = true,\n ...props\n}: ItemProps): ReactElement => {\n let inputAndHelp: ReactElement;\n if (showHelpText === false && showLabel === false) return <>{children}</>;\n if (direction === \"x\")\n inputAndHelp = (\n <Align.Space direction=\"y\" size=\"small\">\n {children}\n {(padHelpText || (helpText != null && helpText.length > 0)) && (\n <HelpText variant={helpTextVariant}>{helpText}</HelpText>\n )}\n </Align.Space>\n );\n else\n inputAndHelp = (\n <Align.Space direction=\"y\" size={1 / 3}>\n {children}\n {(padHelpText || (helpText != null && helpText.length > 0)) && (\n <HelpText variant={helpTextVariant}>{helpText}</HelpText>\n )}\n </Align.Space>\n );\n\n return (\n <Align.Space\n className={CSS(CSS.B(\"input-item\"), className)}\n direction={direction}\n size={size}\n align={maybeDefaultAlignment(align, direction)}\n {...props}\n >\n {showLabel && <Label required={required}>{label}</Label>}\n {inputAndHelp}\n </Align.Space>\n );\n};\n","// Copyright 2024 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nimport { type ReactElement, useState } from \"react\";\n\nimport { TimeSpan, TimeStamp } from \"@synnaxlabs/x\";\n\nimport { Text } from \"@/input/Text\";\nimport { type BaseProps } from \"@/input/types\";\n\nexport interface DateTimeProps extends BaseProps<number> {}\n\nexport const DateTime = ({\n value,\n onChange,\n onBlur,\n ...props\n}: DateTimeProps): ReactElement => {\n const ts = new TimeStamp(value, \"UTC\");\n const [internalValue, setInternalValue] = useState(\n ts.fString(\"ISO\", \"local\").slice(0, -1),\n );\n const [valueIsValid, setValueIsValid] = useState(true);\n\n const handleChange = (next: string | number): void => {\n let nextStr = next.toString();\n setInternalValue(nextStr);\n\n let ts = new TimeStamp(next, \"UTC\");\n if (nextStr.length < 23) nextStr += \".000\";\n\n ts = ts.add(\n BigInt(\n TimeStamp.now().date().getTimezoneOffset() - ts.date().getTimezoneOffset(),\n ) * TimeSpan.MINUTE.valueOf(),\n );\n let ok = false;\n try {\n const str = ts.fString(\"ISO\", \"local\");\n ok = str.slice(0, -1) === nextStr;\n } catch (_) {\n console.error(\"e\");\n }\n if (!ok) {\n setValueIsValid(false);\n return;\n }\n onChange(Number(ts.valueOf()));\n setValueIsValid(true);\n };\n\n const handleBlur: React.FocusEventHandler<HTMLInputElement> = (e) => {\n setValueIsValid(true);\n setInternalValue(new TimeStamp(value, \"UTC\").fString(\"ISO\", \"local\").slice(0, -1));\n onBlur?.(e);\n };\n\n return (\n <Text\n type=\"datetime-local\"\n onBlur={handleBlur}\n required={false}\n value={\n valueIsValid\n ? new TimeStamp(value, \"UTC\").fString(\"ISO\", \"local\").slice(0, -1)\n : internalValue\n }\n onChange={handleChange}\n {...props}\n />\n );\n};\n"],"names":["jsx","Text.Text","jsxs","direction","Align.Space","TimeStamp","ts","TimeSpan","Text"],"mappings":";;;;;;AAiCO,MAAM,WAAW,CAAC;AAAA,EACvB;AAAA,EACA,UAAU;AAAA,EACV,GAAG;AACL,MACEA,kCAAA;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC,WAAW;AAAA,MACT,IAAI,EAAE,iBAAiB;AAAA,MACvB,IAAI,GAAG,mBAAmB,OAAO;AAAA,MACjC;AAAA,IACF;AAAA,IACA,OAAM;AAAA,IACL,GAAG;AAAA,EAAA;AACN;ACfK,MAAM,QAAQ,CAAC;AAAA,EACpB;AAAA,EACA,WAAW;AAAA,EACX;AAAA,EACA,GAAG;AACL,MAAgC;AAE5B,SAAAC,kCAAA,KAAC,SAAM,EAAA,WAAW,IAAI,IAAI,EAAE,aAAa,GAAG,SAAS,GAAI,GAAG,OACzD,UAAA;AAAA,IAAA;AAAA,IAAS;AAA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AA,MACR,UAAU;AAAA,MACV,OACE,eACI,IAAIH,EAAU,OAAO,KAAK,EAAE,QAAQ,OAAO,OAAO,EAAE,MAAM,GAAG,EAAE,IAC/D;AAAA,MAEN,UAAU;AAAA,MACT,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ALIGNMENTS, C as Center, a as CoreCenter, J as JUSTIFICATIONS, P as Pack, S as Space, s as shouldReverse } from "./Center-
|
|
1
|
+
import { A as ALIGNMENTS, C as Center, a as CoreCenter, J as JUSTIFICATIONS, P as Pack, S as Space, s as shouldReverse } from "./Center-BK9Rcaa0.js";
|
|
2
2
|
const external = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3
3
|
__proto__: null,
|
|
4
4
|
ALIGNMENTS,
|
|
@@ -12,4 +12,4 @@ const external = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
|
|
|
12
12
|
export {
|
|
13
13
|
external as e
|
|
14
14
|
};
|
|
15
|
-
//# sourceMappingURL=external-
|
|
15
|
+
//# sourceMappingURL=external-BpqCp_M1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"external-BpqCp_M1.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { w as useDataUtilContext, as as useDebouncedCallback, ah as Text, J as Column, at as ColumnContext, z as Core, h as DataProvider, H as Hover, au as ItemFrame, av as Search, A as Selector, aw as selectValueIsZero, ax as useDataContext, ay as useGetTransformedData, az as useHoverContext, aA as useSearch, K as useSelect, aB as useSelection, aC as useSelectionContext, v as useSelectionUtils, aD as useSetSourceData, aE as useSourceData, aF as useTransformedData } from "./Toggle-
|
|
1
|
+
import { w as useDataUtilContext, as as useDebouncedCallback, ah as Text, J as Column, at as ColumnContext, z as Core, h as DataProvider, H as Hover, au as ItemFrame, av as Search, A as Selector, aw as selectValueIsZero, ax as useDataContext, ay as useGetTransformedData, az as useHoverContext, aA as useSearch, K as useSelect, aB as useSelection, aC as useSelectionContext, v as useSelectionUtils, aD as useSetSourceData, aE as useSourceData, aF as useTransformedData } from "./Toggle-bT5RpwfA.js";
|
|
2
2
|
import { j as jsxRuntimeExports } from "./jsx-runtime-mMz73N64.js";
|
|
3
3
|
import { useCallback } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import "./css-
|
|
6
|
-
import "./Center-
|
|
7
|
-
import { L as List } from "./List-
|
|
4
|
+
import { n as w, h as usePurePassthrough } from "./aggregator-B8fg7W2s.js";
|
|
5
|
+
import "./css-DKKmdhSr.js";
|
|
6
|
+
import "./Center-BK9Rcaa0.js";
|
|
7
|
+
import { L as List } from "./List-BmP_se57.js";
|
|
8
8
|
function isArray(value) {
|
|
9
9
|
return !Array.isArray ? getTag(value) === "[object Array]" : Array.isArray(value);
|
|
10
10
|
}
|
|
@@ -1505,4 +1505,4 @@ export {
|
|
|
1505
1505
|
fuseFilter as f,
|
|
1506
1506
|
proxyMemo as p
|
|
1507
1507
|
};
|
|
1508
|
-
//# sourceMappingURL=external-
|
|
1508
|
+
//# sourceMappingURL=external-BrW40HJx.js.map
|