@companix/uikit 0.0.2 → 0.0.4

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 (222) hide show
  1. package/dist/Button/index.d.ts +20 -0
  2. package/dist/ButtonGroup/index.d.ts +7 -0
  3. package/dist/Checkbox/index.d.ts +10 -0
  4. package/dist/Countdown/index.d.ts +7 -0
  5. package/dist/DateInput/index.d.ts +13 -0
  6. package/dist/DatePicker/Calendar.d.ts +14 -0
  7. package/dist/DatePicker/CalendarHeader.d.ts +10 -0
  8. package/dist/DatePicker/index.d.ts +12 -0
  9. package/dist/Dialog/index.d.ts +12 -0
  10. package/dist/DialogAlert/Alert.d.ts +19 -0
  11. package/dist/DialogAlert/Viewport.d.ts +8 -0
  12. package/dist/DialogAlert/index.d.ts +11 -0
  13. package/dist/Drawer/index.d.ts +13 -0
  14. package/dist/File/index.d.ts +10 -0
  15. package/dist/Form/index.d.ts +17 -0
  16. package/dist/Icon/index.d.ts +7 -0
  17. package/dist/LoadButton/index.d.ts +5 -0
  18. package/dist/NumberInput/index.d.ts +6 -0
  19. package/dist/OptionItem/OptionItem.d.ts +7 -0
  20. package/dist/OptionItem/OptionsList.d.ts +8 -0
  21. package/dist/Popover/index.d.ts +26 -0
  22. package/dist/Radio/index.d.ts +20 -0
  23. package/dist/Scrollable/ImitateScroll.d.ts +10 -0
  24. package/dist/Scrollable/index.d.ts +33 -0
  25. package/dist/Select/SelectInput.d.ts +14 -0
  26. package/dist/Select/index.d.ts +15 -0
  27. package/dist/SelectTags/index.d.ts +15 -0
  28. package/dist/Spinner/index.d.ts +8 -0
  29. package/dist/Stepper/index.d.ts +8 -0
  30. package/dist/Switch/index.d.ts +10 -0
  31. package/dist/Tabs/index.d.ts +13 -0
  32. package/dist/TextArea/index.d.ts +7 -0
  33. package/dist/Toaster/RemoveListener.d.ts +3 -0
  34. package/dist/Toaster/Toast.d.ts +9 -0
  35. package/dist/Toaster/Viewport.d.ts +13 -0
  36. package/dist/Toaster/index.d.ts +15 -0
  37. package/dist/Tooltip/index.d.ts +8 -0
  38. package/dist/__hooks/use-frooze-closing.d.ts +5 -0
  39. package/dist/__hooks/use-loading.d.ts +8 -0
  40. package/dist/__hooks/use-local-storage.d.ts +1 -0
  41. package/dist/__hooks/use-popover-position.d.ts +8 -0
  42. package/dist/__hooks/use-previos.d.ts +2 -0
  43. package/dist/__hooks/use-resize.d.ts +3 -0
  44. package/dist/__hooks/use-scrollbox.d.ts +7 -0
  45. package/dist/__hooks/use-stepper-input.d.ts +13 -0
  46. package/dist/__hooks/use-update.d.ts +1 -0
  47. package/dist/__hooks/useCalendar.d.ts +17 -0
  48. package/dist/__hooks/useCalendarOptions-copy.d.ts +22 -0
  49. package/dist/__hooks/useCalendarOptions.d.ts +31 -0
  50. package/dist/__libs/calendar.d.ts +25 -0
  51. package/dist/__utils/utils.d.ts +25 -0
  52. package/dist/bundle.es.js +58 -0
  53. package/dist/bundle.es10.js +38 -0
  54. package/dist/bundle.es11.js +33 -0
  55. package/dist/bundle.es12.js +18 -0
  56. package/dist/bundle.es13.js +10 -0
  57. package/dist/bundle.es14.js +35 -0
  58. package/dist/bundle.es15.js +27 -0
  59. package/dist/bundle.es16.js +23 -0
  60. package/dist/bundle.es17.js +24 -0
  61. package/dist/bundle.es18.js +15 -0
  62. package/dist/bundle.es19.js +40 -0
  63. package/dist/bundle.es2.js +45 -0
  64. package/dist/bundle.es20.js +18 -0
  65. package/dist/bundle.es21.js +36 -0
  66. package/dist/bundle.es22.js +23 -0
  67. package/dist/bundle.es23.js +42 -0
  68. package/dist/bundle.es24.js +113 -0
  69. package/dist/bundle.es25.js +114 -0
  70. package/dist/bundle.es26.js +38 -0
  71. package/dist/bundle.es27.js +13 -0
  72. package/dist/bundle.es28.js +27 -0
  73. package/dist/bundle.es29.js +38 -0
  74. package/dist/bundle.es3.js +13 -0
  75. package/dist/bundle.es30.js +26 -0
  76. package/dist/bundle.es31.js +83 -0
  77. package/dist/bundle.es32.js +20 -0
  78. package/dist/bundle.es33.js +16 -0
  79. package/dist/bundle.es34.js +24 -0
  80. package/dist/bundle.es35.js +7 -0
  81. package/dist/bundle.es36.js +23 -0
  82. package/dist/bundle.es37.js +16 -0
  83. package/dist/bundle.es38.js +72 -0
  84. package/dist/bundle.es39.js +70 -0
  85. package/dist/bundle.es4.js +87 -0
  86. package/dist/bundle.es40.js +34 -0
  87. package/dist/bundle.es41.js +70 -0
  88. package/dist/bundle.es42.js +33 -0
  89. package/dist/bundle.es43.js +77 -0
  90. package/dist/bundle.es44.js +51 -0
  91. package/dist/bundle.es45.js +45 -0
  92. package/dist/bundle.es5.js +87 -0
  93. package/dist/bundle.es6.js +80 -0
  94. package/dist/bundle.es7.js +28 -0
  95. package/dist/bundle.es8.js +87 -0
  96. package/dist/bundle.es9.js +75 -0
  97. package/dist/index.d.ts +30 -0
  98. package/{src → dist}/index.scss +3 -0
  99. package/{src → dist}/mixins.scss +4 -3
  100. package/{src → dist}/theme.scss +0 -2
  101. package/dist/types.d.ts +13 -0
  102. package/package.json +10 -6
  103. package/.eslintrc +0 -54
  104. package/declaration.d.ts +0 -4
  105. package/index.html +0 -12
  106. package/playground/App.tsx +0 -166
  107. package/playground/Example.tsx +0 -14
  108. package/playground/Test.tsx +0 -44
  109. package/playground/animation-test-1/index.scss +0 -20
  110. package/playground/animation-test-1/index.tsx +0 -17
  111. package/playground/animation-test-2/index.scss +0 -62
  112. package/playground/animation-test-2/index.tsx +0 -32
  113. package/playground/bootstrap.tsx +0 -19
  114. package/playground/buttons/index.tsx +0 -132
  115. package/playground/checkbox/index.tsx +0 -64
  116. package/playground/date-input/index.tsx +0 -45
  117. package/playground/date-picker/index.tsx +0 -41
  118. package/playground/dialog/index.tsx +0 -92
  119. package/playground/dialog-alert/index.tsx +0 -47
  120. package/playground/drawer/index.tsx +0 -55
  121. package/playground/index.css +0 -33
  122. package/playground/index.scss +0 -270
  123. package/playground/input/index.tsx +0 -112
  124. package/playground/number-inputs/index.tsx +0 -50
  125. package/playground/popovers/index.tsx +0 -70
  126. package/playground/radio-group/index.tsx +0 -69
  127. package/playground/select/index.tsx +0 -72
  128. package/playground/select-tags/index.tsx +0 -36
  129. package/playground/styles.scss +0 -2
  130. package/playground/switch/index.tsx +0 -44
  131. package/playground/tabs/index.tsx +0 -16
  132. package/playground/test.scss +0 -0
  133. package/playground/text-area/index.tsx +0 -17
  134. package/playground/text-input/index.tsx +0 -12
  135. package/playground/toaster/index.tsx +0 -156
  136. package/playground/tooltip/index.tsx +0 -26
  137. package/src/Button/index.tsx +0 -72
  138. package/src/ButtonGroup/index.tsx +0 -20
  139. package/src/Checkbox/index.tsx +0 -46
  140. package/src/Countdown/index.tsx +0 -54
  141. package/src/DateInput/index.tsx +0 -96
  142. package/src/DatePicker/Calendar.tsx +0 -157
  143. package/src/DatePicker/CalendarHeader.tsx +0 -139
  144. package/src/DatePicker/index.tsx +0 -177
  145. package/src/Dialog/index.tsx +0 -31
  146. package/src/DialogAlert/Alert.tsx +0 -78
  147. package/src/DialogAlert/Viewport.tsx +0 -52
  148. package/src/DialogAlert/index.tsx +0 -37
  149. package/src/Drawer/index.tsx +0 -46
  150. package/src/File/index.tsx +0 -60
  151. package/src/Form/index.tsx +0 -131
  152. package/src/Icon/index.tsx +0 -43
  153. package/src/LoadButton/index.tsx +0 -17
  154. package/src/NumberInput/index.tsx +0 -74
  155. package/src/OptionItem/OptionItem.tsx +0 -49
  156. package/src/OptionItem/OptionsList.tsx +0 -26
  157. package/src/Popover/index.tsx +0 -117
  158. package/src/Radio/index.tsx +0 -68
  159. package/src/Scrollable/ImitateScroll.tsx +0 -141
  160. package/src/Scrollable/index.tsx +0 -141
  161. package/src/Select/SelectInput.tsx +0 -131
  162. package/src/Select/index.tsx +0 -134
  163. package/src/SelectTags/index.tsx +0 -192
  164. package/src/Spinner/index.tsx +0 -19
  165. package/src/Stepper/index.tsx +0 -76
  166. package/src/Switch/index.tsx +0 -49
  167. package/src/Tabs/index.tsx +0 -89
  168. package/src/TextArea/index.tsx +0 -51
  169. package/src/Toaster/RemoveListener.tsx +0 -11
  170. package/src/Toaster/Toast.tsx +0 -69
  171. package/src/Toaster/Viewport.tsx +0 -117
  172. package/src/Toaster/index.tsx +0 -52
  173. package/src/Tooltip/index.tsx +0 -33
  174. package/src/__hooks/use-frooze-closing.ts +0 -51
  175. package/src/__hooks/use-loading.ts +0 -34
  176. package/src/__hooks/use-local-storage.ts +0 -19
  177. package/src/__hooks/use-popover-position.ts +0 -24
  178. package/src/__hooks/use-previos.ts +0 -25
  179. package/src/__hooks/use-resize.ts +0 -41
  180. package/src/__hooks/use-scrollbox.ts +0 -45
  181. package/src/__hooks/use-stepper-input.ts +0 -82
  182. package/src/__hooks/use-update.ts +0 -19
  183. package/src/__hooks/useCalendar.ts +0 -104
  184. package/src/__hooks/useCalendarOptions-copy.ts +0 -87
  185. package/src/__hooks/useCalendarOptions.ts +0 -68
  186. package/src/__libs/calendar.ts +0 -175
  187. package/src/__utils/utils.ts +0 -137
  188. package/src/index.ts +0 -36
  189. package/src/types.ts +0 -14
  190. package/tailwind.config.js +0 -91
  191. package/themes/classic/animations.scss +0 -179
  192. package/themes/classic/classic.scss +0 -493
  193. package/tsconfig.json +0 -27
  194. package/vite.build.ts +0 -35
  195. package/vite.config.ts +0 -33
  196. /package/{src → dist}/Button/Button.scss +0 -0
  197. /package/{src → dist}/ButtonGroup/ButtonGroup.scss +0 -0
  198. /package/{src → dist}/Checkbox/Checkbox.scss +0 -0
  199. /package/{src → dist}/DateInput/DateInput.scss +0 -0
  200. /package/{src → dist}/DatePicker/Calendar.scss +0 -0
  201. /package/{src → dist}/DatePicker/DatePicker.scss +0 -0
  202. /package/{src → dist}/Dialog/Dialog.scss +0 -0
  203. /package/{src → dist}/Dialog/Popup.scss +0 -0
  204. /package/{src → dist}/DialogAlert/Alert.scss +0 -0
  205. /package/{src → dist}/Drawer/Drawer.scss +0 -0
  206. /package/{src → dist}/Form/Form.scss +0 -0
  207. /package/{src → dist}/Form/Input.scss +0 -0
  208. /package/{src → dist}/Icon/icon.scss +0 -0
  209. /package/{src → dist}/OptionItem/Option.scss +0 -0
  210. /package/{src → dist}/Popover/Popover.scss +0 -0
  211. /package/{src → dist}/Radio/Radio.scss +0 -0
  212. /package/{src → dist}/Scrollable/Scrollable.scss +0 -0
  213. /package/{src → dist}/Select/Select.scss +0 -0
  214. /package/{src → dist}/SelectTags/SelectTags.scss +0 -0
  215. /package/{src → dist}/Spinner/Spinner.scss +0 -0
  216. /package/{src → dist}/Stepper/StepperInput.scss +0 -0
  217. /package/{src → dist}/Switch/Switch.scss +0 -0
  218. /package/{src → dist}/Tabs/Tabs.scss +0 -0
  219. /package/{src → dist}/TextArea/TextArea.scss +0 -0
  220. /package/{src → dist}/Toaster/Toaster.scss +0 -0
  221. /package/{src → dist}/Tooltip/Tooltip.scss +0 -0
  222. /package/{src/css.scss → dist/css-properties.scss} +0 -0
