@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.
Files changed (221) hide show
  1. package/AGENTS.md +19 -344
  2. package/Components.esm.js +72 -11
  3. package/README.md +5 -0
  4. package/Styles.esm.js +7 -7
  5. package/Utilities.esm.js +2 -2
  6. package/_virtual/_rolldown/runtime.esm.js +18 -6
  7. package/package.json +75 -6
  8. package/src/components/Button/AGENTS.md +65 -0
  9. package/src/components/{Button.d.ts → Button/Button.d.ts} +1 -1
  10. package/src/components/Button/Button.esm.js +20 -0
  11. package/src/components/Carousel/AGENTS.md +41 -0
  12. package/src/components/Carousel/Carousel.css +1 -0
  13. package/src/components/Carousel/Carousel.d.ts +11 -0
  14. package/src/components/Carousel/Carousel.scss +34 -0
  15. package/src/components/Carousel/Carousel2.esm.js +75 -0
  16. package/src/components/Checkbox/AGENTS.md +34 -0
  17. package/src/components/Checkbox/Checkbox.d.ts +8 -0
  18. package/src/components/Checkbox/Checkbox.esm.js +18 -0
  19. package/src/components/DatePicker/AGENTS.md +36 -0
  20. package/src/components/DatePicker/DatePicker.css +1 -0
  21. package/src/components/DatePicker/DatePicker.d.ts +8 -0
  22. package/src/components/DatePicker/DatePicker.scss +61 -0
  23. package/src/components/DatePicker/DatePicker2.esm.js +29 -0
  24. package/src/components/DatePicker/ReactCalendar.css +1 -0
  25. package/src/components/DatePicker/ReactCalendar.scss +158 -0
  26. package/src/components/DatePicker/_DatePicker.scss +73 -0
  27. package/src/components/DateRangePicker/AGENTS.md +38 -0
  28. package/src/components/DateRangePicker/DateRangePicker.css +1 -0
  29. package/src/components/DateRangePicker/DateRangePicker.d.ts +8 -0
  30. package/src/components/DateRangePicker/DateRangePicker.scss +62 -0
  31. package/src/components/DateRangePicker/DateRangePicker2.esm.js +29 -0
  32. package/src/components/DateTimePicker/AGENTS.md +41 -0
  33. package/src/components/DateTimePicker/DateTimePicker.css +1 -0
  34. package/src/components/DateTimePicker/DateTimePicker.d.ts +13 -0
  35. package/src/components/DateTimePicker/DateTimePicker.scss +86 -0
  36. package/src/components/DateTimePicker/DateTimePicker2.esm.js +82 -0
  37. package/src/components/Icons/IconAmazonPay.d.ts +2 -0
  38. package/src/components/Icons/IconAmazonPay.esm.js +76 -0
  39. package/src/components/Icons/IconAmex.d.ts +2 -0
  40. package/src/components/Icons/IconAmex.esm.js +87 -0
  41. package/src/components/Icons/IconApplePay.d.ts +2 -0
  42. package/src/components/Icons/IconApplePay.esm.js +26 -0
  43. package/src/components/Icons/IconDiscover.d.ts +2 -0
  44. package/src/components/Icons/IconDiscover.esm.js +129 -0
  45. package/src/components/Icons/IconGooglePay.d.ts +2 -0
  46. package/src/components/Icons/IconGooglePay.esm.js +64 -0
  47. package/src/components/Icons/IconMaestro.d.ts +2 -0
  48. package/src/components/Icons/IconMaestro.esm.js +38 -0
  49. package/src/components/Icons/IconMastercard.d.ts +2 -0
  50. package/src/components/Icons/IconMastercard.esm.js +27 -0
  51. package/src/components/Icons/IconPayPal.d.ts +2 -0
  52. package/src/components/Icons/IconPayPal.esm.js +52 -0
  53. package/src/components/Icons/IconSepa.d.ts +2 -0
  54. package/src/components/Icons/IconSepa.esm.js +272 -0
  55. package/src/components/Icons/IconShopPay.d.ts +2 -0
  56. package/src/components/Icons/IconShopPay.esm.js +35 -0
  57. package/src/components/Icons/IconSquare.d.ts +2 -0
  58. package/src/components/Icons/IconSquare.esm.js +11 -0
  59. package/src/components/Icons/IconStripe.d.ts +2 -0
  60. package/src/components/Icons/IconStripe.esm.js +57 -0
  61. package/src/components/Icons/IconUnionPay.d.ts +2 -0
  62. package/src/components/Icons/IconUnionPay.esm.js +28 -0
  63. package/src/components/Icons/IconVenmo.d.ts +2 -0
  64. package/src/components/Icons/IconVenmo.esm.js +21 -0
  65. package/src/components/Icons/IconVisa.d.ts +2 -0
  66. package/src/components/Icons/IconVisa.esm.js +14 -0
  67. package/src/components/Icons/index.d.ts +15 -0
  68. package/src/components/Icons/index.esm.js +16 -0
  69. package/src/components/Icons/types.d.ts +4 -0
  70. package/src/components/Input/AGENTS.md +30 -0
  71. package/src/components/Input/Input.css +1 -0
  72. package/src/components/Input/Input.d.ts +6 -0
  73. package/src/components/Input/Input.scss +176 -0
  74. package/src/components/Input/Input2.esm.js +42 -0
  75. package/src/components/Input/InputWrapper.d.ts +11 -0
  76. package/src/components/Input/InputWrapper.esm.js +22 -0
  77. package/src/components/InputNumber/AGENTS.md +37 -0
  78. package/src/components/InputNumber/InputNumber.css +1 -0
  79. package/src/components/InputNumber/InputNumber.d.ts +10 -0
  80. package/src/components/InputNumber/InputNumber.scss +29 -0
  81. package/src/components/InputNumber/InputNumber2.esm.js +36 -0
  82. package/src/components/InputPassword/AGENTS.md +29 -0
  83. package/src/components/{InputPassword.d.ts → InputPassword/InputPassword.d.ts} +2 -2
  84. package/src/components/InputPassword/InputPassword.esm.js +30 -0
  85. package/src/components/InputPhone/AGENTS.md +35 -0
  86. package/src/components/InputPhone/InputPhone.css +1 -0
  87. package/src/components/InputPhone/InputPhone.d.ts +7 -0
  88. package/src/components/InputPhone/InputPhone.scss +266 -0
  89. package/src/components/InputPhone/InputPhone2.esm.js +27 -0
  90. package/src/components/Loader/AGENTS.md +31 -0
  91. package/src/components/{Loader.d.ts → Loader/Loader.d.ts} +1 -2
  92. package/src/components/Loader/Loader.esm.js +19 -0
  93. package/src/components/Loader/loaders.module.css +1 -0
  94. package/src/components/Loader/loaders.module.esm.js +21 -0
  95. package/src/{styles/global/components → components/Loader}/loaders.module.scss +2 -1
  96. package/src/components/Modal/AGENTS.md +47 -0
  97. package/src/components/Modal/Modal.css +1 -0
  98. package/src/components/{Modal.d.ts → Modal/Modal.d.ts} +0 -1
  99. package/src/components/Modal/Modal.scss +150 -0
  100. package/src/components/Modal/Modal2.esm.js +53 -0
  101. package/src/components/Notice/AGENTS.md +42 -0
  102. package/src/components/Notice/Notice.css +1 -0
  103. package/src/components/Notice/Notice.d.ts +13 -0
  104. package/src/components/Notice/Notice.scss +76 -0
  105. package/src/components/Notice/Notice2.esm.js +56 -0
  106. package/src/components/Pagination/AGENTS.md +38 -0
  107. package/src/components/Pagination/Pagination.css +1 -0
  108. package/src/components/Pagination/Pagination.d.ts +10 -0
  109. package/src/components/Pagination/Pagination.scss +22 -0
  110. package/src/components/Pagination/Pagination2.esm.js +64 -0
  111. package/src/components/RadioButton/AGENTS.md +44 -0
  112. package/src/components/RadioButton/RadioButton.d.ts +9 -0
  113. package/src/components/RadioButton/RadioButton.esm.js +18 -0
  114. package/src/components/Select/AGENTS.md +36 -0
  115. package/src/components/Select/Select.d.ts +14 -0
  116. package/src/components/Select/Select.esm.js +26 -0
  117. package/src/components/SortableList/AGENTS.md +45 -0
  118. package/src/components/SortableList/ListItem.d.ts +10 -0
  119. package/src/components/SortableList/ListItem.esm.js +67 -0
  120. package/src/components/SortableList/SortableList.css +1 -0
  121. package/src/components/SortableList/SortableList.d.ts +23 -0
  122. package/src/components/SortableList/SortableList.scss +41 -0
  123. package/src/components/SortableList/SortableList2.esm.js +54 -0
  124. package/src/components/SortableList/utilities.d.ts +7 -0
  125. package/src/components/SortableList/utilities.esm.js +4 -0
  126. package/src/components/Text/AGENTS.md +32 -0
  127. package/src/components/Text/Text.css +1 -0
  128. package/src/components/Text/Text.d.ts +10 -0
  129. package/src/components/Text/Text.scss +80 -0
  130. package/src/components/Text/Text2.esm.js +23 -0
  131. package/src/components/Textarea/AGENTS.md +32 -0
  132. package/src/components/Textarea/Textarea.d.ts +3 -0
  133. package/src/components/Textarea/Textarea.esm.js +23 -0
  134. package/src/components/TimePicker/AGENTS.md +42 -0
  135. package/src/components/TimePicker/TimePicker.css +1 -0
  136. package/src/components/TimePicker/TimePicker.d.ts +13 -0
  137. package/src/components/TimePicker/TimePicker.scss +226 -0
  138. package/src/components/TimePicker/TimePicker2.esm.js +98 -0
  139. package/src/components/TimePicker/TimePickerDisplay.d.ts +16 -0
  140. package/src/components/TimePicker/TimePickerDisplay.esm.js +54 -0
  141. package/src/components/TimePicker/TimePickerWheel.d.ts +13 -0
  142. package/src/components/TimePicker/TimePickerWheel.esm.js +61 -0
  143. package/src/components/TimePicker/constants.d.ts +7 -0
  144. package/src/components/TimePicker/constants.esm.js +3 -0
  145. package/src/components/TimePicker/utilities.d.ts +15 -0
  146. package/src/components/TimePicker/utilities.esm.js +20 -0
  147. package/src/components/Toggle/AGENTS.md +33 -0
  148. package/src/components/Toggle/Toggle.css +1 -0
  149. package/src/components/Toggle/Toggle.d.ts +5 -0
  150. package/src/components/Toggle/Toggle.scss +64 -0
  151. package/src/components/Toggle/Toggle2.esm.js +19 -0
  152. package/src/components/Tooltip/AGENTS.md +41 -0
  153. package/src/components/Tooltip/Tooltip.css +1 -0
  154. package/src/components/Tooltip/Tooltip.d.ts +12 -0
  155. package/src/components/Tooltip/Tooltip.scss +29 -0
  156. package/src/components/Tooltip/Tooltip2.esm.js +65 -0
  157. package/src/components/index.d.ts +23 -7
  158. package/src/stories/assets/Stam.jpg +0 -0
  159. package/src/stories/assets/kaluah.jpg +0 -0
  160. package/src/stories/assets/stam2.jpg +0 -0
  161. package/src/stories/assets/tito.jpg +0 -0
  162. package/src/stories/documentation/AboutUs.mdx +21 -0
  163. package/src/stories/documentation/GettingStarted.mdx +117 -0
  164. package/src/stories/documentation/Introduction.mdx +29 -0
  165. package/src/stories/documentation/Themes.mdx +264 -0
  166. package/src/stories/documentation/ToDo.mdx +15 -0
  167. package/src/stories/molecules/Carousel.scss +21 -0
  168. package/src/stories/utilities/DeviceDetection.mdx +59 -0
  169. package/src/styles/_config.scss +30 -0
  170. package/src/styles/components/ThemeProvider.esm.js +1 -1
  171. package/src/styles/global/components/_button.scss +56 -52
  172. package/src/styles/global/components/_checkbox.scss +64 -59
  173. package/src/styles/global/components/_code.scss +19 -15
  174. package/src/styles/global/components/_input.scss +29 -37
  175. package/src/styles/global/components/_radioButton.scss +30 -26
  176. package/src/styles/global/components/_select.scss +56 -0
  177. package/src/styles/global/components/_typography.scss +97 -6
  178. package/src/styles/global/globalStyles.module.scss +1 -129
  179. package/src/styles/global/globalStyles.scss +87 -1
  180. package/src/styles/index.d.ts +1 -1
  181. package/src/styles/theme/components.esm.js +11 -7
  182. package/src/styles/theme/theme.esm.js +31 -41
  183. package/src/styles/theme/types.d.ts +4 -1
  184. package/src/styles/utilities/_functions.scss +117 -0
  185. package/src/styles/utilities/_mixins.scss +0 -0
  186. package/src/styles/utilities/_placeholders.scss +6 -0
  187. package/src/styles/utilities/color.d.ts +1 -1
  188. package/src/styles/utilities/constants.d.ts +1 -1
  189. package/src/styles/utilities/layout.d.ts +1 -1
  190. package/src/styles/utilities/layout.esm.js +3 -3
  191. package/src/{styles/utilities → utilities}/types.d.ts +61 -3
  192. package/src/utilities/types.esm.js +85 -0
  193. package/src/utilities/validations.d.ts +5 -0
  194. package/src/utilities/validations.esm.js +19 -1
  195. package/src/components/Button.esm.js +0 -28
  196. package/src/components/Button.module.css +0 -1
  197. package/src/components/Button.module.esm.js +0 -9
  198. package/src/components/Button.module.scss +0 -5
  199. package/src/components/Checkbox.d.ts +0 -7
  200. package/src/components/Checkbox.esm.js +0 -11
  201. package/src/components/Input.d.ts +0 -11
  202. package/src/components/Input.esm.js +0 -41
  203. package/src/components/Input.module.css +0 -1
  204. package/src/components/Input.module.esm.js +0 -11
  205. package/src/components/Input.module.scss +0 -141
  206. package/src/components/InputPassword.esm.js +0 -33
  207. package/src/components/Loader.esm.js +0 -21
  208. package/src/components/Modal.esm.js +0 -62
  209. package/src/components/Modal.module.css +0 -1
  210. package/src/components/Modal.module.esm.js +0 -13
  211. package/src/components/Modal.module.scss +0 -133
  212. package/src/components/RadioButton.d.ts +0 -7
  213. package/src/components/RadioButton.esm.js +0 -11
  214. package/src/styles/global/components/_mixins.scss +0 -2
  215. package/src/styles/global/components/button.d.ts +0 -7
  216. package/src/styles/global/components/loaders.module.css +0 -1
  217. package/src/styles/global/components/loaders.module.esm.js +0 -21
  218. package/src/styles/utilities/types.esm.js +0 -54
  219. package/src/{styles/global/components/loaders.d.ts → components/Loader/types.d.ts} +1 -1
  220. /package/src/{styles/global/components/loaders.esm.js → components/Loader/types.esm.js} +0 -0
  221. /package/src/components/{Progress.d.ts → Progress/Progress.d.ts} +0 -0
