@stamcat/craftsman 0.0.27-alpha.14 → 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.
Files changed (61) hide show
  1. package/AGENTS.md +3 -3
  2. package/Components.esm.js +11 -9
  3. package/Styles.esm.js +5 -5
  4. package/Utilities.esm.js +2 -2
  5. package/package.json +6 -1
  6. package/src/components/Button/Button.d.ts +1 -1
  7. package/src/components/Button/Button.esm.js +0 -1
  8. package/src/components/Carousel/Carousel.scss +1 -1
  9. package/src/components/{Input → Checkbox}/Checkbox.d.ts +2 -3
  10. package/src/components/{Input → Checkbox}/Checkbox.esm.js +2 -2
  11. package/src/components/DatePicker/DatePicker.css +1 -0
  12. package/src/components/DatePicker/DatePicker.d.ts +8 -0
  13. package/src/components/DatePicker/DatePicker.scss +61 -0
  14. package/src/components/DatePicker/DatePicker2.esm.js +29 -0
  15. package/src/components/DatePicker/ReactCalendar.css +1 -0
  16. package/src/components/DatePicker/ReactCalendar.scss +179 -0
  17. package/src/components/DatePicker/_DateTimePicker.scss +67 -0
  18. package/src/components/DateTimePicker/DateTimePicker.d.ts +13 -0
  19. package/src/components/DateTimePicker/DateTimePicker.scss +86 -0
  20. package/src/components/Input/Input.scss +1 -1
  21. package/src/components/{Input → InputPassword}/InputPassword.d.ts +1 -1
  22. package/src/components/{Input → InputPassword}/InputPassword.esm.js +2 -2
  23. package/src/{styles/global/components/_reactPhone.css → components/InputPhone/InputPhone.css} +1 -1
  24. package/src/components/{Input → InputPhone}/InputPhone.d.ts +1 -1
  25. package/src/components/InputPhone/InputPhone.scss +266 -0
  26. package/src/components/{Input/InputPhone.esm.js → InputPhone/InputPhone2.esm.js} +3 -3
  27. package/src/components/Modal/Modal.esm.js +4 -4
  28. package/src/components/Modal/Modal.module.scss +1 -1
  29. package/src/components/Pagination/Pagination.scss +1 -1
  30. package/src/components/{Input → RadioButton}/RadioButton.d.ts +1 -1
  31. package/src/components/{Input → RadioButton}/RadioButton.esm.js +2 -2
  32. package/src/components/Text/Text.scss +1 -1
  33. package/src/components/{Input → Textarea}/Textarea.d.ts +1 -1
  34. package/src/components/{Input → Textarea}/Textarea.esm.js +2 -2
  35. package/src/components/TimePicker/TimePicker.css +1 -0
  36. package/src/components/TimePicker/TimePicker.d.ts +5 -4
  37. package/src/components/TimePicker/TimePicker.scss +107 -3
  38. package/src/components/TimePicker/TimePicker2.esm.js +93 -0
  39. package/src/components/TimePicker/TimePickerDisplay.d.ts +12 -18
  40. package/src/components/TimePicker/TimePickerDisplay.esm.js +54 -0
  41. package/src/components/TimePicker/TimePickerWheel.esm.js +61 -0
  42. package/src/components/TimePicker/constants.esm.js +3 -0
  43. package/src/components/TimePicker/utilities.esm.js +20 -0
  44. package/src/components/Tooltip/Tooltip.d.ts +12 -0
  45. package/src/components/Tooltip/Tooltip.scss +29 -0
  46. package/src/components/index.d.ts +7 -6
  47. package/src/stories/molecules/Carousel.scss +1 -1
  48. package/src/styles/global/components/_button.scss +11 -11
  49. package/src/styles/theme/components.esm.js +5 -5
  50. package/src/styles/utilities/_placeholders.scss +6 -0
  51. package/src/styles/utilities/layout.esm.js +3 -3
  52. package/src/utilities/types.d.ts +2 -2
  53. package/src/utilities/validations.d.ts +2 -0
  54. package/src/utilities/validations.esm.js +6 -2
  55. package/src/components/Input/DatePicker.d.ts +0 -8
  56. package/src/components/Input/DatePicker.esm.js +0 -24
  57. package/src/styles/global/components/_reactCalendar.css +0 -1
  58. package/src/styles/global/components/_reactCalendar.scss +0 -237
  59. package/src/styles/global/components/_reactDatePicker.css +0 -1
  60. package/src/styles/global/components/_reactDatePicker.scss +0 -152
  61. package/src/styles/global/components/_reactPhone.scss +0 -265
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/functions" as u;
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/functions" as u;
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/functions" as u;
138
+ @use "@stamcat/craftsman/styles/utilities/_functions" as u;
139
139
 
