@companix/uikit 0.0.2 → 0.0.3

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 (254) hide show
  1. package/dist/bundle.es.js +61 -0
  2. package/dist/bundle.es10.js +87 -0
  3. package/dist/bundle.es11.js +75 -0
  4. package/dist/bundle.es12.js +38 -0
  5. package/dist/bundle.es13.js +33 -0
  6. package/dist/bundle.es14.js +18 -0
  7. package/dist/bundle.es15.js +11 -0
  8. package/dist/bundle.es16.js +35 -0
  9. package/dist/bundle.es17.js +27 -0
  10. package/dist/bundle.es18.js +23 -0
  11. package/dist/bundle.es19.js +24 -0
  12. package/dist/bundle.es20.js +15 -0
  13. package/dist/bundle.es21.js +41 -0
  14. package/dist/bundle.es22.js +18 -0
  15. package/dist/bundle.es23.js +36 -0
  16. package/dist/bundle.es24.js +23 -0
  17. package/dist/bundle.es25.js +42 -0
  18. package/dist/bundle.es26.js +114 -0
  19. package/dist/bundle.es27.js +115 -0
  20. package/dist/bundle.es28.js +38 -0
  21. package/dist/bundle.es29.js +13 -0
  22. package/dist/bundle.es3.js +45 -0
  23. package/dist/bundle.es30.js +27 -0
  24. package/dist/bundle.es31.js +38 -0
  25. package/dist/bundle.es35.js +43 -0
  26. package/dist/bundle.es36.js +442 -0
  27. package/dist/bundle.es37.js +24 -0
  28. package/dist/bundle.es38.js +26 -0
  29. package/dist/bundle.es39.js +83 -0
  30. package/dist/bundle.es4.js +14 -0
  31. package/dist/bundle.es40.js +20 -0
  32. package/dist/bundle.es41.js +16 -0
  33. package/dist/bundle.es43.js +7 -0
  34. package/dist/bundle.es44.js +23 -0
  35. package/dist/bundle.es45.js +16 -0
  36. package/dist/bundle.es46.js +72 -0
  37. package/dist/bundle.es47.js +70 -0
  38. package/dist/bundle.es48.js +34 -0
  39. package/dist/bundle.es49.js +70 -0
  40. package/dist/bundle.es5.js +88 -0
  41. package/dist/bundle.es50.js +33 -0
  42. package/dist/bundle.es51.js +78 -0
  43. package/dist/bundle.es52.js +51 -0
  44. package/dist/bundle.es53.js +45 -0
  45. package/dist/bundle.es54.js +40 -0
  46. package/dist/bundle.es55.js +36 -0
  47. package/dist/bundle.es56.js +9 -0
  48. package/dist/bundle.es57.js +9 -0
  49. package/dist/bundle.es58.js +7 -0
  50. package/dist/bundle.es59.js +9 -0
  51. package/dist/bundle.es6.js +87 -0
  52. package/dist/bundle.es60.js +8 -0
  53. package/dist/bundle.es61.js +19 -0
  54. package/dist/bundle.es62.js +15 -0
  55. package/dist/bundle.es63.js +22 -0
  56. package/dist/bundle.es64.js +45 -0
  57. package/dist/bundle.es65.js +28 -0
  58. package/dist/bundle.es66.js +34 -0
  59. package/dist/bundle.es67.js +6 -0
  60. package/dist/bundle.es68.js +12 -0
  61. package/dist/bundle.es69.js +47 -0
  62. package/dist/bundle.es7.js +80 -0
  63. package/dist/bundle.es70.js +11 -0
  64. package/dist/bundle.es71.js +18 -0
  65. package/dist/bundle.es72.js +32 -0
  66. package/dist/bundle.es73.js +35 -0
  67. package/dist/bundle.es74.js +6 -0
  68. package/dist/bundle.es75.js +7 -0
  69. package/dist/bundle.es76.js +7 -0
  70. package/dist/bundle.es77.js +11 -0
  71. package/dist/bundle.es78.js +17 -0
  72. package/dist/bundle.es79.js +7 -0
  73. package/dist/bundle.es8.js +29 -0
  74. package/dist/bundle.es80.js +17 -0
  75. package/dist/bundle.es81.js +25 -0
  76. package/dist/bundle.es9.js +47 -0
  77. package/dist/types/Button/index.d.ts +20 -0
  78. package/dist/types/ButtonGroup/index.d.ts +7 -0
  79. package/dist/types/Checkbox/index.d.ts +10 -0
  80. package/dist/types/Countdown/index.d.ts +7 -0
  81. package/dist/types/DateInput/index.d.ts +13 -0
  82. package/dist/types/DatePicker/Calendar.d.ts +14 -0
  83. package/dist/types/DatePicker/CalendarHeader.d.ts +10 -0
  84. package/dist/types/DatePicker/index.d.ts +12 -0
  85. package/dist/types/Dialog/index.d.ts +12 -0
  86. package/dist/types/DialogAlert/Alert.d.ts +19 -0
  87. package/dist/types/DialogAlert/Viewport.d.ts +8 -0
  88. package/dist/types/DialogAlert/index.d.ts +11 -0
  89. package/dist/types/Drawer/index.d.ts +13 -0
  90. package/dist/types/File/index.d.ts +10 -0
  91. package/dist/types/Form/index.d.ts +17 -0
  92. package/dist/types/Icon/index.d.ts +7 -0
  93. package/dist/types/LoadButton/index.d.ts +5 -0
  94. package/dist/types/NumberInput/index.d.ts +6 -0
  95. package/dist/types/OptionItem/OptionItem.d.ts +7 -0
  96. package/dist/types/OptionItem/OptionsList.d.ts +8 -0
  97. package/dist/types/Popover/index.d.ts +26 -0
  98. package/dist/types/Radio/index.d.ts +20 -0
  99. package/dist/types/Scrollable/ImitateScroll.d.ts +10 -0
  100. package/dist/types/Scrollable/index.d.ts +33 -0
  101. package/dist/types/Select/SelectInput.d.ts +14 -0
  102. package/dist/types/Select/index.d.ts +15 -0
  103. package/dist/types/SelectTags/index.d.ts +15 -0
  104. package/dist/types/Spinner/index.d.ts +8 -0
  105. package/dist/types/Stepper/index.d.ts +8 -0
  106. package/dist/types/Switch/index.d.ts +10 -0
  107. package/dist/types/Tabs/index.d.ts +13 -0
  108. package/dist/types/TextArea/index.d.ts +7 -0
  109. package/dist/types/Toaster/RemoveListener.d.ts +3 -0
  110. package/dist/types/Toaster/Toast.d.ts +9 -0
  111. package/dist/types/Toaster/Viewport.d.ts +13 -0
  112. package/dist/types/Toaster/index.d.ts +15 -0
  113. package/dist/types/Tooltip/index.d.ts +8 -0
  114. package/dist/types/__hooks/use-frooze-closing.d.ts +5 -0
  115. package/dist/types/__hooks/use-loading.d.ts +8 -0
  116. package/dist/types/__hooks/use-local-storage.d.ts +1 -0
  117. package/dist/types/__hooks/use-popover-position.d.ts +8 -0
  118. package/dist/types/__hooks/use-previos.d.ts +2 -0
  119. package/dist/types/__hooks/use-resize.d.ts +3 -0
  120. package/dist/types/__hooks/use-scrollbox.d.ts +7 -0
  121. package/dist/types/__hooks/use-stepper-input.d.ts +13 -0
  122. package/dist/types/__hooks/use-update.d.ts +1 -0
  123. package/dist/types/__hooks/useCalendar.d.ts +17 -0
  124. package/dist/types/__hooks/useCalendarOptions-copy.d.ts +22 -0
  125. package/dist/types/__hooks/useCalendarOptions.d.ts +31 -0
  126. package/dist/types/__libs/calendar.d.ts +25 -0
  127. package/dist/types/__utils/utils.d.ts +25 -0
  128. package/dist/types/index.d.ts +31 -0
  129. package/dist/types/types.d.ts +13 -0
  130. package/dist/uikit.css +1 -0
  131. package/package.json +10 -6
  132. package/.eslintrc +0 -54
  133. package/declaration.d.ts +0 -4
  134. package/index.html +0 -12
  135. package/playground/App.tsx +0 -166
  136. package/playground/Example.tsx +0 -14
  137. package/playground/Test.tsx +0 -44
  138. package/playground/animation-test-1/index.scss +0 -20
  139. package/playground/animation-test-1/index.tsx +0 -17
  140. package/playground/animation-test-2/index.scss +0 -62
  141. package/playground/animation-test-2/index.tsx +0 -32
  142. package/playground/bootstrap.tsx +0 -19
  143. package/playground/buttons/index.tsx +0 -132
  144. package/playground/checkbox/index.tsx +0 -64
  145. package/playground/date-input/index.tsx +0 -45
  146. package/playground/date-picker/index.tsx +0 -41
  147. package/playground/dialog/index.tsx +0 -92
  148. package/playground/dialog-alert/index.tsx +0 -47
  149. package/playground/drawer/index.tsx +0 -55
  150. package/playground/index.css +0 -33
  151. package/playground/index.scss +0 -270
  152. package/playground/input/index.tsx +0 -112
  153. package/playground/number-inputs/index.tsx +0 -50
  154. package/playground/popovers/index.tsx +0 -70
  155. package/playground/radio-group/index.tsx +0 -69
  156. package/playground/select/index.tsx +0 -72
  157. package/playground/select-tags/index.tsx +0 -36
  158. package/playground/styles.scss +0 -2
  159. package/playground/switch/index.tsx +0 -44
  160. package/playground/tabs/index.tsx +0 -16
  161. package/playground/test.scss +0 -0
  162. package/playground/text-area/index.tsx +0 -17
  163. package/playground/text-input/index.tsx +0 -12
  164. package/playground/toaster/index.tsx +0 -156
  165. package/playground/tooltip/index.tsx +0 -26
  166. package/src/Button/Button.scss +0 -128
  167. package/src/Button/index.tsx +0 -72
  168. package/src/ButtonGroup/ButtonGroup.scss +0 -18
  169. package/src/ButtonGroup/index.tsx +0 -20
  170. package/src/Checkbox/Checkbox.scss +0 -115
  171. package/src/Checkbox/index.tsx +0 -46
  172. package/src/Countdown/index.tsx +0 -54
  173. package/src/DateInput/DateInput.scss +0 -11
  174. package/src/DateInput/index.tsx +0 -96
  175. package/src/DatePicker/Calendar.scss +0 -125
  176. package/src/DatePicker/Calendar.tsx +0 -157
  177. package/src/DatePicker/CalendarHeader.tsx +0 -139
  178. package/src/DatePicker/DatePicker.scss +0 -0
  179. package/src/DatePicker/index.tsx +0 -177
  180. package/src/Dialog/Dialog.scss +0 -25
  181. package/src/Dialog/Popup.scss +0 -55
  182. package/src/Dialog/index.tsx +0 -31
  183. package/src/DialogAlert/Alert.scss +0 -52
  184. package/src/DialogAlert/Alert.tsx +0 -78
  185. package/src/DialogAlert/Viewport.tsx +0 -52
  186. package/src/DialogAlert/index.tsx +0 -37
  187. package/src/Drawer/Drawer.scss +0 -112
  188. package/src/Drawer/index.tsx +0 -46
  189. package/src/File/index.tsx +0 -60
  190. package/src/Form/Form.scss +0 -70
  191. package/src/Form/Input.scss +0 -24
  192. package/src/Form/index.tsx +0 -131
  193. package/src/Icon/icon.scss +0 -18
  194. package/src/Icon/index.tsx +0 -43
  195. package/src/LoadButton/index.tsx +0 -17
  196. package/src/NumberInput/index.tsx +0 -74
  197. package/src/OptionItem/Option.scss +0 -89
  198. package/src/OptionItem/OptionItem.tsx +0 -49
  199. package/src/OptionItem/OptionsList.tsx +0 -26
  200. package/src/Popover/Popover.scss +0 -80
  201. package/src/Popover/index.tsx +0 -117
  202. package/src/Radio/Radio.scss +0 -148
  203. package/src/Radio/index.tsx +0 -68
  204. package/src/Scrollable/ImitateScroll.tsx +0 -141
  205. package/src/Scrollable/Scrollable.scss +0 -50
  206. package/src/Scrollable/index.tsx +0 -141
  207. package/src/Select/Select.scss +0 -80
  208. package/src/Select/SelectInput.tsx +0 -131
  209. package/src/Select/index.tsx +0 -134
  210. package/src/SelectTags/SelectTags.scss +0 -66
  211. package/src/SelectTags/index.tsx +0 -192
  212. package/src/Spinner/Spinner.scss +0 -14
  213. package/src/Spinner/index.tsx +0 -19
  214. package/src/Stepper/StepperInput.scss +0 -35
  215. package/src/Stepper/index.tsx +0 -76
  216. package/src/Switch/Switch.scss +0 -102
  217. package/src/Switch/index.tsx +0 -49
  218. package/src/Tabs/Tabs.scss +0 -58
  219. package/src/Tabs/index.tsx +0 -89
  220. package/src/TextArea/TextArea.scss +0 -34
  221. package/src/TextArea/index.tsx +0 -51
  222. package/src/Toaster/RemoveListener.tsx +0 -11
  223. package/src/Toaster/Toast.tsx +0 -69
  224. package/src/Toaster/Toaster.scss +0 -151
  225. package/src/Toaster/Viewport.tsx +0 -117
  226. package/src/Toaster/index.tsx +0 -52
  227. package/src/Tooltip/Tooltip.scss +0 -28
  228. package/src/Tooltip/index.tsx +0 -33
  229. package/src/__hooks/use-frooze-closing.ts +0 -51
  230. package/src/__hooks/use-loading.ts +0 -34
  231. package/src/__hooks/use-local-storage.ts +0 -19
  232. package/src/__hooks/use-popover-position.ts +0 -24
  233. package/src/__hooks/use-previos.ts +0 -25
  234. package/src/__hooks/use-resize.ts +0 -41
  235. package/src/__hooks/use-scrollbox.ts +0 -45
  236. package/src/__hooks/use-stepper-input.ts +0 -82
  237. package/src/__hooks/use-update.ts +0 -19
  238. package/src/__hooks/useCalendar.ts +0 -104
  239. package/src/__hooks/useCalendarOptions-copy.ts +0 -87
  240. package/src/__hooks/useCalendarOptions.ts +0 -68
  241. package/src/__libs/calendar.ts +0 -175
  242. package/src/__utils/utils.ts +0 -137
  243. package/src/css.scss +0 -120
  244. package/src/index.scss +0 -22
  245. package/src/index.ts +0 -36
  246. package/src/mixins.scss +0 -99
  247. package/src/theme.scss +0 -103
  248. package/src/types.ts +0 -14
  249. package/tailwind.config.js +0 -91
  250. package/themes/classic/animations.scss +0 -179
  251. package/themes/classic/classic.scss +0 -493
  252. package/tsconfig.json +0 -27
  253. package/vite.build.ts +0 -35
  254. package/vite.config.ts +0 -33
