@balikjs/mobile 0.0.2 → 0.1.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/dist/index.js +3537 -0
- package/dist/styles.css +1 -1
- package/package.json +209 -10
- package/dist/mobile.js +0 -3235
- package/src/Alert/Alert.jsx +0 -67
- package/src/Alert/Alert.module.css +0 -87
- package/src/Alert/index.js +0 -1
- package/src/Avatar/Avatar.jsx +0 -77
- package/src/Avatar/Avatar.module.css +0 -74
- package/src/Avatar/index.js +0 -1
- package/src/Badge/Badge.jsx +0 -83
- package/src/Badge/Badge.module.css +0 -141
- package/src/Badge/index.js +0 -1
- package/src/BottomNavigation/BottomNavigation.jsx +0 -61
- package/src/BottomNavigation/BottomNavigation.module.css +0 -53
- package/src/BottomNavigation/index.js +0 -1
- package/src/BottomSheet/BottomSheet.jsx +0 -51
- package/src/BottomSheet/BottomSheet.module.css +0 -56
- package/src/BottomSheet/index.js +0 -1
- package/src/Button/Button.jsx +0 -77
- package/src/Button/Button.module.css +0 -124
- package/src/Button/index.js +0 -1
- package/src/Card/Card.jsx +0 -31
- package/src/Card/Card.module.css +0 -4
- package/src/Card/index.js +0 -1
- package/src/Checkbox/Checkbox.jsx +0 -64
- package/src/Checkbox/Checkbox.module.css +0 -146
- package/src/Checkbox/index.js +0 -1
- package/src/Clipboard/Clipboard.jsx +0 -82
- package/src/Clipboard/Clipboard.module.css +0 -126
- package/src/Clipboard/index.js +0 -1
- package/src/CloseButton/CloseButton.jsx +0 -51
- package/src/CloseButton/CloseButton.module.css +0 -94
- package/src/Confirm/Confirm.jsx +0 -52
- package/src/Confirm/Confirm.module.css +0 -5
- package/src/Confirm/index.js +0 -1
- package/src/DatePicker/DatePicker.jsx +0 -276
- package/src/DatePicker/DatePicker.module.css +0 -197
- package/src/DatePicker/index.js +0 -1
- package/src/Dialog/Dialog.jsx +0 -63
- package/src/Dialog/Dialog.module.css +0 -111
- package/src/Dialog/index.js +0 -1
- package/src/Divider/Divider.jsx +0 -38
- package/src/Divider/Divider.module.css +0 -16
- package/src/Divider/index.js +0 -1
- package/src/Drawer/Drawer.jsx +0 -55
- package/src/Drawer/Drawer.module.css +0 -68
- package/src/Drawer/index.js +0 -1
- package/src/Empty/Empty.jsx +0 -35
- package/src/Empty/Empty.module.css +0 -17
- package/src/Empty/index.js +0 -1
- package/src/Fab/Fab.jsx +0 -91
- package/src/Fab/Fab.module.css +0 -94
- package/src/Fab/index.js +0 -1
- package/src/Input/Input.jsx +0 -53
- package/src/Input/Input.module.css +0 -97
- package/src/Input/index.js +0 -1
- package/src/Link/Link.jsx +0 -31
- package/src/Link/Link.module.css +0 -18
- package/src/Link/index.js +0 -1
- package/src/Popover/Popover.jsx +0 -162
- package/src/Popover/Popover.module.css +0 -63
- package/src/Popover/index.js +0 -1
- package/src/RadioGroup/Radio.jsx +0 -52
- package/src/RadioGroup/Radio.module.css +0 -133
- package/src/RadioGroup/RadioGroup.jsx +0 -36
- package/src/RadioGroup/RadioGroup.module.css +0 -23
- package/src/RadioGroup/index.js +0 -2
- package/src/SearchInput/SearchInput.jsx +0 -89
- package/src/SearchInput/SearchInput.module.css +0 -169
- package/src/SearchInput/index.js +0 -1
- package/src/Select/Select.jsx +0 -102
- package/src/Select/Select.module.css +0 -174
- package/src/Select/index.js +0 -1
- package/src/SelectPc/Select.jsx +0 -88
- package/src/SelectPc/SelectPc.module.css +0 -132
- package/src/SelectPc/index.js +0 -1
- package/src/Skeleton/Skeleton.jsx +0 -55
- package/src/Skeleton/Skeleton.module.css +0 -33
- package/src/Skeleton/index.js +0 -1
- package/src/Slider/Slider.jsx +0 -50
- package/src/Slider/Slider.module.css +0 -77
- package/src/Slider/index.js +0 -1
- package/src/Spinner/Spinner.jsx +0 -45
- package/src/Spinner/Spinner.module.css +0 -35
- package/src/Spinner/index.js +0 -1
- package/src/Switch/Switch.jsx +0 -51
- package/src/Switch/Switch.module.css +0 -156
- package/src/Switch/index.js +0 -1
- package/src/Tabs/Tabs.jsx +0 -75
- package/src/Tabs/Tabs.module.css +0 -45
- package/src/Tabs/index.js +0 -1
- package/src/Tag/Tag.jsx +0 -74
- package/src/Tag/Tag.module.css +0 -128
- package/src/Tag/index.js +0 -1
- package/src/Textarea/Textarea.jsx +0 -52
- package/src/Textarea/Textarea.module.css +0 -89
- package/src/Textarea/index.js +0 -1
- package/src/Toast/Toast.jsx +0 -169
- package/src/Toast/Toast.module.css +0 -152
- package/src/Toast/index.js +0 -1
- package/src/Tooltip/Tooltip.jsx +0 -42
- package/src/Tooltip/Tooltip.module.css +0 -41
- package/src/Tooltip/index.js +0 -1
- package/src/index.js +0 -35
- package/src/styles/index.css +0 -90
- package/src/styles/tokens.css +0 -227
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
.backdrop {
|
|
2
|
-
position: fixed;
|
|
3
|
-
inset: 0;
|
|
4
|
-
z-index: var(--b-z-index-modal);
|
|
5
|
-
background-color: rgba(0, 0, 0, 0.35);
|
|
6
|
-
opacity: 0;
|
|
7
|
-
pointer-events: none;
|
|
8
|
-
transition: opacity 0.3s ease;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.backdrop[data-open] {
|
|
12
|
-
opacity: 1;
|
|
13
|
-
pointer-events: auto;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.root {
|
|
17
|
-
position: fixed;
|
|
18
|
-
inset-inline: 0;
|
|
19
|
-
bottom: 0;
|
|
20
|
-
z-index: var(--b-z-index-modal);
|
|
21
|
-
background-color: oklch(95% 0 0);
|
|
22
|
-
border-radius: 16px 16px 0 0;
|
|
23
|
-
display: flex;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
transform: translateY(100%);
|
|
26
|
-
pointer-events: none;
|
|
27
|
-
transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
|
|
28
|
-
overflow: hidden;
|
|
29
|
-
user-select: none;
|
|
30
|
-
-webkit-user-select: none;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.root[data-open] {
|
|
34
|
-
transform: translateY(0);
|
|
35
|
-
pointer-events: auto;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.header {
|
|
39
|
-
display: flex;
|
|
40
|
-
align-items: center;
|
|
41
|
-
justify-content: space-between;
|
|
42
|
-
padding: 12px 16px;
|
|
43
|
-
border-bottom: 0.5px solid color-mix(in oklch, var(--base-fg) 10%, transparent);
|
|
44
|
-
flex-shrink: 0;
|
|
45
|
-
background-color: oklch(97% 0 0);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.headerTitle {
|
|
49
|
-
font-size: var(--b-comp-font-size-md);
|
|
50
|
-
font-weight: 600;
|
|
51
|
-
color: var(--base-fg);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
.headerBtn {
|
|
55
|
-
font-size: var(--b-comp-font-size-md);
|
|
56
|
-
font-weight: 500;
|
|
57
|
-
color: var(--base-edge);
|
|
58
|
-
background: none;
|
|
59
|
-
border: none;
|
|
60
|
-
padding: 4px 8px;
|
|
61
|
-
cursor: pointer;
|
|
62
|
-
-webkit-tap-highlight-color: transparent;
|
|
63
|
-
border-radius: var(--b-radius-l1-md);
|
|
64
|
-
transition: background-color var(--b-transition-fast);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.headerBtn:active {
|
|
68
|
-
background-color: color-mix(in oklch, var(--base-fg) 6%, transparent);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
.headerBtnConfirm {
|
|
72
|
-
font-weight: 600;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.pickerBody {
|
|
76
|
-
position: relative;
|
|
77
|
-
flex: 1;
|
|
78
|
-
display: flex;
|
|
79
|
-
flex-direction: column;
|
|
80
|
-
padding: 0 8px 16px;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.selectedBar {
|
|
84
|
-
position: absolute;
|
|
85
|
-
inset-inline: 24px;
|
|
86
|
-
top: 50%;
|
|
87
|
-
transform: translateY(calc(-50% + 8px));
|
|
88
|
-
height: 40px;
|
|
89
|
-
border-top: 1px solid color-mix(in oklch, var(--base-fg) 10%, transparent);
|
|
90
|
-
border-bottom: 1px solid color-mix(in oklch, var(--base-fg) 10%, transparent);
|
|
91
|
-
background-color: color-mix(in oklch, var(--base-fg) 2%, transparent);
|
|
92
|
-
border-radius: var(--b-radius-l2-xs);
|
|
93
|
-
pointer-events: none;
|
|
94
|
-
z-index: 0;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.columns {
|
|
98
|
-
display: flex;
|
|
99
|
-
position: relative;
|
|
100
|
-
z-index: 1;
|
|
101
|
-
padding: 20px 0;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.column {
|
|
105
|
-
flex: 1;
|
|
106
|
-
overflow: hidden;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
.column:first-child {
|
|
110
|
-
flex: 1.1;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.column:last-child {
|
|
114
|
-
flex: 0.9;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.scroller {
|
|
118
|
-
height: 200px;
|
|
119
|
-
overflow-y: auto;
|
|
120
|
-
scroll-snap-type: y mandatory;
|
|
121
|
-
-webkit-overflow-scrolling: touch;
|
|
122
|
-
scrollbar-width: none;
|
|
123
|
-
mask-image: linear-gradient(
|
|
124
|
-
to bottom,
|
|
125
|
-
transparent 0%,
|
|
126
|
-
rgba(0, 0, 0, 0.2) 15%,
|
|
127
|
-
rgba(0, 0, 0, 1) 30%,
|
|
128
|
-
rgba(0, 0, 0, 1) 70%,
|
|
129
|
-
rgba(0, 0, 0, 0.2) 85%,
|
|
130
|
-
transparent 100%
|
|
131
|
-
);
|
|
132
|
-
-webkit-mask-image: linear-gradient(
|
|
133
|
-
to bottom,
|
|
134
|
-
transparent 0%,
|
|
135
|
-
rgba(0, 0, 0, 0.2) 15%,
|
|
136
|
-
rgba(0, 0, 0, 1) 30%,
|
|
137
|
-
rgba(0, 0, 0, 1) 70%,
|
|
138
|
-
rgba(0, 0, 0, 0.2) 85%,
|
|
139
|
-
transparent 100%
|
|
140
|
-
);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.scroller::-webkit-scrollbar {
|
|
144
|
-
display: none;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
.yearColumn {
|
|
148
|
-
align-items: flex-end;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.item {
|
|
152
|
-
display: flex;
|
|
153
|
-
align-items: center;
|
|
154
|
-
justify-content: center;
|
|
155
|
-
height: 40px;
|
|
156
|
-
scroll-snap-align: center;
|
|
157
|
-
font-size: var(--b-comp-font-size-lg);
|
|
158
|
-
color: color-mix(in oklch, var(--base-fg) 40%, transparent);
|
|
159
|
-
transition: color 0.2s ease, font-weight 0.2s ease;
|
|
160
|
-
cursor: pointer;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.yearItem {
|
|
164
|
-
justify-content: flex-end;
|
|
165
|
-
padding-right: 8px;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
.monthItem {
|
|
169
|
-
justify-content: center;
|
|
170
|
-
min-width: 80px;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.dayItem {
|
|
174
|
-
justify-content: flex-start;
|
|
175
|
-
padding-left: 8px;
|
|
176
|
-
min-width: 48px;
|
|
177
|
-
font-variant-numeric: tabular-nums;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.itemSelected {
|
|
181
|
-
color: var(--base-fg);
|
|
182
|
-
font-weight: 600;
|
|
183
|
-
font-size: var(--b-comp-font-size-xl);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.itemDisabled {
|
|
187
|
-
color: color-mix(in oklch, var(--base-fg) 15%, transparent);
|
|
188
|
-
pointer-events: none;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
.weekday {
|
|
192
|
-
text-align: center;
|
|
193
|
-
font-size: var(--b-comp-font-size-xs);
|
|
194
|
-
color: color-mix(in oklch, var(--base-fg) 40%, transparent);
|
|
195
|
-
margin: 0;
|
|
196
|
-
padding: 8px 0 0;
|
|
197
|
-
}
|
package/src/DatePicker/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { DatePicker } from './DatePicker.jsx'
|
package/src/Dialog/Dialog.jsx
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { splitProps, mergeProps } from 'solid-js'
|
|
2
|
-
import { Portal } from 'solid-js/web'
|
|
3
|
-
import { Dialog as ArkDialog } from '@ark-ui/solid'
|
|
4
|
-
import { CloseButton } from '../CloseButton/CloseButton.jsx'
|
|
5
|
-
import styles from './Dialog.module.css'
|
|
6
|
-
|
|
7
|
-
const DEFAULT_PROPS = {
|
|
8
|
-
modal: true,
|
|
9
|
-
lazyMount: true,
|
|
10
|
-
unmountOnExit: true,
|
|
11
|
-
closeable: true,
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* @param {import('@ark-ui/solid').DialogRootProps & {
|
|
16
|
-
* title?: string
|
|
17
|
-
* description?: string
|
|
18
|
-
* closeable?: boolean
|
|
19
|
-
* class?: string
|
|
20
|
-
* }} props
|
|
21
|
-
*/
|
|
22
|
-
export function Dialog(props) {
|
|
23
|
-
const [local, rest] = splitProps(
|
|
24
|
-
mergeProps(DEFAULT_PROPS, props),
|
|
25
|
-
['title', 'description', 'class', 'children', 'modal', 'lazyMount', 'unmountOnExit', 'closeable'],
|
|
26
|
-
)
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<ArkDialog.Root {...rest} modal={local.modal} lazyMount={local.lazyMount} unmountOnExit={local.unmountOnExit}>
|
|
30
|
-
<Portal mount={document.body}>
|
|
31
|
-
<ArkDialog.Backdrop class={styles.backdrop} />
|
|
32
|
-
<ArkDialog.Positioner class={styles.positioner}>
|
|
33
|
-
<ArkDialog.Content
|
|
34
|
-
class={[
|
|
35
|
-
'balik-dialog',
|
|
36
|
-
styles.content,
|
|
37
|
-
local.class,
|
|
38
|
-
]
|
|
39
|
-
.filter(Boolean)
|
|
40
|
-
.join(' ')}
|
|
41
|
-
>
|
|
42
|
-
{local.title && (
|
|
43
|
-
<ArkDialog.Title class={styles.title}>
|
|
44
|
-
{local.title}
|
|
45
|
-
</ArkDialog.Title>
|
|
46
|
-
)}
|
|
47
|
-
{local.description && (
|
|
48
|
-
<ArkDialog.Description class={styles.description}>
|
|
49
|
-
{local.description}
|
|
50
|
-
</ArkDialog.Description>
|
|
51
|
-
)}
|
|
52
|
-
<div class={styles.body}>{local.children}</div>
|
|
53
|
-
{local.closeable && (
|
|
54
|
-
<ArkDialog.CloseTrigger asChild={CloseButton} class={styles.close} />
|
|
55
|
-
)}
|
|
56
|
-
</ArkDialog.Content>
|
|
57
|
-
</ArkDialog.Positioner>
|
|
58
|
-
</Portal>
|
|
59
|
-
</ArkDialog.Root>
|
|
60
|
-
)
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
Dialog.Original = ArkDialog
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
.backdrop {
|
|
2
|
-
position: fixed;
|
|
3
|
-
inset: 0;
|
|
4
|
-
z-index: var(--b-z-index-modal);
|
|
5
|
-
background-color: rgba(0, 0, 0, 0.4);
|
|
6
|
-
opacity: 0;
|
|
7
|
-
pointer-events: none;
|
|
8
|
-
transition: opacity var(--b-transition-normal);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.backdrop[data-state="open"] {
|
|
12
|
-
opacity: 1;
|
|
13
|
-
pointer-events: auto;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.backdrop[data-state="closed"] {
|
|
17
|
-
opacity: 0;
|
|
18
|
-
pointer-events: none;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.positioner {
|
|
22
|
-
position: fixed;
|
|
23
|
-
inset: 0;
|
|
24
|
-
z-index: var(--b-z-index-modal);
|
|
25
|
-
display: flex;
|
|
26
|
-
align-items: center;
|
|
27
|
-
justify-content: center;
|
|
28
|
-
padding: var(--b-spacing-lg);
|
|
29
|
-
pointer-events: none;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.content {
|
|
33
|
-
--_dialog-padding: 16px;
|
|
34
|
-
|
|
35
|
-
position: relative;
|
|
36
|
-
display: flex;
|
|
37
|
-
flex-direction: column;
|
|
38
|
-
max-height: calc(100vh - var(--b-spacing-lg) * 2);
|
|
39
|
-
width: 100%;
|
|
40
|
-
max-width: 440px;
|
|
41
|
-
background-color: var(--base-bg);
|
|
42
|
-
border-radius: var(--b-radius-l3-md);
|
|
43
|
-
box-shadow: var(--b-shadow-lg);
|
|
44
|
-
pointer-events: auto;
|
|
45
|
-
opacity: 0;
|
|
46
|
-
transform: scale(0.95);
|
|
47
|
-
transition:
|
|
48
|
-
opacity var(--b-transition-normal),
|
|
49
|
-
transform var(--b-transition-normal);
|
|
50
|
-
overflow-y: auto;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
.content[data-state="open"] {
|
|
54
|
-
opacity: 1;
|
|
55
|
-
transform: scale(1);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.content[data-state="closed"] {
|
|
59
|
-
opacity: 0;
|
|
60
|
-
transform: scale(0.95);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.title {
|
|
64
|
-
margin: 0;
|
|
65
|
-
padding:
|
|
66
|
-
var(--_dialog-padding)
|
|
67
|
-
var(--_dialog-padding)
|
|
68
|
-
0;
|
|
69
|
-
font-size: var(--b-font-size-lg);
|
|
70
|
-
font-weight: 600;
|
|
71
|
-
color: var(--base-fg);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.description {
|
|
75
|
-
margin: 0;
|
|
76
|
-
padding:
|
|
77
|
-
var(--b-spacing-sm)
|
|
78
|
-
var(--_dialog-padding)
|
|
79
|
-
0;
|
|
80
|
-
font-size: var(--b-font-size-md);
|
|
81
|
-
line-height: var(--b-line-height);
|
|
82
|
-
color: color-mix(in oklch, var(--base-fg) 55%, transparent);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.body {
|
|
86
|
-
padding: var(--_dialog-padding);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.close {
|
|
90
|
-
position: absolute;
|
|
91
|
-
top: var(--_dialog-padding);
|
|
92
|
-
right: var(--_dialog-padding);
|
|
93
|
-
display: flex;
|
|
94
|
-
align-items: center;
|
|
95
|
-
justify-content: center;
|
|
96
|
-
width: 32px;
|
|
97
|
-
height: 32px;
|
|
98
|
-
padding: 0;
|
|
99
|
-
border: none;
|
|
100
|
-
border-radius: var(--b-radius-l1-md);
|
|
101
|
-
background: transparent;
|
|
102
|
-
color: color-mix(in oklch, var(--base-fg) 40%, transparent);
|
|
103
|
-
cursor: pointer;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
.close svg {
|
|
107
|
-
display: block;
|
|
108
|
-
width: 16px;
|
|
109
|
-
height: 16px;
|
|
110
|
-
pointer-events: none;
|
|
111
|
-
}
|
package/src/Dialog/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Dialog } from './Dialog.jsx'
|
package/src/Divider/Divider.jsx
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { splitProps, mergeProps } from 'solid-js'
|
|
2
|
-
import styles from './Divider.module.css'
|
|
3
|
-
|
|
4
|
-
const orientations = {
|
|
5
|
-
horizontal: styles.horizontal,
|
|
6
|
-
vertical: styles.vertical,
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
const DEFAULT_PROPS = {
|
|
10
|
-
orientation: 'horizontal',
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @param {import('solid-js').JSX.HTMLAttributes<HTMLHRElement> & {
|
|
15
|
-
* orientation?: 'horizontal' | 'vertical'
|
|
16
|
-
* class?: string
|
|
17
|
-
* }} props
|
|
18
|
-
*/
|
|
19
|
-
export function Divider(props) {
|
|
20
|
-
const [local, rest] = splitProps(
|
|
21
|
-
mergeProps(DEFAULT_PROPS, props),
|
|
22
|
-
['orientation', 'class'],
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<hr
|
|
27
|
-
{...rest}
|
|
28
|
-
class={[
|
|
29
|
-
'balik-divider',
|
|
30
|
-
`balik-divider--${local.orientation}`,
|
|
31
|
-
orientations[local.orientation],
|
|
32
|
-
local.class,
|
|
33
|
-
]
|
|
34
|
-
.filter(Boolean)
|
|
35
|
-
.join(' ')}
|
|
36
|
-
/>
|
|
37
|
-
)
|
|
38
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
.horizontal {
|
|
2
|
-
width: 100%;
|
|
3
|
-
height: 1px;
|
|
4
|
-
flex-shrink: 0;
|
|
5
|
-
border: none;
|
|
6
|
-
background-color: color-mix(in oklch, var(--base-fg) 10%, var(--base-bg));
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.vertical {
|
|
10
|
-
width: 1px;
|
|
11
|
-
height: 100%;
|
|
12
|
-
min-height: 1em;
|
|
13
|
-
flex-shrink: 0;
|
|
14
|
-
border: none;
|
|
15
|
-
background-color: color-mix(in oklch, var(--base-fg) 10%, var(--base-bg));
|
|
16
|
-
}
|
package/src/Divider/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Divider } from './Divider.jsx'
|
package/src/Drawer/Drawer.jsx
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { splitProps, mergeProps } from 'solid-js'
|
|
2
|
-
import { Portal } from 'solid-js/web'
|
|
3
|
-
import styles from './Drawer.module.css'
|
|
4
|
-
|
|
5
|
-
const DEFAULT_PROPS = {
|
|
6
|
-
side: 'right',
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @param {{
|
|
11
|
-
* open: boolean
|
|
12
|
-
* onOpenChange?: (open: boolean) => void
|
|
13
|
-
* title?: string
|
|
14
|
-
* side?: 'left' | 'right'
|
|
15
|
-
* class?: string
|
|
16
|
-
* children?: import('solid-js').JSX.Element
|
|
17
|
-
* }} props
|
|
18
|
-
*/
|
|
19
|
-
export function Drawer(props) {
|
|
20
|
-
const [local] = splitProps(
|
|
21
|
-
mergeProps(DEFAULT_PROPS, props),
|
|
22
|
-
['open', 'onOpenChange', 'title', 'side', 'class', 'children'],
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<Portal mount={document.body}>
|
|
27
|
-
<div
|
|
28
|
-
class={styles.backdrop}
|
|
29
|
-
data-open={local.open ? '' : undefined}
|
|
30
|
-
onClick={() => local.onOpenChange?.(false)}
|
|
31
|
-
/>
|
|
32
|
-
<div
|
|
33
|
-
class={[
|
|
34
|
-
'balik-drawer',
|
|
35
|
-
styles.panel,
|
|
36
|
-
local.side === 'left' ? styles.sideLeft : styles.sideRight,
|
|
37
|
-
local.class,
|
|
38
|
-
]
|
|
39
|
-
.filter(Boolean)
|
|
40
|
-
.join(' ')}
|
|
41
|
-
data-open={local.open ? '' : undefined}
|
|
42
|
-
role="dialog"
|
|
43
|
-
aria-modal="true"
|
|
44
|
-
aria-label={local.title || 'Drawer'}
|
|
45
|
-
>
|
|
46
|
-
{local.title && (
|
|
47
|
-
<div class={styles.header}>
|
|
48
|
-
<h2 class={styles.title}>{local.title}</h2>
|
|
49
|
-
</div>
|
|
50
|
-
)}
|
|
51
|
-
<div class={styles.body}>{local.children}</div>
|
|
52
|
-
</div>
|
|
53
|
-
</Portal>
|
|
54
|
-
)
|
|
55
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
.backdrop {
|
|
2
|
-
position: fixed;
|
|
3
|
-
inset: 0;
|
|
4
|
-
z-index: var(--b-z-index-modal);
|
|
5
|
-
background-color: rgba(0, 0, 0, 0.35);
|
|
6
|
-
opacity: 0;
|
|
7
|
-
pointer-events: none;
|
|
8
|
-
transition: opacity 0.25s ease;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.backdrop[data-open] {
|
|
12
|
-
opacity: 1;
|
|
13
|
-
pointer-events: auto;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
.panel {
|
|
17
|
-
position: fixed;
|
|
18
|
-
top: 0;
|
|
19
|
-
bottom: 0;
|
|
20
|
-
z-index: var(--b-z-index-modal);
|
|
21
|
-
display: flex;
|
|
22
|
-
flex-direction: column;
|
|
23
|
-
width: 260px;
|
|
24
|
-
max-width: 80vw;
|
|
25
|
-
background-color: var(--base-bg);
|
|
26
|
-
overflow-y: auto;
|
|
27
|
-
transition: transform 0.25s ease;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.sideLeft {
|
|
31
|
-
left: 0;
|
|
32
|
-
border-right: 1px solid color-mix(in oklch, var(--base-fg) 8%, var(--base-bg));
|
|
33
|
-
transform: translateX(-100%);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.sideLeft[data-open] {
|
|
37
|
-
transform: translateX(0);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.sideRight {
|
|
41
|
-
right: 0;
|
|
42
|
-
border-left: 1px solid color-mix(in oklch, var(--base-fg) 8%, var(--base-bg));
|
|
43
|
-
transform: translateX(100%);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.sideRight[data-open] {
|
|
47
|
-
transform: translateX(0);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.header {
|
|
51
|
-
display: flex;
|
|
52
|
-
align-items: center;
|
|
53
|
-
padding: 16px;
|
|
54
|
-
border-bottom: 1px solid color-mix(in oklch, var(--base-fg) 6%, var(--base-bg));
|
|
55
|
-
flex-shrink: 0;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.title {
|
|
59
|
-
margin: 0;
|
|
60
|
-
font-size: var(--b-comp-font-size-lg);
|
|
61
|
-
font-weight: 600;
|
|
62
|
-
color: var(--base-fg);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.body {
|
|
66
|
-
padding: 16px;
|
|
67
|
-
flex: 1;
|
|
68
|
-
}
|
package/src/Drawer/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Drawer } from './Drawer.jsx'
|
package/src/Empty/Empty.jsx
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { splitProps, mergeProps } from 'solid-js'
|
|
2
|
-
import styles from './Empty.module.css'
|
|
3
|
-
|
|
4
|
-
const DEFAULT_PROPS = {
|
|
5
|
-
title: 'No data',
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @param {{
|
|
10
|
-
* title?: string
|
|
11
|
-
* icon?: import('solid-js').JSX.Element
|
|
12
|
-
* class?: string
|
|
13
|
-
* }} props
|
|
14
|
-
*/
|
|
15
|
-
export function Empty(props) {
|
|
16
|
-
const [local] = splitProps(
|
|
17
|
-
mergeProps(DEFAULT_PROPS, props),
|
|
18
|
-
['title', 'icon', 'class'],
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
return (
|
|
22
|
-
<div
|
|
23
|
-
class={[
|
|
24
|
-
'balik-empty',
|
|
25
|
-
styles.base,
|
|
26
|
-
local.class,
|
|
27
|
-
]
|
|
28
|
-
.filter(Boolean)
|
|
29
|
-
.join(' ')}
|
|
30
|
-
>
|
|
31
|
-
{local.icon}
|
|
32
|
-
<p class={styles.title}>{local.title}</p>
|
|
33
|
-
</div>
|
|
34
|
-
)
|
|
35
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
.base {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
align-items: center;
|
|
5
|
-
justify-content: center;
|
|
6
|
-
text-align: center;
|
|
7
|
-
width: 100%;
|
|
8
|
-
padding: 40px 16px;
|
|
9
|
-
gap: 12px;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.title {
|
|
13
|
-
font-weight: 600;
|
|
14
|
-
font-size: 16px;
|
|
15
|
-
line-height: 24px;
|
|
16
|
-
color: var(--base-fg);
|
|
17
|
-
}
|
package/src/Empty/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Empty } from './Empty.jsx'
|
package/src/Fab/Fab.jsx
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import { splitProps, mergeProps } from 'solid-js'
|
|
2
|
-
import { Popover } from '../Popover/Popover.jsx'
|
|
3
|
-
import styles from './Fab.module.css'
|
|
4
|
-
|
|
5
|
-
const DEFAULT_PROPS = {}
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @param {import('solid-js').JSX.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
9
|
-
* icon: import('solid-js').JSX.Element
|
|
10
|
-
* class?: string
|
|
11
|
-
* }} props
|
|
12
|
-
*/
|
|
13
|
-
export function Fab(props) {
|
|
14
|
-
const [local, rest] = splitProps(
|
|
15
|
-
mergeProps(DEFAULT_PROPS, props),
|
|
16
|
-
['icon', 'class'],
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
<button
|
|
21
|
-
{...rest}
|
|
22
|
-
type="button"
|
|
23
|
-
class={[
|
|
24
|
-
'balik-fab',
|
|
25
|
-
styles.base,
|
|
26
|
-
local.class,
|
|
27
|
-
]
|
|
28
|
-
.filter(Boolean)
|
|
29
|
-
.join(' ')}
|
|
30
|
-
>
|
|
31
|
-
<span class={styles.icon}>{local.icon}</span>
|
|
32
|
-
</button>
|
|
33
|
-
)
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* @param {import('solid-js').JSX.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
38
|
-
* icon: import('solid-js').JSX.Element
|
|
39
|
-
* label?: string
|
|
40
|
-
* class?: string
|
|
41
|
-
* }} props
|
|
42
|
-
*/
|
|
43
|
-
function FabItem(props) {
|
|
44
|
-
const [local, rest] = splitProps(props, ['icon', 'label', 'class'])
|
|
45
|
-
|
|
46
|
-
return (
|
|
47
|
-
<button
|
|
48
|
-
{...rest}
|
|
49
|
-
type="button"
|
|
50
|
-
class={[
|
|
51
|
-
styles.item,
|
|
52
|
-
local.class,
|
|
53
|
-
]
|
|
54
|
-
.filter(Boolean)
|
|
55
|
-
.join(' ')}
|
|
56
|
-
>
|
|
57
|
-
<span class={styles.itemIcon}>{local.icon}</span>
|
|
58
|
-
{local.label && <span class={styles.itemLabel}>{local.label}</span>}
|
|
59
|
-
</button>
|
|
60
|
-
)
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* @param {{
|
|
65
|
-
* icon: import('solid-js').JSX.Element
|
|
66
|
-
* 'aria-label'?: string
|
|
67
|
-
* class?: string
|
|
68
|
-
* style?: string | import('solid-js').JSX.CSSProperties
|
|
69
|
-
* children?: import('solid-js').JSX.Element
|
|
70
|
-
* }} props
|
|
71
|
-
*/
|
|
72
|
-
function FabGroup(props) {
|
|
73
|
-
const [local] = splitProps(
|
|
74
|
-
mergeProps(DEFAULT_PROPS, props),
|
|
75
|
-
['icon', 'aria-label', 'class', 'style', 'children'],
|
|
76
|
-
)
|
|
77
|
-
|
|
78
|
-
return (
|
|
79
|
-
<Popover positioning={{ placement: 'top-end', gutter: 16 }}>
|
|
80
|
-
<Popover.Trigger>
|
|
81
|
-
<Fab icon={local.icon} aria-label={local['aria-label']} class={styles.trigger} />
|
|
82
|
-
</Popover.Trigger>
|
|
83
|
-
<Popover.Content class={styles.groupContent}>
|
|
84
|
-
<div class={styles.items}>{local.children}</div>
|
|
85
|
-
</Popover.Content>
|
|
86
|
-
</Popover>
|
|
87
|
-
)
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
Fab.Group = FabGroup
|
|
91
|
-
Fab.Group.Item = FabItem
|