@@ -1,175 +0,0 @@
1
- import { CalendarProps } from '../DatePicker/Calendar'
2
- import { useCallback, useMemo } from 'react'
3
-
4
- export function isSameDate(d1: Date, d2: Date): boolean {
5
- return (
6
- d1.getDate() === d2.getDate() &&
7
- d1.getMonth() === d2.getMonth() &&
8
- d1.getFullYear() === d2.getFullYear()
9
- )
10
- }
11
-
12
- export const MONDAY = 1
13
-
14
- /**
15
- * Возвращает дату начала недели
16
- */
17
- export function startOfWeek(date: Date, { weekStartsOn = MONDAY }): Date {
18
- const result = new Date(date)
19
- const day = result.getDay()
20
- const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn
21
-
22
- result.setDate(result.getDate() - diff)
23
- result.setHours(0, 0, 0, 0)
24
- return result
25
- }
26
-
27
- /**
28
- * Возвращает дату конца недели
29
- */
30
- export function endOfWeek(date: Date, { weekStartsOn = MONDAY }): Date {
31
- const result = new Date(date)
32
- const day = result.getDay()
33
- const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn)
34
-
35
- result.setDate(result.getDate() + diff)
36
- result.setHours(23, 59, 59, 999)
37
- return result
38
- }
39
-
40
- /**
41
- * Возвращает дату начала дня
42
- */
43
- export function startOfDay(date: Date): Date {
44
- const result = new Date(date)
45
- result.setHours(0, 0, 0, 0)
46
- return result
47
- }
48
-
49
- /**
50
- * Возвращает дату конца дня
51
- */
52
- export function endOfDay(date: Date): Date {
53
- const result = new Date(date)
54
- result.setHours(23, 59, 59, 999)
55
- return result
56
- }
57
-
58
- /**
59
- * Позволяет определить удовлетворяет ли исходная дата заданным ограничения `min` и/или `max`
60
- */
61
- export function isDayMinMaxRestricted(
62
- day: Date,
63
- options: { min?: Date; max?: Date; withTime?: boolean } = {}
64
- ): boolean {
65
- const { min, max, withTime = false } = options
66
-
67
- if (!withTime && ((min && isSameDate(day, min)) || (max && isSameDate(day, max)))) {
68
- return false
69
- }
70
-
71
- return Boolean((min && day < min) || (max && day > max))
72
- }
73
-
74
- export function addMonths(date: Date, amount: number): Date {
75
- const result = new Date(date)
76
-
77
- if (!amount) {
78
- return result
79
- }
80
-
81
- const dayOfMonth = result.getDate()
82
-
83
- const endOfDesiredMonth = new Date(date)
84
- endOfDesiredMonth.setMonth(result.getMonth() + amount + 1, 0) // Конец месяца
85
- const daysInMonth = endOfDesiredMonth.getDate()
86
- if (dayOfMonth >= daysInMonth) {
87
- // Если мы уже находимся в конце месяца, то это нужная дата
88
- return endOfDesiredMonth
89
- }
90
-
91
- result.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth)
92
- return result
93
- }
94
-
95
- export function subMonths(date: Date, amount: number): Date {
96
- return addMonths(date, -amount)
97
- }
98
-
99
- // set
100
-
101
- function getDaysInMonth(date: Date): number {
102
- const result = new Date(date)
103
- const lastDayOfMonth = new Date(result)
104
- lastDayOfMonth.setFullYear(result.getFullYear(), result.getMonth() + 1, 0)
105
- lastDayOfMonth.setHours(0, 0, 0, 0)
106
- return lastDayOfMonth.getDate()
107
- }
108
-
109
- export function setYear(date: Date, year: number): Date {
110
- const result = new Date(date)
111
- result.setFullYear(year)
112
- return result
113
- }
114
-
115
- export function setMonth(date: Date, month: number): Date {
116
- const result = new Date(date)
117
- const year = result.getFullYear()
118
- const day = result.getDate()
119
-
120
- const midMonth = new Date(date)
121
- midMonth.setFullYear(year, month, 15)
122
- midMonth.setHours(0, 0, 0, 0)
123
- const daysInMonth = getDaysInMonth(midMonth)
124
-
125
- result.setMonth(month, Math.min(day, daysInMonth))
126
- return result
127
- }
128
-
129
- // custom
130
-
131
- interface DisableOptions
132
- extends Pick<
133
- CalendarProps,
134
- 'disableFuture' | 'disablePast' | 'maxDateTime' | 'minDateTime' | 'shouldDisableDate'
135
- > {}
136
-
137
- export const createDayDisableChecker = (options: DisableOptions) => {
138
- const { disableFuture, disablePast, maxDateTime, minDateTime, shouldDisableDate } = options
139
-
140
- return (day: Date, withTime?: boolean) => {
141
- const now = new Date()
142
-
143
- if (shouldDisableDate) {
144
- return shouldDisableDate(day)
145
- }
146
-
147
- if (disableFuture) {
148
- return startOfDay(day) > now
149
- }
150
-
151
- if (disablePast) {
152
- return endOfDay(day) < now
153
- }
154
-
155
- if (minDateTime || maxDateTime) {
156
- return isDayMinMaxRestricted(day, { min: minDateTime, max: maxDateTime, withTime })
157
- }
158
-
159
- return false
160
- }
161
- }
162
-
163
- export const useDayDisableCheker = (options: DisableOptions) => {
164
- const isDayDisabled = useMemo(() => {
165
- return createDayDisableChecker(options)
166
- }, [
167
- options.disableFuture,
168
- options.disablePast,
169
- options.shouldDisableDate,
170
- options.minDateTime,
171
- options.maxDateTime
172
- ])
173
-
174
- return useCallback(isDayDisabled, [isDayDisabled])
175
- }
@@ -1,137 +0,0 @@
1
- import { clamp } from '@companix/utils-browser'
2
- import { DateFormat, Option } from '..'
3
-
4
- export const getMonthMaxDay = (month: number, year: number) => {
5
- return new Date(year, month, 0).getDate()
6
- }
7
-
8
- export const getFirstDay = (month: number, year: number) => {
9
- return new Date(year, month - 1, 1).getDay()
10
- }
11
-
12
- // 0 is Monday, 6 - is Sunday
13
- export const getDayIndex = (day: number) => {
14
- return day === 0 ? 6 : day - 1
15
- }
16
-
17
- export const createVoids = (length: number) => {
18
- return new Array(length).fill(0)
19
- }
20
-
21
- export const dateToFormat = (date: Date): DateFormat => {
22
- return {
23
- day: date.getDate(),
24
- month: date.getMonth() + 1,
25
- year: date.getFullYear()
26
- }
27
- }
28
-
29
- export const createDateValidation = ({ min, max }: { min: DateFormat; max: DateFormat }) => {
30
- return (value: DateFormat) => {
31
- if (min.year === value.year) {
32
- if (value.month !== 0 && value.month < min.month) {
33
- value.month = 0
34
- value.day = 0
35
-
36
- return value
37
- }
38
-
39
- if (value.month === min.month && value.day < min.day && value.day !== 0) {
40
- value.day = 0
41
-
42
- return value
43
- }
44
- }
45
-
46
- if (max.year === value.year) {
47
- if (value.month !== 0 && value.month > max.month) {
48
- value.month = 0
49
- value.day = 0
50
-
51
- return value
52
- }
53
-
54
- if (value.month === max.month && value.day > max.day && value.day !== 0) {
55
- value.day = 0
56
-
57
- return value
58
- }
59
- }
60
- }
61
- }
62
-
63
- export const createRangeValidation = ({ min, max }: { min?: DateFormat; max?: DateFormat }) => {
64
- const minTime = min ? new Date(formatToDate(min)).getTime() : 0
65
- const maxTime = max ? new Date(formatToDate(max)).getTime() : Infinity
66
-
67
- const getCurrentTime = (value: DateFormat) => {
68
- return new Date(formatToDate(value)).getTime()
69
- }
70
-
71
- return {
72
- isDateMinValid: (value: DateFormat) => {
73
- return getCurrentTime(value) > minTime
74
- },
75
- isDateMaxValid: (value: DateFormat) => {
76
- return getCurrentTime(value) < maxTime
77
- },
78
- isDateInRange: (value: DateFormat) => {
79
- const current = getCurrentTime(value)
80
-
81
- return current > minTime && current < maxTime
82
- }
83
- }
84
- }
85
-
86
- export const formatToDate = (format: DateFormat): Date => {
87
- return new Date(format.year, format.month - 1, format.day)
88
- }
89
-
90
- export const weeks = ['Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Вс']
91
-
92
- export const DefaultMonths = [
93
- 'Январь',
94
- 'Февраль',
95
- 'Март',
96
- 'Апрель',
97
- 'Май',
98
- 'Июнь',
99
- 'Июль',
100
- 'Август',
101
- 'Сентябрь',
102
- 'Октябрь',
103
- 'Ноябрь',
104
- 'Декабрь'
105
- ]
106
-
107
- export const DEFAULT_MAX_YEAR = 9999
108
- export const DEFAULT_MIN_YEAR = 100
109
-
110
- export const getYears = (currentYear: number, range: number): Option<number>[] => {
111
- const years: Option<number>[] = []
112
-
113
- const minYear = clamp(currentYear - range, DEFAULT_MIN_YEAR, DEFAULT_MAX_YEAR)
114
- const maxYear = clamp(currentYear + range, DEFAULT_MIN_YEAR, DEFAULT_MAX_YEAR)
115
-
116
- for (let i = minYear; i <= maxYear; i++) {
117
- years.push({ title: String(i).padStart(4, '0'), value: i })
118
- }
119
-
120
- return years
121
- }
122
-
123
- export const getMonths = (locale?: string): Option<number>[] => {
124
- const months: Option<number>[] = []
125
- const formatter = new Intl.DateTimeFormat(locale, {
126
- month: 'long'
127
- })
128
-
129
- for (let i = 0; i < 12; i++) {
130
- months.push({
131
- title: formatter.format(new Date(2023, i, 15)),
132
- value: i
133
- })
134
- }
135
-
136
- return months
137
- }
package/src/index.ts DELETED
@@ -1,36 +0,0 @@
1
- import './theme.scss'
2
-
3
- export { Button } from './Button'
4
- export { Spinner } from './Spinner'
5
- export { Scrollable } from './Scrollable'
6
- export { ImitateScroll } from './Scrollable/ImitateScroll'
7
- export { Popover } from './Popover'
8
- export { Tooltip } from './Tooltip'
9
- export { StepperInput } from './Stepper'
10
- export { Select } from './Select'
11
- export { Form } from './Form'
12
- export { OptionItem } from './OptionItem/OptionItem'
13
- export { NumberInput } from './NumberInput'
14
- export { OptionsList } from './OptionItem/OptionsList'
15
- export { ButtonGroup } from './ButtonGroup'
16
- export { Checkbox } from './Checkbox'
17
- export { Switch } from './Switch'
18
- export { Radio } from './Radio'
19
- export { Drawer } from './Drawer'
20
- export { Dialog } from './Dialog'
21
- export { AlertDialog } from './DialogAlert/Alert'
22
- export { LoadButton } from './LoadButton'
23
- export { Tabs } from './Tabs'
24
- export { Countdown } from './Countdown'
25
- export { TextArea } from './TextArea'
26
- export { SelectTags } from './SelectTags'
27
- export { DatePicker } from './DatePicker'
28
- export { FileOverlay } from './File'
29
- // hooks
30
- export * from './__hooks/use-local-storage'
31
- // agents
32
- export { createAlertAgent } from './DialogAlert'
33
- export { createToaster } from './Toaster'
34
- // types
35
- export * from './types'
36
- export type { Appearance } from './Button'
package/src/types.ts DELETED
@@ -1,14 +0,0 @@
1
- export interface Option<T> {
2
- title: string
3
- value: T
4
- icon?: React.ReactNode
5
- label?: string
6
- disabled?: boolean
7
- className?: string
8
- }
9
-
10
- export interface DateFormat {
11
- month: number
12
- year: number
13
- day: number
14
- }
@@ -1,91 +0,0 @@
1
- export default {
2
- content: ['./index.html', './playground/*.{js,jsx,ts,tsx}', './playground/**/*.{js,jsx,ts,tsx}'],
3
- corePlugins: {
4
- preflight: false
5
- },
6
- theme: {
7
- borderRadius: {
8
- none: '0px',
9
- sm: '3px',
10
- DEFAULT: '4px',
11
- md: '6px',
12
- lg: '8px',
13
- xl: '12px',
14
- full: '9999px'
15
- },
16
- zIndex: {
17
- auto: 'auto',
18
- 1: '1',
19
- 2: '2',
20
- 3: '3',
21
- 4: '4',
22
- 0: '0',
23
- 10: '10',
24
- 20: '20',
25
- 30: '30',
26
- 40: '40'
27
- },
28
- fontSize: {
29
- xs: ['12px', { lineHeight: '14px' }],
30
- sm: ['14px', { lineHeight: '16.5px' }],
31
- base: ['16px', { lineHeight: '19px' }],
32
- lg: ['18px', { lineHeight: '21.5px' }],
33
- xl: ['20px', { lineHeight: '23.5px' }],
34
- '2xl': ['22px', { lineHeight: '26px' }],
35
- '3xl': ['24px', { lineHeight: '28px' }]
36
- },
37
- spacing: {
38
- 0: '0px',
39
- 1: '1px',
40
- 2: '2px',
41
- 3: '3px',
42
- 4: '4px',
43
- 5: '5px',
44
- 6: '6px',
45
- 7: '7px',
46
- 8: '8px',
47
- 9: '9px',
48
- 10: '10px',
49
- 11: '11px',
50
- 12: '12px',
51
- 13: '13px',
52
- 14: '14px',
53
- 15: '15px',
54
- 16: '16px',
55
- 17: '17px',
56
- 18: '18px',
57
- 19: '19px',
58
- 20: '20px',
59
- 21: '21px',
60
- 22: '22px',
61
- 23: '23px',
62
- 24: '24px',
63
- 25: '25px',
64
- 26: '26px',
65
- 27: '27px',
66
- 28: '28px',
67
- 29: '29px',
68
- 30: '30px',
69
- 31: '31px',
70
- 32: '32px',
71
- 33: '33px',
72
- 34: '34px',
73
- 35: '35px',
74
- 36: '36px',
75
- 37: '37px',
76
- 38: '38px',
77
- 39: '39px',
78
- 40: '40px',
79
- 44: '44px',
80
- 48: '48px',
81
- 52: '52px',
82
- 56: '56px',
83
- 60: '60px',
84
- 64: '64px',
85
- 72: '72px',
86
- 80: '80px',
87
- 96: '96px'
88
- }
89
- },
90
- plugins: []
91
- }
@@ -1,179 +0,0 @@
1
- @keyframes popoverScaleIn {
2
- from {
3
- transform: scale(0.3);
4
- }
5
- to {
6
- transform: scale(1);
7
- }
8
- }
9
-
10
- @keyframes fadeIn {
11
- from {
12
- opacity: 0;
13
- }
14
- to {
15
- opacity: 1;
16
- }
17
- }
18
-
19
- // out
20
-
21
- @keyframes popoverScaleOut {
22
- from {
23
- transform: scale(1);
24
- }
25
- to {
26
- transform: scale(0.3);
27
- }
28
- }
29
-
30
- @keyframes fadeOut {
31
- from {
32
- opacity: 1;
33
- }
34
- to {
35
- opacity: 0;
36
- }
37
- }
38
-
39
- @keyframes checkboxIn {
40
- from {
41
- transform: translateY(-5px);
42
- }
43
- to {
44
- transform: translateY(0);
45
- }
46
- }
47
-
48
- @keyframes checkboxOut {
49
- from {
50
- transform: translateY(0);
51
- }
52
- to {
53
- transform: translateY(-5px);
54
- }
55
- }
56
-
57
- @keyframes checkboxInColor {
58
- from {
59
- color: transparent;
60
- }
61
- to {
62
- color: #242429;
63
- }
64
- }
65
-
66
- @keyframes checkboxOutColor {
67
- from {
68
- color: #242429;
69
- }
70
- to {
71
- color: transparent;
72
- }
73
- }
74
-
75
- // radio-mark
76
-
77
- @keyframes markScaleIn {
78
- from {
79
- transform: scale(0.1);
80
- }
81
- to {
82
- transform: scale(1);
83
- }
84
- }
85
-
86
- @keyframes markScaleOut {
87
- from {
88
- transform: scale(1);
89
- }
90
- to {
91
- transform: scale(0.1);
92
- }
93
- }
94
-
95
- // dialog
96
-
97
- @keyframes dialogIn {
98
- 0% {
99
- opacity: 0;
100
- transform: scale(0.5);
101
- }
102
- 100% {
103
- opacity: 1;
104
- transform: scale(1);
105
- }
106
- }
107
-
108
- @keyframes dialogOut {
109
- from {
110
- opacity: 1;
111
- transform: scale(1);
112
- }
113
- to {
114
- opacity: 0;
115
- transform: scale(0.5);
116
- }
117
- }
118
-
119
- // drawer
120
-
121
- @keyframes slideFromBottom {
122
- from {
123
- transform: translate3d(0, 100%, 0);
124
- }
125
- to {
126
- transform: translate3d(0, 0, 0);
127
- }
128
- }
129
-
130
- @keyframes slideToBottom {
131
- to {
132
- transform: translate3d(0, 100%, 0);
133
- }
134
- }
135
-
136
- @keyframes slideFromTop {
137
- from {
138
- transform: translate3d(0, -100%, 0);
139
- }
140
- to {
141
- transform: translate3d(0, 0, 0);
142
- }
143
- }
144
-
145
- @keyframes slideToTop {
146
- to {
147
- transform: translate3d(0, -100%, 0);
148
- }
149
- }
150
-
151
- @keyframes slideFromLeft {
152
- from {
153
- transform: translate3d(-100%, 0, 0);
154
- }
155
- to {
156
- transform: translate3d(0, 0, 0);
157
- }
158
- }
159
-
160
- @keyframes slideToLeft {
161
- to {
162
- transform: translate3d(-100%, 0, 0);
163
- }
164
- }
165
-
166
- @keyframes slideFromRight {
167
- from {
168
- transform: translate3d(100%, 0, 0);
169
- }
170
- to {
171
- transform: translate3d(0, 0, 0);
172
- }
173
- }
174
-
175
- @keyframes slideToRight {
176
- to {
177
- transform: translate3d(100%, 0, 0);
178
- }
179
- }