@stamcat/craftsman 0.0.31-beta.4 → 0.0.32
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 +1 -0
- package/Components.esm.js +78 -76
- package/package.json +5 -1
- package/skills/craftsman-component-usage/SKILL.md +2 -0
- package/skills/craftsman-style-utilities/SKILL.md +52 -0
- package/src/components/Accordion/AGENTS.md +45 -0
- package/src/components/Accordion/Accordion.css +1 -0
- package/src/components/Accordion/Accordion.d.ts +14 -0
- package/src/components/Accordion/Accordion.esm.js +70 -0
- package/src/components/Accordion/Accordion.scss +64 -0
- package/src/components/Carousel/{Carousel2.esm.js → Carousel.esm.js} +23 -23
- package/src/components/Checkbox/Checkbox.esm.js +1 -1
- package/src/components/DatePicker/DatePicker.css +1 -1
- package/src/components/DatePicker/DatePicker.esm.js +29 -0
- package/src/components/DateRangePicker/DateRangePicker.css +1 -1
- package/src/components/DateRangePicker/{DateRangePicker2.esm.js → DateRangePicker.esm.js} +12 -12
- package/src/components/DateTimePicker/DateTimePicker.css +1 -1
- package/src/components/DateTimePicker/{DateTimePicker2.esm.js → DateTimePicker.esm.js} +16 -16
- package/src/components/Input/Input.css +1 -1
- package/src/components/Input/{Input2.esm.js → Input.esm.js} +10 -10
- package/src/components/Input/Input.scss +7 -0
- package/src/components/Input/InputWrapper.esm.js +1 -1
- package/src/components/InputNumber/{InputNumber2.esm.js → InputNumber.esm.js} +12 -12
- package/src/components/InputPassword/InputPassword.esm.js +10 -10
- package/src/components/InputPhone/{InputPhone2.esm.js → InputPhone.esm.js} +8 -8
- package/src/components/Loader/Loader.esm.js +1 -1
- package/src/components/Modal/{Modal2.esm.js → Modal.esm.js} +16 -16
- package/src/components/Notice/{Notice2.esm.js → Notice.esm.js} +2 -2
- package/src/components/Pagination/{Pagination2.esm.js → Pagination.esm.js} +2 -2
- package/src/components/RadioButton/RadioButton.esm.js +1 -1
- package/src/components/Select/Select.esm.js +18 -17
- package/src/components/SortableList/ListItem.esm.js +8 -8
- package/src/components/SortableList/{SortableList2.esm.js → SortableList.esm.js} +9 -9
- package/src/components/Text/AGENTS.md +4 -2
- package/src/components/Text/{Text2.esm.js → Text.esm.js} +1 -1
- package/src/components/Textarea/Textarea.esm.js +5 -5
- package/src/components/TimePicker/TimePicker.css +1 -1
- package/src/components/TimePicker/{TimePicker2.esm.js → TimePicker.esm.js} +16 -16
- package/src/components/TimePicker/TimePickerDisplay.esm.js +1 -1
- package/src/components/TimePicker/TimePickerWheel.esm.js +15 -15
- package/src/components/Toggle/{Toggle2.esm.js → Toggle.esm.js} +2 -2
- package/src/components/Tooltip/{Tooltip2.esm.js → Tooltip.esm.js} +13 -13
- package/src/components/index.d.ts +1 -0
- package/src/styles/global/components/_input.scss +8 -9
- package/src/styles/global/components/_select.scss +11 -16
- package/src/utilities/types.d.ts +14 -14
- package/src/components/DatePicker/DatePicker2.esm.js +0 -29
- /package/src/components/Loader/{loaders.module.esm.js → loaders.module.style.esm.js} +0 -0
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { InputWrapper as e } from "../Input/InputWrapper.esm.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useId as t } from "react";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/Textarea/Textarea.tsx
|
|
6
6
|
var r = ({ labelPosition: r = "top", id: i, label: a, error: o, required: s, className: c, style: l, ...u }) => {
|
|
7
|
-
let d =
|
|
8
|
-
return /* @__PURE__ */
|
|
7
|
+
let d = t();
|
|
8
|
+
return /* @__PURE__ */ n(e, {
|
|
9
9
|
label: a,
|
|
10
10
|
className: c,
|
|
11
11
|
labelPosition: r,
|
|
12
12
|
error: o,
|
|
13
13
|
required: s,
|
|
14
14
|
style: l,
|
|
15
|
-
children: /* @__PURE__ */
|
|
15
|
+
children: /* @__PURE__ */ n("textarea", {
|
|
16
16
|
id: i || d,
|
|
17
17
|
className: "input",
|
|
18
18
|
...u
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer craftsman-base{.react-time-picker__wrapper
|
|
1
|
+
@layer craftsman-base{.react-time-picker__wrapper{color:var(--text);border:1px solid var(--gray400);padding:calc(var(--w-gutter) * .5);background-color:var(--white);border-radius:6px}.react-time-picker__wrapper:focus{box-shadow:none;outline:0}.react-time-picker__wrapper:hover{border-color:var(--gray500)}[type=number].react-time-picker__wrapper::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}[type=number].react-time-picker__wrapper::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}[type=number].react-time-picker__wrapper{appearance:textfield}.react-time-picker__wrapper:disabled,.disabled.react-time-picker__wrapper{border-color:var(--gray400);background-color:var(--gray100)}}.react-time-picker,.react-time-picker *,.react-time-picker :before,.react-time-picker :after{box-sizing:border-box}@layer craftsman-component{.react-time-picker{display:inline-flex;position:relative}.react-time-picker--disabled{color:#6d6d6d;background-color:#f0f0f0}.react-time-picker__wrapper{flex-grow:1;flex-shrink:0;padding:6px 8px;display:flex}.react-time-picker__inputGroup{box-sizing:content-box;flex-grow:1;padding:0 2px}.react-time-picker__inputGroup__divider{white-space:pre;padding:1px 0}.react-time-picker__inputGroup__divider,.react-time-picker__inputGroup__leadingZero{font:inherit;display:inline-block}.react-time-picker__inputGroup__input{text-align:center;color:currentColor;min-width:calc(2ch + 1px);height:calc(100% - 2px);font:inherit;box-sizing:content-box;appearance:textfield;background:0 0;border:0;padding:1px;position:relative}[name=year].react-time-picker__inputGroup__input{min-width:calc(4ch + 2px)}.react-time-picker__inputGroup__input:disabled{background-color:unset}.react-time-picker__inputGroup__input::-webkit-outer-spin-button{appearance:none;margin:0}.react-time-picker__inputGroup__input::-webkit-inner-spin-button{appearance:none;margin:0}.react-time-picker__inputGroup__input--hasLeadingZero{margin-left:-.54em;padding-left:calc(1px + .54em)}.react-time-picker__button{border:0;padding:4px 4px 4px 7px}.react-time-picker__button:hover{background:0 0}.react-time-picker__wrapper{padding:6px 24px 6px 8px}.react-time-picker__inputGroup__input:invalid{background:#ff00001a}.react-time-picker__inputGroup__amPm{font:inherit;appearance:menulist}.react-time-picker__button:enabled{cursor:pointer}.react-time-picker__button:enabled:hover .react-time-picker__button__icon,.react-time-picker__button:enabled:focus .react-time-picker__button__icon{stroke:#0078d7}.react-time-picker__button:disabled .react-time-picker__button__icon{stroke:#6d6d6d}.react-time-picker__button svg{display:inherit}.react-time-picker__clock{z-index:1;background-color:#fff;border:thin solid #a0a096;width:200px;max-width:100vw;height:200px;padding:25px}.react-time-picker__clock--closed,.timePicker .react-time-picker__clock{display:none}.timePicker .timePicker__field{position:relative}.timePicker .timePicker__field .input-view-toggle{padding:4px;line-height:1;position:absolute;top:50%;right:4px;transform:translateY(-50%)}.timePicker__display{background-color:var(--white);border:1px solid var(--gray400);z-index:1;border-radius:8px;height:160px;display:inline-flex;position:relative}.timePicker__display:before,.timePicker__display:after{content:"";z-index:1;pointer-events:none;height:calc(50% - 16px);display:block;position:absolute;left:0;right:0}.timePicker__display:before{border-bottom:.5px solid rgba(var(--text-high-contrast-rgb-value), .3);background:linear-gradient(to top, rgba(var(--background-site-rgb-value), .65) 0%, rgba(var(--background-site-rgb-value), 1) 100%);top:-.5px}.timePicker__display:after{border-top:.5px solid rgba(var(--text-high-contrast-rgb-value), .3);background:linear-gradient(to bottom, rgba(var(--background-site-rgb-value), .65) 0%, rgba(var(--background-site-rgb-value), 1) 100%);bottom:-.5px}.timePicker__display .ios-picker{flex-direction:row;align-items:center;gap:6px;height:100%;padding:0 12px;font-size:16px;line-height:1;display:flex}.timePicker__display .ios-picker--disabled{pointer-events:none;opacity:.5}.timePicker__display .ios-picker__scene{touch-action:pan-x;align-items:center;min-width:30px;height:100%;display:flex;overflow:hidden}.timePicker__display .ios-picker__viewport{perspective:1000px;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-khtml-user-select:none;-webkit-tap-highlight-color:transparent;width:100%;height:32px}.timePicker__display .ios-picker__viewport--perspective-left{perspective-origin:calc(50% + 130px);transform:translate(27px)}.timePicker__display .ios-picker__viewport--perspective-right{perspective-origin:calc(50% - 130px);transform:translate(-27px)}.timePicker__display .ios-picker__viewport--perspective-center{perspective-origin:50%}.timePicker__display .ios-picker__container{width:100%;height:100%;transform-style:preserve-3d;will-change:transform}.timePicker__display .ios-picker__slide{text-align:center;backface-visibility:hidden;opacity:0;justify-content:center;align-items:center;width:100%;height:100%;display:flex}.timePicker__display .ios-picker__label{white-space:nowrap;pointer-events:none;font-weight:700}}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Button as e } from "../Button/Button.esm.js";
|
|
3
3
|
import { InputWrapper as t } from "../Input/InputWrapper.esm.js";
|
|
4
|
-
import './TimePicker.css';/* empty css
|
|
4
|
+
import './TimePicker.css';/* empty css */
|
|
5
5
|
import { resolveLocale as n } from "./utilities.esm.js";
|
|
6
6
|
import { TimePickerDisplay as r } from "./TimePickerDisplay.esm.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
7
|
+
import { useEffect as i, useState as a } from "react";
|
|
8
|
+
import { FaClock as o, FaRegClock as s, FaX as c } from "react-icons/fa6";
|
|
9
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
10
10
|
import { autoUpdate as d, flip as f, offset as p, shift as m, useFloating as h } from "@floating-ui/react-dom";
|
|
11
11
|
import { TimePicker as g } from "react-time-picker";
|
|
12
12
|
import { isMobile as _ } from "react-device-detect";
|
|
13
13
|
//#region src/components/TimePicker/TimePicker.tsx
|
|
14
14
|
var v = (v) => {
|
|
15
|
-
let { labels: y, locale: b, format: x, value: S, onChange: C, label: w, labelPosition: T, error: E, required: D, name: O, ...k } = v, [A, j] =
|
|
15
|
+
let { labels: y, locale: b, format: x, value: S, onChange: C, label: w, labelPosition: T, error: E, required: D, name: O, ...k } = v, [A, j] = a(null), [M, N] = a(null), { floatingStyles: P } = h({
|
|
16
16
|
placement: "bottom-start",
|
|
17
17
|
strategy: "absolute",
|
|
18
18
|
whileElementsMounted: d,
|
|
@@ -25,8 +25,8 @@ var v = (v) => {
|
|
|
25
25
|
reference: A,
|
|
26
26
|
floating: M
|
|
27
27
|
}
|
|
28
|
-
}), [F, I] =
|
|
29
|
-
return
|
|
28
|
+
}), [F, I] = a(!1), L = n(b);
|
|
29
|
+
return i(() => {
|
|
30
30
|
if (!F) return;
|
|
31
31
|
let e = (e) => {
|
|
32
32
|
A?.contains(e.target) || M?.contains(e.target) || I(!1);
|
|
@@ -38,7 +38,7 @@ var v = (v) => {
|
|
|
38
38
|
F,
|
|
39
39
|
A,
|
|
40
40
|
M
|
|
41
|
-
]), /* @__PURE__ */
|
|
41
|
+
]), /* @__PURE__ */ u("div", {
|
|
42
42
|
className: "timePicker",
|
|
43
43
|
ref: j,
|
|
44
44
|
onFocus: (e) => {
|
|
@@ -48,28 +48,28 @@ var v = (v) => {
|
|
|
48
48
|
e.key === "Enter" && I(!1);
|
|
49
49
|
},
|
|
50
50
|
children: [
|
|
51
|
-
O && /* @__PURE__ */
|
|
51
|
+
O && /* @__PURE__ */ l("input", {
|
|
52
52
|
type: "hidden",
|
|
53
53
|
name: O,
|
|
54
54
|
value: typeof S == "string" ? S : "",
|
|
55
55
|
readOnly: !0
|
|
56
56
|
}),
|
|
57
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ l(t, {
|
|
58
58
|
label: w,
|
|
59
59
|
labelPosition: T,
|
|
60
60
|
error: E,
|
|
61
61
|
required: D,
|
|
62
|
-
children: /* @__PURE__ */
|
|
62
|
+
children: /* @__PURE__ */ u("div", {
|
|
63
63
|
className: "timePicker__field",
|
|
64
|
-
children: [/* @__PURE__ */
|
|
64
|
+
children: [/* @__PURE__ */ l(g, {
|
|
65
65
|
...k,
|
|
66
66
|
value: S,
|
|
67
67
|
onChange: C,
|
|
68
68
|
locale: L,
|
|
69
69
|
required: D,
|
|
70
70
|
disableClock: !0,
|
|
71
|
-
clearIcon: /* @__PURE__ */
|
|
72
|
-
}), !_ && /* @__PURE__ */
|
|
71
|
+
clearIcon: /* @__PURE__ */ l(c, { size: 14 })
|
|
72
|
+
}), !_ && /* @__PURE__ */ l(e, {
|
|
73
73
|
type: "button",
|
|
74
74
|
variant: "text",
|
|
75
75
|
onClick: () => I((e) => !e),
|
|
@@ -77,11 +77,11 @@ var v = (v) => {
|
|
|
77
77
|
"aria-pressed": F,
|
|
78
78
|
disabled: v.disabled,
|
|
79
79
|
className: "input-view-toggle",
|
|
80
|
-
children:
|
|
80
|
+
children: l(F ? o : s, { size: 16 })
|
|
81
81
|
})]
|
|
82
82
|
})
|
|
83
83
|
}),
|
|
84
|
-
!_ && /* @__PURE__ */
|
|
84
|
+
!_ && /* @__PURE__ */ l(r, {
|
|
85
85
|
value: S,
|
|
86
86
|
onChange: (e) => C?.(e),
|
|
87
87
|
locale: L,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { getAmPmLabels as e, getUnitLabel as t, is24HourFormat as n, isEmpty as r } from "../../utilities/validations.esm.js";
|
|
2
2
|
import { padTime as i, parseTimeString as a, resolveLocale as o, resolveTimeFormat as s, to24Hour as c } from "./utilities.esm.js";
|
|
3
3
|
import { IosPickerItem as l } from "./TimePickerWheel.esm.js";
|
|
4
|
-
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
5
4
|
import "react";
|
|
5
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/TimePicker/TimePickerDisplay.tsx
|
|
7
7
|
var f = (e, t) => e ? t : void 0, p = (p) => {
|
|
8
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;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "./constants.esm.js";
|
|
3
3
|
import { inactivateEmblaTransform as e, setContainerStyles as t, setSlideStyles as n, snapOnPointerUp as r } from "./utilities.esm.js";
|
|
4
|
-
import i from "
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
4
|
+
import { useCallback as i, useEffect as a, useLayoutEffect as o, useRef as s } from "react";
|
|
5
|
+
import c from "clsx";
|
|
6
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
7
7
|
import d from "embla-carousel-react";
|
|
8
8
|
//#region src/components/TimePicker/TimePickerWheel.tsx
|
|
9
9
|
var f = (f) => {
|
|
@@ -12,11 +12,11 @@ var f = (f) => {
|
|
|
12
12
|
axis: "y",
|
|
13
13
|
dragFree: !0,
|
|
14
14
|
containScroll: !1
|
|
15
|
-
}), w =
|
|
16
|
-
|
|
15
|
+
}), w = s(null), T = s(b);
|
|
16
|
+
o(() => {
|
|
17
17
|
T.current = b;
|
|
18
18
|
});
|
|
19
|
-
let E = p * 20, D = g ? 0 : 20, O =
|
|
19
|
+
let E = p * 20, D = g ? 0 : 20, O = i((e) => {
|
|
20
20
|
t(e, (p * 20 - D) * e.scrollProgress()), e.slideNodes().forEach((t, r) => {
|
|
21
21
|
n(e, r, g, p, E);
|
|
22
22
|
});
|
|
@@ -26,32 +26,32 @@ var f = (f) => {
|
|
|
26
26
|
D,
|
|
27
27
|
E
|
|
28
28
|
]);
|
|
29
|
-
return
|
|
29
|
+
return a(() => {
|
|
30
30
|
if (!C) return () => {};
|
|
31
31
|
let t = (e) => T.current?.(e.selectedScrollSnap());
|
|
32
32
|
return C.on("pointerUp", r), C.on("scroll", O), C.on("reInit", e), C.on("reInit", O), C.on("select", t), e(C), O(C), () => {
|
|
33
33
|
C.off("pointerUp", r), C.off("scroll", O), C.off("reInit", e), C.off("reInit", O), C.off("select", t);
|
|
34
34
|
};
|
|
35
|
-
}, [C, O]),
|
|
35
|
+
}, [C, O]), a(() => {
|
|
36
36
|
!C || y === void 0 || C.selectedScrollSnap() !== y && C.scrollTo(y);
|
|
37
|
-
}, [C, y]), /* @__PURE__ */
|
|
38
|
-
className:
|
|
37
|
+
}, [C, y]), /* @__PURE__ */ u("div", {
|
|
38
|
+
className: c("ios-picker", { "ios-picker--disabled": x }),
|
|
39
39
|
"aria-disabled": x,
|
|
40
|
-
children: [/* @__PURE__ */
|
|
40
|
+
children: [/* @__PURE__ */ l("div", {
|
|
41
41
|
className: "ios-picker__scene",
|
|
42
42
|
ref: w,
|
|
43
|
-
children: /* @__PURE__ */
|
|
43
|
+
children: /* @__PURE__ */ l("div", {
|
|
44
44
|
className: `ios-picker__viewport ios-picker__viewport--perspective-${m}`,
|
|
45
45
|
ref: S,
|
|
46
|
-
children: /* @__PURE__ */
|
|
46
|
+
children: /* @__PURE__ */ l("div", {
|
|
47
47
|
className: "ios-picker__container",
|
|
48
|
-
children: Array.from({ length: p }, (e, t) => /* @__PURE__ */
|
|
48
|
+
children: Array.from({ length: p }, (e, t) => /* @__PURE__ */ l("div", {
|
|
49
49
|
className: "ios-picker__slide",
|
|
50
50
|
children: v ? v[t] : t + _
|
|
51
51
|
}, t))
|
|
52
52
|
})
|
|
53
53
|
})
|
|
54
|
-
}), /* @__PURE__ */
|
|
54
|
+
}), /* @__PURE__ */ l("div", {
|
|
55
55
|
className: "ios-picker__label",
|
|
56
56
|
children: h
|
|
57
57
|
})]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Input as e } from "../Input/
|
|
3
|
-
import './Toggle.css';/* empty css
|
|
2
|
+
import { Input as e } from "../Input/Input.esm.js";
|
|
3
|
+
import './Toggle.css';/* empty css */
|
|
4
4
|
import t from "clsx";
|
|
5
5
|
import { jsx as n } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/Toggle/Toggle.tsx
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import './Tooltip.css';/* empty css
|
|
3
|
-
import e from "
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
2
|
+
import './Tooltip.css';/* empty css */
|
|
3
|
+
import { useEffect as e, useState as t } from "react";
|
|
4
|
+
import n from "clsx";
|
|
5
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
6
6
|
import { autoUpdate as a, flip as o, offset as s, shift as c, useFloating as l } from "@floating-ui/react-dom";
|
|
7
7
|
//#region src/components/Tooltip/Tooltip.tsx
|
|
8
8
|
var u = (u) => {
|
|
9
|
-
let { showContent: d = "hover" } = u, [f, p] =
|
|
9
|
+
let { showContent: d = "hover" } = u, [f, p] = t(null), [m, h] = t(null), { floatingStyles: g, placement: _ } = l({
|
|
10
10
|
placement: u.placement ?? "bottom-start",
|
|
11
11
|
strategy: u.strategy ?? "absolute",
|
|
12
12
|
whileElementsMounted: a,
|
|
@@ -19,8 +19,8 @@ var u = (u) => {
|
|
|
19
19
|
reference: f,
|
|
20
20
|
floating: m
|
|
21
21
|
}
|
|
22
|
-
}), [v, y] =
|
|
23
|
-
return
|
|
22
|
+
}), [v, y] = t(!1);
|
|
23
|
+
return e(() => {
|
|
24
24
|
if (!v || d !== "click") return;
|
|
25
25
|
let e = (e) => {
|
|
26
26
|
f?.contains(e.target) || m?.contains(e.target) || y(!1);
|
|
@@ -33,10 +33,10 @@ var u = (u) => {
|
|
|
33
33
|
d,
|
|
34
34
|
f,
|
|
35
35
|
m
|
|
36
|
-
]), /* @__PURE__ */
|
|
37
|
-
className:
|
|
38
|
-
children: [/* @__PURE__ */
|
|
39
|
-
className:
|
|
36
|
+
]), /* @__PURE__ */ i("div", {
|
|
37
|
+
className: n("tooltip"),
|
|
38
|
+
children: [/* @__PURE__ */ r("div", {
|
|
39
|
+
className: n("tooltip__anchor"),
|
|
40
40
|
ref: p,
|
|
41
41
|
onMouseEnter: () => {
|
|
42
42
|
d === "hover" && y(!0);
|
|
@@ -49,8 +49,8 @@ var u = (u) => {
|
|
|
49
49
|
},
|
|
50
50
|
style: u.anchorStyles,
|
|
51
51
|
children: u.anchor
|
|
52
|
-
}), v && /* @__PURE__ */
|
|
53
|
-
className:
|
|
52
|
+
}), v && /* @__PURE__ */ r("div", {
|
|
53
|
+
className: n("tooltip__floating"),
|
|
54
54
|
ref: h,
|
|
55
55
|
"data-placement": _,
|
|
56
56
|
style: {
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
@layer craftsman-base {
|
|
4
4
|
|
|
5
|
-
%interactive-focus-reset {
|
|
6
|
-
&:focus {
|
|
7
|
-
outline: 0;
|
|
8
|
-
box-shadow: none;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
5
|
%input-base {
|
|
13
6
|
color: var(--text);
|
|
14
7
|
border-radius: 6px;
|
|
15
8
|
border: 1px solid var(--gray400);
|
|
16
9
|
padding: #{u.width("gutter", 0.5)};
|
|
17
10
|
background-color: var(--white);
|
|
11
|
+
&:focus {
|
|
12
|
+
outline: 0;
|
|
13
|
+
box-shadow: none;
|
|
14
|
+
}
|
|
15
|
+
&:hover {
|
|
16
|
+
border-color: #{u.color("gray500")};
|
|
17
|
+
}
|
|
18
18
|
|
|
19
19
|
&[type="number"]::-webkit-outer-spin-button,
|
|
20
20
|
&[type="number"]::-webkit-inner-spin-button {
|
|
@@ -29,10 +29,9 @@
|
|
|
29
29
|
|
|
30
30
|
&:disabled,
|
|
31
31
|
&.disabled {
|
|
32
|
-
border-color: var(--
|
|
32
|
+
border-color: var(--gray400);
|
|
33
33
|
background-color: var(--gray100);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
@extend %interactive-focus-reset;
|
|
37
36
|
}
|
|
38
37
|
}
|
|
@@ -1,21 +1,16 @@
|
|
|
1
1
|
@use "../../utilities/functions" as u;
|
|
2
|
+
@use "./input";
|
|
3
|
+
|
|
2
4
|
@layer craftsman-base {
|
|
3
5
|
select,
|
|
4
6
|
::picker(select) {
|
|
5
7
|
appearance: base-select;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
border: 1px solid #{u.color("gray200")};
|
|
9
|
-
border-radius: 6px;
|
|
8
|
+
@extend %input-base;
|
|
9
|
+
|
|
10
10
|
}
|
|
11
11
|
select {
|
|
12
|
-
padding:
|
|
12
|
+
padding-right: 40px;
|
|
13
13
|
position: relative;
|
|
14
|
-
&:hover,
|
|
15
|
-
&:focus {
|
|
16
|
-
outline: none;
|
|
17
|
-
border-color: #{u.color("gray200")};
|
|
18
|
-
}
|
|
19
14
|
&:focus-visible {
|
|
20
15
|
outline: none;
|
|
21
16
|
}
|
|
@@ -28,25 +23,25 @@
|
|
|
28
23
|
transition: 0.2s rotate;
|
|
29
24
|
content: "";
|
|
30
25
|
display: inline-block;
|
|
31
|
-
width:
|
|
32
|
-
height:
|
|
26
|
+
width: 7px;
|
|
27
|
+
height: 7px;
|
|
33
28
|
border-style: solid;
|
|
34
29
|
border-width: 0 2px 2px 0;
|
|
35
30
|
transform: rotate(45deg);
|
|
36
31
|
margin: 0px 2px 0 12px;
|
|
37
32
|
position: absolute;
|
|
38
|
-
right:
|
|
39
|
-
top:
|
|
33
|
+
right: 14px;
|
|
34
|
+
top: 14px;
|
|
40
35
|
}
|
|
41
36
|
&:open::picker-icon {
|
|
42
|
-
margin-top:
|
|
37
|
+
margin-top: 4px;
|
|
43
38
|
rotate: 180deg;
|
|
44
39
|
}
|
|
45
40
|
option {
|
|
46
41
|
padding: #{u.width("gutter", 0.5)};
|
|
47
42
|
&:hover,
|
|
48
43
|
&:focus {
|
|
49
|
-
background: #{u.color("
|
|
44
|
+
background: #{u.color("gray300")};
|
|
50
45
|
}
|
|
51
46
|
&::checkmark {
|
|
52
47
|
content: "";
|
package/src/utilities/types.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export declare const BreakpointSchema: z.ZodEnum<{
|
|
|
26
26
|
desktopOnly: "desktopOnly";
|
|
27
27
|
}>;
|
|
28
28
|
export declare const LayoutWidthsSchema: z.ZodEnum<{
|
|
29
|
+
text: "text";
|
|
29
30
|
gutter: "gutter";
|
|
30
31
|
column: "column";
|
|
31
32
|
tablet: "tablet";
|
|
@@ -34,7 +35,6 @@ export declare const LayoutWidthsSchema: z.ZodEnum<{
|
|
|
34
35
|
mobileMax: "mobileMax";
|
|
35
36
|
tabletMax: "tabletMax";
|
|
36
37
|
desktopMax: "desktopMax";
|
|
37
|
-
text: "text";
|
|
38
38
|
}>;
|
|
39
39
|
export type BaseWidth = z.infer<typeof BaseWidthSchema>;
|
|
40
40
|
export type ScreenWidth = z.infer<typeof ScreenWidthSchema>;
|
|
@@ -54,23 +54,23 @@ export declare const zTextInputType: z.ZodEnum<{
|
|
|
54
54
|
number: "number";
|
|
55
55
|
search: "search";
|
|
56
56
|
month: "month";
|
|
57
|
+
time: "time";
|
|
58
|
+
image: "image";
|
|
57
59
|
text: "text";
|
|
60
|
+
hidden: "hidden";
|
|
61
|
+
color: "color";
|
|
58
62
|
checkbox: "checkbox";
|
|
59
63
|
radio: "radio";
|
|
60
|
-
|
|
64
|
+
tel: "tel";
|
|
65
|
+
url: "url";
|
|
66
|
+
email: "email";
|
|
61
67
|
date: "date";
|
|
68
|
+
submit: "submit";
|
|
69
|
+
reset: "reset";
|
|
62
70
|
"datetime-local": "datetime-local";
|
|
63
|
-
email: "email";
|
|
64
71
|
file: "file";
|
|
65
|
-
hidden: "hidden";
|
|
66
|
-
image: "image";
|
|
67
72
|
password: "password";
|
|
68
73
|
range: "range";
|
|
69
|
-
reset: "reset";
|
|
70
|
-
submit: "submit";
|
|
71
|
-
tel: "tel";
|
|
72
|
-
time: "time";
|
|
73
|
-
url: "url";
|
|
74
74
|
week: "week";
|
|
75
75
|
}>;
|
|
76
76
|
export type TextInputType = z.infer<typeof zTextInputType>;
|
|
@@ -102,6 +102,7 @@ export declare const ButtonType: z.ZodEnum<{
|
|
|
102
102
|
}>;
|
|
103
103
|
export type ButtonType = z.infer<typeof ButtonType>;
|
|
104
104
|
export declare const TextTags: z.ZodEnum<{
|
|
105
|
+
div: "div";
|
|
105
106
|
h1: "h1";
|
|
106
107
|
h2: "h2";
|
|
107
108
|
h3: "h3";
|
|
@@ -109,14 +110,13 @@ export declare const TextTags: z.ZodEnum<{
|
|
|
109
110
|
h5: "h5";
|
|
110
111
|
p: "p";
|
|
111
112
|
span: "span";
|
|
112
|
-
div: "div";
|
|
113
113
|
}>;
|
|
114
114
|
export type TextTags = z.infer<typeof TextTags>;
|
|
115
115
|
export declare const TextType: z.ZodEnum<{
|
|
116
|
-
|
|
116
|
+
caption: "caption";
|
|
117
117
|
heading: "heading";
|
|
118
|
+
display: "display";
|
|
118
119
|
paragraph: "paragraph";
|
|
119
|
-
caption: "caption";
|
|
120
120
|
"small-title": "small-title";
|
|
121
121
|
}>;
|
|
122
122
|
export type TextType = z.infer<typeof TextType>;
|
|
@@ -134,10 +134,10 @@ export declare const CarouselPageType: z.ZodEnum<{
|
|
|
134
134
|
}>;
|
|
135
135
|
export type CarouselPageType = z.infer<typeof CarouselPageType>;
|
|
136
136
|
export declare const NoticeType: z.ZodEnum<{
|
|
137
|
+
none: "none";
|
|
137
138
|
help: "help";
|
|
138
139
|
info: "info";
|
|
139
140
|
success: "success";
|
|
140
141
|
error: "error";
|
|
141
|
-
none: "none";
|
|
142
142
|
}>;
|
|
143
143
|
export type NoticeType = z.infer<typeof NoticeType>;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { InputWrapper as e } from "../Input/InputWrapper.esm.js";
|
|
3
|
-
import './ReactCalendar.css';import './DatePicker.css';/* empty css */
|
|
4
|
-
/* empty css */
|
|
5
|
-
import t from "clsx";
|
|
6
|
-
import { jsx as n } from "react/jsx-runtime";
|
|
7
|
-
import { useId as r } from "react";
|
|
8
|
-
import { DatePicker as i } from "react-date-picker";
|
|
9
|
-
import { FaRegCalendar as a, FaX as o } from "react-icons/fa6";
|
|
10
|
-
//#region src/components/DatePicker/DatePicker.tsx
|
|
11
|
-
var s = ({ label: s, id: c, labelPosition: l = "top", required: u = !1, error: d, style: f, className: p, ...m }) => {
|
|
12
|
-
let h = r();
|
|
13
|
-
return /* @__PURE__ */ n(e, {
|
|
14
|
-
id: c || h,
|
|
15
|
-
className: t("datePicker", p),
|
|
16
|
-
label: s,
|
|
17
|
-
labelPosition: l,
|
|
18
|
-
error: d,
|
|
19
|
-
required: u,
|
|
20
|
-
style: f,
|
|
21
|
-
children: /* @__PURE__ */ n(i, {
|
|
22
|
-
calendarIcon: /* @__PURE__ */ n(a, { size: 16 }),
|
|
23
|
-
clearIcon: /* @__PURE__ */ n(o, { size: 14 }),
|
|
24
|
-
...m
|
|
25
|
-
})
|
|
26
|
-
});
|
|
27
|
-
};
|
|
28
|
-
//#endregion
|
|
29
|
-
export { s as DatePicker };
|
|
File without changes
|