@@ -0,0 +1,266 @@
1
+ @use "../../styles/global/components/input";
2
+ @use "../../styles/utilities/_functions" as u;
3
+ @layer craftsman-component {
4
+ .inputPhone {
5
+ &[data-label-position="inside"] {
6
+ .input-label {
7
+ top: 15px;
8
+ left: 50px;
9
+ }
10
+ }
11
+
12
+ .react-international-phone-country-selector {
13
+ position: relative;
14
+ }
15
+
16
+ .react-international-phone-flag-emoji {
17
+ width: var(--react-international-phone-flag-width, 24px);
18
+ height: var(--react-international-phone-flag-height, 24px);
19
+ box-sizing: border-box;
20
+ }
21
+
22
+ .react-international-phone-country-selector-button {
23
+ display: flex;
24
+ height: var(--react-international-phone-height, 36px);
25
+ box-sizing: border-box;
26
+ align-items: center;
27
+ justify-content: center;
28
+ padding: 0;
29
+ border: 1px solid
30
+ var(
31
+ --react-international-phone-country-selector-border-color,
32
+ var(--react-international-phone-border-color, gainsboro)
33
+ );
34
+ margin: 0;
35
+ appearance: button;
36
+ -webkit-appearance: button;
37
+ background-color: var(
38
+ --react-international-phone-country-selector-background-color,
39
+ var(--react-international-phone-background-color, white)
40
+ );
41
+ cursor: pointer;
42
+ text-transform: none;
43
+ user-select: none;
44
+
45
+ &:hover {
46
+ background-color: var(--react-international-phone-country-selector-background-color-hover, whitesmoke);
47
+ }
48
+
49
+ &--hide-dropdown {
50
+ cursor: auto;
51
+
52
+ &:hover {
53
+ background-color: transparent;
54
+ }
55
+ }
56
+
57
+ &--disabled {
58
+ background-color: var(
59
+ --react-international-phone-disabled-country-selector-background-color,
60
+ var(--react-international-phone-disabled-background-color, whitesmoke)
61
+ );
62
+ cursor: auto;
63
+
64
+ &:hover {
65
+ background-color: var(
66
+ --react-international-phone-disabled-country-selector-background-color,
67
+ var(--react-international-phone-disabled-background-color, whitesmoke)
68
+ );
69
+ }
70
+ }
71
+
72
+ &__button-content {
73
+ display: flex;
74
+ align-items: center;
75
+ justify-content: center;
76
+ }
77
+
78
+ &__flag-emoji {
79
+ margin: 0 4px;
80
+
81
+ &--disabled {
82
+ opacity: 0.75;
83
+ }
84
+ }
85
+
86
+ &__dropdown-arrow {
87
+ border-top: var(--react-international-phone-country-selector-arrow-size, 4px) solid
88
+ var(--react-international-phone-country-selector-arrow-color, #777);
89
+ border-right: var(--react-international-phone-country-selector-arrow-size, 4px) solid transparent;
90
+ border-left: var(--react-international-phone-country-selector-arrow-size, 4px) solid transparent;
91
+ margin-right: 4px;
92
+ transition: all 0.1s ease-out;
93
+
94
+ &--active {
95
+ transform: rotateX(180deg);
96
+ }
97
+
98
+ &--disabled {
99
+ border-top-color: var(--react-international-phone-disabled-country-selector-arrow-color, #999);
100
+ }
101
+ }
102
+ }
103
+
104
+ .react-international-phone-country-selector-dropdown {
105
+ position: absolute;
106
+ z-index: 1000;
107
+ top: var(--react-international-phone-dropdown-top, 44px);
108
+ left: var(--react-international-phone-dropdown-left, 0);
109
+ display: flex;
110
+ width: 300px;
111
+ max-height: 200px;
112
+ flex-direction: column;
113
+ padding: 4px 0;
114
+ margin: 0;
115
+ background-color: var(
116
+ --react-international-phone-dropdown-item-background-color,
117
+ var(--react-international-phone-background-color, white)
118
+ );
119
+ box-shadow: var(--react-international-phone-dropdown-shadow, 2px 2px 16px rgba(0, 0, 0, 0.25));
120
+ color: var(
121
+ --react-international-phone-dropdown-item-text-color,
122
+ var(--react-international-phone-text-color, #222)
123
+ );
124
+ list-style: none;
125
+ overflow-y: scroll;
126
+
127
+ &__preferred-list-divider {
128
+ height: 1px;
129
+ border: none;
130
+ margin: var(--react-international-phone-dropdown-preferred-list-divider-margin, 0);
131
+ background: var(
132
+ --react-international-phone-dropdown-preferred-list-divider-color,
133
+ var(--react-international-phone-border-color, gainsboro)
134
+ );
135
+ }
136
+
137
+ &__list-item {
138
+ display: flex;
139
+ min-height: var(--react-international-phone-dropdown-item-height, 28px);
140
+ box-sizing: border-box;
141
+ align-items: center;
142
+ padding: 2px 8px;
143
+
144
+ &:hover {
145
+ background-color: var(
146
+ --react-international-phone-selected-dropdown-item-background-color,
147
+ var(--react-international-phone-selected-dropdown-item-background-color, whitesmoke)
148
+ );
149
+ cursor: pointer;
150
+ }
151
+
152
+ &--selected,
153
+ &--focused {
154
+ background-color: var(--react-international-phone-selected-dropdown-item-background-color, whitesmoke);
155
+ color: var(
156
+ --react-international-phone-selected-dropdown-item-text-color,
157
+ var(--react-international-phone-text-color, #222)
158
+ );
159
+
160
+ .react-international-phone-country-selector-dropdown__list-item-dial-code {
161
+ color: var(
162
+ --react-international-phone-selected-dropdown-item-dial-code-color,
163
+ var(--react-international-phone-dropdown-item-dial-code-color, gray)
164
+ );
165
+ }
166
+ }
167
+
168
+ &--focused {
169
+ background-color: var(
170
+ --react-international-phone-selected-dropdown-item-background-color,
171
+ var(--react-international-phone-selected-dropdown-item-background-color, whitesmoke)
172
+ );
173
+ }
174
+
175
+ &-flag-emoji {
176
+ margin-right: 8px;
177
+ }
178
+
179
+ &-country-name {
180
+ overflow: hidden;
181
+ margin-right: 8px;
182
+ font-size: var(--react-international-phone-dropdown-item-font-size, 14px);
183
+ text-overflow: ellipsis;
184
+ white-space: nowrap;
185
+ }
186
+
187
+ &-dial-code {
188
+ color: var(--react-international-phone-dropdown-item-dial-code-color, gray);
189
+ font-size: var(--react-international-phone-dropdown-item-font-size, 14px);
190
+ }
191
+ }
192
+ }
193
+
194
+ .react-international-phone-dial-code-preview {
195
+ display: flex;
196
+ align-items: center;
197
+ justify-content: center;
198
+ padding: 0 8px;
199
+ border: 1px solid
200
+ var(
201
+ --react-international-phone-dial-code-preview-border-color,
202
+ var(--react-international-phone-border-color, gainsboro)
203
+ );
204
+ margin-right: -1px;
205
+ background-color: var(
206
+ --react-international-phone-dial-code-preview-background-color,
207
+ var(--react-international-phone-background-color, white)
208
+ );
209
+ color: var(
210
+ --react-international-phone-dial-code-preview-text-color,
211
+ var(--react-international-phone-text-color, #222)
212
+ );
213
+ font-size: var(
214
+ --react-international-phone-dial-code-preview-font-size,
215
+ var(--react-international-phone-font-size, 13px)
216
+ );
217
+
218
+ &--disabled {
219
+ background-color: var(
220
+ --react-international-phone-dial-code-preview-disabled-background-color,
221
+ var(--react-international-phone-disabled-background-color, whitesmoke)
222
+ );
223
+ color: var(
224
+ --react-international-phone-dial-code-preview-disabled-text-color,
225
+ var(--react-international-phone-disabled-text-color, #666)
226
+ );
227
+ }
228
+ }
229
+
230
+ .react-international-phone-input-container {
231
+ display: flex;
232
+
233
+ .react-international-phone-country-selector-button {
234
+ border-radius: var(--react-international-phone-border-radius, 4px);
235
+ margin-right: -1px;
236
+ border-bottom-right-radius: 0;
237
+ border-top-right-radius: 0;
238
+ }
239
+
240
+ .react-international-phone-input {
241
+ overflow: visible;
242
+ height: var(--react-international-phone-height, 36px);
243
+ box-sizing: border-box;
244
+ padding: 0 8px;
245
+ border: 1px solid var(--react-international-phone-border-color, gainsboro);
246
+ border-radius: var(--react-international-phone-border-radius, 4px);
247
+ margin: 0;
248
+ background-color: var(--react-international-phone-background-color, white);
249
+ border-bottom-left-radius: 0;
250
+ border-top-left-radius: 0;
251
+ color: var(--react-international-phone-text-color, #222);
252
+ font-family: inherit;
253
+ font-size: var(--react-international-phone-font-size, 13px);
254
+
255
+ &:focus {
256
+ outline: none;
257
+ }
258
+
259
+ &--disabled {
260
+ background-color: var(--react-international-phone-disabled-background-color, whitesmoke);
261
+ color: var(--react-international-phone-disabled-text-color, #666);
262
+ }
263
+ }
264
+ }
265
+ }
266
+ }
@@ -0,0 +1,27 @@
1
+ "use client";
2
+ import { InputWrapper as e } from "../Input/InputWrapper.esm.js";
3
+ import './InputPhone.css';/* empty css */
4
+ import t from "clsx";
5
+ import { jsx as n } from "react/jsx-runtime";
6
+ import r, { useId as i } from "react";
7
+ import { PhoneInput as a } from "react-international-phone";
8
+ //#region src/components/InputPhone/InputPhone.tsx
9
+ var o = ({ label: o, id: s, labelPosition: c = "top", required: l = !1, defaultCountry: u = "us", error: d, style: f, className: p, ...m }) => {
10
+ let h = i(), g = s || h, _ = r.useRef(null);
11
+ return /* @__PURE__ */ n(e, {
12
+ id: g,
13
+ className: t("inputPhone", p),
14
+ label: o,
15
+ labelPosition: c,
16
+ error: d,
17
+ required: l,
18
+ style: f,
19
+ children: /* @__PURE__ */ n(a, {
20
+ defaultCountry: u,
21
+ ...m,
22
+ ref: _
23
+ })
24
+ });
25
+ };
26
+ //#endregion
27
+ export { o as InputPhone };
@@ -0,0 +1,31 @@
1
+ # Loader — Agent Usage Notes
2
+
3
+ Import:
4
+
5
+ ```tsx
6
+ import { Loader } from "@stamcat/craftsman/Loader";
7
+ ```
8
+
9
+ Props:
10
+
11
+ - Inherits all native `<div>` props.
12
+ - `type` is required and must be one of:
13
+ - `"dots"`
14
+ - `"dots-trace"`
15
+ - `"dots-bounce"`
16
+ - `"dots-orbit"`
17
+ - `"dashes"`
18
+ - `"spinner"`
19
+ - `"swirl"`
20
+ - `"ball"`
21
+ - `"boxy"`
22
+ - `"factory"`
23
+ - `color?: string` (default: `"black"`)
24
+ - `width?: number` (optional, variant-dependent default behavior)
25
+ - `styles?: React.CSSProperties` (inline style override)
26
+
27
+ Example:
28
+
29
+ ```tsx
30
+ <Loader type="spinner" color="var(--blue500)" width={40} aria-label="Loading" />
31
+ ```
@@ -1,8 +1,7 @@
1
- import { LoaderStyle } from '../styles/global/components/loaders';
1
+ import { LoaderStyle } from './types';
2
2
  export type LoaderProps = React.ComponentProps<"div"> & {
3
3
  type: LoaderStyle;
4
4
  color?: string;
5
5
  width?: number;
6
- styles?: React.CSSProperties;
7
6
  };
8
7
  export declare const Loader: React.FC<LoaderProps>;
@@ -0,0 +1,19 @@
1
+ "use client";
2
+ import { loaders as e } from "./types.esm.js";
3
+ import t from "./loaders.module.esm.js";
4
+ import n from "clsx";
5
+ import { jsx as r } from "react/jsx-runtime";
6
+ //#region src/components/Loader/Loader.tsx
7
+ var i = (i) => {
8
+ let { type: a, color: o = "black", width: s, className: c, style: l, ...u } = i, d = e[a](o, s);
9
+ return /* @__PURE__ */ r("div", {
10
+ className: n("loader", t[a], c),
11
+ style: {
12
+ ...d,
13
+ ...l
14
+ },
15
+ ...u
16
+ });
17
+ };
18
+ //#endregion
19
+ export { i as Loader };
@@ -0,0 +1 @@
1
+ @layer craftsman-base{._dots_mugu5_2{aspect-ratio:1;width:var(--_l5w);margin:0 var(--_l5w2);border-radius:50%;animation:1s linear infinite alternate _l5_mugu5_1}@keyframes _l5_mugu5_1{0%{box-shadow:var(--_l5w2) 0 var(--_l5c), var(--_l5w3) 0 color-mix(in srgb, var(--_l5c) 80%, white 75%);background:var(--_l5c)}33%{box-shadow:var(--_l5w2) 0 var(--_l5c), var(--_l5w3) 0 color-mix(in srgb, var(--_l5c) 80%, white 75%);background:color-mix(in srgb, var(--_l5c) 80%, white 75%)}66%{box-shadow:var(--_l5w2) 0 color-mix(in srgb, var(--_l5c) 80%, white 75%), var(--_l5w3) 0 var(--_l5c);background:color-mix(in srgb, var(--_l5c) 80%, white 75%)}to{box-shadow:var(--_l5w2) 0 color-mix(in srgb, var(--_l5c) 80%, white 75%), var(--_l5w3) 0 var(--_l5c);background:var(--_l5c)}}@keyframes _l3_mugu5_1{to{transform:rotate(1turn)}}._dots-trace_mugu5_41{width:var(--_dtw);aspect-ratio:4;background:radial-gradient(circle closest-side, var(--_dtc) 90%, #0000) 0/33.3333% 100% space;clip-path:inset(0 100% 0 0);animation:1s steps(4,end) infinite _l1_mugu5_1}@keyframes _l1_mugu5_1{to{clip-path:inset(0 -34% 0 0)}}._dots-orbit_mugu5_53{width:var(--_dow);aspect-ratio:1;background:var(--_doc);border-radius:50%;animation:2s linear infinite _l22-0_mugu5_1;display:grid}._dots-orbit_mugu5_53:before,._dots-orbit_mugu5_53:after{content:"";background:inherit;border-radius:50%;grid-area:1/1;margin:15%;animation:1s infinite _l22_mugu5_1;transform:rotate(0)translate(150%)}._dots-orbit_mugu5_53:after{animation-delay:-.5s}@keyframes _l22-0_mugu5_1{to{transform:rotate(1turn)}}@keyframes _l22_mugu5_1{to{transform:rotate(1turn)translate(150%)}}._dashes_mugu5_83{width:var(--_dshw);height:calc(var(--_dshw) * .3);background:linear-gradient(var(--_dshc) 0 0) left/var(--_dshw2) 4px, linear-gradient(var(--_dshc) 0 0) center/var(--_dshw2) 4px, linear-gradient(var(--_dshc) 0 0) right/var(--_dshw2) 4px;background-repeat:no-repeat;animation:1s linear infinite _dashes_mugu5_83}@keyframes _dashes_mugu5_83{0%{background-size:var(--_dshw2) 4px, var(--_dshw2) 4px, var(--_dshw2) 4px;opacity:1}33%{background-size:var(--_dshw2) var(--_dshw2), var(--_dshw2) 4px, var(--_dshw2) 4px;opacity:.7}66%{background-size:var(--_dshw2) 4px, var(--_dshw2) var(--_dshw2), var(--_dshw2) 4px;opacity:.7}to{background-size:var(--_dshw2) 4px, var(--_dshw2) 4px, var(--_dshw2) var(--_dshw2);opacity:1}}._spinner_mugu5_108{width:var(--_spnw);aspect-ratio:1;border:var(--_spnw2) solid color-mix(in srgb, var(--_spnc) 20%, transparent);border-right-color:var(--_spnc);border-radius:50%;animation:1s linear infinite _l2_mugu5_1}@keyframes _l2_mugu5_1{to{transform:rotate(1turn)}}._swirl_mugu5_121{width:var(--_swrlw);padding:var(--_swrlw2);aspect-ratio:1;background:var(--_swrlc);--_m:conic-gradient(#0000 10%,#000), linear-gradient(#000 0 0) content-box;-webkit-mask:var(--_m);-webkit-mask:var(--_m);mask:var(--_m);-webkit-mask-composite:source-out;border-radius:50%;animation:1s linear infinite _l3_mugu5_1;-webkit-mask-composite:source-out;mask-composite:subtract}._ball_mugu5_141{width:var(--_ballw);aspect-ratio:1;background:radial-gradient(farthest-side, var(--_ballc) 95%, #0000) 50% 1px/var(--_ballw2) var(--_ballw2) no-repeat, radial-gradient(farthest-side, #0000 calc(100% - var(--_ballw2)), #ccc 0);border-radius:50%;animation:2s linear infinite _l9_mugu5_1}@keyframes _l9_mugu5_1{to{transform:rotate(1turn)}}._boxy_mugu5_153{width:var(--_boxw);height:var(--_boxw2);background:linear-gradient(var(--_boxc) 0 0) left -25% top 0/20% 100% no-repeat #ddd;animation:1s steps(6,end) infinite _l7_mugu5_1;-webkit-mask:linear-gradient(90deg,#000 70%,#0000 0) 0/20% 100%}@keyframes _l7_mugu5_1{to{background-position:right -25% top 0}}}
@@ -0,0 +1,21 @@
1
+ import './loaders.module.css';//#region src/components/Loader/loaders.module.scss
2
+ var e = "_dots_mugu5_2", t = "_l5_mugu5_1", n = "_dots-trace_mugu5_41", r = "_l1_mugu5_1", i = "_dots-orbit_mugu5_53", a = "_l22-0_mugu5_1", o = "_l22_mugu5_1", s = "_dashes_mugu5_83", c = "_spinner_mugu5_108", l = "_l2_mugu5_1", u = "_swirl_mugu5_121", d = "_l3_mugu5_1", f = "_ball_mugu5_141", p = "_l9_mugu5_1", m = "_boxy_mugu5_153", h = "_l7_mugu5_1", g = {
3
+ dots: e,
4
+ l5: t,
5
+ dotsTrace: n,
6
+ l1: r,
7
+ dotsOrbit: i,
8
+ l220: a,
9
+ l22: o,
10
+ dashes: s,
11
+ spinner: c,
12
+ l2: l,
13
+ swirl: u,
14
+ l3: d,
15
+ ball: f,
16
+ l9: p,
17
+ boxy: m,
18
+ l7: h
19
+ };
20
+ //#endregion
21
+ export { f as ball, m as boxy, s as dashes, g as default, e as dots, i as dotsOrbit, n as dotsTrace, r as l1, l as l2, o as l22, a as l220, d as l3, t as l5, h as l7, p as l9, c as spinner, u as swirl };
@@ -1,3 +1,4 @@
1
+ @layer craftsman-base {
1
2
  .dots {
2
3
  aspect-ratio: 1;
3
4
  border-radius: 50%;
@@ -243,4 +244,4 @@
243
244
  // 0%,70% {transform:translate(0)}
244
245
  // 100% {transform:translate(200%)}
245
246
  // }
246
-
247
+ }
@@ -0,0 +1,47 @@
1
+ # Modal — Agent Usage Notes
2
+
3
+ Import:
4
+
5
+ ```tsx
6
+ import { Modal } from "@stamcat/craftsman/Modal";
7
+ ```
8
+
9
+ Props:
10
+
11
+ - Inherits all native `<div>` props.
12
+ - `visible?: boolean` (when falsy, component renders nothing)
13
+ - `onDismiss?: () => void`
14
+ - `type?: "dialog" | "panel"` (default: `"dialog"`)
15
+ - `header?: string | React.ReactNode`
16
+ - `backgroundDismiss?: boolean` (default behavior: `true`)
17
+ - `hideDismissIcon?: boolean` (default behavior: close icon is shown)
18
+ - `footer?: React.ReactNode`
19
+ - `styles?: React.CSSProperties` (applies to outer modal wrapper)
20
+
21
+ Behavior notes:
22
+
23
+ - Modal is controlled; parent owns open/close state via `visible` and `onDismiss`.
24
+ - Close icon and background click both dismiss through `onDismiss`.
25
+ - Background dismiss only runs when `backgroundDismiss` is `true` or `undefined`.
26
+ - Dismiss uses a short close animation before calling `onDismiss` (~280ms timeout).
27
+ - `type="dialog"` renders centered responsive dialog sizing; `type="panel"` renders a right-side panel.
28
+ - `footer` is rendered in an action row container below modal content.
29
+
30
+ Example:
31
+
32
+ ```tsx
33
+ const [open, setOpen] = useState(false);
34
+
35
+ <>
36
+ <Button variant="primary" onClick={() => setOpen(true)}>Open</Button>
37
+ <Modal
38
+ visible={open}
39
+ onDismiss={() => setOpen(false)}
40
+ type="dialog"
41
+ header="Confirm Action"
42
+ footer={<><Button onClick={() => setOpen(false)}>Cancel</Button><Button variant="primary">Confirm</Button></>}
43
+ >
44
+ <p>Are you sure?</p>
45
+ </Modal>
46
+ </>
47
+ ```
@@ -0,0 +1 @@
1
+ .modal.wrapper,.modal .background{width:100%;height:100%;position:fixed;inset:0}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes slideIn{0%{transform:translateY(100%)}to{transform:translateY(0)}}@keyframes slideOut{0%{transform:translateY(0)}to{transform:translateY(100%)}}@layer craftsman-component{.modal.wrapper{z-index:1000;justify-content:center;align-items:center;display:flex}.modal .background{z-index:1001;background-color:#00000080;animation-fill-mode:forwards}.modal .background[data-is-closing=true]{animation:.3s ease-in-out fadeOut}.modal .background[data-is-closing=false]{animation:.3s ease-in-out fadeIn}.modal .content{padding:var(--w-gutter);z-index:1002;background-color:var(--white);-webkit-overflow-scrolling:touch;touch-action:pan-y;max-height:80vh;animation-fill-mode:forwards;overflow-y:auto}.modal .content[data-is-closing=true]{animation:.3s ease-in-out slideOut}.modal .content[data-is-closing=false]{animation:.3s ease-in-out slideIn}.modal .content.panel{height:100%;position:fixed;top:0;right:0}.modal .content.dialog{border-radius:8px}.modal .content>header{width:100%;margin-bottom:calc(var(--w-gutter) * .5);justify-content:space-between;display:inline-flex}.modal .content>header>button:only-child{margin-left:auto}.modal .actionContainer{margin-top:calc(var(--w-gutter) * 2);background-color:var(--white);gap:var(--w-gutter);height:fit-content;display:flex}.modal .closeModal{border-radius:50%;justify-content:center;width:30px;height:30px;padding:0;text-decoration:none;display:inline-flex}@media (width>=0) and (width<=660px){.modal .content.panel,.modal .content.dialog{width:100%;height:100%}}@media (width>=660px){.modal .content.panel{width:calc((var(--w-column) * 4) + (var(--w-gutter) * 3))}.modal .content.dialog{width:calc((var(--w-column) * 6) + (var(--w-gutter) * 5))}}@media (width>=1040px){.modal .content.dialog{width:calc((var(--w-column) * 8) + (var(--w-gutter) * 7))}}}
@@ -8,7 +8,6 @@ export interface ModalProps extends React.ComponentPropsWithoutRef<"div"> {
8
8
  backgroundDismiss?: boolean;
9
9
  hideDismissIcon?: boolean;
10
10
  footer?: React.ReactNode;
11
- styles?: React.CSSProperties;
12
11
  }
13
12
  type ModalState = {
14
13
  isClosing: boolean;
@@ -0,0 +1,150 @@
1
+ @use "../../styles/global/components/modal";
2
+ @use "../../styles/utilities/_functions" as u;
3
+
4
+ @keyframes fadeIn {
5
+ from {
6
+ opacity: 0;
7
+ }
8
+
9
+ to {
10
+ opacity: 1;
11
+ }
12
+ }
13
+
14
+ @keyframes fadeOut {
15
+ from {
16
+ opacity: 1;
17
+ }
18
+
19
+ to {
20
+ opacity: 0;
21
+ }
22
+ }
23
+
24
+ @keyframes slideIn {
25
+ from {
26
+ transform: translateY(100%);
27
+ }
28
+
29
+ to {
30
+ transform: translateY(0);
31
+ }
32
+ }
33
+
34
+ @keyframes slideOut {
35
+ from {
36
+ transform: translateY(0);
37
+ }
38
+
39
+ to {
40
+ transform: translateY(100%);
41
+ }
42
+ }
43
+ @layer craftsman-component {
44
+ .modal {
45
+ &.wrapper {
46
+ @extend %modal-overlay;
47
+ z-index: 1000;
48
+ display: flex;
49
+ justify-content: center;
50
+ align-items: center;
51
+ }
52
+
53
+ .background {
54
+ @extend %modal-overlay;
55
+ z-index: 1001;
56
+ background-color: rgba(0, 0, 0, 0.5);
57
+ animation-fill-mode: forwards;
58
+
59
+ &[data-is-closing="true"] {
60
+ animation: fadeOut 0.3s ease-in-out;
61
+ }
62
+
63
+ &[data-is-closing="false"] {
64
+ animation: fadeIn 0.3s ease-in-out;
65
+ }
66
+ }
67
+
68
+ .content {
69
+ padding: #{u.width("gutter")};
70
+ z-index: 1002;
71
+ background-color: var(--white);
72
+ max-height: 80vh;
73
+ overflow-y: auto;
74
+ -webkit-overflow-scrolling: touch;
75
+ touch-action: pan-y;
76
+ animation-fill-mode: forwards;
77
+
78
+ &[data-is-closing="true"] {
79
+ animation: slideOut 0.3s ease-in-out;
80
+ }
81
+
82
+ &[data-is-closing="false"] {
83
+ animation: slideIn 0.3s ease-in-out;
84
+ }
85
+
86
+ &.panel {
87
+ position: fixed;
88
+ top: 0;
89
+ right: 0;
90
+ height: 100%;
91
+ }
92
+
93
+ &.dialog {
94
+ border-radius: 8px;
95
+ }
96
+
97
+ > header {
98
+ display: inline-flex;
99
+ width: 100%;
100
+ justify-content: space-between;
101
+ margin-bottom: #{u.width("gutter", 0.5)};
102
+
103
+ > button:only-child {
104
+ margin-left: auto;
105
+ }
106
+ }
107
+ }
108
+
109
+ .actionContainer {
110
+ margin-top: #{u.width("gutter", 2)};
111
+ background-color: var(--white);
112
+ height: fit-content;
113
+ display: flex;
114
+ gap: #{u.width("gutter")};
115
+ }
116
+ .closeModal {
117
+ text-decoration: none;
118
+ height: 30px;
119
+ width: 30px;
120
+ border-radius: 50%;
121
+ padding: 0;
122
+ display: inline-flex;
123
+ justify-content: center;
124
+ };
125
+
126
+ @include u.breakpoint(mobileOnly) {
127
+ .content.panel,
128
+ .content.dialog {
129
+ width: 100%;
130
+ height: 100%;
131
+ }
132
+ }
133
+
134
+ @include u.breakpoint(tablet) {
135
+ .content.panel {
136
+ width: #{u.width("column", 4)};
137
+ }
138
+
139
+ .content.dialog {
140
+ width: #{u.width("column", 6)};
141
+ }
142
+ }
143
+
144
+ @include u.breakpoint(desktop) {
145
+ .content.dialog {
146
+ width: #{u.width("column", 8)};
147
+ }
148
+ }
149
+ }
150
+ }
@@ -0,0 +1,53 @@
1
+ "use client";
2
+ import { Button as e } from "../Button/Button.esm.js";
3
+ import { color as t } from "../../styles/utilities/color.esm.js";
4
+ import './Modal.css';/* empty css */
5
+ import n from "clsx";
6
+ import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
7
+ import o from "react";
8
+ import { LuX as s } from "react-icons/lu";
9
+ //#region src/components/Modal/Modal.tsx
10
+ var c = class extends o.PureComponent {
11
+ state = { isClosing: !1 };
12
+ onDismiss = () => {
13
+ this.props.onDismiss && (this.setState({ isClosing: !0 }), setTimeout(() => {
14
+ this.props.onDismiss && this.props.onDismiss(), this.setState({ isClosing: !1 });
15
+ }, 280));
16
+ };
17
+ onClickBackground = () => {
18
+ (this.props.backgroundDismiss ?? !0) === !0 && this.onDismiss();
19
+ };
20
+ render() {
21
+ let o = this.props.type || "dialog";
22
+ return this.props.visible ? /* @__PURE__ */ a("div", {
23
+ className: n("modal", "wrapper", this.props.className),
24
+ style: this.props.style,
25
+ children: [/* @__PURE__ */ a("div", {
26
+ className: n("content", o),
27
+ "data-is-closing": this.state.isClosing,
28
+ children: [
29
+ /* @__PURE__ */ a("header", { children: [this.props.header && /* @__PURE__ */ i(r, { children: this.props.header }), !this.props.hideDismissIcon && /* @__PURE__ */ i(e, {
30
+ variant: "primary",
31
+ className: "closeModal",
32
+ onClick: this.onDismiss,
33
+ children: /* @__PURE__ */ i(s, {
34
+ fill: t("white"),
35
+ size: 18
36
+ })
37
+ })] }),
38
+ /* @__PURE__ */ i("section", { children: this.props.children }),
39
+ this.props.footer && /* @__PURE__ */ i("footer", {
40
+ className: "actionContainer",
41
+ children: this.props.footer
42
+ })
43
+ ]
44
+ }), /* @__PURE__ */ i("div", {
45
+ className: "background",
46
+ "data-is-closing": this.state.isClosing,
47
+ onClick: this.onClickBackground
48
+ })]
49
+ }) : /* @__PURE__ */ i(r, {});
50
+ }
51
+ };
52
+ //#endregion
53
+ export { c as Modal };