@balikjs/mobile 0.0.2 → 0.1.0

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 (107) hide show
  1. package/dist/index.js +3537 -0
  2. package/dist/styles.css +1 -1
  3. package/package.json +209 -10
  4. package/dist/mobile.js +0 -3235
  5. package/src/Alert/Alert.jsx +0 -67
  6. package/src/Alert/Alert.module.css +0 -87
  7. package/src/Alert/index.js +0 -1
  8. package/src/Avatar/Avatar.jsx +0 -77
  9. package/src/Avatar/Avatar.module.css +0 -74
  10. package/src/Avatar/index.js +0 -1
  11. package/src/Badge/Badge.jsx +0 -83
  12. package/src/Badge/Badge.module.css +0 -141
  13. package/src/Badge/index.js +0 -1
  14. package/src/BottomNavigation/BottomNavigation.jsx +0 -61
  15. package/src/BottomNavigation/BottomNavigation.module.css +0 -53
  16. package/src/BottomNavigation/index.js +0 -1
  17. package/src/BottomSheet/BottomSheet.jsx +0 -51
  18. package/src/BottomSheet/BottomSheet.module.css +0 -56
  19. package/src/BottomSheet/index.js +0 -1
  20. package/src/Button/Button.jsx +0 -77
  21. package/src/Button/Button.module.css +0 -124
  22. package/src/Button/index.js +0 -1
  23. package/src/Card/Card.jsx +0 -31
  24. package/src/Card/Card.module.css +0 -4
  25. package/src/Card/index.js +0 -1
  26. package/src/Checkbox/Checkbox.jsx +0 -64
  27. package/src/Checkbox/Checkbox.module.css +0 -146
  28. package/src/Checkbox/index.js +0 -1
  29. package/src/Clipboard/Clipboard.jsx +0 -82
  30. package/src/Clipboard/Clipboard.module.css +0 -126
  31. package/src/Clipboard/index.js +0 -1
  32. package/src/CloseButton/CloseButton.jsx +0 -51
  33. package/src/CloseButton/CloseButton.module.css +0 -94
  34. package/src/Confirm/Confirm.jsx +0 -52
  35. package/src/Confirm/Confirm.module.css +0 -5
  36. package/src/Confirm/index.js +0 -1
  37. package/src/DatePicker/DatePicker.jsx +0 -276
  38. package/src/DatePicker/DatePicker.module.css +0 -197
  39. package/src/DatePicker/index.js +0 -1
  40. package/src/Dialog/Dialog.jsx +0 -63
  41. package/src/Dialog/Dialog.module.css +0 -111
  42. package/src/Dialog/index.js +0 -1
  43. package/src/Divider/Divider.jsx +0 -38
  44. package/src/Divider/Divider.module.css +0 -16
  45. package/src/Divider/index.js +0 -1
  46. package/src/Drawer/Drawer.jsx +0 -55
  47. package/src/Drawer/Drawer.module.css +0 -68
  48. package/src/Drawer/index.js +0 -1
  49. package/src/Empty/Empty.jsx +0 -35
  50. package/src/Empty/Empty.module.css +0 -17
  51. package/src/Empty/index.js +0 -1
  52. package/src/Fab/Fab.jsx +0 -91
  53. package/src/Fab/Fab.module.css +0 -94
  54. package/src/Fab/index.js +0 -1
  55. package/src/Input/Input.jsx +0 -53
  56. package/src/Input/Input.module.css +0 -97
  57. package/src/Input/index.js +0 -1
  58. package/src/Link/Link.jsx +0 -31
  59. package/src/Link/Link.module.css +0 -18
  60. package/src/Link/index.js +0 -1
  61. package/src/Popover/Popover.jsx +0 -162
  62. package/src/Popover/Popover.module.css +0 -63
  63. package/src/Popover/index.js +0 -1
  64. package/src/RadioGroup/Radio.jsx +0 -52
  65. package/src/RadioGroup/Radio.module.css +0 -133
  66. package/src/RadioGroup/RadioGroup.jsx +0 -36
  67. package/src/RadioGroup/RadioGroup.module.css +0 -23
  68. package/src/RadioGroup/index.js +0 -2
  69. package/src/SearchInput/SearchInput.jsx +0 -89
  70. package/src/SearchInput/SearchInput.module.css +0 -169
  71. package/src/SearchInput/index.js +0 -1
  72. package/src/Select/Select.jsx +0 -102
  73. package/src/Select/Select.module.css +0 -174
  74. package/src/Select/index.js +0 -1
  75. package/src/SelectPc/Select.jsx +0 -88
  76. package/src/SelectPc/SelectPc.module.css +0 -132
  77. package/src/SelectPc/index.js +0 -1
  78. package/src/Skeleton/Skeleton.jsx +0 -55
  79. package/src/Skeleton/Skeleton.module.css +0 -33
  80. package/src/Skeleton/index.js +0 -1
  81. package/src/Slider/Slider.jsx +0 -50
  82. package/src/Slider/Slider.module.css +0 -77
  83. package/src/Slider/index.js +0 -1
  84. package/src/Spinner/Spinner.jsx +0 -45
  85. package/src/Spinner/Spinner.module.css +0 -35
  86. package/src/Spinner/index.js +0 -1
  87. package/src/Switch/Switch.jsx +0 -51
  88. package/src/Switch/Switch.module.css +0 -156
  89. package/src/Switch/index.js +0 -1
  90. package/src/Tabs/Tabs.jsx +0 -75
  91. package/src/Tabs/Tabs.module.css +0 -45
  92. package/src/Tabs/index.js +0 -1
  93. package/src/Tag/Tag.jsx +0 -74
  94. package/src/Tag/Tag.module.css +0 -128
  95. package/src/Tag/index.js +0 -1
  96. package/src/Textarea/Textarea.jsx +0 -52
  97. package/src/Textarea/Textarea.module.css +0 -89
  98. package/src/Textarea/index.js +0 -1
  99. package/src/Toast/Toast.jsx +0 -169
  100. package/src/Toast/Toast.module.css +0 -152
  101. package/src/Toast/index.js +0 -1
  102. package/src/Tooltip/Tooltip.jsx +0 -42
  103. package/src/Tooltip/Tooltip.module.css +0 -41
  104. package/src/Tooltip/index.js +0 -1
  105. package/src/index.js +0 -35
  106. package/src/styles/index.css +0 -90
  107. package/src/styles/tokens.css +0 -227
