@companix/uikit 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc +54 -0
- package/declaration.d.ts +4 -0
- package/index.html +12 -0
- package/package.json +66 -0
- package/playground/App.tsx +166 -0
- package/playground/Example.tsx +14 -0
- package/playground/Test.tsx +44 -0
- package/playground/animation-test-1/index.scss +20 -0
- package/playground/animation-test-1/index.tsx +17 -0
- package/playground/animation-test-2/index.scss +62 -0
- package/playground/animation-test-2/index.tsx +32 -0
- package/playground/bootstrap.tsx +19 -0
- package/playground/buttons/index.tsx +132 -0
- package/playground/checkbox/index.tsx +64 -0
- package/playground/date-input/index.tsx +45 -0
- package/playground/date-picker/index.tsx +41 -0
- package/playground/dialog/index.tsx +92 -0
- package/playground/dialog-alert/index.tsx +47 -0
- package/playground/drawer/index.tsx +55 -0
- package/playground/index.css +33 -0
- package/playground/index.scss +270 -0
- package/playground/input/index.tsx +112 -0
- package/playground/number-inputs/index.tsx +50 -0
- package/playground/popovers/index.tsx +70 -0
- package/playground/radio-group/index.tsx +69 -0
- package/playground/select/index.tsx +72 -0
- package/playground/select-tags/index.tsx +36 -0
- package/playground/styles.scss +2 -0
- package/playground/switch/index.tsx +44 -0
- package/playground/tabs/index.tsx +16 -0
- package/playground/test.scss +0 -0
- package/playground/text-area/index.tsx +17 -0
- package/playground/text-input/index.tsx +12 -0
- package/playground/toaster/index.tsx +156 -0
- package/playground/tooltip/index.tsx +26 -0
- package/src/Button/Button.scss +128 -0
- package/src/Button/index.tsx +72 -0
- package/src/ButtonGroup/ButtonGroup.scss +18 -0
- package/src/ButtonGroup/index.tsx +20 -0
- package/src/Checkbox/Checkbox.scss +115 -0
- package/src/Checkbox/index.tsx +46 -0
- package/src/Countdown/index.tsx +54 -0
- package/src/DateInput/DateInput.scss +11 -0
- package/src/DateInput/index.tsx +96 -0
- package/src/DatePicker/Calendar.scss +125 -0
- package/src/DatePicker/Calendar.tsx +157 -0
- package/src/DatePicker/CalendarHeader.tsx +139 -0
- package/src/DatePicker/DatePicker.scss +0 -0
- package/src/DatePicker/index.tsx +177 -0
- package/src/Dialog/Dialog.scss +25 -0
- package/src/Dialog/Popup.scss +55 -0
- package/src/Dialog/index.tsx +31 -0
- package/src/DialogAlert/Alert.scss +52 -0
- package/src/DialogAlert/Alert.tsx +78 -0
- package/src/DialogAlert/Viewport.tsx +52 -0
- package/src/DialogAlert/index.tsx +37 -0
- package/src/Drawer/Drawer.scss +112 -0
- package/src/Drawer/index.tsx +46 -0
- package/src/File/index.tsx +60 -0
- package/src/Form/Form.scss +70 -0
- package/src/Form/Input.scss +24 -0
- package/src/Form/index.tsx +131 -0
- package/src/Icon/icon.scss +18 -0
- package/src/Icon/index.tsx +43 -0
- package/src/LoadButton/index.tsx +17 -0
- package/src/NumberInput/index.tsx +74 -0
- package/src/OptionItem/Option.scss +89 -0
- package/src/OptionItem/OptionItem.tsx +49 -0
- package/src/OptionItem/OptionsList.tsx +26 -0
- package/src/Popover/Popover.scss +80 -0
- package/src/Popover/index.tsx +117 -0
- package/src/Radio/Radio.scss +148 -0
- package/src/Radio/index.tsx +68 -0
- package/src/Scrollable/ImitateScroll.tsx +141 -0
- package/src/Scrollable/Scrollable.scss +50 -0
- package/src/Scrollable/index.tsx +141 -0
- package/src/Select/Select.scss +80 -0
- package/src/Select/SelectInput.tsx +131 -0
- package/src/Select/index.tsx +134 -0
- package/src/SelectTags/SelectTags.scss +66 -0
- package/src/SelectTags/index.tsx +192 -0
- package/src/Spinner/Spinner.scss +14 -0
- package/src/Spinner/index.tsx +19 -0
- package/src/Stepper/StepperInput.scss +35 -0
- package/src/Stepper/index.tsx +76 -0
- package/src/Switch/Switch.scss +102 -0
- package/src/Switch/index.tsx +49 -0
- package/src/Tabs/Tabs.scss +58 -0
- package/src/Tabs/index.tsx +89 -0
- package/src/TextArea/TextArea.scss +34 -0
- package/src/TextArea/index.tsx +51 -0
- package/src/Toaster/RemoveListener.tsx +11 -0
- package/src/Toaster/Toast.tsx +69 -0
- package/src/Toaster/Toaster.scss +151 -0
- package/src/Toaster/Viewport.tsx +117 -0
- package/src/Toaster/index.tsx +52 -0
- package/src/Tooltip/Tooltip.scss +28 -0
- package/src/Tooltip/index.tsx +33 -0
- package/src/__hooks/use-frooze-closing.ts +51 -0
- package/src/__hooks/use-loading.ts +34 -0
- package/src/__hooks/use-local-storage.ts +19 -0
- package/src/__hooks/use-popover-position.ts +24 -0
- package/src/__hooks/use-previos.ts +25 -0
- package/src/__hooks/use-resize.ts +41 -0
- package/src/__hooks/use-scrollbox.ts +45 -0
- package/src/__hooks/use-stepper-input.ts +82 -0
- package/src/__hooks/use-update.ts +19 -0
- package/src/__hooks/useCalendar.ts +104 -0
- package/src/__hooks/useCalendarOptions-copy.ts +87 -0
- package/src/__hooks/useCalendarOptions.ts +68 -0
- package/src/__libs/calendar.ts +175 -0
- package/src/__utils/utils.ts +137 -0
- package/src/css.scss +120 -0
- package/src/index.scss +22 -0
- package/src/index.ts +36 -0
- package/src/mixins.scss +99 -0
- package/src/theme.scss +103 -0
- package/src/types.ts +14 -0
- package/tailwind.config.js +91 -0
- package/themes/classic/animations.scss +179 -0
- package/themes/classic/classic.scss +493 -0
- package/tsconfig.json +27 -0
- package/vite.build.ts +35 -0
- package/vite.config.ts +33 -0
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
body {
|
|
2
|
+
background-color: color(display-p3 0.976 0.976 0.984);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
// SIMPLE TEST
|
|
6
|
+
|
|
7
|
+
.box-styles {
|
|
8
|
+
background: red;
|
|
9
|
+
color: rgb(255, 255, 255);
|
|
10
|
+
width: 120px;
|
|
11
|
+
height: 60px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// CLASSNAMES USAGE
|
|
15
|
+
|
|
16
|
+
.enterFrom {
|
|
17
|
+
opacity: 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.enter {
|
|
21
|
+
transition: opacity;
|
|
22
|
+
transition-timing-function: linear;
|
|
23
|
+
transition-duration: 10s;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.enterTo {
|
|
27
|
+
opacity: 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// leave
|
|
31
|
+
|
|
32
|
+
.leaveFrom {
|
|
33
|
+
opacity: 1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.leave {
|
|
37
|
+
transition: all;
|
|
38
|
+
transition-timing-function: linear;
|
|
39
|
+
transition-duration: 5s;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.leaveTo {
|
|
43
|
+
opacity: 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.col-group {
|
|
47
|
+
display: flex;
|
|
48
|
+
flex-direction: column;
|
|
49
|
+
gap: 10px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.row-group {
|
|
53
|
+
display: flex;
|
|
54
|
+
align-items: center;
|
|
55
|
+
gap: 10px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.examples-list {
|
|
59
|
+
display: flex;
|
|
60
|
+
flex-direction: column;
|
|
61
|
+
gap: 60px;
|
|
62
|
+
padding: 20px 120px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.spinner-border {
|
|
66
|
+
animation: none;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.w-full {
|
|
70
|
+
width: 100%;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.docs-popover-placement-example {
|
|
74
|
+
display: flex;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.docs-popover-placement-example .docs-example-grid {
|
|
79
|
+
display: grid;
|
|
80
|
+
gap: 10px;
|
|
81
|
+
grid-template-columns: 1fr 2fr 1fr;
|
|
82
|
+
grid-template-rows: 1fr 2fr 1fr;
|
|
83
|
+
justify-content: stretch;
|
|
84
|
+
margin: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.docs-popover-placement-example .docs-example-grid-1-1 {
|
|
88
|
+
grid-column: 1/2;
|
|
89
|
+
grid-row: 1/2;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.docs-popover-placement-example .docs-example-grid-1-2 {
|
|
93
|
+
grid-column: 2/3;
|
|
94
|
+
grid-row: 1/2;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.docs-popover-placement-example .docs-example-grid-1-3 {
|
|
98
|
+
grid-column: 3/4;
|
|
99
|
+
grid-row: 1/2;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.docs-popover-placement-example .docs-example-grid-2-1 {
|
|
103
|
+
grid-column: 1/2;
|
|
104
|
+
grid-row: 2/3;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.docs-popover-placement-example .docs-example-grid-2-2 {
|
|
108
|
+
grid-column: 2/3;
|
|
109
|
+
grid-row: 2/3;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.docs-popover-placement-example .docs-example-grid-2-3 {
|
|
113
|
+
grid-column: 3/4;
|
|
114
|
+
grid-row: 2/3;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.docs-popover-placement-example .docs-example-grid-3-1 {
|
|
118
|
+
grid-column: 1/2;
|
|
119
|
+
grid-row: 3/4;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.docs-popover-placement-example .docs-example-grid-3-2 {
|
|
123
|
+
grid-column: 2/3;
|
|
124
|
+
grid-row: 3/4;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.docs-popover-placement-example .docs-example-grid-3-3 {
|
|
128
|
+
grid-column: 3/4;
|
|
129
|
+
grid-row: 3/4;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.docs-popover-placement-example .docs-example-grid-1-1 {
|
|
133
|
+
align-self: end;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.docs-popover-placement-example .docs-example-grid-1-2,
|
|
137
|
+
.docs-popover-placement-example .docs-example-grid-2-1 {
|
|
138
|
+
align-self: stretch;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.docs-popover-placement-example .docs-example-grid-1-3,
|
|
142
|
+
.docs-popover-placement-example .docs-example-grid-3-1 {
|
|
143
|
+
align-self: start;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.docs-popover-placement-example .docs-example-grid-1-2,
|
|
147
|
+
.docs-popover-placement-example .docs-example-grid-2-1 {
|
|
148
|
+
align-self: end;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.docs-popover-placement-example .docs-example-grid-2-2 {
|
|
152
|
+
align-self: stretch;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.docs-popover-placement-example .docs-example-grid-2-3,
|
|
156
|
+
.docs-popover-placement-example .docs-example-grid-3-2 {
|
|
157
|
+
align-self: start;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.docs-popover-placement-example .docs-example-grid-1-3,
|
|
161
|
+
.docs-popover-placement-example .docs-example-grid-3-1 {
|
|
162
|
+
align-self: end;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.docs-popover-placement-example .docs-example-grid-2-3,
|
|
166
|
+
.docs-popover-placement-example .docs-example-grid-3-2 {
|
|
167
|
+
align-self: stretch;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.docs-popover-placement-example .docs-example-grid-3-3 {
|
|
171
|
+
align-self: start;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.docs-popover-placement-example .docs-example-grid-2-2 {
|
|
175
|
+
align-self: center;
|
|
176
|
+
text-align: center;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.docs-popover-placement-example em {
|
|
180
|
+
display: inline-block;
|
|
181
|
+
max-width: 250px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.bp6-dark .docs-popover-placement-example em {
|
|
185
|
+
color: #abb3bf;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.docs-popover-placement-example-content .bp6-popover-content {
|
|
189
|
+
line-height: 2;
|
|
190
|
+
padding: 10px 20px;
|
|
191
|
+
text-align: center;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.docs-popover-placement-example-content code {
|
|
195
|
+
font-weight: 600;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.docs-popover-placement-value-code-block {
|
|
199
|
+
font-size: 16px;
|
|
200
|
+
font-weight: 600;
|
|
201
|
+
text-align: center;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.sample {
|
|
205
|
+
border: 1px solid #00000024;
|
|
206
|
+
padding: 28px;
|
|
207
|
+
border-radius: 10px;
|
|
208
|
+
background-color: #ffffff;
|
|
209
|
+
box-shadow: 0px 4px 18px #0000000a, 0px 2.025px 7.84688px rgba(0, 0, 0, 0.027),
|
|
210
|
+
0px 0.8px 2.925px #00000005, 0px 0.175px 1.04062px rgba(0, 0, 0, 0.013);
|
|
211
|
+
|
|
212
|
+
&-name {
|
|
213
|
+
font-size: 18px;
|
|
214
|
+
font-weight: 600;
|
|
215
|
+
margin-bottom: 18px;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.help-tip {
|
|
220
|
+
margin-left: 6px;
|
|
221
|
+
margin-top: -2px;
|
|
222
|
+
display: inline-block;
|
|
223
|
+
vertical-align: middle;
|
|
224
|
+
opacity: 0.3;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.form-slot {
|
|
228
|
+
pointer-events: auto;
|
|
229
|
+
padding: 0px var(--form_space, 0);
|
|
230
|
+
|
|
231
|
+
&[data-side='right'] {
|
|
232
|
+
border-left: var(--form_border);
|
|
233
|
+
margin-left: var(--form_space, 0);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
&[data-side='left'] {
|
|
237
|
+
border-right: var(--form_border);
|
|
238
|
+
margin-right: var(--form_space, 0);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
&:hover {
|
|
242
|
+
svg {
|
|
243
|
+
color: #858585;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.dialog-close {
|
|
249
|
+
position: absolute;
|
|
250
|
+
outline: none;
|
|
251
|
+
top: 14px;
|
|
252
|
+
right: 14px;
|
|
253
|
+
cursor: pointer;
|
|
254
|
+
padding: 8px;
|
|
255
|
+
border-radius: 8px;
|
|
256
|
+
color: var(--dialog-close-color);
|
|
257
|
+
|
|
258
|
+
&:hover {
|
|
259
|
+
background-color: var(--dialog-close-hover-background);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
&:active {
|
|
263
|
+
background-color: var(--dialog-close-active-background);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
svg {
|
|
267
|
+
width: 16px;
|
|
268
|
+
height: 16px;
|
|
269
|
+
}
|
|
270
|
+
}
|