@stamcat/craftsman 0.0.27-alpha.2 → 0.0.27-alpha.21
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/AGENTS.md +19 -344
- package/Components.esm.js +72 -11
- package/README.md +5 -0
- package/Styles.esm.js +7 -7
- package/Utilities.esm.js +2 -2
- package/_virtual/_rolldown/runtime.esm.js +18 -6
- package/package.json +75 -6
- package/src/components/Button/AGENTS.md +65 -0
- package/src/components/{Button.d.ts → Button/Button.d.ts} +1 -1
- package/src/components/Button/Button.esm.js +20 -0
- package/src/components/Carousel/AGENTS.md +41 -0
- package/src/components/Carousel/Carousel.css +1 -0
- package/src/components/Carousel/Carousel.d.ts +11 -0
- package/src/components/Carousel/Carousel.scss +34 -0
- package/src/components/Carousel/Carousel2.esm.js +75 -0
- package/src/components/Checkbox/AGENTS.md +34 -0
- package/src/components/Checkbox/Checkbox.d.ts +8 -0
- package/src/components/Checkbox/Checkbox.esm.js +18 -0
- package/src/components/DatePicker/AGENTS.md +36 -0
- package/src/components/DatePicker/DatePicker.css +1 -0
- package/src/components/DatePicker/DatePicker.d.ts +8 -0
- package/src/components/DatePicker/DatePicker.scss +61 -0
- package/src/components/DatePicker/DatePicker2.esm.js +29 -0
- package/src/components/DatePicker/ReactCalendar.css +1 -0
- package/src/components/DatePicker/ReactCalendar.scss +158 -0
- package/src/components/DatePicker/_DatePicker.scss +73 -0
- package/src/components/DateRangePicker/AGENTS.md +38 -0
- package/src/components/DateRangePicker/DateRangePicker.css +1 -0
- package/src/components/DateRangePicker/DateRangePicker.d.ts +8 -0
- package/src/components/DateRangePicker/DateRangePicker.scss +62 -0
- package/src/components/DateRangePicker/DateRangePicker2.esm.js +29 -0
- package/src/components/DateTimePicker/AGENTS.md +41 -0
- package/src/components/DateTimePicker/DateTimePicker.css +1 -0
- package/src/components/DateTimePicker/DateTimePicker.d.ts +13 -0
- package/src/components/DateTimePicker/DateTimePicker.scss +86 -0
- package/src/components/DateTimePicker/DateTimePicker2.esm.js +82 -0
- package/src/components/Icons/IconAmazonPay.d.ts +2 -0
- package/src/components/Icons/IconAmazonPay.esm.js +76 -0
- package/src/components/Icons/IconAmex.d.ts +2 -0
- package/src/components/Icons/IconAmex.esm.js +87 -0
- package/src/components/Icons/IconApplePay.d.ts +2 -0
- package/src/components/Icons/IconApplePay.esm.js +26 -0
- package/src/components/Icons/IconDiscover.d.ts +2 -0
- package/src/components/Icons/IconDiscover.esm.js +129 -0
- package/src/components/Icons/IconGooglePay.d.ts +2 -0
- package/src/components/Icons/IconGooglePay.esm.js +64 -0
- package/src/components/Icons/IconMaestro.d.ts +2 -0
- package/src/components/Icons/IconMaestro.esm.js +38 -0
- package/src/components/Icons/IconMastercard.d.ts +2 -0
- package/src/components/Icons/IconMastercard.esm.js +27 -0
- package/src/components/Icons/IconPayPal.d.ts +2 -0
- package/src/components/Icons/IconPayPal.esm.js +52 -0
- package/src/components/Icons/IconSepa.d.ts +2 -0
- package/src/components/Icons/IconSepa.esm.js +272 -0
- package/src/components/Icons/IconShopPay.d.ts +2 -0
- package/src/components/Icons/IconShopPay.esm.js +35 -0
- package/src/components/Icons/IconSquare.d.ts +2 -0
- package/src/components/Icons/IconSquare.esm.js +11 -0
- package/src/components/Icons/IconStripe.d.ts +2 -0
- package/src/components/Icons/IconStripe.esm.js +57 -0
- package/src/components/Icons/IconUnionPay.d.ts +2 -0
- package/src/components/Icons/IconUnionPay.esm.js +28 -0
- package/src/components/Icons/IconVenmo.d.ts +2 -0
- package/src/components/Icons/IconVenmo.esm.js +21 -0
- package/src/components/Icons/IconVisa.d.ts +2 -0
- package/src/components/Icons/IconVisa.esm.js +14 -0
- package/src/components/Icons/index.d.ts +15 -0
- package/src/components/Icons/index.esm.js +16 -0
- package/src/components/Icons/types.d.ts +4 -0
- package/src/components/Input/AGENTS.md +30 -0
- package/src/components/Input/Input.css +1 -0
- package/src/components/Input/Input.d.ts +6 -0
- package/src/components/Input/Input.scss +176 -0
- package/src/components/Input/Input2.esm.js +42 -0
- package/src/components/Input/InputWrapper.d.ts +11 -0
- package/src/components/Input/InputWrapper.esm.js +22 -0
- package/src/components/InputNumber/AGENTS.md +37 -0
- package/src/components/InputNumber/InputNumber.css +1 -0
- package/src/components/InputNumber/InputNumber.d.ts +10 -0
- package/src/components/InputNumber/InputNumber.scss +29 -0
- package/src/components/InputNumber/InputNumber2.esm.js +36 -0
- package/src/components/InputPassword/AGENTS.md +29 -0
- package/src/components/{InputPassword.d.ts → InputPassword/InputPassword.d.ts} +2 -2
- package/src/components/InputPassword/InputPassword.esm.js +30 -0
- package/src/components/InputPhone/AGENTS.md +35 -0
- package/src/components/InputPhone/InputPhone.css +1 -0
- package/src/components/InputPhone/InputPhone.d.ts +7 -0
- package/src/components/InputPhone/InputPhone.scss +266 -0
- package/src/components/InputPhone/InputPhone2.esm.js +27 -0
- package/src/components/Loader/AGENTS.md +31 -0
- package/src/components/{Loader.d.ts → Loader/Loader.d.ts} +1 -2
- package/src/components/Loader/Loader.esm.js +19 -0
- package/src/components/Loader/loaders.module.css +1 -0
- package/src/components/Loader/loaders.module.esm.js +21 -0
- package/src/{styles/global/components → components/Loader}/loaders.module.scss +2 -1
- package/src/components/Modal/AGENTS.md +47 -0
- package/src/components/Modal/Modal.css +1 -0
- package/src/components/{Modal.d.ts → Modal/Modal.d.ts} +0 -1
- package/src/components/Modal/Modal.scss +150 -0
- package/src/components/Modal/Modal2.esm.js +53 -0
- package/src/components/Notice/AGENTS.md +42 -0
- package/src/components/Notice/Notice.css +1 -0
- package/src/components/Notice/Notice.d.ts +13 -0
- package/src/components/Notice/Notice.scss +76 -0
- package/src/components/Notice/Notice2.esm.js +56 -0
- package/src/components/Pagination/AGENTS.md +38 -0
- package/src/components/Pagination/Pagination.css +1 -0
- package/src/components/Pagination/Pagination.d.ts +10 -0
- package/src/components/Pagination/Pagination.scss +22 -0
- package/src/components/Pagination/Pagination2.esm.js +64 -0
- package/src/components/RadioButton/AGENTS.md +44 -0
- package/src/components/RadioButton/RadioButton.d.ts +9 -0
- package/src/components/RadioButton/RadioButton.esm.js +18 -0
- package/src/components/Select/AGENTS.md +36 -0
- package/src/components/Select/Select.d.ts +14 -0
- package/src/components/Select/Select.esm.js +26 -0
- package/src/components/SortableList/AGENTS.md +45 -0
- package/src/components/SortableList/ListItem.d.ts +10 -0
- package/src/components/SortableList/ListItem.esm.js +67 -0
- package/src/components/SortableList/SortableList.css +1 -0
- package/src/components/SortableList/SortableList.d.ts +23 -0
- package/src/components/SortableList/SortableList.scss +41 -0
- package/src/components/SortableList/SortableList2.esm.js +54 -0
- package/src/components/SortableList/utilities.d.ts +7 -0
- package/src/components/SortableList/utilities.esm.js +4 -0
- package/src/components/Text/AGENTS.md +32 -0
- package/src/components/Text/Text.css +1 -0
- package/src/components/Text/Text.d.ts +10 -0
- package/src/components/Text/Text.scss +80 -0
- package/src/components/Text/Text2.esm.js +23 -0
- package/src/components/Textarea/AGENTS.md +32 -0
- package/src/components/Textarea/Textarea.d.ts +3 -0
- package/src/components/Textarea/Textarea.esm.js +23 -0
- package/src/components/TimePicker/AGENTS.md +42 -0
- package/src/components/TimePicker/TimePicker.css +1 -0
- package/src/components/TimePicker/TimePicker.d.ts +13 -0
- package/src/components/TimePicker/TimePicker.scss +226 -0
- package/src/components/TimePicker/TimePicker2.esm.js +98 -0
- package/src/components/TimePicker/TimePickerDisplay.d.ts +16 -0
- package/src/components/TimePicker/TimePickerDisplay.esm.js +54 -0
- package/src/components/TimePicker/TimePickerWheel.d.ts +13 -0
- package/src/components/TimePicker/TimePickerWheel.esm.js +61 -0
- package/src/components/TimePicker/constants.d.ts +7 -0
- package/src/components/TimePicker/constants.esm.js +3 -0
- package/src/components/TimePicker/utilities.d.ts +15 -0
- package/src/components/TimePicker/utilities.esm.js +20 -0
- package/src/components/Toggle/AGENTS.md +33 -0
- package/src/components/Toggle/Toggle.css +1 -0
- package/src/components/Toggle/Toggle.d.ts +5 -0
- package/src/components/Toggle/Toggle.scss +64 -0
- package/src/components/Toggle/Toggle2.esm.js +19 -0
- package/src/components/Tooltip/AGENTS.md +41 -0
- package/src/components/Tooltip/Tooltip.css +1 -0
- package/src/components/Tooltip/Tooltip.d.ts +12 -0
- package/src/components/Tooltip/Tooltip.scss +29 -0
- package/src/components/Tooltip/Tooltip2.esm.js +65 -0
- package/src/components/index.d.ts +23 -7
- package/src/stories/assets/Stam.jpg +0 -0
- package/src/stories/assets/kaluah.jpg +0 -0
- package/src/stories/assets/stam2.jpg +0 -0
- package/src/stories/assets/tito.jpg +0 -0
- package/src/stories/documentation/AboutUs.mdx +21 -0
- package/src/stories/documentation/GettingStarted.mdx +117 -0
- package/src/stories/documentation/Introduction.mdx +29 -0
- package/src/stories/documentation/Themes.mdx +264 -0
- package/src/stories/documentation/ToDo.mdx +15 -0
- package/src/stories/molecules/Carousel.scss +21 -0
- package/src/stories/utilities/DeviceDetection.mdx +59 -0
- package/src/styles/_config.scss +30 -0
- package/src/styles/components/ThemeProvider.esm.js +1 -1
- package/src/styles/global/components/_button.scss +56 -52
- package/src/styles/global/components/_checkbox.scss +64 -59
- package/src/styles/global/components/_code.scss +19 -15
- package/src/styles/global/components/_input.scss +29 -37
- package/src/styles/global/components/_radioButton.scss +30 -26
- package/src/styles/global/components/_select.scss +56 -0
- package/src/styles/global/components/_typography.scss +97 -6
- package/src/styles/global/globalStyles.module.scss +1 -129
- package/src/styles/global/globalStyles.scss +87 -1
- package/src/styles/index.d.ts +1 -1
- package/src/styles/theme/components.esm.js +11 -7
- package/src/styles/theme/theme.esm.js +31 -41
- package/src/styles/theme/types.d.ts +4 -1
- package/src/styles/utilities/_functions.scss +117 -0
- package/src/styles/utilities/_mixins.scss +0 -0
- package/src/styles/utilities/_placeholders.scss +6 -0
- package/src/styles/utilities/color.d.ts +1 -1
- package/src/styles/utilities/constants.d.ts +1 -1
- package/src/styles/utilities/layout.d.ts +1 -1
- package/src/styles/utilities/layout.esm.js +3 -3
- package/src/{styles/utilities → utilities}/types.d.ts +61 -3
- package/src/utilities/types.esm.js +85 -0
- package/src/utilities/validations.d.ts +5 -0
- package/src/utilities/validations.esm.js +19 -1
- package/src/components/Button.esm.js +0 -28
- package/src/components/Button.module.css +0 -1
- package/src/components/Button.module.esm.js +0 -9
- package/src/components/Button.module.scss +0 -5
- package/src/components/Checkbox.d.ts +0 -7
- package/src/components/Checkbox.esm.js +0 -11
- package/src/components/Input.d.ts +0 -11
- package/src/components/Input.esm.js +0 -41
- package/src/components/Input.module.css +0 -1
- package/src/components/Input.module.esm.js +0 -11
- package/src/components/Input.module.scss +0 -141
- package/src/components/InputPassword.esm.js +0 -33
- package/src/components/Loader.esm.js +0 -21
- package/src/components/Modal.esm.js +0 -62
- package/src/components/Modal.module.css +0 -1
- package/src/components/Modal.module.esm.js +0 -13
- package/src/components/Modal.module.scss +0 -133
- package/src/components/RadioButton.d.ts +0 -7
- package/src/components/RadioButton.esm.js +0 -11
- package/src/styles/global/components/_mixins.scss +0 -2
- package/src/styles/global/components/button.d.ts +0 -7
- package/src/styles/global/components/loaders.module.css +0 -1
- package/src/styles/global/components/loaders.module.esm.js +0 -21
- package/src/styles/utilities/types.esm.js +0 -54
- package/src/{styles/global/components/loaders.d.ts → components/Loader/types.d.ts} +1 -1
- /package/src/{styles/global/components/loaders.esm.js → components/Loader/types.esm.js} +0 -0
- /package/src/components/{Progress.d.ts → Progress/Progress.d.ts} +0 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Button as e } from "../Button/Button.esm.js";
|
|
3
|
+
import { InputWrapper as t } from "../Input/InputWrapper.esm.js";
|
|
4
|
+
import './TimePicker.css';/* empty css */
|
|
5
|
+
import { resolveLocale as n } from "./utilities.esm.js";
|
|
6
|
+
import { TimePickerDisplay as r } from "./TimePickerDisplay.esm.js";
|
|
7
|
+
import { require_lib as i } from "../../../node_modules/react-device-detect/dist/lib.esm.js";
|
|
8
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
9
|
+
import { useEffect as s, useState as c } from "react";
|
|
10
|
+
import { FaClock as l, FaRegClock as u, FaX as d } from "react-icons/fa6";
|
|
11
|
+
import { autoUpdate as f, flip as p, offset as m, shift as h, useFloating as g } from "@floating-ui/react-dom";
|
|
12
|
+
import { TimePicker as _ } from "react-time-picker";
|
|
13
|
+
//#region src/components/TimePicker/TimePicker.tsx
|
|
14
|
+
var v = i(), y = (i) => {
|
|
15
|
+
let { labels: y, locale: b, format: x, value: S, onChange: C, label: w, labelPosition: T, error: E, required: D, name: O, ...k } = i, [A, j] = c(null), [M, N] = c(null), { floatingStyles: P } = g({
|
|
16
|
+
placement: "bottom-start",
|
|
17
|
+
strategy: "absolute",
|
|
18
|
+
whileElementsMounted: f,
|
|
19
|
+
middleware: [
|
|
20
|
+
m(4),
|
|
21
|
+
p(),
|
|
22
|
+
h()
|
|
23
|
+
],
|
|
24
|
+
elements: {
|
|
25
|
+
reference: A,
|
|
26
|
+
floating: M
|
|
27
|
+
}
|
|
28
|
+
}), [F, I] = c(!1), L = n(b);
|
|
29
|
+
return s(() => {
|
|
30
|
+
if (!F) return;
|
|
31
|
+
let e = (e) => {
|
|
32
|
+
A?.contains(e.target) || M?.contains(e.target) || I(!1);
|
|
33
|
+
};
|
|
34
|
+
return document.addEventListener("pointerdown", e), () => {
|
|
35
|
+
document.removeEventListener("pointerdown", e);
|
|
36
|
+
};
|
|
37
|
+
}, [
|
|
38
|
+
F,
|
|
39
|
+
A,
|
|
40
|
+
M
|
|
41
|
+
]), /* @__PURE__ */ o("div", {
|
|
42
|
+
className: "timePicker",
|
|
43
|
+
ref: j,
|
|
44
|
+
onFocus: (e) => {
|
|
45
|
+
v.isMobile || e.target instanceof HTMLInputElement && I(!0);
|
|
46
|
+
},
|
|
47
|
+
onKeyDown: (e) => {
|
|
48
|
+
e.key === "Enter" && I(!1);
|
|
49
|
+
},
|
|
50
|
+
children: [
|
|
51
|
+
O && /* @__PURE__ */ a("input", {
|
|
52
|
+
type: "hidden",
|
|
53
|
+
name: O,
|
|
54
|
+
value: typeof S == "string" ? S : "",
|
|
55
|
+
readOnly: !0
|
|
56
|
+
}),
|
|
57
|
+
/* @__PURE__ */ a(t, {
|
|
58
|
+
label: w,
|
|
59
|
+
labelPosition: T,
|
|
60
|
+
error: E,
|
|
61
|
+
required: D,
|
|
62
|
+
children: /* @__PURE__ */ o("div", {
|
|
63
|
+
className: "timePicker__field",
|
|
64
|
+
children: [/* @__PURE__ */ a(_, {
|
|
65
|
+
...k,
|
|
66
|
+
value: S,
|
|
67
|
+
onChange: C,
|
|
68
|
+
locale: L,
|
|
69
|
+
required: D,
|
|
70
|
+
disableClock: !0,
|
|
71
|
+
clearIcon: /* @__PURE__ */ a(d, { size: 14 })
|
|
72
|
+
}), !v.isMobile && /* @__PURE__ */ a(e, {
|
|
73
|
+
type: "button",
|
|
74
|
+
variant: "text",
|
|
75
|
+
onClick: () => I((e) => !e),
|
|
76
|
+
"aria-label": F ? "Hide time picker" : "Show time picker",
|
|
77
|
+
"aria-pressed": F,
|
|
78
|
+
disabled: i.disabled,
|
|
79
|
+
className: "input-view-toggle",
|
|
80
|
+
children: a(F ? l : u, { size: 16 })
|
|
81
|
+
})]
|
|
82
|
+
})
|
|
83
|
+
}),
|
|
84
|
+
!v.isMobile && /* @__PURE__ */ a(r, {
|
|
85
|
+
value: S,
|
|
86
|
+
onChange: (e) => C?.(e),
|
|
87
|
+
locale: L,
|
|
88
|
+
labels: y,
|
|
89
|
+
format: x,
|
|
90
|
+
visible: F,
|
|
91
|
+
floatingRef: N,
|
|
92
|
+
style: P
|
|
93
|
+
})
|
|
94
|
+
]
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
//#endregion
|
|
98
|
+
export { y as TimePicker };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type TimePickerDisplayProps = {
|
|
3
|
+
value?: unknown;
|
|
4
|
+
onChange?: (val: string) => void;
|
|
5
|
+
locale?: Intl.LocalesArgument;
|
|
6
|
+
format?: 24 | 12;
|
|
7
|
+
labels?: {
|
|
8
|
+
hour?: string;
|
|
9
|
+
minute?: string;
|
|
10
|
+
};
|
|
11
|
+
visible?: boolean;
|
|
12
|
+
floatingRef?: (node: HTMLElement | null) => void;
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
};
|
|
15
|
+
export declare const TimePickerDisplay: React.FC<TimePickerDisplayProps>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { getAmPmLabels as e, getUnitLabel as t, is24HourFormat as n, isEmpty as r } from "../../utilities/validations.esm.js";
|
|
2
|
+
import { padTime as i, parseTimeString as a, resolveLocale as o, resolveTimeFormat as s, to24Hour as c } from "./utilities.esm.js";
|
|
3
|
+
import { IosPickerItem as l } from "./TimePickerWheel.esm.js";
|
|
4
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
5
|
+
import "react";
|
|
6
|
+
//#region src/components/TimePicker/TimePickerDisplay.tsx
|
|
7
|
+
var f = (e, t) => e ? t : void 0, p = (p) => {
|
|
8
|
+
let { value: m, onChange: h, locale: g, format: _, labels: v, visible: y = !1, floatingRef: b, style: x } = p, S = o(g), [C, w] = a(m), T = !r(m), E = s(_, n(S)), D = +(E === 12), O = E === 12 ? e(S) : null, k = +(C >= 12), A = E === 12 ? (C % 12 + 11) % 12 : C;
|
|
9
|
+
return y ? /* @__PURE__ */ d("div", {
|
|
10
|
+
className: "timePicker__display",
|
|
11
|
+
ref: b,
|
|
12
|
+
style: x,
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ u(l, {
|
|
15
|
+
slideCount: E,
|
|
16
|
+
perspective: "left",
|
|
17
|
+
loop: !0,
|
|
18
|
+
offset: D,
|
|
19
|
+
selectedIndex: f(T, A),
|
|
20
|
+
onSelect: (e) => {
|
|
21
|
+
let t = c(e + D, C >= 12, E === 12);
|
|
22
|
+
h?.(`${i(t)}:${i(w)}`);
|
|
23
|
+
},
|
|
24
|
+
label: t(S, "hour", v?.hour)
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ u(l, {
|
|
27
|
+
slideCount: 60,
|
|
28
|
+
perspective: "right",
|
|
29
|
+
loop: !0,
|
|
30
|
+
selectedIndex: f(T, w),
|
|
31
|
+
onSelect: (e) => {
|
|
32
|
+
h?.(`${i(C)}:${i(e)}`);
|
|
33
|
+
},
|
|
34
|
+
label: t(S, "minute", v?.minute)
|
|
35
|
+
}),
|
|
36
|
+
E === 12 && O && /* @__PURE__ */ u(l, {
|
|
37
|
+
slideCount: 2,
|
|
38
|
+
perspective: "center",
|
|
39
|
+
loop: !1,
|
|
40
|
+
slides: O,
|
|
41
|
+
selectedIndex: f(T, k),
|
|
42
|
+
onSelect: (e) => {
|
|
43
|
+
let t = e === 1;
|
|
44
|
+
if (t === C >= 12) return;
|
|
45
|
+
let n = t ? C + 12 : C - 12;
|
|
46
|
+
h?.(`${i(n)}:${i(w)}`);
|
|
47
|
+
},
|
|
48
|
+
label: ""
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
}) : null;
|
|
52
|
+
};
|
|
53
|
+
//#endregion
|
|
54
|
+
export { p as TimePickerDisplay };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type IosPickerItemProps = {
|
|
3
|
+
loop?: boolean;
|
|
4
|
+
label: string;
|
|
5
|
+
slideCount: number;
|
|
6
|
+
perspective: "left" | "right" | "center";
|
|
7
|
+
offset?: number;
|
|
8
|
+
slides?: React.ReactNode[];
|
|
9
|
+
selectedIndex?: number;
|
|
10
|
+
onSelect?: (index: number) => void;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const IosPickerItem: (props: IosPickerItemProps) => React.JSX.Element;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import e from "../../../node_modules/embla-carousel-react/esm/embla-carousel-react.esm.esm.js";
|
|
3
|
+
import "./constants.esm.js";
|
|
4
|
+
import { inactivateEmblaTransform as t, setContainerStyles as n, setSlideStyles as r, snapOnPointerUp as i } from "./utilities.esm.js";
|
|
5
|
+
import a from "clsx";
|
|
6
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
+
import { useCallback as c, useEffect as l, useLayoutEffect as u, useRef as d } from "react";
|
|
8
|
+
//#region src/components/TimePicker/TimePickerWheel.tsx
|
|
9
|
+
var f = (f) => {
|
|
10
|
+
let { slideCount: p, perspective: m, label: h, loop: g = !1, offset: _ = 0, slides: v, selectedIndex: y, onSelect: b, disabled: x } = f, [S, C] = e({
|
|
11
|
+
loop: g,
|
|
12
|
+
axis: "y",
|
|
13
|
+
dragFree: !0,
|
|
14
|
+
containScroll: !1
|
|
15
|
+
}), w = d(null), T = d(b);
|
|
16
|
+
u(() => {
|
|
17
|
+
T.current = b;
|
|
18
|
+
});
|
|
19
|
+
let E = p * 20, D = g ? 0 : 20, O = c((e) => {
|
|
20
|
+
n(e, (p * 20 - D) * e.scrollProgress()), e.slideNodes().forEach((t, n) => {
|
|
21
|
+
r(e, n, g, p, E);
|
|
22
|
+
});
|
|
23
|
+
}, [
|
|
24
|
+
g,
|
|
25
|
+
p,
|
|
26
|
+
D,
|
|
27
|
+
E
|
|
28
|
+
]);
|
|
29
|
+
return l(() => {
|
|
30
|
+
if (!C) return () => {};
|
|
31
|
+
let e = (e) => T.current?.(e.selectedScrollSnap());
|
|
32
|
+
return C.on("pointerUp", i), C.on("scroll", O), C.on("reInit", t), C.on("reInit", O), C.on("select", e), t(C), O(C), () => {
|
|
33
|
+
C.off("pointerUp", i), C.off("scroll", O), C.off("reInit", t), C.off("reInit", O), C.off("select", e);
|
|
34
|
+
};
|
|
35
|
+
}, [C, O]), l(() => {
|
|
36
|
+
!C || y === void 0 || C.selectedScrollSnap() !== y && C.scrollTo(y);
|
|
37
|
+
}, [C, y]), /* @__PURE__ */ s("div", {
|
|
38
|
+
className: a("ios-picker", { "ios-picker--disabled": x }),
|
|
39
|
+
"aria-disabled": x,
|
|
40
|
+
children: [/* @__PURE__ */ o("div", {
|
|
41
|
+
className: "ios-picker__scene",
|
|
42
|
+
ref: w,
|
|
43
|
+
children: /* @__PURE__ */ o("div", {
|
|
44
|
+
className: `ios-picker__viewport ios-picker__viewport--perspective-${m}`,
|
|
45
|
+
ref: S,
|
|
46
|
+
children: /* @__PURE__ */ o("div", {
|
|
47
|
+
className: "ios-picker__container",
|
|
48
|
+
children: Array.from({ length: p }, (e, t) => /* @__PURE__ */ o("div", {
|
|
49
|
+
className: "ios-picker__slide",
|
|
50
|
+
children: v ? v[t] : t + _
|
|
51
|
+
}, t))
|
|
52
|
+
})
|
|
53
|
+
})
|
|
54
|
+
}), /* @__PURE__ */ o("div", {
|
|
55
|
+
className: "ios-picker__label",
|
|
56
|
+
children: h
|
|
57
|
+
})]
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
//#endregion
|
|
61
|
+
export { f as IosPickerItem };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const CIRCLE_DEGREES = 360;
|
|
2
|
+
export declare const WHEEL_ITEM_SIZE = 32;
|
|
3
|
+
export declare const WHEEL_ITEM_COUNT = 18;
|
|
4
|
+
export declare const WHEEL_ITEMS_IN_VIEW = 4;
|
|
5
|
+
export declare const WHEEL_ITEM_RADIUS: number;
|
|
6
|
+
export declare const IN_VIEW_DEGREES: number;
|
|
7
|
+
export declare const WHEEL_RADIUS: number;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EmblaCarouselType } from 'embla-carousel';
|
|
2
|
+
export declare const parseTimeString: (val: unknown) => [number, number];
|
|
3
|
+
export declare const padTime: (n: number) => string;
|
|
4
|
+
export declare const toDisplayHour: (hours: number, is12h: boolean) => number;
|
|
5
|
+
export declare const to24Hour: (display: number, isPM: boolean, is12h: boolean) => number;
|
|
6
|
+
export declare const resolveLocale: (locale?: Intl.LocalesArgument) => string;
|
|
7
|
+
export declare const resolveTimeFormat: (format: 24 | 12 | undefined, is24h: boolean) => 24 | 12;
|
|
8
|
+
export declare const isInView: (wheelLocation: number, slidePosition: number) => boolean;
|
|
9
|
+
export declare const setSlideStyles: (emblaApi: EmblaCarouselType, index: number, loop: boolean, slideCount: number, totalRadius: number) => void;
|
|
10
|
+
export declare const setContainerStyles: (emblaApi: EmblaCarouselType, wheelRotation: number) => void;
|
|
11
|
+
export declare const inactivateEmblaTransform: (emblaApi: EmblaCarouselType) => void;
|
|
12
|
+
export declare const snapOnPointerUp: (emblaApi: EmblaCarouselType) => void;
|
|
13
|
+
export declare const resolveHasValue: (value: React.ComponentProps<"input">["value"], internalHours: number | null) => boolean;
|
|
14
|
+
export declare const resolveTime: (value: unknown, h: number | null, m: number | null) => [number, number];
|
|
15
|
+
export declare const toDisplayInputValue: (hasVal: boolean, val: string | number) => string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { WHEEL_RADIUS as e } from "./constants.esm.js";
|
|
2
|
+
//#region src/components/TimePicker/utilities.ts
|
|
3
|
+
var t = (e) => {
|
|
4
|
+
if (typeof e != "string" || !e.includes(":")) return [0, 0];
|
|
5
|
+
let [t, n] = e.split(":").map(Number);
|
|
6
|
+
return [isNaN(t) ? 0 : t, isNaN(n) ? 0 : n];
|
|
7
|
+
}, n = (e) => String(e).padStart(2, "0"), r = (e, t, n) => n ? e === 12 ? t ? 12 : 0 : t ? e + 12 : e : e, i = (e) => e ? String(Array.isArray(e) ? e[0] : e) : typeof navigator < "u" ? navigator.language : "en-US", a = (e, t) => e ?? (t ? 24 : 12), o = (e, t) => Math.abs(e - t) < 80, s = (t, n, r, i, a) => {
|
|
8
|
+
let s = t.slideNodes()[n], c = t.scrollProgress() * a, l = t.scrollSnapList()[n] * a, u = l + a, d = l - a, f = !1, p = n * -20;
|
|
9
|
+
o(c, l) && (f = !0), r && o(c, d) && (f = !0, p = -360 + (i - n) * 20), r && o(c, u) && (f = !0, p = -(a % 360) - n * 20), f ? (s.style.opacity = "1", s.style.transform = `translateY(-${n * 100}%) rotateX(${p}deg) translateZ(${e}px)`) : (s.style.opacity = "0", s.style.transform = "none");
|
|
10
|
+
}, c = (t, n) => {
|
|
11
|
+
t.containerNode().style.transform = `translateZ(${e}px) rotateX(${n}deg)`;
|
|
12
|
+
}, l = (e) => {
|
|
13
|
+
let { translate: t } = e.internalEngine();
|
|
14
|
+
t.clear(), t.toggleActive(!1);
|
|
15
|
+
}, u = (e) => {
|
|
16
|
+
let { scrollTo: t, target: n, location: r } = e.internalEngine(), i = n.get() - r.get(), a = Math.abs(i) < 32 / 2.5 ? 10 : .1;
|
|
17
|
+
t.distance(i * a, !0);
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { l as inactivateEmblaTransform, o as isInView, n as padTime, t as parseTimeString, i as resolveLocale, a as resolveTimeFormat, c as setContainerStyles, s as setSlideStyles, u as snapOnPointerUp, r as to24Hour };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Toggle — Agent Usage Notes
|
|
2
|
+
|
|
3
|
+
Import:
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { Toggle } from "@stamcat/craftsman/Toggle";
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Props:
|
|
10
|
+
|
|
11
|
+
- Extends `Input` props, excluding `type`, `preAdornment`, and `endAdornment` (all internally managed).
|
|
12
|
+
- `width?: number` — pixel width of the switch track (default: `40`). Track height, thumb size, and thumb travel all derive from this via `calc()`.
|
|
13
|
+
- `label?: string | ReactNode`, `labelPosition?: "top" | "left" | "bottom" | "right" | "inside" | "hidden"` (default: `"right"`), `error?`, `required?` — same as `Input`.
|
|
14
|
+
|
|
15
|
+
Behavior notes:
|
|
16
|
+
|
|
17
|
+
- `Toggle` is `<Input type="checkbox">` under the hood — it is a real, keyboard-accessible checkbox styled as a switch, not a custom widget.
|
|
18
|
+
- `width` sets a single `--toggle-width` CSS variable inline; the track, thumb, and checked-state translation are all `calc()`-derived from it in `Toggle.scss` (the same sizing pattern used by `Button`'s `--btn-size`, `Checkbox`'s `--checkbox-size`, and `RadioButton`'s `--radio-size`).
|
|
19
|
+
- The underlying checkbox input is stretched invisibly over the full switch (`opacity: 0`) so it stays the real click/keyboard target; the visual slider is rendered via `endAdornment` with `pointer-events: none`.
|
|
20
|
+
- Controlled and uncontrolled patterns are both supported (`checked` + `onChange`, or `defaultChecked`).
|
|
21
|
+
|
|
22
|
+
Example:
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
const [enabled, setEnabled] = useState(false);
|
|
26
|
+
|
|
27
|
+
<Toggle
|
|
28
|
+
label="Enable notifications"
|
|
29
|
+
width={48}
|
|
30
|
+
checked={enabled}
|
|
31
|
+
onChange={(event) => setEnabled(event.currentTarget.checked)}
|
|
32
|
+
/>
|
|
33
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer craftsman-component{.input-wrapper.toggle>label{align-items:center;gap:calc(var(--w-gutter) * .5);display:inline-flex}.input-wrapper.toggle .input-field{width:var(--toggle-width,60px);height:calc(var(--toggle-width,60px) * .56);position:relative}.input-wrapper.toggle .input.checkbox{opacity:0;cursor:pointer;z-index:1;width:100%;height:100%;margin:0;position:absolute;inset:0}.input-wrapper.toggle .input-end-adornment{position:absolute;inset:0;transform:none}.input-wrapper.toggle .toggle-slider{pointer-events:none;background-color:var(--gray400);border-radius:calc(var(--toggle-width,60px) * .56);transition:background-color .2s;position:absolute;inset:0}.input-wrapper.toggle .toggle-slider:before{content:"";left:calc(var(--toggle-width,60px) * .065);bottom:calc(var(--toggle-width,60px) * .065);height:calc(var(--toggle-width,60px) * .43);width:calc(var(--toggle-width,60px) * .43);background-color:var(--white);border-radius:50%;transition:transform .2s;position:absolute}.input-wrapper.toggle .input.checkbox:checked+.input-end-adornment .toggle-slider{background-color:var(--blue500)}.input-wrapper.toggle .input.checkbox:checked+.input-end-adornment .toggle-slider:before{transform:translateX(calc(var(--toggle-width,60px) * .43))}}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
@use "../../styles/utilities/_functions" as u;
|
|
2
|
+
|
|
3
|
+
@layer craftsman-component {
|
|
4
|
+
.input-wrapper.toggle {
|
|
5
|
+
> label {
|
|
6
|
+
display: inline-flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
gap: #{u.width("gutter", 0.5)};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.input-field {
|
|
12
|
+
position: relative;
|
|
13
|
+
width: var(--toggle-width, 60px);
|
|
14
|
+
height: calc(var(--toggle-width, 60px) * 0.56);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.input.checkbox {
|
|
18
|
+
position: absolute;
|
|
19
|
+
inset: 0;
|
|
20
|
+
width: 100%;
|
|
21
|
+
height: 100%;
|
|
22
|
+
margin: 0;
|
|
23
|
+
opacity: 0;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
z-index: 1;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.input-end-adornment {
|
|
29
|
+
position: absolute;
|
|
30
|
+
inset: 0;
|
|
31
|
+
top: 0;
|
|
32
|
+
transform: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.toggle-slider {
|
|
36
|
+
position: absolute;
|
|
37
|
+
inset: 0;
|
|
38
|
+
pointer-events: none;
|
|
39
|
+
background-color: var(--gray400);
|
|
40
|
+
border-radius: calc(var(--toggle-width, 60px) * 0.56);
|
|
41
|
+
transition: background-color 0.2s ease;
|
|
42
|
+
|
|
43
|
+
&::before {
|
|
44
|
+
position: absolute;
|
|
45
|
+
content: "";
|
|
46
|
+
left: calc(var(--toggle-width, 60px) * 0.065);
|
|
47
|
+
bottom: calc(var(--toggle-width, 60px) * 0.065);
|
|
48
|
+
height: calc(var(--toggle-width, 60px) * 0.43);
|
|
49
|
+
width: calc(var(--toggle-width, 60px) * 0.43);
|
|
50
|
+
border-radius: 50%;
|
|
51
|
+
background-color: var(--white);
|
|
52
|
+
transition: transform 0.2s ease;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.input.checkbox:checked + .input-end-adornment .toggle-slider {
|
|
57
|
+
background-color: var(--blue500);
|
|
58
|
+
|
|
59
|
+
&::before {
|
|
60
|
+
transform: translateX(calc(var(--toggle-width, 60px) * 0.43));
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Input as e } from "../Input/Input2.esm.js";
|
|
3
|
+
import './Toggle.css';/* empty css */
|
|
4
|
+
import t from "clsx";
|
|
5
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/Toggle/Toggle.tsx
|
|
7
|
+
var r = ({ labelPosition: r = "right", className: i, style: a, width: o = 40, ...s }) => /* @__PURE__ */ n(e, {
|
|
8
|
+
type: "checkbox",
|
|
9
|
+
labelPosition: r,
|
|
10
|
+
className: t("toggle", i),
|
|
11
|
+
endAdornment: /* @__PURE__ */ n("span", { className: "toggle-slider" }),
|
|
12
|
+
style: {
|
|
13
|
+
...a,
|
|
14
|
+
"--toggle-width": `${o}px`
|
|
15
|
+
},
|
|
16
|
+
...s
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
export { r as Toggle };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Tooltip — Agent Usage Notes
|
|
2
|
+
|
|
3
|
+
> Not yet part of the documented public export surface (see `craftsman-component-usage` skill's Known Limitations). Source path only — do not assume `@stamcat/craftsman/Tooltip` is published until confirmed in `exports.ts`.
|
|
4
|
+
|
|
5
|
+
Import (source-relative, once exported):
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { Tooltip } from "@stamcat/craftsman/Tooltip";
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Props:
|
|
12
|
+
|
|
13
|
+
- `anchor: React.ReactNode` — the element the tooltip is attached to.
|
|
14
|
+
- `content: React.ReactNode` — the floating content shown.
|
|
15
|
+
- `placement?: Placement` (from `@floating-ui/react-dom`, default: `"bottom-start"`)
|
|
16
|
+
- `strategy?: Strategy` (from `@floating-ui/react-dom`, default: `"absolute"`)
|
|
17
|
+
- `showContent?: "hover" | "click"` (default: `"hover"`)
|
|
18
|
+
- `anchorStyles?: React.CSSProperties`
|
|
19
|
+
- `contentStyles?: React.CSSProperties`
|
|
20
|
+
|
|
21
|
+
Behavior notes:
|
|
22
|
+
|
|
23
|
+
- Built on `@floating-ui/react-dom`'s `useFloating` with `autoUpdate` and `offset(12)`, `flip()`, `shift()` middleware.
|
|
24
|
+
- `showContent="hover"` toggles visibility on the anchor's `mouseenter`/`mouseleave`.
|
|
25
|
+
- `showContent="click"` toggles visibility on anchor click, and closes on any outside `pointerdown`.
|
|
26
|
+
- Floating content is only rendered in the DOM while visible (not just hidden via CSS).
|
|
27
|
+
- Current `placement` is exposed via `data-placement` on the floating element for style targeting.
|
|
28
|
+
|
|
29
|
+
Example:
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
<Tooltip
|
|
33
|
+
anchor={<Button variant="text">Hover me</Button>}
|
|
34
|
+
content="Helpful detail"
|
|
35
|
+
placement="top"
|
|
36
|
+
/>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Implementation caution:
|
|
40
|
+
|
|
41
|
+
- No dedicated theme entry currently in `theme.components`; style via `anchorStyles`/`contentStyles` or global selectors targeting `.tooltip__anchor` / `.tooltip__floating`.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer craftsman-component{.tooltip{--tooltip-bg:var(--gray800)}.tooltip__floating{background-color:var(--tooltip-bg);color:var(--white);padding:calc(var(--w-gutter) * .25) calc(var(--w-gutter) * .5);border-radius:6px;position:relative}.tooltip__floating:before{content:"";background-color:var(--tooltip-bg);width:8px;height:8px;position:absolute;transform:rotate(45deg)}.tooltip__floating[data-placement^=bottom]:before{margin-left:-4px;top:-4px;left:50%}.tooltip__floating[data-placement^=top]:before{margin-left:-4px;bottom:-4px;left:50%}.tooltip__floating[data-placement^=left]:before{margin-top:-4px;top:50%;right:-4px}.tooltip__floating[data-placement^=right]:before{margin-top:-4px;top:50%;left:-4px}}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Placement, Strategy } from '@floating-ui/react-dom';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export type TooltipProps = {
|
|
4
|
+
anchor: React.ReactNode;
|
|
5
|
+
content: React.ReactNode;
|
|
6
|
+
placement?: Placement;
|
|
7
|
+
strategy?: Strategy;
|
|
8
|
+
showContent?: "hover" | "click";
|
|
9
|
+
anchorStyles?: React.CSSProperties;
|
|
10
|
+
contentStyles?: React.CSSProperties;
|
|
11
|
+
};
|
|
12
|
+
export declare const Tooltip: React.FC<TooltipProps>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@use "../../styles/utilities/_functions" as u;
|
|
2
|
+
|
|
3
|
+
@layer craftsman-component {
|
|
4
|
+
.tooltip {
|
|
5
|
+
--tooltip-bg: #{u.color("gray800")};
|
|
6
|
+
|
|
7
|
+
&__floating {
|
|
8
|
+
position: relative;
|
|
9
|
+
background-color: var(--tooltip-bg);
|
|
10
|
+
color: #{u.color("white")};
|
|
11
|
+
padding: #{u.width("gutter", 0.25)} #{u.width("gutter", 0.5)};
|
|
12
|
+
border-radius: 6px;
|
|
13
|
+
|
|
14
|
+
&::before {
|
|
15
|
+
content: '';
|
|
16
|
+
position: absolute;
|
|
17
|
+
width: 8px;
|
|
18
|
+
height: 8px;
|
|
19
|
+
background-color: var(--tooltip-bg);
|
|
20
|
+
transform: rotate(45deg);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&[data-placement^="bottom"]::before { top: -4px; left: 50%; margin-left: -4px; }
|
|
24
|
+
&[data-placement^="top"]::before { bottom: -4px; left: 50%; margin-left: -4px; }
|
|
25
|
+
&[data-placement^="left"]::before { right: -4px; top: 50%; margin-top: -4px; }
|
|
26
|
+
&[data-placement^="right"]::before { left: -4px; top: 50%; margin-top: -4px; }
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import './Tooltip.css';/* empty css */
|
|
3
|
+
import e from "clsx";
|
|
4
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
5
|
+
import { useEffect as r, useState as i } from "react";
|
|
6
|
+
import { autoUpdate as a, flip as o, offset as s, shift as c, useFloating as l } from "@floating-ui/react-dom";
|
|
7
|
+
//#region src/components/Tooltip/Tooltip.tsx
|
|
8
|
+
var u = (u) => {
|
|
9
|
+
let { showContent: d = "hover" } = u, [f, p] = i(null), [m, h] = i(null), { floatingStyles: g, placement: _ } = l({
|
|
10
|
+
placement: u.placement ?? "bottom-start",
|
|
11
|
+
strategy: u.strategy ?? "absolute",
|
|
12
|
+
whileElementsMounted: a,
|
|
13
|
+
middleware: [
|
|
14
|
+
s(12),
|
|
15
|
+
o(),
|
|
16
|
+
c()
|
|
17
|
+
],
|
|
18
|
+
elements: {
|
|
19
|
+
reference: f,
|
|
20
|
+
floating: m
|
|
21
|
+
}
|
|
22
|
+
}), [v, y] = i(!1);
|
|
23
|
+
return r(() => {
|
|
24
|
+
if (!v || d !== "click") return;
|
|
25
|
+
let e = (e) => {
|
|
26
|
+
f?.contains(e.target) || m?.contains(e.target) || y(!1);
|
|
27
|
+
};
|
|
28
|
+
return document.addEventListener("pointerdown", e), () => {
|
|
29
|
+
document.removeEventListener("pointerdown", e);
|
|
30
|
+
};
|
|
31
|
+
}, [
|
|
32
|
+
v,
|
|
33
|
+
d,
|
|
34
|
+
f,
|
|
35
|
+
m
|
|
36
|
+
]), /* @__PURE__ */ n("div", {
|
|
37
|
+
className: e("tooltip"),
|
|
38
|
+
children: [/* @__PURE__ */ t("div", {
|
|
39
|
+
className: e("tooltip__anchor"),
|
|
40
|
+
ref: p,
|
|
41
|
+
onMouseEnter: () => {
|
|
42
|
+
d === "hover" && y(!0);
|
|
43
|
+
},
|
|
44
|
+
onMouseLeave: () => {
|
|
45
|
+
d === "hover" && y(!1);
|
|
46
|
+
},
|
|
47
|
+
onClick: () => {
|
|
48
|
+
d === "click" && y((e) => !e);
|
|
49
|
+
},
|
|
50
|
+
style: u.anchorStyles,
|
|
51
|
+
children: u.anchor
|
|
52
|
+
}), v && /* @__PURE__ */ t("div", {
|
|
53
|
+
className: e("tooltip__floating"),
|
|
54
|
+
ref: h,
|
|
55
|
+
"data-placement": _,
|
|
56
|
+
style: {
|
|
57
|
+
...g,
|
|
58
|
+
...u.contentStyles
|
|
59
|
+
},
|
|
60
|
+
children: u.content
|
|
61
|
+
})]
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
//#endregion
|
|
65
|
+
export { u as Tooltip };
|
|
@@ -1,7 +1,23 @@
|
|
|
1
|
-
export { Button } from './Button';
|
|
2
|
-
export { Input } from './Input';
|
|
3
|
-
export { InputPassword } from './InputPassword';
|
|
4
|
-
export { Loader } from './Loader';
|
|
5
|
-
export { RadioButton } from './RadioButton';
|
|
6
|
-
export { Checkbox } from './Checkbox';
|
|
7
|
-
export {
|
|
1
|
+
export { Button } from './Button/Button';
|
|
2
|
+
export { Input } from './Input/Input';
|
|
3
|
+
export { InputPassword } from './InputPassword/InputPassword';
|
|
4
|
+
export { Loader } from './Loader/Loader';
|
|
5
|
+
export { RadioButton } from './RadioButton/RadioButton';
|
|
6
|
+
export { Checkbox } from './Checkbox/Checkbox';
|
|
7
|
+
export { Textarea } from './Textarea/Textarea';
|
|
8
|
+
export { Text } from './Text/Text';
|
|
9
|
+
export { Modal } from './Modal/Modal';
|
|
10
|
+
export { Select } from './Select/Select';
|
|
11
|
+
export { DatePicker } from './DatePicker/DatePicker';
|
|
12
|
+
export { DateRangePicker } from './DateRangePicker/DateRangePicker';
|
|
13
|
+
export { InputPhone } from './InputPhone/InputPhone';
|
|
14
|
+
export { InputNumber } from './InputNumber/InputNumber';
|
|
15
|
+
export { Toggle } from './Toggle/Toggle';
|
|
16
|
+
export { Pagination } from './Pagination/Pagination';
|
|
17
|
+
export { Carousel } from './Carousel/Carousel';
|
|
18
|
+
export { TimePicker } from './TimePicker/TimePicker';
|
|
19
|
+
export { DateTimePicker } from './DateTimePicker/DateTimePicker';
|
|
20
|
+
export { Tooltip } from './Tooltip/Tooltip';
|
|
21
|
+
export { Notice } from './Notice/Notice';
|
|
22
|
+
export { SortableList } from './SortableList/SortableList';
|
|
23
|
+
export * from './Icons';
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Meta } from "@storybook/addon-docs/blocks";
|
|
2
|
+
import stamPhoto from "../assets/Stam.jpg";
|
|
3
|
+
|
|
4
|
+
<Meta title="About Stamcat" />
|
|
5
|
+
|
|
6
|
+
# About Stamcat
|
|
7
|
+
|
|
8
|
+
This repository's namespace - Stamcat - is named after my cat, Stam.
|
|
9
|
+
|
|
10
|
+
When I chose this name, I wanted something that wasn't simply *my name*, <br />
|
|
11
|
+
and I didn't want a name that implied that I'm some kind of elite developer.<br />
|
|
12
|
+
I wanted something simple to celebrate all that is good, to have fun, and to enjoy what I do.
|
|
13
|
+
|
|
14
|
+
Stam was the greatest thing that ever happened to me. She was the embodiment of love,
|
|
15
|
+
the vet-certified cutest kitty in the world, and she forever changed my life for the better.
|
|
16
|
+
|
|
17
|
+
Though we had to say goodbye on September 9, 2025, she will always be with me in the morning sunlight,
|
|
18
|
+
the sound of running water, and in the birds and squirrels outside her favorite window.
|
|
19
|
+
<img src={stamPhoto} alt="Stam" />
|
|
20
|
+
<blockquote>Lay down, black gives way to blue. <br /> Lay down, I'll remember you <br />- <em>J. Cantrell</em></blockquote>
|
|
21
|
+
|