140
140
  .sidebar {
141
141
  display: none;
package/Components.esm.js CHANGED
@@ -1,20 +1,21 @@
1
1
  import { __exportAll as e } from "./_virtual/_rolldown/runtime.esm.js";
2
2
  import { Button as t } from "./src/components/Button/Button.esm.js";
3
3
  import { Input as n } from "./src/components/Input/Input2.esm.js";
4
- import { InputPassword as r } from "./src/components/Input/InputPassword.esm.js";
4
+ import { InputPassword as r } from "./src/components/InputPassword/InputPassword.esm.js";
5
5
  import { Loader as i } from "./src/components/Loader/Loader.esm.js";
6
- import { RadioButton as a } from "./src/components/Input/RadioButton.esm.js";
7
- import { Checkbox as o } from "./src/components/Input/Checkbox.esm.js";
8
- import { Textarea as s } from "./src/components/Input/Textarea.esm.js";
6
+ import { RadioButton as a } from "./src/components/RadioButton/RadioButton.esm.js";
7
+ import { Checkbox as o } from "./src/components/Checkbox/Checkbox.esm.js";
8
+ import { Textarea as s } from "./src/components/Textarea/Textarea.esm.js";
9
9
  import { Text as c } from "./src/components/Text/Text2.esm.js";
10
10
  import { Modal as l } from "./src/components/Modal/Modal.esm.js";
11
11
  import { Select as u } from "./src/components/Select/Select.esm.js";
12
- import { DatePicker as d } from "./src/components/Input/DatePicker.esm.js";
13
- import { InputPhone as f } from "./src/components/Input/InputPhone.esm.js";
12
+ import { DatePicker as d } from "./src/components/DatePicker/DatePicker2.esm.js";
13
+ import { InputPhone as f } from "./src/components/InputPhone/InputPhone2.esm.js";
14
14
  import { Pagination as p } from "./src/components/Pagination/Pagination2.esm.js";
15
15
  import { Carousel as m } from "./src/components/Carousel/Carousel2.esm.js";
16
+ import { TimePicker as h } from "./src/components/TimePicker/TimePicker2.esm.js";
16
17
  //#region src/components/index.ts
17
- var h = /* @__PURE__ */ e({
18
+ var g = /* @__PURE__ */ e({
18
19
  Button: () => t,
19
20
  Carousel: () => m,
20
21
  Checkbox: () => o,
@@ -28,7 +29,8 @@ var h = /* @__PURE__ */ e({
28
29
  RadioButton: () => a,
29
30
  Select: () => u,
30
31
  Text: () => c,
31
- Textarea: () => s
32
+ Textarea: () => s,
33
+ TimePicker: () => h
32
34
  });
33
35
  //#endregion
34
- export { t as Button, m as Carousel, o as Checkbox, d as DatePicker, n as Input, r as InputPassword, f as InputPhone, i as Loader, l as Modal, p as Pagination, a as RadioButton, u as Select, c as Text, s as Textarea, h as components_exports };
36
+ export { t as Button, m as Carousel, o as Checkbox, d as DatePicker, n as Input, r as InputPassword, f as InputPhone, i as Loader, l as Modal, p as Pagination, a as RadioButton, u as Select, c as Text, s as Textarea, h as TimePicker, g as components_exports };
package/Styles.esm.js CHANGED
@@ -1,7 +1,7 @@
1
- import { defaultColors as e, defaultWidths as t } from "./src/styles/utilities/constants.esm.js";
2
- import { color as n, colors as r, hexToRgba as i } from "./src/styles/utilities/color.esm.js";
3
- import { BaseWidthSchema as a, BreakpointSchema as o, ButtonType as s, CarouselPageType as c, LayoutWidthsSchema as l, MaxScreenWidthSchema as u, ScreenWidthSchema as d, TextSize as f, TextTags as p, TextType as m, zLabelPosition as h, zTextInputExclusions as g, zTextInputType as _, zTextInputTypes as v } from "./src/utilities/types.esm.js";
4
- import { breakpoint as y, media as b, width as x, widths as S } from "./src/styles/utilities/layout.esm.js";
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 { a as BaseWidthSchema, o as BreakpointSchema, s as ButtonType, c as CarouselPageType, l as LayoutWidthsSchema, u as MaxScreenWidthSchema, d as ScreenWidthSchema, f as TextSize, p as TextTags, m as TextType, w as ThemeProvider, y as breakpoint, n as color, r as colors, e as defaultColors, t as defaultWidths, i as hexToRgba, b as media, C as themeBuilder, x as width, S as widths, h as zLabelPosition, g as zTextInputExclusions, _ as zTextInputType, v as zTextInputTypes };
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 { getAmPmLabels as e, getUnitLabel as t, is24HourFormat as n, isEmpty as r, isTouchDevice as i, validateEmail as a } from "./src/utilities/validations.esm.js";
2
- export { e as getAmPmLabels, t as getUnitLabel, n as is24HourFormat, r as isEmpty, i as isTouchDevice, a as validateEmail };
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@stamcat/craftsman",
3
- "version": "0.0.27-alpha.14",
3
+ "version": "0.0.27-alpha.16",
4
4
  "type": "module",
5
5
  "description": "A powerful, lightweight framework for design systems",
6
6
  "repository": {
@@ -35,6 +35,7 @@
35
35
  "react-icons": "5.7.0",
36
36
  "react-international-phone": "4.8.0",
37
37
  "react-intl": "10.1.20",
38
+ "react-time-picker": "8.1.0",
38
39
  "react-toastify": "11.1.0",
39
40
  "sass-embedded": "1.100.0",
40
41
  "typescript-plugin-css-modules": "5.2.0",
@@ -119,6 +120,10 @@
119
120
  "./Carousel": {
120
121
  "types": "./src/components/Carousel.d.ts",
121
122
  "default": "./src/components/Carousel.esm.js"
123
+ },
124
+ "./TimePicker": {
125
+ "types": "./src/components/TimePicker.d.ts",
126
+ "default": "./src/components/TimePicker.esm.js"
122
127
  }
123
128
  }
124
129
  }
@@ -1,4 +1,4 @@
1
- import { ButtonType } from '../../styles';
1
+ import { ButtonType } from '../../utilities/types';
2
2
  export type ButtonProps = React.ComponentProps<"button"> & {
3
3
  variant?: ButtonType;
4
4
  size?: number;
@@ -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,4 +1,4 @@
1
- @use "../../styles/utilities/functions" as u;
1
+ @use "../../styles/utilities/_functions" as u;
2
2
 
3
3
  @layer craftsman-base {
4
4
  .carousel {
@@ -1,7 +1,6 @@
1
- import { InputProps } from './Input';
2
- type CheckboxProps = InputProps & {
1
+ import { InputProps } from '../Input/Input';
2
+ export type CheckboxProps = InputProps & {
3
3
  type?: "checkbox";
4
4
  labelPosition?: "left" | "right" | "top" | "bottom";
5
5
  };
6
6
  export declare const Checkbox: React.FC<CheckboxProps>;
7
- export {};
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { Input as e } from "./Input2.esm.js";
2
+ import { Input as e } from "../Input/Input2.esm.js";
3
3
  import { jsx as t } from "react/jsx-runtime";
4
- //#region src/components/Input/Checkbox.tsx
4
+ //#region src/components/Checkbox/Checkbox.tsx
5
5
  var n = ({ type: n = "checkbox", labelPosition: r = "right", ...i }) => /* @__PURE__ */ t(e, {
6
6
  type: n,
7
7
  labelPosition: r,
@@ -0,0 +1 @@
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}
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { LabeledInput } from '../Input/InputWrapper';
3
+ import { DatePickerProps as ReactDatePickerProps } from 'react-date-picker';
4
+ export type DatePickerProps = ReactDatePickerProps & LabeledInput & {
5
+ id?: string;
6
+ style?: React.CSSProperties;
7
+ };
8
+ export declare const DatePicker: React.FC<DatePickerProps>;
@@ -0,0 +1,61 @@
1
+ @use "../../styles/global/components/input";
2
+ @use "../../styles/utilities/_functions" as u;
3
+ @use "../../styles/utilities/_placeholders";
4
+ @use "./_DateTimePicker";
5
+ @layer craftsman-base {
6
+ .react-date-picker,
7
+ .react-date-picker *,
8
+ .react-date-picker *:before,
9
+ .react-date-picker *:after {
10
+ @extend %border-box;
11
+ }
12
+
13
+ .react-date-picker {
14
+ @extend %date-picker-styles;
15
+ &--disabled {
16
+ @extend %date-picker-disabled;
17
+ }
18
+ &__wrapper {
19
+ @extend %date-picker-wrapper;
20
+ }
21
+ &__inputGroup {
22
+ @extend %date-picker-input-group;
23
+ }
24
+ &__inputGroup__divider {
25
+ @extend %date-picker-divider;
26
+ }
27
+ &__inputGroup__divider,
28
+ &__inputGroup__leadingZero {
29
+ @extend %date-picker-leading-zero-divider;
30
+ }
31
+ &__inputGroup__input {
32
+ @extend %date-picker-group-input;
33
+ }
34
+ &__inputGroup__input::-webkit-outer-spin-button,
35
+ &__inputGroup__input::-webkit-inner-spin-button {
36
+ @extend %date-picker-input-spinner;
37
+ }
38
+ &__inputGroup__input--hasLeadingZero {
39
+ @extend %date-picker-input-leading-zero;
40
+ }
41
+ &__button {
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;
50
+ }
51
+ }
52
+ &__calendar--closed, &__clock--closed {
53
+ display: none;
54
+ }
55
+
56
+ }
57
+ .react-date-picker__calendar
58
+ .react-date-picker__inputGroup__input:invalid {
59
+ background: unset;
60
+ }
61
+ }
@@ -0,0 +1,29 @@
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(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 };
@@ -0,0 +1 @@
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%}}
@@ -0,0 +1,179 @@
1
+ @use "../../styles/utilities/_functions" as u;
2
+ @use "../../styles/utilities/_placeholders";
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
+
12
+ .react-calendar {
13
+ width: 350px;
14
+ max-width: 100%;
15
+ background: white;
16
+ border: 1px solid #a0a096;
17
+ line-height: 1.125em;
18
+ }
19
+
20
+ .react-calendar--doubleView {
21
+ width: 700px;
22
+ }
23
+
24
+ .react-calendar--doubleView .react-calendar__viewContainer {
25
+ display: flex;
26
+ margin: -0.5em;
27
+ }
28
+
29
+ .react-calendar--doubleView .react-calendar__viewContainer > * {
30
+ width: 50%;
31
+ margin: 0.5em;
32
+ }
33
+ .react-calendar button {
34
+ margin: 0;
35
+ border: 0;
36
+ outline: none;
37
+ }
38
+
39
+ .react-calendar button:enabled:hover {
40
+ cursor: pointer;
41
+ }
42
+
43
+ .react-calendar__navigation {
44
+ display: flex;
45
+ height: 44px;
46
+ margin-bottom: 1em;
47
+ }
48
+
49
+ .react-calendar__navigation button {
50
+ min-width: 44px;
51
+ background: none;
52
+ }
53
+
54
+ .react-calendar__navigation button:disabled {
55
+ background-color: #f0f0f0;
56
+ }
57
+
58
+ .react-calendar__navigation button:enabled:hover,
59
+ .react-calendar__navigation button:enabled:focus {
60
+ background-color: #e6e6e6;
61
+ }
62
+
63
+ .react-calendar__month-view__weekdays {
64
+ text-align: center;
65
+ text-transform: uppercase;
66
+ font: inherit;
67
+ font-size: 0.75em;
68
+ font-weight: bold;
69
+ }
70
+
71
+ .react-calendar__month-view__weekdays__weekday {
72
+ padding: 0.5em;
73
+ }
74
+
75
+ .react-calendar__month-view__weekNumbers .react-calendar__tile {
76
+ display: flex;
77
+ align-items: center;
78
+ justify-content: center;
79
+ font: inherit;
80
+ font-size: 0.75em;
81
+ font-weight: bold;
82
+ }
83
+
84
+ .react-calendar__month-view__days__day--weekend {
85
+ color: #d10000;
86
+ }
87
+
88
+ .react-calendar__month-view__days__day--neighboringMonth,
89
+ .react-calendar__decade-view__years__year--neighboringDecade,
90
+ .react-calendar__century-view__decades__decade--neighboringCentury {
91
+ color: #757575;
92
+ }
93
+
94
+ .react-calendar__year-view .react-calendar__tile,
95
+ .react-calendar__decade-view .react-calendar__tile,
96
+ .react-calendar__century-view .react-calendar__tile {
97
+ padding: 2em 0.5em;
98
+ }
99
+
100
+ .react-calendar__tile {
101
+ max-width: 100%;
102
+ padding: 10px 6.6667px;
103
+ background: none;
104
+ text-align: center;
105
+ font: inherit;
106
+ font-size: 0.833em;
107
+ }
108
+
109
+ .react-calendar__tile:disabled {
110
+ background-color: #f0f0f0;
111
+ color: #ababab;
112
+ }
113
+
114
+ .react-calendar__month-view__days__day--neighboringMonth:disabled,
115
+ .react-calendar__decade-view__years__year--neighboringDecade:disabled,
116
+ .react-calendar__century-view__decades__decade--neighboringCentury:disabled {
117
+ color: #cdcdcd;
118
+ }
119
+
120
+ .react-calendar__tile:enabled:hover,
121
+ .react-calendar__tile:enabled:focus {
122
+ background-color: #e6e6e6;
123
+ }
124
+
125
+ .react-calendar__tile--now {
126
+ background: #ffff76;
127
+ }
128
+
129
+ .react-calendar__tile--now:enabled:hover,
130
+ .react-calendar__tile--now:enabled:focus {
131
+ background: #ffffa9;
132
+ }
133
+
134
+ .react-calendar__tile--hasActive {
135
+ background: #76baff;
136
+ }
137
+
138
+ .react-calendar__tile--hasActive:enabled:hover,
139
+ .react-calendar__tile--hasActive:enabled:focus {
140
+ background: #a9d4ff;
141
+ }
142
+
143
+ .react-calendar__tile--active {
144
+ background: #006edc;
145
+ color: white;
146
+ }
147
+
148
+ .react-calendar__tile--active:enabled:hover,
149
+ .react-calendar__tile--active:enabled:focus {
150
+ background: #1087ff;
151
+ }
152
+
153
+ .react-calendar--selectRange .react-calendar__tile--hover {
154
+ background-color: #e6e6e6;
155
+ }
156
+ .react-calendar {
157
+ border-color: #{u.color("gray400")};
158
+ }
159
+ .react-calendar button {
160
+ justify-content: center;
161
+ }
162
+ .react-calendar__month-view__days {
163
+ button {
164
+ &.react-calendar__tile {
165
+ height: 50px;
166
+ &:hover {
167
+ border-radius: 50%;
168
+ }
169
+ &--active {
170
+ border-radius: 50%;
171
+ }
172
+ &--now {
173
+ border-radius: 50%;
174
+ }
175
+ }
176
+ }
177
+ }
178
+
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
+ }
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { LabeledInput } from '../Input/InputWrapper';
3
+ import { DateTimePickerProps as ReactDateTimePickerProps } from 'react-datetime-picker';
4
+ export type DateTimePickerProps = ReactDateTimePickerProps & LabeledInput & {
5
+ id?: string;
6
+ style?: React.CSSProperties;
7
+ format?: 24 | 12;
8
+ labels?: {
9
+ hour?: string;
10
+ minute?: string;
11
+ };
12
+ };
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,5 +1,5 @@
1
1
  @use "../../styles/global/components/input";
2
- @use "../../styles/utilities/functions" as u;
2
+ @use "../../styles/utilities/_functions" as u;
3
3
 
4
4
  @mixin inside-input-label-floating {
5
5
  top: -0.5rem;
@@ -1,5 +1,5 @@
1
1
  import { TextInputType } from '../../utilities/types';
2
- import { InputProps } from './Input';
2
+ import { InputProps } from '../Input/Input';
3
3
  export type InputPasswordProps = React.ComponentProps<"input"> & {} & Omit<InputProps, "type" | "endAdornment"> & {
4
4
  type?: Extract<TextInputType, "password">;
5
5
  };
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { Button as e } from "../Button/Button.esm.js";
3
- import { Input as t } from "./Input2.esm.js";
3
+ import { Input as t } from "../Input/Input2.esm.js";
4
4
  import { jsx as n } from "react/jsx-runtime";
5
5
  import { useState as r } from "react";
6
6
  import { ImEye as i, ImEyeBlocked as a } from "react-icons/im";
7
- //#region src/components/Input/InputPassword.tsx
7
+ //#region src/components/InputPassword/InputPassword.tsx
8
8
  var o = ({ visible: t, onToggle: r }) => /* @__PURE__ */ n(e, {
9
9
  type: "button",
10
10
  variant: "text",