@stamcat/craftsman 0.0.27-alpha.15 → 0.0.27-alpha.16
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 +3 -3
- package/Styles.esm.js +5 -5
- package/Utilities.esm.js +2 -2
- package/package.json +1 -1
- package/src/components/Button/Button.d.ts +1 -1
- package/src/components/Button/Button.esm.js +0 -1
- package/src/components/Carousel/Carousel.scss +1 -1
- package/src/components/DatePicker/DatePicker.css +1 -1
- package/src/components/DatePicker/DatePicker.scss +25 -117
- package/src/components/DatePicker/DatePicker2.esm.js +16 -11
- package/src/components/DatePicker/ReactCalendar.css +1 -1
- package/src/components/DatePicker/ReactCalendar.scss +9 -69
- package/src/components/DatePicker/_DateTimePicker.scss +67 -0
- package/src/components/DateTimePicker/DateTimePicker.d.ts +5 -0
- package/src/components/DateTimePicker/DateTimePicker.scss +86 -0
- package/src/components/Input/Input.scss +1 -1
- package/src/components/InputPhone/InputPhone.scss +1 -1
- package/src/components/Modal/Modal.esm.js +4 -4
- package/src/components/Modal/Modal.module.scss +1 -1
- package/src/components/Pagination/Pagination.scss +1 -1
- package/src/components/Text/Text.scss +1 -1
- package/src/components/TimePicker/TimePicker.css +1 -1
- package/src/components/TimePicker/TimePicker.d.ts +1 -1
- package/src/components/TimePicker/TimePicker.scss +102 -27
- package/src/components/TimePicker/TimePicker2.esm.js +60 -96
- package/src/components/TimePicker/TimePickerDisplay.d.ts +12 -18
- package/src/components/TimePicker/TimePickerDisplay.esm.js +54 -0
- package/src/components/Tooltip/Tooltip.scss +1 -1
- package/src/stories/molecules/Carousel.scss +1 -1
- package/src/styles/global/components/_button.scss +11 -11
- package/src/styles/theme/components.esm.js +5 -5
- package/src/styles/utilities/_placeholders.scss +6 -0
- package/src/styles/utilities/layout.esm.js +3 -3
- package/src/utilities/types.d.ts +2 -2
- package/src/utilities/validations.d.ts +2 -0
- package/src/utilities/validations.esm.js +6 -2
package/AGENTS.md
CHANGED
|
@@ -76,7 +76,7 @@ hexToRgba(colors.blue500, 0.5)
|
|
|
76
76
|
**Sass** — import `functions` as `u`:
|
|
77
77
|
|
|
78
78
|
```scss
|
|
79
|
-
@use "@stamcat/craftsman/styles/utilities/
|
|
79
|
+
@use "@stamcat/craftsman/styles/utilities/_functions" as u;
|
|
80
80
|
|
|
81
81
|
.element {
|
|
82
82
|
color: #{u.color(blue500)};
|
|
@@ -103,7 +103,7 @@ width("column", 3) // calc((var(--w-column) * 3) + (var(--w-gutter) * 2))
|
|
|
103
103
|
**Sass** — import `functions` as `u`:
|
|
104
104
|
|
|
105
105
|
```scss
|
|
106
|
-
@use "@stamcat/craftsman/styles/utilities/
|
|
106
|
+
@use "@stamcat/craftsman/styles/utilities/_functions" as u;
|
|
107
107
|
|
|
108
108
|
.card {
|
|
109
109
|
padding: #{u.width(gutter)};
|
|
@@ -135,7 +135,7 @@ media.tablet // => "(min-width: 660px)"
|
|
|
135
135
|
**Sass** — `@include breakpoint(key)` wraps content in the correct `@media` query:
|
|
136
136
|
|
|
137
137
|
```scss
|
|
138
|
-
@use "@stamcat/craftsman/styles/utilities/
|
|
138
|
+
@use "@stamcat/craftsman/styles/utilities/_functions" as u;
|
|
139
139
|
|
|
140
140
|
.sidebar {
|
|
141
141
|
display: none;
|
package/Styles.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { BaseWidthSchema as e, BreakpointSchema as t, ButtonType as n, CarouselPageType as r, LayoutWidthsSchema as i, MaxScreenWidthSchema as a, ScreenWidthSchema as o, TextSize as s, TextTags as c, TextType as l, zLabelPosition as u, zTextInputExclusions as d, zTextInputType as f, zTextInputTypes as p } from "./src/utilities/types.esm.js";
|
|
2
|
+
import { defaultColors as m, defaultWidths as h } from "./src/styles/utilities/constants.esm.js";
|
|
3
|
+
import { breakpoint as g, media as _, width as v, widths as y } from "./src/styles/utilities/layout.esm.js";
|
|
4
|
+
import { color as b, colors as x, hexToRgba as S } from "./src/styles/utilities/color.esm.js";
|
|
5
5
|
import { themeBuilder as C } from "./src/styles/theme/theme.esm.js";
|
|
6
6
|
import { ThemeProvider as w } from "./src/styles/components/ThemeProvider.esm.js";
|
|
7
|
-
export {
|
|
7
|
+
export { e as BaseWidthSchema, t as BreakpointSchema, n as ButtonType, r as CarouselPageType, i as LayoutWidthsSchema, a as MaxScreenWidthSchema, o as ScreenWidthSchema, s as TextSize, c as TextTags, l as TextType, w as ThemeProvider, g as breakpoint, b as color, x as colors, m as defaultColors, h as defaultWidths, S as hexToRgba, _ as media, C as themeBuilder, v as width, y as widths, u as zLabelPosition, d as zTextInputExclusions, f as zTextInputType, p as zTextInputTypes };
|
package/Utilities.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { e as
|
|
1
|
+
import { formatTime as e, getAmPmLabels as t, getUnitLabel as n, is24HourFormat as r, isEmpty as i, isTouchDevice as a, validateEmail as o } from "./src/utilities/validations.esm.js";
|
|
2
|
+
export { e as formatTime, t as getAmPmLabels, n as getUnitLabel, r as is24HourFormat, i as isEmpty, a as isTouchDevice, o as validateEmail };
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { isEmpty as e } from "../../utilities/validations.esm.js";
|
|
3
3
|
import { width as t } from "../../styles/utilities/layout.esm.js";
|
|
4
|
-
import "../../../Styles.esm.js";
|
|
5
4
|
import n from "clsx";
|
|
6
5
|
import { Fragment as r, jsx as i } from "react/jsx-runtime";
|
|
7
6
|
//#region src/components/Button/Button.tsx
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer craftsman-base{.react-date-picker__wrapper:focus
|
|
1
|
+
@layer craftsman-base{.react-date-picker__wrapper:focus{box-shadow:none;outline:0}.react-date-picker__wrapper{color:var(--text);border:1px solid var(--gray400);padding:calc(var(--w-gutter) * .5);background-color:var(--white);border-radius:3px}[type=number].react-date-picker__wrapper::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}[type=number].react-date-picker__wrapper::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}[type=number].react-date-picker__wrapper{appearance:textfield}.react-date-picker__wrapper:disabled,.disabled.react-date-picker__wrapper{border-color:var(--gray200);background-color:var(--gray100)}.react-date-picker{display:inline-flex;position:relative}.react-date-picker--disabled{color:#6d6d6d;background-color:#f0f0f0}.react-date-picker__wrapper{flex-grow:1;flex-shrink:0;padding:6px 8px;display:flex}.react-date-picker__inputGroup{box-sizing:content-box;flex-grow:1;padding:0 2px}.react-date-picker__inputGroup__divider{white-space:pre;padding:1px 0}.react-date-picker__inputGroup__divider,.react-date-picker__inputGroup__leadingZero{font:inherit;display:inline-block}.react-date-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}.react-date-picker__inputGroup__input::-webkit-outer-spin-button{appearance:none;margin:0}.react-date-picker__inputGroup__input::-webkit-inner-spin-button{appearance:none;margin:0}.react-date-picker__inputGroup__input--hasLeadingZero{margin-left:-.54em;padding-left:calc(1px + .54em)}.react-date-picker__button{border:0;padding:4px 4px 4px 7px}.react-date-picker__button:hover{background:0 0}.react-date-picker__calendar{z-index:1;width:350px;max-width:100vw}.react-date-picker__calendar .react-calendar{border-width:thin}.react-date-picker__calendar--closed,.react-date-picker__clock--closed{display:none}.react-date-picker__calendar .react-date-picker__inputGroup__input:invalid{background:unset}}.react-date-picker,.react-date-picker *,.react-date-picker :before,.react-date-picker :after{box-sizing:border-box}
|
|
@@ -1,99 +1,52 @@
|
|
|
1
1
|
@use "../../styles/global/components/input";
|
|
2
|
-
@use "../../styles/utilities/
|
|
2
|
+
@use "../../styles/utilities/_functions" as u;
|
|
3
|
+
@use "../../styles/utilities/_placeholders";
|
|
4
|
+
@use "./_DateTimePicker";
|
|
3
5
|
@layer craftsman-base {
|
|
4
6
|
.react-date-picker,
|
|
5
7
|
.react-date-picker *,
|
|
6
8
|
.react-date-picker *:before,
|
|
7
|
-
.react-date-picker *:after
|
|
8
|
-
|
|
9
|
-
.react-datetime-picker *,
|
|
10
|
-
.react-datetime-picker *:before,
|
|
11
|
-
.react-datetime-picker *:after {
|
|
12
|
-
-moz-box-sizing: border-box;
|
|
13
|
-
-webkit-box-sizing: border-box;
|
|
14
|
-
box-sizing: border-box;
|
|
9
|
+
.react-date-picker *:after {
|
|
10
|
+
@extend %border-box;
|
|
15
11
|
}
|
|
16
12
|
|
|
17
|
-
.react-date-picker
|
|
18
|
-
|
|
19
|
-
display: inline-flex;
|
|
20
|
-
position: relative;
|
|
21
|
-
|
|
13
|
+
.react-date-picker {
|
|
14
|
+
@extend %date-picker-styles;
|
|
22
15
|
&--disabled {
|
|
23
|
-
|
|
24
|
-
color: #6d6d6d;
|
|
16
|
+
@extend %date-picker-disabled;
|
|
25
17
|
}
|
|
26
18
|
&__wrapper {
|
|
27
|
-
|
|
28
|
-
flex-grow: 1;
|
|
29
|
-
flex-shrink: 0;
|
|
30
|
-
border-radius: 3px;
|
|
31
|
-
padding: 2px;
|
|
32
|
-
border: 1px solid var(--gray400);
|
|
19
|
+
@extend %date-picker-wrapper;
|
|
33
20
|
}
|
|
34
21
|
&__inputGroup {
|
|
35
|
-
|
|
36
|
-
flex-grow: 1;
|
|
37
|
-
padding: 0 2px;
|
|
38
|
-
box-sizing: content-box;
|
|
22
|
+
@extend %date-picker-input-group;
|
|
39
23
|
}
|
|
40
24
|
&__inputGroup__divider {
|
|
41
|
-
|
|
42
|
-
white-space: pre;
|
|
25
|
+
@extend %date-picker-divider;
|
|
43
26
|
}
|
|
44
27
|
&__inputGroup__divider,
|
|
45
28
|
&__inputGroup__leadingZero {
|
|
46
|
-
|
|
47
|
-
font: inherit;
|
|
29
|
+
@extend %date-picker-leading-zero-divider;
|
|
48
30
|
}
|
|
49
31
|
&__inputGroup__input {
|
|
50
|
-
|
|
51
|
-
height: calc(100% - 2px);
|
|
52
|
-
position: relative;
|
|
53
|
-
padding: 1px;
|
|
54
|
-
border: 0;
|
|
55
|
-
background: none;
|
|
56
|
-
color: currentColor;
|
|
57
|
-
font: inherit;
|
|
58
|
-
box-sizing: content-box;
|
|
59
|
-
-webkit-appearance: textfield;
|
|
60
|
-
-moz-appearance: textfield;
|
|
61
|
-
appearance: textfield;
|
|
32
|
+
@extend %date-picker-group-input;
|
|
62
33
|
}
|
|
63
34
|
&__inputGroup__input::-webkit-outer-spin-button,
|
|
64
35
|
&__inputGroup__input::-webkit-inner-spin-button {
|
|
65
|
-
-
|
|
66
|
-
-moz-appearance: none;
|
|
67
|
-
appearance: none;
|
|
68
|
-
margin: 0;
|
|
36
|
+
@extend %date-picker-input-spinner;
|
|
69
37
|
}
|
|
70
38
|
&__inputGroup__input--hasLeadingZero {
|
|
71
|
-
|
|
72
|
-
padding-left: calc(1px + 0.54em);
|
|
39
|
+
@extend %date-picker-input-leading-zero;
|
|
73
40
|
}
|
|
74
41
|
&__button {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
stroke: #0078d7;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
:disabled {
|
|
89
|
-
.react-date-picker, .react-datetime-picker {
|
|
90
|
-
&__button__icon {
|
|
91
|
-
stroke: #6d6d6d;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
svg {
|
|
96
|
-
display: inherit;
|
|
42
|
+
@extend %date-picker-button;
|
|
43
|
+
}
|
|
44
|
+
&__calendar {
|
|
45
|
+
width: 350px;
|
|
46
|
+
max-width: 100vw;
|
|
47
|
+
z-index: 1;
|
|
48
|
+
.react-calendar {
|
|
49
|
+
border-width: thin;
|
|
97
50
|
}
|
|
98
51
|
}
|
|
99
52
|
&__calendar--closed, &__clock--closed {
|
|
@@ -101,53 +54,8 @@
|
|
|
101
54
|
}
|
|
102
55
|
|
|
103
56
|
}
|
|
104
|
-
|
|
105
|
-
.react-date-
|
|
106
|
-
width: 350px;
|
|
107
|
-
max-width: 100vw;
|
|
108
|
-
z-index: 1;
|
|
109
|
-
}
|
|
110
|
-
.react-datetime-picker__calendar,
|
|
111
|
-
.react-datetime-picker__clock {
|
|
112
|
-
z-index: 1;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.react-datetime-picker__inputGroup__input:invalid {
|
|
116
|
-
background: rgba(255, 0, 0, 0.1);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.react-datetime-picker__inputGroup__amPm {
|
|
120
|
-
font: inherit;
|
|
121
|
-
-webkit-appearance: menulist;
|
|
122
|
-
-moz-appearance: menulist;
|
|
123
|
-
appearance: menulist;
|
|
124
|
-
}
|
|
125
|
-
.react-datetime-picker__calendar {
|
|
126
|
-
width: 350px;
|
|
127
|
-
max-width: 100vw;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.react-datetime-picker__calendar .react-calendar {
|
|
131
|
-
border-width: thin;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.react-datetime-picker__clock {
|
|
135
|
-
width: 200px;
|
|
136
|
-
height: 200px;
|
|
137
|
-
max-width: 100vw;
|
|
138
|
-
padding: 25px;
|
|
139
|
-
background-color: white;
|
|
140
|
-
border: thin solid #a0a096;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.react-date-picker__calendar .react-calendar {
|
|
144
|
-
border-width: thin;
|
|
145
|
-
}
|
|
146
|
-
.react-date-picker__wrapper, .react-datetime-picker__wrapper {
|
|
147
|
-
// padding: 16px;
|
|
148
|
-
@extend %input-base;
|
|
149
|
-
}
|
|
150
|
-
.react-date-picker__inputGroup__input:invalid, .react-datetime-picker__inputGroup__input:invalid {
|
|
57
|
+
.react-date-picker__calendar
|
|
58
|
+
.react-date-picker__inputGroup__input:invalid {
|
|
151
59
|
background: unset;
|
|
152
60
|
}
|
|
153
61
|
}
|
|
@@ -6,19 +6,24 @@ import t from "clsx";
|
|
|
6
6
|
import { jsx as n } from "react/jsx-runtime";
|
|
7
7
|
import { useId as r } from "react";
|
|
8
8
|
import { DatePicker as i } from "react-date-picker";
|
|
9
|
+
import { FaRegCalendar as a, FaX as o } from "react-icons/fa6";
|
|
9
10
|
//#region src/components/DatePicker/DatePicker.tsx
|
|
10
|
-
var
|
|
11
|
-
let
|
|
11
|
+
var s = ({ label: s, id: c, labelPosition: l = "top", required: u = !1, error: d, style: f, className: p, ...m }) => {
|
|
12
|
+
let h = r();
|
|
12
13
|
return /* @__PURE__ */ n(e, {
|
|
13
|
-
id:
|
|
14
|
-
className: t(
|
|
15
|
-
label:
|
|
16
|
-
labelPosition:
|
|
17
|
-
error:
|
|
18
|
-
required:
|
|
19
|
-
style:
|
|
20
|
-
children: /* @__PURE__ */ n(i, {
|
|
14
|
+
id: c || h,
|
|
15
|
+
className: t(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
|
+
})
|
|
21
26
|
});
|
|
22
27
|
};
|
|
23
28
|
//#endregion
|
|
24
|
-
export {
|
|
29
|
+
export { s as DatePicker };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer craftsman-base{.react-calendar{background:#fff;border:1px solid #a0a096;width:350px;max-width:100%;
|
|
1
|
+
.react-calendar,.react-calendar *,.react-calendar :before,.react-calendar :after{box-sizing:border-box}@layer craftsman-base{.react-calendar{background:#fff;border:1px solid #a0a096;width:350px;max-width:100%;line-height:1.125em}.react-calendar--doubleView{width:700px}.react-calendar--doubleView .react-calendar__viewContainer{margin:-.5em;display:flex}.react-calendar--doubleView .react-calendar__viewContainer>*{width:50%;margin:.5em}.react-calendar button{border:0;outline:none;margin:0}.react-calendar button:enabled:hover{cursor:pointer}.react-calendar__navigation{height:44px;margin-bottom:1em;display:flex}.react-calendar__navigation button{background:0 0;min-width:44px}.react-calendar__navigation button:disabled{background-color:#f0f0f0}.react-calendar__navigation button:enabled:hover,.react-calendar__navigation button:enabled:focus{background-color:#e6e6e6}.react-calendar__month-view__weekdays{text-align:center;text-transform:uppercase;font:inherit;font-size:.75em;font-weight:700}.react-calendar__month-view__weekdays__weekday{padding:.5em}.react-calendar__month-view__weekNumbers .react-calendar__tile{font:inherit;justify-content:center;align-items:center;font-size:.75em;font-weight:700;display:flex}.react-calendar__month-view__days__day--weekend{color:#d10000}.react-calendar__month-view__days__day--neighboringMonth,.react-calendar__decade-view__years__year--neighboringDecade,.react-calendar__century-view__decades__decade--neighboringCentury{color:#757575}.react-calendar__year-view .react-calendar__tile,.react-calendar__decade-view .react-calendar__tile,.react-calendar__century-view .react-calendar__tile{padding:2em .5em}.react-calendar__tile{text-align:center;max-width:100%;font:inherit;background:0 0;padding:10px 6.6667px;font-size:.833em}.react-calendar__tile:disabled{color:#ababab;background-color:#f0f0f0}.react-calendar__month-view__days__day--neighboringMonth:disabled,.react-calendar__decade-view__years__year--neighboringDecade:disabled,.react-calendar__century-view__decades__decade--neighboringCentury:disabled{color:#cdcdcd}.react-calendar__tile:enabled:hover,.react-calendar__tile:enabled:focus{background-color:#e6e6e6}.react-calendar__tile--now{background:#ffff76}.react-calendar__tile--now:enabled:hover,.react-calendar__tile--now:enabled:focus{background:#ffffa9}.react-calendar__tile--hasActive{background:#76baff}.react-calendar__tile--hasActive:enabled:hover,.react-calendar__tile--hasActive:enabled:focus{background:#a9d4ff}.react-calendar__tile--active{color:#fff;background:#006edc}.react-calendar__tile--active:enabled:hover,.react-calendar__tile--active:enabled:focus{background:#1087ff}.react-calendar--selectRange .react-calendar__tile--hover{background-color:#e6e6e6}.react-calendar{border-color:var(--gray400)}.react-calendar button{justify-content:center}.react-calendar__month-view__days button.react-calendar__tile{height:50px}.react-calendar__month-view__days button.react-calendar__tile:hover,.react-calendar__month-view__days button.react-calendar__tile--active,.react-calendar__month-view__days button.react-calendar__tile--now{border-radius:50%}}
|
|
@@ -1,12 +1,19 @@
|
|
|
1
|
-
@use "../../styles/utilities/
|
|
1
|
+
@use "../../styles/utilities/_functions" as u;
|
|
2
|
+
@use "../../styles/utilities/_placeholders";
|
|
2
3
|
|
|
3
4
|
@layer craftsman-base {
|
|
5
|
+
.react-calendar,
|
|
6
|
+
.react-calendar *,
|
|
7
|
+
.react-calendar *:before,
|
|
8
|
+
.react-calendar *:after {
|
|
9
|
+
@extend %border-box;
|
|
10
|
+
}
|
|
11
|
+
|
|
4
12
|
.react-calendar {
|
|
5
13
|
width: 350px;
|
|
6
14
|
max-width: 100%;
|
|
7
15
|
background: white;
|
|
8
16
|
border: 1px solid #a0a096;
|
|
9
|
-
font-family: "Arial", "Helvetica", sans-serif;
|
|
10
17
|
line-height: 1.125em;
|
|
11
18
|
}
|
|
12
19
|
|
|
@@ -23,16 +30,6 @@
|
|
|
23
30
|
width: 50%;
|
|
24
31
|
margin: 0.5em;
|
|
25
32
|
}
|
|
26
|
-
|
|
27
|
-
.react-calendar,
|
|
28
|
-
.react-calendar *,
|
|
29
|
-
.react-calendar *:before,
|
|
30
|
-
.react-calendar *:after {
|
|
31
|
-
-moz-box-sizing: border-box;
|
|
32
|
-
-webkit-box-sizing: border-box;
|
|
33
|
-
box-sizing: border-box;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
33
|
.react-calendar button {
|
|
37
34
|
margin: 0;
|
|
38
35
|
border: 0;
|
|
@@ -179,61 +176,4 @@
|
|
|
179
176
|
}
|
|
180
177
|
}
|
|
181
178
|
|
|
182
|
-
// .react-calendar__month-view__days__day--weekend {
|
|
183
|
-
// color: unset;
|
|
184
|
-
// }
|
|
185
|
-
.react-datetime-picker {
|
|
186
|
-
button {
|
|
187
|
-
color: unset;
|
|
188
|
-
&.react-calendar__tile {
|
|
189
|
-
&--active {
|
|
190
|
-
background-color: #{u.color("blue500")};
|
|
191
|
-
color: #{u.color("white")};
|
|
192
|
-
&:hover {
|
|
193
|
-
background-color: #{u.color("blue500")};
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
&--now {
|
|
197
|
-
// background-color: unset;
|
|
198
|
-
border: 1px solid #{u.color("text")};
|
|
199
|
-
&:hover {
|
|
200
|
-
background-color: #{u.color("gray100")};
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
&--hasActive {
|
|
204
|
-
background: #{u.color("blue500")};
|
|
205
|
-
&:hover {
|
|
206
|
-
background: #{u.color("blue300")};
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
&:hover {
|
|
211
|
-
background-color: unset;
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
input {
|
|
215
|
-
/* Disable spinner/flipper buttons */
|
|
216
|
-
&[type="number"] {
|
|
217
|
-
-webkit-appearance: textfield;
|
|
218
|
-
-moz-appearance: textfield;
|
|
219
|
-
appearance: textfield;
|
|
220
|
-
}
|
|
221
|
-
&::-webkit-inner-spin-button,
|
|
222
|
-
&::-webkit-outer-spin-button {
|
|
223
|
-
-webkit-appearance: none;
|
|
224
|
-
margin: 0;
|
|
225
|
-
}
|
|
226
|
-
background-color: unset;
|
|
227
|
-
border: unset;
|
|
228
|
-
box-sizing: unset;
|
|
229
|
-
border-radius: unset;
|
|
230
|
-
&:focus,
|
|
231
|
-
&:focus-visible {
|
|
232
|
-
border: unset;
|
|
233
|
-
color: unset;
|
|
234
|
-
background: unset;
|
|
235
|
-
outline: none;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
179
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
@use "../../styles/global/components/input";
|
|
2
|
+
@use "../../styles/utilities/_functions" as u;
|
|
3
|
+
@use "../../styles/utilities/_placeholders";
|
|
4
|
+
|
|
5
|
+
@layer craftsman-base {
|
|
6
|
+
%date-picker-styles {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
position: relative;
|
|
9
|
+
}
|
|
10
|
+
%date-picker-disabled {
|
|
11
|
+
background-color: #f0f0f0;
|
|
12
|
+
color: #6d6d6d;
|
|
13
|
+
}
|
|
14
|
+
%date-picker-wrapper {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-grow: 1;
|
|
17
|
+
flex-shrink: 0;
|
|
18
|
+
@extend %input-base;
|
|
19
|
+
padding: 6px 8px;
|
|
20
|
+
}
|
|
21
|
+
%date-picker-input-group {
|
|
22
|
+
// min-width: calc((4px * 3) + 0.54em * 8 + 0.217em * 2);
|
|
23
|
+
flex-grow: 1;
|
|
24
|
+
padding: 0 2px;
|
|
25
|
+
box-sizing: content-box;
|
|
26
|
+
}
|
|
27
|
+
%date-picker-divider {
|
|
28
|
+
padding: 1px 0;
|
|
29
|
+
white-space: pre;
|
|
30
|
+
}
|
|
31
|
+
%date-picker-leading-zero-divider {
|
|
32
|
+
display: inline-block;
|
|
33
|
+
font: inherit;
|
|
34
|
+
}
|
|
35
|
+
%date-picker-group-input {
|
|
36
|
+
min-width: calc(2ch + 1px);
|
|
37
|
+
text-align: center;
|
|
38
|
+
height: calc(100% - 2px);
|
|
39
|
+
position: relative;
|
|
40
|
+
padding: 1px;
|
|
41
|
+
border: 0;
|
|
42
|
+
background: none;
|
|
43
|
+
color: currentColor;
|
|
44
|
+
font: inherit;
|
|
45
|
+
box-sizing: content-box;
|
|
46
|
+
-webkit-appearance: textfield;
|
|
47
|
+
-moz-appearance: textfield;
|
|
48
|
+
appearance: textfield;
|
|
49
|
+
}
|
|
50
|
+
%date-picker-input-spinner {
|
|
51
|
+
-webkit-appearance: none;
|
|
52
|
+
-moz-appearance: none;
|
|
53
|
+
appearance: none;
|
|
54
|
+
margin: 0;
|
|
55
|
+
}
|
|
56
|
+
%date-picker-input-leading-zero {
|
|
57
|
+
margin-left: -0.54em;
|
|
58
|
+
padding-left: calc(1px + 0.54em);
|
|
59
|
+
}
|
|
60
|
+
%date-picker-button {
|
|
61
|
+
border: 0;
|
|
62
|
+
padding: 4px 4px 4px 7px;
|
|
63
|
+
&:hover {
|
|
64
|
+
background: transparent;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -4,5 +4,10 @@ import { DateTimePickerProps as ReactDateTimePickerProps } from 'react-datetime-
|
|
|
4
4
|
export type DateTimePickerProps = ReactDateTimePickerProps & LabeledInput & {
|
|
5
5
|
id?: string;
|
|
6
6
|
style?: React.CSSProperties;
|
|
7
|
+
format?: 24 | 12;
|
|
8
|
+
labels?: {
|
|
9
|
+
hour?: string;
|
|
10
|
+
minute?: string;
|
|
11
|
+
};
|
|
7
12
|
};
|
|
8
13
|
export declare const DateTimePicker: React.FC<DateTimePickerProps>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
@use "../../styles/global/components/input";
|
|
2
|
+
@use "../../styles/utilities/_functions" as u;
|
|
3
|
+
@use "../../styles/utilities/_placeholders";
|
|
4
|
+
@use "../DatePicker/_DateTimePicker";
|
|
5
|
+
@layer craftsman-base {
|
|
6
|
+
.react-datetime-picker,
|
|
7
|
+
.react-datetime-picker *,
|
|
8
|
+
.react-datetime-picker *:before,
|
|
9
|
+
.react-datetime-picker *:after {
|
|
10
|
+
@extend %border-box;
|
|
11
|
+
}
|
|
12
|
+
.react-datetime-picker {
|
|
13
|
+
@extend %date-picker-styles;
|
|
14
|
+
&--disabled {
|
|
15
|
+
@extend %date-picker-disabled;
|
|
16
|
+
}
|
|
17
|
+
&__wrapper {
|
|
18
|
+
@extend %date-picker-wrapper;
|
|
19
|
+
}
|
|
20
|
+
&__inputGroup {
|
|
21
|
+
@extend %date-picker-input-group;
|
|
22
|
+
}
|
|
23
|
+
&__inputGroup__divider {
|
|
24
|
+
@extend %date-picker-divider;
|
|
25
|
+
}
|
|
26
|
+
&__inputGroup__divider,
|
|
27
|
+
&__inputGroup__leadingZero {
|
|
28
|
+
@extend %date-picker-leading-zero-divider;
|
|
29
|
+
}
|
|
30
|
+
&__inputGroup__input {
|
|
31
|
+
@extend %date-picker-group-input;
|
|
32
|
+
}
|
|
33
|
+
&__inputGroup__input::-webkit-outer-spin-button,
|
|
34
|
+
&__inputGroup__input::-webkit-inner-spin-button {
|
|
35
|
+
@extend %date-picker-input-spinner;
|
|
36
|
+
}
|
|
37
|
+
&__inputGroup__input--hasLeadingZero {
|
|
38
|
+
@extend %date-picker-input-leading-zero;
|
|
39
|
+
}
|
|
40
|
+
&__button {
|
|
41
|
+
@extend %date-picker-button;
|
|
42
|
+
}
|
|
43
|
+
&__calendar--closed, &__clock--closed {
|
|
44
|
+
display: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
.react-datetime-picker__calendar,
|
|
49
|
+
.react-datetime-picker__clock {
|
|
50
|
+
z-index: 1;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.react-datetime-picker__inputGroup__input:invalid {
|
|
54
|
+
background: rgba(255, 0, 0, 0.1);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.react-datetime-picker__inputGroup__amPm {
|
|
58
|
+
font: inherit;
|
|
59
|
+
-webkit-appearance: menulist;
|
|
60
|
+
-moz-appearance: menulist;
|
|
61
|
+
appearance: menulist;
|
|
62
|
+
}
|
|
63
|
+
.react-datetime-picker__calendar {
|
|
64
|
+
width: 350px;
|
|
65
|
+
max-width: 100vw;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.react-datetime-picker__calendar .react-calendar {
|
|
69
|
+
border-width: thin;
|
|
70
|
+
}
|
|
71
|
+
.react-date-picker__inputGroup__input:invalid, .react-datetime-picker__inputGroup__input:invalid {
|
|
72
|
+
background: unset;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.dateTimePicker {
|
|
76
|
+
|
|
77
|
+
&__time-display {
|
|
78
|
+
margin-top: 8px;
|
|
79
|
+
display: flex;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.dateTimePicker__wrapper {
|
|
84
|
+
display: inline-block;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Button as e } from "../Button/Button.esm.js";
|
|
3
|
+
import { color as t } from "../../styles/utilities/color.esm.js";
|
|
4
4
|
import n from "./Modal.module.esm.js";
|
|
5
5
|
import r from "clsx";
|
|
6
6
|
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
@@ -26,12 +26,12 @@ var l = class extends s.PureComponent {
|
|
|
26
26
|
className: r(n.content, n[s]),
|
|
27
27
|
"data-is-closing": this.state.isClosing,
|
|
28
28
|
children: [
|
|
29
|
-
/* @__PURE__ */ o("header", { children: [this.props.header && /* @__PURE__ */ a(i, { children: this.props.header }), !this.props.hideDismissIcon && /* @__PURE__ */ a(
|
|
29
|
+
/* @__PURE__ */ o("header", { children: [this.props.header && /* @__PURE__ */ a(i, { children: this.props.header }), !this.props.hideDismissIcon && /* @__PURE__ */ a(e, {
|
|
30
30
|
variant: "primary",
|
|
31
31
|
className: n.closeModal,
|
|
32
32
|
onClick: this.onDismiss,
|
|
33
33
|
children: /* @__PURE__ */ a(c, {
|
|
34
|
-
fill:
|
|
34
|
+
fill: t("white"),
|
|
35
35
|
size: 18
|
|
36
36
|
})
|
|
37
37
|
})] }),
|