@@ -1,94 +0,0 @@
1
- .base {
2
- display: inline-flex;
3
- align-items: center;
4
- justify-content: center;
5
- width: 56px;
6
- height: 56px;
7
- border: none;
8
- border-radius: 50%;
9
- background-color: var(--base-edge);
10
- color: var(--base-bg);
11
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
12
- cursor: pointer;
13
- user-select: none;
14
- touch-action: manipulation;
15
- transition: box-shadow var(--b-transition-fast);
16
- }
17
-
18
- .base:active {
19
- transform: scale(0.95);
20
- }
21
-
22
- .base:focus-visible {
23
- outline: 2px solid var(--color-focus-border);
24
- outline-offset: 2px;
25
- }
26
-
27
- .icon {
28
- display: flex;
29
- align-items: center;
30
- justify-content: center;
31
- width: 24px;
32
- height: 24px;
33
- }
34
-
35
- .icon svg {
36
- width: 100%;
37
- height: 100%;
38
- }
39
-
40
- .groupContent {
41
- padding: 8px;
42
- border: none;
43
- box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
44
- background-color: transparent;
45
- animation: none;
46
- }
47
-
48
- .items {
49
- display: flex;
50
- flex-direction: column;
51
- gap: 8px;
52
- }
53
-
54
- .item {
55
- display: inline-flex;
56
- align-items: center;
57
- gap: 8px;
58
- padding: 8px 16px;
59
- border: none;
60
- border-radius: 24px;
61
- background-color: color-mix(in oklch, var(--base-fg) 90%, var(--base-bg));
62
- color: var(--base-bg);
63
- box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
64
- font-family: inherit;
65
- font-size: 14px;
66
- font-weight: 500;
67
- white-space: nowrap;
68
- cursor: pointer;
69
- user-select: none;
70
- touch-action: manipulation;
71
- transition: transform var(--b-transition-fast);
72
- }
73
-
74
- .item:active {
75
- transform: scale(0.95);
76
- }
77
-
78
- .itemIcon {
79
- display: flex;
80
- align-items: center;
81
- justify-content: center;
82
- width: 20px;
83
- height: 20px;
84
- }
85
-
86
- .itemIcon svg {
87
- width: 100%;
88
- height: 100%;
89
- }
90
-
91
- .itemLabel {
92
- font-size: 14px;
93
- line-height: 20px;
94
- }
package/src/Fab/index.js DELETED
@@ -1 +0,0 @@
1
- export { Fab } from './Fab.jsx'
@@ -1,53 +0,0 @@
1
- import { splitProps, mergeProps } from 'solid-js'
2
- import { ark } from '@ark-ui/solid/factory'
3
- import styles from './Input.module.css'
4
-
5
- const variants = {
6
- solid: styles.solid,
7
- outline: styles.outline,
8
- singleline: styles.singleline,
9
- }
10
-
11
- const sizes = {
12
- xs: styles.sizeXs,
13
- sm: styles.sizeSm,
14
- md: styles.sizeMd,
15
- lg: styles.sizeLg,
16
- xl: styles.sizeXl,
17
- }
18
-
19
- const DEFAULT_PROPS = {
20
- variant: 'outline',
21
- size: 'md',
22
- disabled: false,
23
- }
24
-
25
- /**
26
- * @param {import('solid-js').JSX.InputHTMLAttributes<HTMLInputElement> & {
27
- * variant?: 'solid' | 'outline' | 'singleline'
28
- * size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl'
29
- * }} props
30
- */
31
- export function Input(props) {
32
- const [local, rest] = splitProps(
33
- mergeProps(DEFAULT_PROPS, props),
34
- ['variant', 'size', 'class'],
35
- )
36
-
37
- return (
38
- <ark.input
39
- {...rest}
40
- class={[
41
- 'balik-input',
42
- `balik-input--${local.variant}`,
43
- `balik-input--${local.size}`,
44
- styles.base,
45
- variants[local.variant],
46
- sizes[local.size],
47
- local.class,
48
- ]
49
- .filter(Boolean)
50
- .join(' ')}
51
- />
52
- )
53
- }
@@ -1,97 +0,0 @@
1
- .base {
2
- display: block;
3
- width: 100%;
4
- border: 1px solid transparent;
5
- border-radius: var(--_border-radius);
6
- font-family: inherit;
7
- outline: none;
8
- box-shadow: none;
9
- appearance: none;
10
- touch-action: manipulation;
11
- transition: background-color var(--b-transition-fast),
12
- border-color var(--b-transition-fast),
13
- color var(--b-transition-fast);
14
-
15
- --_current-intent: var(--base-edge);
16
- }
17
-
18
- .base::placeholder {
19
- color: var(--color-disabled-fg);
20
- }
21
-
22
- .base:disabled {
23
- background-color: var(--color-disabled-bg);
24
- border-color: var(--color-disabled-border);
25
- color: var(--color-disabled-fg);
26
- }
27
-
28
- .solid {
29
- background-color: color-mix(in oklch, var(--base-fg) 2%, var(--base-bg));
30
- border-color: transparent;
31
- }
32
-
33
- .solid:focus {
34
- background-color: var(--color-focus-bg);
35
- }
36
-
37
- .outline {
38
- background-color: var(--base-bg);
39
- border-color: var(--_current-intent);
40
- }
41
-
42
- .outline:focus {
43
- background-color: var(--color-focus-bg);
44
- border-color: var(--color-focus-border);
45
- }
46
-
47
- .singleline {
48
- background-color: transparent;
49
- border-color: transparent;
50
- border-bottom-color: var(--_current-intent);
51
- border-radius: 0;
52
- }
53
-
54
- .singleline:focus {
55
- background-color: var(--color-focus-bg);
56
- border-bottom-color: var(--color-focus-border);
57
- }
58
-
59
- .sizeXs {
60
- height: var(--b-comp-height-xs);
61
- line-height: var(--b-comp-line-height-xs);
62
- padding: var(--b-comp-padding-y-xs) var(--b-comp-padding-x-xs);
63
- font-size: var(--b-comp-font-size-xs);
64
- --_border-radius: var(--b-radius-l1-xs);
65
- }
66
-
67
- .sizeSm {
68
- height: var(--b-comp-height-sm);
69
- line-height: var(--b-comp-line-height-sm);
70
- padding: var(--b-comp-padding-y-sm) var(--b-comp-padding-x-sm);
71
- font-size: var(--b-comp-font-size-sm);
72
- --_border-radius: var(--b-radius-l1-sm);
73
- }
74
-
75
- .sizeMd {
76
- height: var(--b-comp-height-md);
77
- line-height: var(--b-comp-line-height-md);
78
- padding: var(--b-comp-padding-y-md) var(--b-comp-padding-x-md);
79
- font-size: var(--b-comp-font-size-md);
80
- --_border-radius: var(--b-radius-l1-md);
81
- }
82
-
83
- .sizeLg {
84
- height: var(--b-comp-height-lg);
85
- line-height: var(--b-comp-line-height-lg);
86
- padding: var(--b-comp-padding-y-lg) var(--b-comp-padding-x-lg);
87
- font-size: var(--b-comp-font-size-lg);
88
- --_border-radius: var(--b-radius-l1-lg);
89
- }
90
-
91
- .sizeXl {
92
- height: var(--b-comp-height-xl);
93
- line-height: var(--b-comp-line-height-xl);
94
- padding: var(--b-comp-padding-y-xl) var(--b-comp-padding-x-xl);
95
- font-size: var(--b-comp-font-size-xl);
96
- --_border-radius: var(--b-radius-l1-xl);
97
- }
@@ -1 +0,0 @@
1
- export { Input } from './Input.jsx'
package/src/Link/Link.jsx DELETED
@@ -1,31 +0,0 @@
1
- import { splitProps, mergeProps } from 'solid-js'
2
- import styles from './Link.module.css'
3
-
4
- const DEFAULT_PROPS = {}
5
-
6
- /**
7
- * @param {import('solid-js').JSX.AnchorHTMLAttributes<HTMLAnchorElement> & {
8
- * class?: string
9
- * }} props
10
- */
11
- export function Link(props) {
12
- const [local, rest] = splitProps(
13
- mergeProps(DEFAULT_PROPS, props),
14
- ['class', 'children'],
15
- )
16
-
17
- return (
18
- <a
19
- {...rest}
20
- class={[
21
- 'balik-link',
22
- styles.base,
23
- local.class,
24
- ]
25
- .filter(Boolean)
26
- .join(' ')}
27
- >
28
- {local.children}
29
- </a>
30
- )
31
- }
@@ -1,18 +0,0 @@
1
- .base {
2
- color: var(--base-edge);
3
- text-decoration: none;
4
- cursor: pointer;
5
- font-weight: 500;
6
- transition: color var(--b-transition-fast), text-decoration-color var(--b-transition-fast);
7
- }
8
-
9
- .base:hover {
10
- text-decoration: underline;
11
- text-decoration-color: color-mix(in oklch, var(--base-edge) 60%, transparent);
12
- }
13
-
14
- .base:focus-visible {
15
- outline: 2px solid var(--color-focus-border);
16
- outline-offset: 2px;
17
- border-radius: 2px;
18
- }
package/src/Link/index.js DELETED
@@ -1 +0,0 @@
1
- export { Link } from './Link.jsx'
@@ -1,162 +0,0 @@
1
- import { splitProps, mergeProps } from 'solid-js'
2
- import { Portal } from 'solid-js/web'
3
- import { Popover as ArkPopover } from '@ark-ui/solid'
4
- import styles from './Popover.module.css'
5
-
6
- /**
7
- * @param {import('@ark-ui/solid').PopoverRootProps & {
8
- * class?: string
9
- * }} props
10
- */
11
- function PopoverRoot(props) {
12
- const [local, rest] = splitProps(
13
- mergeProps({}, props),
14
- ['class', 'children'],
15
- )
16
-
17
- return (
18
- <ArkPopover.Root {...rest} lazyMount unmountOnExit>
19
- {local.children}
20
- </ArkPopover.Root>
21
- )
22
- }
23
-
24
- /**
25
- * @param {import('@ark-ui/solid').PopoverTriggerProps & {
26
- * class?: string
27
- * }} props
28
- */
29
- function PopoverTrigger(props) {
30
- const [local, rest] = splitProps(
31
- mergeProps({}, props),
32
- ['class', 'children'],
33
- )
34
-
35
- return (
36
- <ArkPopover.Trigger
37
- {...rest}
38
- as="div"
39
- class={[
40
- 'balik-popover-trigger',
41
- local.class,
42
- ].filter(Boolean).join(' ')}
43
- >
44
- {local.children}
45
- </ArkPopover.Trigger>
46
- )
47
- }
48
-
49
- /**
50
- * @param {import('@ark-ui/solid').PopoverContentProps & {
51
- * class?: string
52
- * }} props
53
- */
54
- function PopoverContent(props) {
55
- const [local, rest] = splitProps(
56
- mergeProps({}, props),
57
- ['class', 'children'],
58
- )
59
-
60
- return (
61
- <Portal mount={document.body}>
62
- <ArkPopover.Positioner class={styles.positioner}>
63
- <ArkPopover.Content
64
- {...rest}
65
- class={[
66
- 'balik-popover-content',
67
- styles.content,
68
- local.class,
69
- ].filter(Boolean).join(' ')}
70
- >
71
- <ArkPopover.Arrow class={styles.arrow}>
72
- <ArkPopover.ArrowTip class={styles.arrowTip} />
73
- </ArkPopover.Arrow>
74
- {local.children}
75
- </ArkPopover.Content>
76
- </ArkPopover.Positioner>
77
- </Portal>
78
- )
79
- }
80
-
81
- /**
82
- * @param {import('@ark-ui/solid').PopoverCloseTriggerProps & {
83
- * class?: string
84
- * }} props
85
- */
86
- function PopoverCloseTrigger(props) {
87
- const [local, rest] = splitProps(
88
- mergeProps({}, props),
89
- ['class', 'children'],
90
- )
91
-
92
- return (
93
- <ArkPopover.CloseTrigger
94
- {...rest}
95
- class={[
96
- styles.closeTrigger,
97
- local.class,
98
- ].filter(Boolean).join(' ')}
99
- >
100
- {local.children}
101
- </ArkPopover.CloseTrigger>
102
- )
103
- }
104
-
105
- /**
106
- * @param {import('@ark-ui/solid').PopoverTitleProps & {
107
- * class?: string
108
- * }} props
109
- */
110
- function PopoverTitle(props) {
111
- const [local, rest] = splitProps(
112
- mergeProps({}, props),
113
- ['class', 'children'],
114
- )
115
-
116
- return (
117
- <ArkPopover.Title
118
- {...rest}
119
- class={[
120
- styles.title,
121
- local.class,
122
- ].filter(Boolean).join(' ')}
123
- >
124
- {local.children}
125
- </ArkPopover.Title>
126
- )
127
- }
128
-
129
- /**
130
- * @param {import('@ark-ui/solid').PopoverDescriptionProps & {
131
- * class?: string
132
- * }} props
133
- */
134
- function PopoverDescription(props) {
135
- const [local, rest] = splitProps(
136
- mergeProps({}, props),
137
- ['class', 'children'],
138
- )
139
-
140
- return (
141
- <ArkPopover.Description
142
- {...rest}
143
- class={[
144
- styles.description,
145
- local.class,
146
- ].filter(Boolean).join(' ')}
147
- >
148
- {local.children}
149
- </ArkPopover.Description>
150
- )
151
- }
152
-
153
- export function Popover(props) {
154
- return <PopoverRoot {...props} />
155
- }
156
-
157
- Popover.Trigger = PopoverTrigger
158
- Popover.Content = PopoverContent
159
- Popover.Title = PopoverTitle
160
- Popover.Description = PopoverDescription
161
- Popover.CloseTrigger = PopoverCloseTrigger
162
- Popover.Original = ArkPopover
@@ -1,63 +0,0 @@
1
- .positioner {
2
- z-index: var(--b-z-index-dropdown);
3
- }
4
-
5
- .content {
6
- padding: 12px;
7
- background-color: var(--base-bg);
8
- border-radius: var(--b-radius-l2-md);
9
- box-shadow: var(--b-shadow-lg);
10
- border: 1px solid color-mix(in oklch, var(--base-fg) 8%, var(--base-bg));
11
- outline: none;
12
- animation: popoverIn 0.15s ease;
13
- }
14
-
15
- @keyframes popoverIn {
16
- from {
17
- opacity: 0;
18
- transform: scale(0.95);
19
- }
20
- to {
21
- opacity: 1;
22
- transform: scale(1);
23
- }
24
- }
25
-
26
- .arrowTip {
27
- --arrow-size: 8px;
28
- --arrow-background: var(--base-bg);
29
- }
30
-
31
- .closeTrigger {
32
- display: flex;
33
- align-items: center;
34
- justify-content: center;
35
- position: absolute;
36
- top: 8px;
37
- right: 8px;
38
- width: 24px;
39
- height: 24px;
40
- padding: 0;
41
- border: none;
42
- border-radius: var(--b-radius-l1-md);
43
- background: transparent;
44
- color: color-mix(in oklch, var(--base-fg) 40%, transparent);
45
- cursor: pointer;
46
- touch-action: manipulation;
47
- }
48
-
49
- .title {
50
- margin: 0;
51
- padding-right: 24px;
52
- font-size: var(--b-comp-font-size-md);
53
- font-weight: 600;
54
- color: var(--base-fg);
55
- }
56
-
57
- .description {
58
- margin: 0;
59
- margin-top: 4px;
60
- font-size: var(--b-comp-font-size-sm);
61
- color: color-mix(in oklch, var(--base-fg) 55%, transparent);
62
- line-height: 1.5;
63
- }
@@ -1 +0,0 @@
1
- export { Popover } from './Popover.jsx'
@@ -1,52 +0,0 @@
1
- import { splitProps, mergeProps } from 'solid-js'
2
- import { RadioGroup as ArkRadioGroup } from '@ark-ui/solid'
3
- import styles from './Radio.module.css'
4
-
5
- const sizes = {
6
- xs: styles.sizeXs,
7
- sm: styles.sizeSm,
8
- md: styles.sizeMd,
9
- lg: styles.sizeLg,
10
- xl: styles.sizeXl,
11
- '2xl': styles.size2xl,
12
- }
13
-
14
- /**
15
- * @param {import('@ark-ui/solid').RadioGroupItemProps & {
16
- * size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'
17
- * class?: string
18
- * }} props
19
- */
20
- export function Radio(props) {
21
- const [local, rest] = splitProps(
22
- mergeProps({ size: 'md' }, props),
23
- ['class', 'children', 'size'],
24
- )
25
-
26
- return (
27
- <ArkRadioGroup.Item
28
- {...rest}
29
- class={[
30
- 'balik-radio',
31
- styles.item,
32
- sizes[local.size],
33
- local.class,
34
- ]
35
- .filter(Boolean)
36
- .join(' ')}
37
- >
38
- <ArkRadioGroup.ItemControl class={styles.control} />
39
- <ArkRadioGroup.ItemText class={styles.text}>
40
- {local.children}
41
- </ArkRadioGroup.ItemText>
42
- <ArkRadioGroup.ItemHiddenInput />
43
- </ArkRadioGroup.Item>
44
- )
45
- }
46
-
47
- Radio.Original = {
48
- Item: ArkRadioGroup.Item,
49
- ItemControl: ArkRadioGroup.ItemControl,
50
- ItemText: ArkRadioGroup.ItemText,
51
- ItemHiddenInput: ArkRadioGroup.ItemHiddenInput,
52
- }