@acusti/uikit-docs 0.2.0 → 0.3.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/.storybook/main.ts +4 -8
- package/.storybook/manager.ts +1 -1
- package/.storybook/preview.ts +1 -1
- package/CHANGELOG.md +26 -0
- package/dist/assets/CSSValueInput-BgAgo3f9.css +1 -0
- package/dist/assets/CSSValueInput-BoZriUnh.js +1 -0
- package/dist/assets/CSSValueInput.stories-D1VcYZJ0.js +113 -0
- package/dist/assets/Color-AVL7NMMY-BeW0C7pE.js +1 -0
- package/dist/assets/DatePicker-l5oaNCVE.css +1 -0
- package/dist/assets/DatePicker.stories-BSWV31FV.js +244 -0
- package/dist/assets/DocsRenderer-PQXLIZUC-D92GwNti.js +2 -0
- package/dist/assets/Dropdown-D5cyjefk.css +1 -0
- package/dist/assets/Dropdown-DUP_ybXe.js +84 -0
- package/dist/assets/Dropdown.stories-2Wtw1otE.js +336 -0
- package/dist/assets/InputText-Tkbh5amB.css +1 -0
- package/dist/assets/InputText.stories-BYt2Aj0_.js +90 -0
- package/dist/assets/Introduction-nSE2hjmb.js +183 -0
- package/dist/assets/MonthCalendar.stories-IJrL6wIl.js +169 -0
- package/dist/assets/accessibility-W_h2acOZ.png +0 -0
- package/dist/assets/addon-library-BWUCAmyN.png +0 -0
- package/dist/assets/blocks-Du178fXa.js +658 -0
- package/dist/assets/client-B2qWCcIR.js +25 -0
- package/dist/assets/clsx-hXifHU8N.js +9 -0
- package/dist/assets/context-C0qIqeS4.png +0 -0
- package/dist/assets/docs---vsFbMi.png +0 -0
- package/dist/assets/figma-plugin-CH2hELiO.png +0 -0
- package/dist/assets/iframe-ByGa_ItU.js +1102 -0
- package/dist/assets/index-BRXcJgsA.js +1 -0
- package/dist/assets/index-BVajFqaV.js +1 -0
- package/dist/assets/index-DwJ-mRZ2.js +9 -0
- package/dist/assets/jsx-runtime-D_zvdyIk.js +9 -0
- package/dist/assets/react-18-djOrgGe8.js +1 -0
- package/dist/assets/share-DGA-UcQf.png +0 -0
- package/dist/assets/styling-Bk6zjRzU.png +0 -0
- package/dist/assets/testing-cbzR9l9r.png +0 -0
- package/dist/assets/theming-D6WJLNoW.png +0 -0
- package/dist/assets/useIsOutOfBounds--pZPDsvJ.css +1 -0
- package/dist/assets/useIsOutOfBounds.stories-e48KZd_G.js +105 -0
- package/dist/assets/useKeyboardEvents-BH4Zd7d3.css +1 -0
- package/dist/assets/useKeyboardEvents.stories-CJbDuGfk.js +3 -0
- package/dist/favicon.svg +1 -0
- package/dist/iframe.html +685 -0
- package/dist/index.html +152 -0
- package/dist/index.json +1 -0
- package/dist/nunito-sans-bold-italic.woff2 +0 -0
- package/dist/nunito-sans-bold.woff2 +0 -0
- package/dist/nunito-sans-italic.woff2 +0 -0
- package/dist/nunito-sans-regular.woff2 +0 -0
- package/dist/project.json +1 -0
- package/dist/sb-addons/docs-1/manager-bundle.js +151 -0
- package/dist/sb-addons/storybook-2/manager-bundle.js +3 -0
- package/dist/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +188 -0
- package/dist/sb-common-assets/favicon.svg +1 -0
- package/dist/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/dist/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/dist/sb-manager/globals-module-info.js +797 -0
- package/dist/sb-manager/globals-runtime.js +72053 -0
- package/dist/sb-manager/globals.js +34 -0
- package/dist/sb-manager/runtime.js +13001 -0
- package/package.json +14 -10
- package/stories/CSSValueInput.stories.tsx +3 -3
- package/stories/DatePicker.stories.tsx +3 -3
- package/stories/Dropdown.css +119 -71
- package/stories/Dropdown.stories.tsx +3 -3
- package/stories/InputText.css +12 -1
- package/stories/InputText.stories.tsx +29 -6
- package/stories/Introduction.mdx +1 -1
- package/stories/MonthCalendar.stories.ts +1 -1
- package/stories/useIsOutOfBounds.css +1 -1
- package/stories/useIsOutOfBounds.stories.tsx +8 -5
- package/stories/useKeyboardEvents.stories.tsx +1 -1
- package/tsconfig.json +13 -1
- package/tsconfig.tsbuildinfo +1 -0
- package/stories/Button.stories.ts +0 -50
- package/stories/Button.tsx +0 -48
- package/stories/Header.stories.ts +0 -27
- package/stories/Header.tsx +0 -66
- package/stories/Page.stories.ts +0 -29
- package/stories/Page.tsx +0 -91
- package/stories/button.css +0 -30
- package/stories/header.css +0 -32
- package/stories/page.css +0 -69
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acusti/uikit-docs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=14"
|
|
6
6
|
},
|
|
@@ -9,18 +9,22 @@
|
|
|
9
9
|
"storybook": "storybook dev -p 6006"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"@storybook/addon-
|
|
13
|
-
"@storybook/
|
|
14
|
-
"@
|
|
15
|
-
"
|
|
16
|
-
"@storybook/react-vite": "^8.6",
|
|
17
|
-
"@storybook/test": "^8.6",
|
|
18
|
-
"@types/react": "^19.1.1",
|
|
19
|
-
"core-js": "^3.41.0",
|
|
12
|
+
"@storybook/addon-docs": "^9",
|
|
13
|
+
"@storybook/react-vite": "^9",
|
|
14
|
+
"@types/react": "^19.1.6",
|
|
15
|
+
"core-js": "^3.42.0",
|
|
20
16
|
"react": "^19.0.0",
|
|
21
17
|
"react-dom": "^19.0.0",
|
|
22
|
-
"storybook": "^
|
|
18
|
+
"storybook": "^9",
|
|
23
19
|
"typescript": "5.8.3",
|
|
24
20
|
"vite": "^6"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@acusti/css-value-input": "workspace:^",
|
|
24
|
+
"@acusti/date-picker": "workspace:^",
|
|
25
|
+
"@acusti/dropdown": "workspace:^",
|
|
26
|
+
"@acusti/input-text": "workspace:^",
|
|
27
|
+
"@acusti/use-is-out-of-bounds": "workspace:^",
|
|
28
|
+
"@acusti/use-keyboard-events": "workspace:^"
|
|
25
29
|
}
|
|
26
30
|
}
|
|
@@ -5,7 +5,7 @@ import CSSValueInput from '../../css-value-input/src/CSSValueInput.js';
|
|
|
5
5
|
import './CSSValueInput.css';
|
|
6
6
|
import './InputText.css';
|
|
7
7
|
|
|
8
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
8
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
9
9
|
|
|
10
10
|
const meta: Meta<typeof CSSValueInput> = {
|
|
11
11
|
component: CSSValueInput,
|
|
@@ -155,7 +155,7 @@ export const NumberValue: Story = {
|
|
|
155
155
|
cssValueType: 'integer',
|
|
156
156
|
label: 'opacity',
|
|
157
157
|
name: 'opacity',
|
|
158
|
-
value: 0,
|
|
158
|
+
value: '0',
|
|
159
159
|
},
|
|
160
160
|
};
|
|
161
161
|
|
|
@@ -166,6 +166,6 @@ export const LineHeight: Story = {
|
|
|
166
166
|
name: 'line-height',
|
|
167
167
|
step: 0.1,
|
|
168
168
|
unit: '',
|
|
169
|
-
value: 1.4,
|
|
169
|
+
value: '1.4',
|
|
170
170
|
},
|
|
171
171
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
|
|
3
|
+
import { DatePicker, getMonthFromDate } from '@acusti/date-picker';
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
|
|
4
6
|
import './DatePicker.css';
|
|
5
7
|
|
|
6
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
7
|
-
|
|
8
8
|
const { useState } = React;
|
|
9
9
|
|
|
10
10
|
const meta: Meta<typeof DatePicker> = {
|
package/stories/Dropdown.css
CHANGED
|
@@ -1,65 +1,106 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
box-sizing: border-box;
|
|
6
|
-
width: 110px;
|
|
1
|
+
#storybook-root,
|
|
2
|
+
.sb-story > div {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
7
5
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
|
|
7
|
+
#storybook-root {
|
|
8
|
+
&:has(.position-right.uktdropdown) {
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
height: calc(200vh - 110px);
|
|
12
|
+
width: calc(200vw - 270px);
|
|
13
|
+
}
|
|
13
14
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
|
|
16
|
+
.sb-story {
|
|
17
|
+
&:has(.position-right.uktdropdown) {
|
|
18
|
+
height: 350px;
|
|
19
|
+
width: 100%;
|
|
20
|
+
overflow: auto;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
> div {
|
|
24
|
+
&:has(.position-right.uktdropdown) {
|
|
25
|
+
align-items: center;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
height: 670px;
|
|
28
|
+
width: calc(200% - 190px);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
18
31
|
}
|
|
19
32
|
|
|
20
|
-
.
|
|
21
|
-
|
|
22
|
-
font-size: 12px;
|
|
23
|
-
text-transform: uppercase;
|
|
24
|
-
letter-spacing: 1px;
|
|
25
|
-
font-weight: 700;
|
|
26
|
-
margin: 0.75rem 0 0.5rem;
|
|
33
|
+
.sb-story {
|
|
34
|
+
min-height: 180px;
|
|
27
35
|
}
|
|
28
36
|
|
|
29
|
-
.uktdropdown
|
|
30
|
-
|
|
37
|
+
.uktdropdown input {
|
|
38
|
+
box-sizing: border-box;
|
|
39
|
+
width: 110px;
|
|
31
40
|
}
|
|
32
41
|
|
|
33
|
-
.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
42
|
+
.uktdropdown-body {
|
|
43
|
+
ul {
|
|
44
|
+
text-align: left;
|
|
45
|
+
list-style-type: none;
|
|
46
|
+
padding-left: 0px;
|
|
47
|
+
margin: 0px;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
li {
|
|
51
|
+
padding: 4px 8px;
|
|
52
|
+
margin: 4px 0;
|
|
53
|
+
white-space: nowrap;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.heading {
|
|
57
|
+
color: #aaa;
|
|
58
|
+
font-size: 12px;
|
|
59
|
+
text-transform: uppercase;
|
|
60
|
+
letter-spacing: 1px;
|
|
61
|
+
font-weight: 700;
|
|
62
|
+
margin: 0.75rem 0 0.5rem;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&:first-child {
|
|
66
|
+
margin-top: 0.25rem;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.no-trigger-text {
|
|
71
|
+
.uktdropdown-trigger {
|
|
72
|
+
position: relative;
|
|
73
|
+
margin-left: 3px;
|
|
74
|
+
width: 27px;
|
|
75
|
+
height: 21px;
|
|
76
|
+
vertical-align: top;
|
|
77
|
+
|
|
78
|
+
&:before {
|
|
79
|
+
content: "";
|
|
80
|
+
display: block;
|
|
81
|
+
position: absolute;
|
|
82
|
+
width: 9px;
|
|
83
|
+
height: 2px;
|
|
84
|
+
top: 10px;
|
|
85
|
+
left: 4px;
|
|
86
|
+
border-radius: 2px 0 0 3px;
|
|
87
|
+
background-color: #666;
|
|
88
|
+
transform: rotateZ(38deg);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&:after {
|
|
92
|
+
content: "";
|
|
93
|
+
display: block;
|
|
94
|
+
position: absolute;
|
|
95
|
+
width: 9px;
|
|
96
|
+
height: 2px;
|
|
97
|
+
top: 10px;
|
|
98
|
+
right: 4px;
|
|
99
|
+
border-radius: 0 2px 2px 0;
|
|
100
|
+
background-color: #666;
|
|
101
|
+
transform: rotateZ(-38deg);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
63
104
|
}
|
|
64
105
|
|
|
65
106
|
.font-weight {
|
|
@@ -72,19 +113,30 @@
|
|
|
72
113
|
color: #fff;
|
|
73
114
|
}
|
|
74
115
|
|
|
75
|
-
.searchable-with-label
|
|
76
|
-
.searchable-
|
|
77
|
-
|
|
78
|
-
|
|
116
|
+
.searchable-with-label,
|
|
117
|
+
.searchable-and-allow-create {
|
|
118
|
+
input,
|
|
119
|
+
.uktdropdown-body {
|
|
120
|
+
width: 85px;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.uktdropdown-body {
|
|
124
|
+
left: revert;
|
|
125
|
+
right: anchor(right);
|
|
126
|
+
}
|
|
79
127
|
}
|
|
80
128
|
|
|
81
|
-
.
|
|
82
|
-
|
|
129
|
+
.css-value-input-trigger {
|
|
130
|
+
.uktdropdown-body {
|
|
131
|
+
width: 110px;
|
|
132
|
+
left: revert;
|
|
133
|
+
right: anchor(right);
|
|
134
|
+
margin-right: 14px;
|
|
135
|
+
}
|
|
83
136
|
}
|
|
84
137
|
|
|
85
|
-
.
|
|
86
|
-
|
|
87
|
-
align-self: center;
|
|
138
|
+
.dropdown-without-items .uktdropdown-body {
|
|
139
|
+
width: 300px;
|
|
88
140
|
}
|
|
89
141
|
|
|
90
142
|
.textarea-trigger .uktdropdown-body {
|
|
@@ -101,16 +153,12 @@
|
|
|
101
153
|
}
|
|
102
154
|
|
|
103
155
|
.overlapping-dropdown .uktdropdown-body {
|
|
104
|
-
top: -
|
|
105
|
-
left: -
|
|
156
|
+
margin-top: -22px;
|
|
157
|
+
margin-left: -10px;
|
|
106
158
|
width: 250px;
|
|
107
159
|
min-height: 200px;
|
|
108
160
|
}
|
|
109
161
|
|
|
110
|
-
.out-of-bounds-example.uktdropdown {
|
|
111
|
-
position: absolute;
|
|
112
|
-
bottom: 50px;
|
|
113
|
-
}
|
|
114
162
|
.out-of-bounds-example input {
|
|
115
163
|
width: 150px;
|
|
116
164
|
}
|
|
@@ -120,8 +168,8 @@
|
|
|
120
168
|
}
|
|
121
169
|
|
|
122
170
|
.position-right.uktdropdown {
|
|
123
|
-
position: absolute;
|
|
124
|
-
right: 65px;
|
|
171
|
+
/* position: absolute;
|
|
172
|
+
right: 65px; */
|
|
125
173
|
}
|
|
126
174
|
|
|
127
175
|
.out-of-bounds-example.no-direction-change.uktdropdown {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fn } from '
|
|
1
|
+
import { fn } from 'storybook/test';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
|
|
4
4
|
import CSSValueInput from '../../css-value-input/src/CSSValueInput.js';
|
|
@@ -8,7 +8,7 @@ import './CSSValueInput.css';
|
|
|
8
8
|
import './Dropdown.css';
|
|
9
9
|
import './InputText.css';
|
|
10
10
|
|
|
11
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
11
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
12
12
|
|
|
13
13
|
const { Fragment } = React;
|
|
14
14
|
|
|
@@ -425,7 +425,7 @@ export const OutOfBoundsAtRight: Story = {
|
|
|
425
425
|
className: 'out-of-bounds-example position-right',
|
|
426
426
|
isSearchable: true,
|
|
427
427
|
name: 'outofboundsatright',
|
|
428
|
-
placeholder: '
|
|
428
|
+
placeholder: 'Fill available space',
|
|
429
429
|
},
|
|
430
430
|
};
|
|
431
431
|
|
package/stories/InputText.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
.input-text {
|
|
2
2
|
width: 160px;
|
|
3
3
|
padding: 3px 6px;
|
|
4
4
|
font-family: system-ui, sans-serif;
|
|
@@ -13,3 +13,14 @@ input.input-text {
|
|
|
13
13
|
cursor: pointer;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
+
|
|
17
|
+
.multi-line-input-text {
|
|
18
|
+
width: 240px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
[popover] {
|
|
22
|
+
border: 0;
|
|
23
|
+
box-shadow: 0px 3px 16px 1px rgba(0, 0, 0, 0.5);
|
|
24
|
+
padding: 25px 30px;
|
|
25
|
+
border-radius: 5px;
|
|
26
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
-
import { fn } from '
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { fn } from 'storybook/test';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
|
|
5
5
|
import InputText from '../../input-text/src/InputText.js';
|
|
@@ -87,7 +87,7 @@ const formatDate = new Intl.DateTimeFormat(undefined, {
|
|
|
87
87
|
export const MultiLineInputWithSubmitOnEnter: Story = {
|
|
88
88
|
args: SUBMIT_ON_ENTER_PROPS,
|
|
89
89
|
render() {
|
|
90
|
-
const [lastSubmitDate, setLastSubmitDate] = React.useState(null);
|
|
90
|
+
const [lastSubmitDate, setLastSubmitDate] = React.useState<Date | null>(null);
|
|
91
91
|
const lastSubmit = lastSubmitDate ? formatDate(lastSubmitDate) : 'never';
|
|
92
92
|
|
|
93
93
|
return (
|
|
@@ -127,11 +127,34 @@ export const InputWithAutoFocus: Story = {
|
|
|
127
127
|
},
|
|
128
128
|
};
|
|
129
129
|
|
|
130
|
+
const MULTI_LINE_INPUT_IN_POPOVER_PROPS = {
|
|
131
|
+
className: 'multi-line-input-text',
|
|
132
|
+
initialValue:
|
|
133
|
+
'This multi-line input should resize to fit its contents when the popover opens even though it initializes with display: none as a result of being inside a hidden popover element so it doesn’t have any dimensions when the component initially renders.',
|
|
134
|
+
multiLine: true,
|
|
135
|
+
name: 'multi-line-input-in-popover',
|
|
136
|
+
selectTextOnFocus: true,
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export const MultiLineInputInPopover: Story = {
|
|
140
|
+
args: MULTI_LINE_INPUT_IN_POPOVER_PROPS,
|
|
141
|
+
render() {
|
|
142
|
+
return (
|
|
143
|
+
<>
|
|
144
|
+
<button popoverTarget="multi-line-input-popover">Open Popover</button>
|
|
145
|
+
<div id="multi-line-input-popover" popover="auto">
|
|
146
|
+
<InputText {...MULTI_LINE_INPUT_IN_POPOVER_PROPS} />
|
|
147
|
+
</div>
|
|
148
|
+
</>
|
|
149
|
+
);
|
|
150
|
+
},
|
|
151
|
+
};
|
|
152
|
+
|
|
130
153
|
const MULTI_LINE_INPUT_WITH_AUTO_FOCUS_PROPS = {
|
|
131
154
|
autoFocus: true,
|
|
132
155
|
initialValue: 'This multi-line input should be focused when the popover opens',
|
|
133
156
|
multiLine: true,
|
|
134
|
-
name: '
|
|
157
|
+
name: 'multi-line-input-with-autofocus-in-popover',
|
|
135
158
|
selectTextOnFocus: true,
|
|
136
159
|
};
|
|
137
160
|
|
|
@@ -140,10 +163,10 @@ export const MultiLineInputWithAutoFocusInPopover: Story = {
|
|
|
140
163
|
render() {
|
|
141
164
|
return (
|
|
142
165
|
<>
|
|
143
|
-
<button popoverTarget="multi-line-input-with-autofocus-
|
|
166
|
+
<button popoverTarget="multi-line-input-with-autofocus-popover">
|
|
144
167
|
Open Popover
|
|
145
168
|
</button>
|
|
146
|
-
<div id="multi-line-input-with-autofocus-
|
|
169
|
+
<div id="multi-line-input-with-autofocus-popover" popover="auto">
|
|
147
170
|
<InputText {...MULTI_LINE_INPUT_WITH_AUTO_FOCUS_PROPS} />
|
|
148
171
|
</div>
|
|
149
172
|
</>
|
package/stories/Introduction.mdx
CHANGED
|
@@ -2,7 +2,7 @@ import { getMonthFromDate, MonthCalendar } from '../../date-picker/src/index.js'
|
|
|
2
2
|
|
|
3
3
|
import './MonthCalendar.css';
|
|
4
4
|
|
|
5
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
5
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
6
6
|
|
|
7
7
|
const meta: Meta<typeof MonthCalendar> = {
|
|
8
8
|
argTypes: {
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
3
|
import Dropdown from '../../dropdown/src/Dropdown.js';
|
|
4
|
+
import useIsOutOfBounds from '../../use-is-out-of-bounds/src/useIsOutOfBounds.js';
|
|
4
5
|
|
|
5
6
|
import './Dropdown.css';
|
|
6
7
|
import './useIsOutOfBounds.css';
|
|
7
8
|
|
|
8
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
9
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
9
10
|
|
|
10
|
-
const meta: Meta<typeof
|
|
11
|
+
const meta: Meta<typeof useIsOutOfBounds> = {
|
|
11
12
|
argTypes: {
|
|
12
13
|
element: {
|
|
13
14
|
description:
|
|
@@ -25,7 +26,8 @@ const meta: Meta<typeof Dropdown> = {
|
|
|
25
26
|
component: `\`useIsOutOfBounds\` is a React hook that returns an object indicating if the
|
|
26
27
|
current component is out of the bounds of its nearest ancestor that doesn’t have overflow: visible. In other words,
|
|
27
28
|
it provides collision detection between an element and its bounds. The return value is
|
|
28
|
-
|
|
29
|
+
|
|
30
|
+
\`\`\`
|
|
29
31
|
type OutOfBounds = {
|
|
30
32
|
bottom: boolean;
|
|
31
33
|
hasLayout: boolean;
|
|
@@ -35,8 +37,9 @@ type OutOfBounds = {
|
|
|
35
37
|
right: boolean;
|
|
36
38
|
top: boolean;
|
|
37
39
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
+
\`\`\`
|
|
41
|
+
|
|
42
|
+
It is used in @acusti/dropdown to automatically position the dropdown in the direction
|
|
40
43
|
where there is room for it to render, so this story uses \`<Dropdown>\` to illustrate that behavior.`,
|
|
41
44
|
},
|
|
42
45
|
},
|
|
@@ -4,7 +4,7 @@ import useKeyboardEvents from '../../use-keyboard-events/src/useKeyboardEvents.j
|
|
|
4
4
|
|
|
5
5
|
import './useKeyboardEvents.css';
|
|
6
6
|
|
|
7
|
-
import type { Meta, StoryObj } from '@storybook/react';
|
|
7
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
8
8
|
|
|
9
9
|
const { Fragment, useState } = React;
|
|
10
10
|
|
package/tsconfig.json
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
-
"extends": "../../tsconfig.json"
|
|
2
|
+
"extends": "../../tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"noEmit": true
|
|
5
|
+
},
|
|
6
|
+
"references": [
|
|
7
|
+
{ "path": "../css-value-input" },
|
|
8
|
+
{ "path": "../date-picker" },
|
|
9
|
+
{ "path": "../dropdown" },
|
|
10
|
+
{ "path": "../input-text" },
|
|
11
|
+
{ "path": "../styling" },
|
|
12
|
+
{ "path": "../use-is-out-of-bounds" },
|
|
13
|
+
{ "path": "../use-keyboard-events" }
|
|
14
|
+
]
|
|
3
15
|
}
|