@@ -1,132 +0,0 @@
1
- import { Appearance, Button, Mode, Size } from '@/Button'
2
- import {
3
- faPlay,
4
- faPause,
5
- faBookmark,
6
- faArrowRight,
7
- faChevronRight,
8
- faFolderBlank,
9
- faEye,
10
- faCaretDown,
11
- faPen,
12
- faFile
13
- } from '@fortawesome/free-solid-svg-icons'
14
- import { Icon } from '@/Icon'
15
- import { ButtonGroup } from '@/ButtonGroup'
16
-
17
- const appearances: Appearance[] = ['primary', 'neutral', 'positive', 'negative']
18
- const modes: Mode[] = ['default', 'outline', 'minimal']
19
- const sizes: Size[] = ['sm', 'md', 'lg']
20
-
21
- export const ButtonsExample = () => {
22
- return (
23
- <div className="col-group">
24
- {appearances.map((appearance) => {
25
- return (
26
- <div className="row-group" key={`appearance-${appearance}`}>
27
- {modes.map((mode) => (
28
- <Button key={`mode-1-${appearance}-${mode}`} appearance={appearance} mode={mode}>
29
- Button
30
- </Button>
31
- ))}
32
- {[...modes].reverse().map((mode) => (
33
- <Button key={`mode-2-${appearance}-${mode}`} appearance={appearance} mode={mode} disabled>
34
- Button
35
- </Button>
36
- ))}
37
- </div>
38
- )
39
- })}
40
- <div className="row-group">
41
- {sizes.map((size) => (
42
- <Button key={`size-${size}`} icon={<Icon icon={faBookmark} size="xxxs" />} size={size}>
43
- Button
44
- </Button>
45
- ))}
46
- </div>
47
- <div className="row-group">
48
- <Button icon={<Icon icon={faPause} size="xxxs" />} size="md"></Button>
49
- <Button icon={<Icon icon={faPlay} size="xxxs" />} size="md">
50
- Button
51
- </Button>
52
- <Button iconRight={<Icon icon={faArrowRight} size="xxxs" />}>Button</Button>
53
- <Button fill iconRight={<Icon icon={faChevronRight} size="xxxs" className="quieter" />}>
54
- Button
55
- </Button>
56
- <Button
57
- fill
58
- icon={<Icon icon={faFolderBlank} size="xxxs" />}
59
- iconRight={<Icon icon={faChevronRight} size="xxxs" className="quieter" />}
60
- >
61
- Button
62
- </Button>
63
- </div>
64
- <div className="row-group">
65
- <Button fill align="left">
66
- Left
67
- </Button>
68
- <Button fill align="center">
69
- Center
70
- </Button>
71
- <Button fill align="right">
72
- Right
73
- </Button>
74
- </div>
75
- <div className="row-group">
76
- <Button loading>Button fullwidth</Button>
77
- <Button disabled>Button disabled</Button>
78
- <Button fill>Button fullwidth</Button>
79
- </div>
80
- </div>
81
- )
82
- }
83
-
84
- export const ButtonsGroupExample = () => {
85
- return (
86
- <div className="col-group">
87
- <div className="row-group">
88
- <ButtonGroup>
89
- <Button>Button One</Button>
90
- <Button>Button Two</Button>
91
- <Button>Button Three</Button>
92
- </ButtonGroup>
93
- </div>
94
- <div className="row-group">
95
- <ButtonGroup fill>
96
- <Button>Secondary</Button>
97
- <Button fill>Primary</Button>
98
- </ButtonGroup>
99
- </div>
100
- <div className="row-group">
101
- <ButtonGroup>
102
- <Button icon={<Icon icon={faBookmark} size="xxxs" />} />
103
- <Button>Button name</Button>
104
- </ButtonGroup>
105
- <ButtonGroup>
106
- <Button>Button name</Button>
107
- <Button icon={<Icon icon={faBookmark} size="xxxs" />} />
108
- </ButtonGroup>
109
- <ButtonGroup>
110
- <Button
111
- icon={<Icon icon={faFile} size="xxxs" />}
112
- iconRight={<Icon icon={faCaretDown} size="xxxs" className="quieter" />}
113
- >
114
- File
115
- </Button>
116
- <Button
117
- icon={<Icon icon={faPen} size="xxxs" />}
118
- iconRight={<Icon icon={faCaretDown} size="xxxs" className="quieter" />}
119
- >
120
- Edit
121
- </Button>
122
- <Button
123
- icon={<Icon icon={faEye} size="xxxs" />}
124
- iconRight={<Icon icon={faCaretDown} size="xxxs" className="quieter" />}
125
- >
126
- View
127
- </Button>
128
- </ButtonGroup>
129
- </div>
130
- </div>
131
- )
132
- }
@@ -1,64 +0,0 @@
1
- import { Checkbox } from '@/Checkbox'
2
- import { Icon } from '@/Icon'
3
- import { Tooltip } from '@/Tooltip'
4
- import { faInfoCircle } from '@fortawesome/free-solid-svg-icons'
5
- import { useState } from 'react'
6
-
7
- const longtext = `The expanded form makes it easy to schedule meetings: fields to fill out are displayed on the left, and the participants' schedule is shown on the right.`
8
-
9
- export const CheckboxExample = () => {
10
- return (
11
- <div className="col-group">
12
- <div className="flex gap-24">
13
- <div className="flex flex-col gap-12">
14
- <CheckboxControl label="Accept terms and conditions" size="md" defaultChecked />
15
- <CheckboxControl label="I want to recieve promote emails" size="sm" defaultChecked />
16
- </div>
17
- <div className="flex flex-col gap-12">
18
- <CheckboxControl label="Accept terms and conditions" size="md" disabled defaultChecked />
19
- <CheckboxControl label="I want to recieve promote emails" size="sm" disabled />
20
- </div>
21
- </div>
22
- <div style={{ height: '1px', background: '#eeeeee', margin: '12px 0px' }} />
23
- <div className="flex flex-col gap-12">
24
- <CheckboxControl label="Accept terms and conditions" size="md" defaultChecked />
25
- <CheckboxControl
26
- size="md"
27
- defaultChecked
28
- label={
29
- <>
30
- <span>Use the advanced form to create events</span>
31
- <Tooltip side="top" content={longtext}>
32
- <span className="help-tip">
33
- <Icon icon={faInfoCircle} size="xxxs" />
34
- </span>
35
- </Tooltip>
36
- </>
37
- }
38
- />
39
- <CheckboxControl label={longtext + ' ' + longtext} size="md" defaultChecked />
40
- </div>
41
- <div style={{ height: '1px', background: '#eeeeee', margin: '12px 0px' }} />
42
- <div>
43
- <div className="flex flex-col gap-12">
44
- <CheckboxControl label="Accept terms and conditions" size="md" required />
45
- <CheckboxControl label="I want to recieve promote emails" size="sm" required />
46
- </div>
47
- </div>
48
- </div>
49
- )
50
- }
51
-
52
- interface Props {
53
- label?: React.ReactNode
54
- size?: 'md' | 'sm'
55
- defaultChecked?: boolean
56
- disabled?: boolean
57
- required?: boolean
58
- }
59
-
60
- const CheckboxControl = ({ defaultChecked, ...props }: Props) => {
61
- const [checked, setCheck] = useState(defaultChecked ?? false)
62
-
63
- return <Checkbox {...props} checked={checked} onCheckedChange={setCheck} />
64
- }
@@ -1,45 +0,0 @@
1
- import { DateInput } from '@/DateInput'
2
- import { useState } from 'react'
3
-
4
- export const DateInputExample = () => {
5
- return (
6
- <div className="flex flex-col gap-14">
7
- <div className="flex items-center gap-40">
8
- <div style={{ maxWidth: '340px', width: '340px' }}>
9
- <DateInputControl size="md" />
10
- </div>
11
- <div style={{ maxWidth: '340px', width: '340px' }}>
12
- <DateInputControl size="md" disabled />
13
- </div>
14
- <div style={{ maxWidth: '340px', width: '340px' }}>
15
- <DateInputControl size="md" required />
16
- </div>
17
- </div>
18
- <div className="flex items-center gap-40">
19
- <div style={{ maxWidth: '340px', width: '340px' }}>
20
- <DateInputControl size="sm" />
21
- </div>
22
- <div style={{ maxWidth: '340px', width: '340px' }}>
23
- <DateInputControl size="sm" disabled />
24
- </div>
25
- <div style={{ maxWidth: '340px', width: '340px' }}>
26
- <DateInputControl size="sm" required />
27
- </div>
28
- </div>
29
- </div>
30
- )
31
- }
32
-
33
- interface Props {
34
- size: 'sm' | 'md' | 'lg'
35
- disabled?: boolean
36
- required?: boolean
37
- }
38
-
39
- const DateInputControl = ({ size, disabled, required }: Props) => {
40
- const [value, onChange] = useState({ month: 0, year: 0, day: 0 })
41
-
42
- return (
43
- <DateInput value={value} size={size} onChange={onChange} disabled={disabled} required={required} />
44
- )
45
- }
@@ -1,41 +0,0 @@
1
- import { DatePicker } from '@/DatePicker'
2
- import { Icon } from '@/Icon'
3
- import { faCalendar } from '@fortawesome/free-solid-svg-icons'
4
- import { useState } from 'react'
5
-
6
- export const DatePickerExample = () => {
7
- return (
8
- <div className="flex flex-col gap-14">
9
- <div className="flex items-center gap-40">
10
- <div style={{ width: '340px' }}>
11
- <DatePickerControl size="md" />
12
- </div>
13
- </div>
14
- </div>
15
- )
16
- }
17
-
18
- interface Props {
19
- size: 'sm' | 'md' | 'lg'
20
- disabled?: boolean
21
- required?: boolean
22
- }
23
-
24
- export const DatePickerControl = ({ size, disabled, required }: Props) => {
25
- const [value, onChange] = useState<null | Date>(new Date())
26
-
27
- return (
28
- <DatePicker
29
- fill
30
- clearButton
31
- leftElement={<Icon icon={faCalendar} size="xxs" className="form-space-margin" />}
32
- value={value}
33
- size={size}
34
- onChange={onChange}
35
- disabled={disabled}
36
- required={required}
37
- placeholder="Укажите дату"
38
- disableFuture
39
- />
40
- )
41
- }
@@ -1,92 +0,0 @@
1
- import { Button, ButtonProps } from '@/Button'
2
- import { useState } from 'react'
3
- import { Dialog, DialogProps } from '@/Dialog'
4
-
5
- export const DialogExample = () => {
6
- return (
7
- <div className="row-group">
8
- <DialogControlled buttonProps={{ text: 'Open dialog' }}>
9
- {() => (
10
- <div className="flex flex-col p-20 overflow-hidden">
11
- <div className="overflow-y-scroll">
12
- <b>
13
- Data integration is the seminal problem of the digital age. For over ten years, we ve
14
- helped the worlds premier organizations rise to the challenge.
15
- </b>
16
- <div>
17
- Palantir Foundry radically reimagines the way enterprises interact with data by
18
- amplifying and extending the power of data integration. With Foundry, anyone can source,
19
- fuse, and transform data into any shape they desire. Business analysts become data
20
- engineers — and leaders in their organizations data revolution.
21
- </div>
22
- </div>
23
- <div className="w-full pt-20">
24
- <DialogControlled buttonProps={{ fill: true }}>
25
- {({ close }) => (
26
- <div className="p-20">
27
- <Button onClick={close}>Close me</Button>
28
- </div>
29
- )}
30
- </DialogControlled>
31
- </div>
32
- </div>
33
- )}
34
- </DialogControlled>
35
- <DialogControlled size="full" buttonProps={{ text: 'Open full-size dialog' }}>
36
- {() => (
37
- <div className="flex flex-col h-full justify-between p-20 overflow-hidden">
38
- <div className="overflow-y-scroll">
39
- <b>
40
- Data integration is the seminal problem of the digital age. For over ten years, we ve
41
- helped the worlds premier organizations rise to the challenge.
42
- </b>
43
- <div>
44
- Palantir Foundry radically reimagines the way enterprises interact with data by
45
- amplifying and extending the power of data integration. With Foundry, anyone can source,
46
- fuse, and transform data into any shape they desire. Business analysts become data
47
- engineers — and leaders in their organizations data revolution.
48
- </div>
49
- </div>
50
- <div className="w-full pt-20">
51
- <DialogControlled buttonProps={{ fill: true }}>
52
- {({ close }) => (
53
- <div className="p-20">
54
- <Button onClick={close}>Close me</Button>
55
- </div>
56
- )}
57
- </DialogControlled>
58
- </div>
59
- </div>
60
- )}
61
- </DialogControlled>
62
- </div>
63
- )
64
- }
65
-
66
- interface Props extends Pick<DialogProps, 'size'> {
67
- buttonProps?: ButtonProps
68
- children: (value: { close: () => void }) => JSX.Element
69
- }
70
-
71
- const DialogControlled = ({ size, children, buttonProps }: Props) => {
72
- const [open, setOpen] = useState(false)
73
-
74
- return (
75
- <>
76
- <Button {...buttonProps} onClick={() => setOpen(true)}>
77
- Open dialog
78
- </Button>
79
- <Dialog open={open} onOpenChange={setOpen} size={size}>
80
- <Dialog.Close className="dialog-close">
81
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
82
- <path
83
- fill="currentColor"
84
- d="M14.03 3.03 9.06 8l4.97 4.97-1.061 1.06-4.97-4.97-4.97 4.97-1.06-1.06L6.939 8l-4.97-4.97 1.06-1.06L8 6.94l4.97-4.97z"
85
- />
86
- </svg>
87
- </Dialog.Close>
88
- {children({ close: () => setOpen(false) })}
89
- </Dialog>
90
- </>
91
- )
92
- }
@@ -1,47 +0,0 @@
1
- import { Button } from '@/Button'
2
- import { createAlertAgent } from '@/DialogAlert'
3
- import { Icon } from '@/Icon'
4
- import { faWifi } from '@fortawesome/free-solid-svg-icons'
5
-
6
- const AlertAgent = createAlertAgent({ cancelDefaultText: 'Cancel' })
7
-
8
- export const DialogAlertExample = () => {
9
- return (
10
- <div className="row-group">
11
- <Button
12
- onClick={() => {
13
- AlertAgent.show({
14
- title: 'Are you sure?',
15
- confirm: { text: 'Move to trash' },
16
- description: `Are you sure you want to move filename to Trash? You will be able to restore it later, but it will become private to you`
17
- })
18
- }}
19
- >
20
- Move to trash
21
- </Button>
22
- <Button
23
- onClick={() => {
24
- AlertAgent.show({
25
- cancel: { text: 'Okay' },
26
- description: `Couldn't create the file because the containing folder doesn't exist anymore. You will be redirected to your user folder`
27
- })
28
- }}
29
- >
30
- Do unable
31
- </Button>
32
- <Button
33
- onClick={() => {
34
- AlertAgent.show({
35
- disableCancel: true,
36
- icon: <Icon icon={faWifi} />,
37
- confirm: { text: 'Reload', appearance: 'neutral', onClick: () => window.location.reload() },
38
- description: `Connection is interupted. Page will be reloaded`
39
- })
40
- }}
41
- >
42
- Reconnecting
43
- </Button>
44
- <AlertAgent.Viewport />
45
- </div>
46
- )
47
- }
@@ -1,55 +0,0 @@
1
- import { Button } from '@/Button'
2
- import { Drawer, DrawerProps } from '@/Drawer'
3
- import { useState } from 'react'
4
-
5
- const direction = ['left', 'top', 'bottom', 'right'] as const
6
-
7
- export const DrawerExample = () => {
8
- return (
9
- <div className="row-group">
10
- {direction.map((direction) => (
11
- <DrawerControlled
12
- direction={direction}
13
- key={`drawer-${direction}`}
14
- size="40%"
15
- button={<span className="capitalize">{direction} Drawer</span>}
16
- >
17
- {() => (
18
- <div className="flex flex-col overflow-hidden">
19
- <div className="overflow-y-scroll p-20">
20
- <b>
21
- Data integration is the seminal problem of the digital age. For over ten years, we ve
22
- helped the worlds premier organizations rise to the challenge.
23
- </b>
24
- <div>
25
- Palantir Foundry radically reimagines the way enterprises interact with data by
26
- amplifying and extending the power of data integration. With Foundry, anyone can
27
- source, fuse, and transform data into any shape they desire. Business analysts become
28
- data engineers — and leaders in their organizations data revolution.
29
- </div>
30
- </div>
31
- </div>
32
- )}
33
- </DrawerControlled>
34
- ))}
35
- </div>
36
- )
37
- }
38
-
39
- interface Props extends Omit<DrawerProps, 'open' | 'onOpenChange' | 'children'> {
40
- children: (value: { close: () => void }) => JSX.Element
41
- button: React.ReactNode
42
- }
43
-
44
- const DrawerControlled = ({ children, button, ...props }: Props) => {
45
- const [open, setOpen] = useState(false)
46
-
47
- return (
48
- <>
49
- <Button onClick={() => setOpen(true)}>{button}</Button>
50
- <Drawer open={open} onOpenChange={setOpen} {...props}>
51
- {children({ close: () => setOpen(false) })}
52
- </Drawer>
53
- </>
54
- )
55
- }
@@ -1,33 +0,0 @@
1
- @layer theme, base, components, utilities;
2
-
3
- @import 'tailwindcss/theme.css' layer(theme);
4
- @import 'tailwindcss/preflight.css' layer(base);
5
- @import 'tailwindcss/utilities.css' layer(utilities);
6
-
7
- /* @import 'tailwindcss'; */
8
- @config "../tailwind.config.js";
9
-
10
- .center {
11
- @apply flex items-center justify-center;
12
- }
13
-
14
- .full {
15
- @apply h-full w-full;
16
- }
17
-
18
- .image {
19
- @apply h-full w-full bg-cover bg-center;
20
- background-color: #3d3d3d17;
21
- }
22
-
23
- .quiet {
24
- @apply opacity-75;
25
- }
26
-
27
- .quieter {
28
- @apply opacity-50;
29
- }
30
-
31
- .all-0 {
32
- @apply bottom-0 left-0 right-0 top-0;
33
- }