@acusti/uikit-docs 0.2.0 → 0.3.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 (83) hide show
  1. package/.storybook/main.ts +4 -8
  2. package/.storybook/manager.ts +1 -1
  3. package/.storybook/preview.ts +1 -1
  4. package/CHANGELOG.md +19 -0
  5. package/dist/assets/CSSValueInput-BgAgo3f9.css +1 -0
  6. package/dist/assets/CSSValueInput-BoZriUnh.js +1 -0
  7. package/dist/assets/CSSValueInput.stories-D1VcYZJ0.js +113 -0
  8. package/dist/assets/Color-AVL7NMMY-BeW0C7pE.js +1 -0
  9. package/dist/assets/DatePicker-l5oaNCVE.css +1 -0
  10. package/dist/assets/DatePicker.stories-BSWV31FV.js +244 -0
  11. package/dist/assets/DocsRenderer-PQXLIZUC-D92GwNti.js +2 -0
  12. package/dist/assets/Dropdown-D5cyjefk.css +1 -0
  13. package/dist/assets/Dropdown-DUP_ybXe.js +84 -0
  14. package/dist/assets/Dropdown.stories-2Wtw1otE.js +336 -0
  15. package/dist/assets/InputText-Tkbh5amB.css +1 -0
  16. package/dist/assets/InputText.stories-BYt2Aj0_.js +90 -0
  17. package/dist/assets/Introduction-nSE2hjmb.js +183 -0
  18. package/dist/assets/MonthCalendar.stories-IJrL6wIl.js +169 -0
  19. package/dist/assets/accessibility-W_h2acOZ.png +0 -0
  20. package/dist/assets/addon-library-BWUCAmyN.png +0 -0
  21. package/dist/assets/blocks-Du178fXa.js +658 -0
  22. package/dist/assets/client-B2qWCcIR.js +25 -0
  23. package/dist/assets/clsx-hXifHU8N.js +9 -0
  24. package/dist/assets/context-C0qIqeS4.png +0 -0
  25. package/dist/assets/docs---vsFbMi.png +0 -0
  26. package/dist/assets/figma-plugin-CH2hELiO.png +0 -0
  27. package/dist/assets/iframe-ByGa_ItU.js +1102 -0
  28. package/dist/assets/index-BRXcJgsA.js +1 -0
  29. package/dist/assets/index-BVajFqaV.js +1 -0
  30. package/dist/assets/index-DwJ-mRZ2.js +9 -0
  31. package/dist/assets/jsx-runtime-D_zvdyIk.js +9 -0
  32. package/dist/assets/react-18-djOrgGe8.js +1 -0
  33. package/dist/assets/share-DGA-UcQf.png +0 -0
  34. package/dist/assets/styling-Bk6zjRzU.png +0 -0
  35. package/dist/assets/testing-cbzR9l9r.png +0 -0
  36. package/dist/assets/theming-D6WJLNoW.png +0 -0
  37. package/dist/assets/useIsOutOfBounds--pZPDsvJ.css +1 -0
  38. package/dist/assets/useIsOutOfBounds.stories-e48KZd_G.js +105 -0
  39. package/dist/assets/useKeyboardEvents-BH4Zd7d3.css +1 -0
  40. package/dist/assets/useKeyboardEvents.stories-CJbDuGfk.js +3 -0
  41. package/dist/favicon.svg +1 -0
  42. package/dist/iframe.html +685 -0
  43. package/dist/index.html +152 -0
  44. package/dist/index.json +1 -0
  45. package/dist/nunito-sans-bold-italic.woff2 +0 -0
  46. package/dist/nunito-sans-bold.woff2 +0 -0
  47. package/dist/nunito-sans-italic.woff2 +0 -0
  48. package/dist/nunito-sans-regular.woff2 +0 -0
  49. package/dist/project.json +1 -0
  50. package/dist/sb-addons/docs-1/manager-bundle.js +151 -0
  51. package/dist/sb-addons/storybook-2/manager-bundle.js +3 -0
  52. package/dist/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +188 -0
  53. package/dist/sb-common-assets/favicon.svg +1 -0
  54. package/dist/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  55. package/dist/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  56. package/dist/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  57. package/dist/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  58. package/dist/sb-manager/globals-module-info.js +797 -0
  59. package/dist/sb-manager/globals-runtime.js +72053 -0
  60. package/dist/sb-manager/globals.js +34 -0
  61. package/dist/sb-manager/runtime.js +13001 -0
  62. package/package.json +14 -10
  63. package/stories/CSSValueInput.stories.tsx +3 -3
  64. package/stories/DatePicker.stories.tsx +3 -3
  65. package/stories/Dropdown.stories.tsx +2 -2
  66. package/stories/InputText.css +12 -1
  67. package/stories/InputText.stories.tsx +29 -6
  68. package/stories/Introduction.mdx +1 -1
  69. package/stories/MonthCalendar.stories.ts +1 -1
  70. package/stories/useIsOutOfBounds.css +1 -1
  71. package/stories/useIsOutOfBounds.stories.tsx +8 -5
  72. package/stories/useKeyboardEvents.stories.tsx +1 -1
  73. package/tsconfig.json +13 -1
  74. package/tsconfig.tsbuildinfo +1 -0
  75. package/stories/Button.stories.ts +0 -50
  76. package/stories/Button.tsx +0 -48
  77. package/stories/Header.stories.ts +0 -27
  78. package/stories/Header.tsx +0 -66
  79. package/stories/Page.stories.ts +0 -29
  80. package/stories/Page.tsx +0 -91
  81. package/stories/button.css +0 -30
  82. package/stories/header.css +0 -32
  83. package/stories/page.css +0 -69
@@ -1,48 +0,0 @@
1
- import React from 'react';
2
- import './button.css';
3
-
4
- interface ButtonProps {
5
- /**
6
- * Is this the principal call to action on the page?
7
- */
8
- primary?: boolean;
9
- /**
10
- * What background color to use
11
- */
12
- backgroundColor?: string;
13
- /**
14
- * How large should the button be?
15
- */
16
- size?: 'small' | 'medium' | 'large';
17
- /**
18
- * Button contents
19
- */
20
- label: string;
21
- /**
22
- * Optional click handler
23
- */
24
- onClick?: () => void;
25
- }
26
-
27
- /**
28
- * Primary UI component for user interaction
29
- */
30
- export const Button = ({
31
- primary = false,
32
- size = 'medium',
33
- backgroundColor,
34
- label,
35
- ...props
36
- }: ButtonProps) => {
37
- const mode = primary ? 'storybook-button--primary' : 'storybook-button--secondary';
38
- return (
39
- <button
40
- type="button"
41
- className={['storybook-button', `storybook-button--${size}`, mode].join(' ')}
42
- style={{ backgroundColor }}
43
- {...props}
44
- >
45
- {label}
46
- </button>
47
- );
48
- };
@@ -1,27 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
-
3
- import { Header } from './Header';
4
-
5
- const meta = {
6
- title: 'Example/Header',
7
- component: Header,
8
- // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/react/writing-docs/autodocs
9
- tags: ['autodocs'],
10
- parameters: {
11
- // More on how to position stories at: https://storybook.js.org/docs/react/configure/story-layout
12
- layout: 'fullscreen',
13
- },
14
- } satisfies Meta<typeof Header>;
15
-
16
- export default meta;
17
- type Story = StoryObj<typeof meta>;
18
-
19
- export const LoggedIn: Story = {
20
- args: {
21
- user: {
22
- name: 'Jane Doe',
23
- },
24
- },
25
- };
26
-
27
- export const LoggedOut: Story = {};
@@ -1,66 +0,0 @@
1
- import React from 'react';
2
-
3
- import { Button } from './Button';
4
- import './header.css';
5
-
6
- type User = {
7
- name: string;
8
- };
9
-
10
- interface HeaderProps {
11
- user?: User;
12
- onLogin: () => void;
13
- onLogout: () => void;
14
- onCreateAccount: () => void;
15
- }
16
-
17
- export const Header = ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps) => (
18
- <header>
19
- <div className="storybook-header">
20
- <div>
21
- <svg
22
- width="32"
23
- height="32"
24
- viewBox="0 0 32 32"
25
- xmlns="http://www.w3.org/2000/svg"
26
- >
27
- <g fill="none" fillRule="evenodd">
28
- <path
29
- d="M10 0h12a10 10 0 0110 10v12a10 10 0 01-10 10H10A10 10 0 010 22V10A10 10 0 0110 0z"
30
- fill="#FFF"
31
- />
32
- <path
33
- d="M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z"
34
- fill="#555AB9"
35
- />
36
- <path
37
- d="M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z"
38
- fill="#91BAF8"
39
- />
40
- </g>
41
- </svg>
42
- <h1>Acme</h1>
43
- </div>
44
- <div>
45
- {user ? (
46
- <>
47
- <span className="welcome">
48
- Welcome, <b>{user.name}</b>!
49
- </span>
50
- <Button size="small" onClick={onLogout} label="Log out" />
51
- </>
52
- ) : (
53
- <>
54
- <Button size="small" onClick={onLogin} label="Log in" />
55
- <Button
56
- primary
57
- size="small"
58
- onClick={onCreateAccount}
59
- label="Sign up"
60
- />
61
- </>
62
- )}
63
- </div>
64
- </div>
65
- </header>
66
- );
@@ -1,29 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/react';
2
- import { within, userEvent } from '@storybook/test';
3
-
4
- import { Page } from './Page';
5
-
6
- const meta = {
7
- title: 'Example/Page',
8
- component: Page,
9
- parameters: {
10
- // More on how to position stories at: https://storybook.js.org/docs/react/configure/story-layout
11
- layout: 'fullscreen',
12
- },
13
- } satisfies Meta<typeof Page>;
14
-
15
- export default meta;
16
- type Story = StoryObj<typeof meta>;
17
-
18
- export const LoggedOut: Story = {};
19
-
20
- // More on interaction testing: https://storybook.js.org/docs/react/writing-tests/interaction-testing
21
- export const LoggedIn: Story = {
22
- play: async ({ canvasElement }) => {
23
- const canvas = within(canvasElement);
24
- const loginButton = await canvas.getByRole('button', {
25
- name: /Log in/i,
26
- });
27
- await userEvent.click(loginButton);
28
- },
29
- };
package/stories/Page.tsx DELETED
@@ -1,91 +0,0 @@
1
- import React from 'react';
2
-
3
- import { Header } from './Header';
4
- import './page.css';
5
-
6
- type User = {
7
- name: string;
8
- };
9
-
10
- export const Page: React.FC = () => {
11
- const [user, setUser] = React.useState<User>();
12
-
13
- return (
14
- <article>
15
- <Header
16
- user={user}
17
- onLogin={() => setUser({ name: 'Jane Doe' })}
18
- onLogout={() => setUser(undefined)}
19
- onCreateAccount={() => setUser({ name: 'Jane Doe' })}
20
- />
21
-
22
- <section className="storybook-page">
23
- <h2>Pages in Storybook</h2>
24
- <p>
25
- We recommend building UIs with a{' '}
26
- <a
27
- href="https://componentdriven.org"
28
- target="_blank"
29
- rel="noopener noreferrer"
30
- >
31
- <strong>component-driven</strong>
32
- </a>{' '}
33
- process starting with atomic components and ending with pages.
34
- </p>
35
- <p>
36
- Render pages with mock data. This makes it easy to build and review
37
- page states without needing to navigate to them in your app. Here are
38
- some handy patterns for managing page data in Storybook:
39
- </p>
40
- <ul>
41
- <li>
42
- Use a higher-level connected component. Storybook helps you
43
- compose such data from the "args" of child component stories
44
- </li>
45
- <li>
46
- Assemble data in the page component from your services. You can
47
- mock these services out using Storybook.
48
- </li>
49
- </ul>
50
- <p>
51
- Get a guided tutorial on component-driven development at{' '}
52
- <a
53
- href="https://storybook.js.org/tutorials/"
54
- target="_blank"
55
- rel="noopener noreferrer"
56
- >
57
- Storybook tutorials
58
- </a>
59
- . Read more in the{' '}
60
- <a
61
- href="https://storybook.js.org/docs"
62
- target="_blank"
63
- rel="noopener noreferrer"
64
- >
65
- docs
66
- </a>
67
- .
68
- </p>
69
- <div className="tip-wrapper">
70
- <span className="tip">Tip</span> Adjust the width of the canvas with
71
- the{' '}
72
- <svg
73
- width="10"
74
- height="10"
75
- viewBox="0 0 12 12"
76
- xmlns="http://www.w3.org/2000/svg"
77
- >
78
- <g fill="none" fillRule="evenodd">
79
- <path
80
- d="M1.5 5.2h4.8c.3 0 .5.2.5.4v5.1c-.1.2-.3.3-.4.3H1.4a.5.5 0 01-.5-.4V5.7c0-.3.2-.5.5-.5zm0-2.1h6.9c.3 0 .5.2.5.4v7a.5.5 0 01-1 0V4H1.5a.5.5 0 010-1zm0-2.1h9c.3 0 .5.2.5.4v9.1a.5.5 0 01-1 0V2H1.5a.5.5 0 010-1zm4.3 5.2H2V10h3.8V6.2z"
81
- id="a"
82
- fill="#999"
83
- />
84
- </g>
85
- </svg>
86
- Viewports addon in the toolbar
87
- </div>
88
- </section>
89
- </article>
90
- );
91
- };
@@ -1,30 +0,0 @@
1
- .storybook-button {
2
- font-family: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
3
- font-weight: 700;
4
- border: 0;
5
- border-radius: 3em;
6
- cursor: pointer;
7
- display: inline-block;
8
- line-height: 1;
9
- }
10
- .storybook-button--primary {
11
- color: white;
12
- background-color: #1ea7fd;
13
- }
14
- .storybook-button--secondary {
15
- color: #333;
16
- background-color: transparent;
17
- box-shadow: rgba(0, 0, 0, 0.15) 0px 0px 0px 1px inset;
18
- }
19
- .storybook-button--small {
20
- font-size: 12px;
21
- padding: 10px 16px;
22
- }
23
- .storybook-button--medium {
24
- font-size: 14px;
25
- padding: 11px 20px;
26
- }
27
- .storybook-button--large {
28
- font-size: 16px;
29
- padding: 12px 24px;
30
- }
@@ -1,32 +0,0 @@
1
- .storybook-header {
2
- font-family: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
3
- border-bottom: 1px solid rgba(0, 0, 0, 0.1);
4
- padding: 15px 20px;
5
- display: flex;
6
- align-items: center;
7
- justify-content: space-between;
8
- }
9
-
10
- .storybook-header svg {
11
- display: inline-block;
12
- vertical-align: top;
13
- }
14
-
15
- .storybook-header h1 {
16
- font-weight: 700;
17
- font-size: 20px;
18
- line-height: 1;
19
- margin: 6px 0 6px 10px;
20
- display: inline-block;
21
- vertical-align: top;
22
- }
23
-
24
- .storybook-header button + button {
25
- margin-left: 10px;
26
- }
27
-
28
- .storybook-header .welcome {
29
- color: #333;
30
- font-size: 14px;
31
- margin-right: 10px;
32
- }
package/stories/page.css DELETED
@@ -1,69 +0,0 @@
1
- .storybook-page {
2
- font-family: "Nunito Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
3
- font-size: 14px;
4
- line-height: 24px;
5
- padding: 48px 20px;
6
- margin: 0 auto;
7
- max-width: 600px;
8
- color: #333;
9
- }
10
-
11
- .storybook-page h2 {
12
- font-weight: 700;
13
- font-size: 32px;
14
- line-height: 1;
15
- margin: 0 0 4px;
16
- display: inline-block;
17
- vertical-align: top;
18
- }
19
-
20
- .storybook-page p {
21
- margin: 1em 0;
22
- }
23
-
24
- .storybook-page a {
25
- text-decoration: none;
26
- color: #1ea7fd;
27
- }
28
-
29
- .storybook-page ul {
30
- padding-left: 30px;
31
- margin: 1em 0;
32
- }
33
-
34
- .storybook-page li {
35
- margin-bottom: 8px;
36
- }
37
-
38
- .storybook-page .tip {
39
- display: inline-block;
40
- border-radius: 1em;
41
- font-size: 11px;
42
- line-height: 12px;
43
- font-weight: 700;
44
- background: #e7fdd8;
45
- color: #66bf3c;
46
- padding: 4px 12px;
47
- margin-right: 10px;
48
- vertical-align: top;
49
- }
50
-
51
- .storybook-page .tip-wrapper {
52
- font-size: 13px;
53
- line-height: 20px;
54
- margin-top: 40px;
55
- margin-bottom: 40px;
56
- }
57
-
58
- .storybook-page .tip-wrapper svg {
59
- display: inline-block;
60
- height: 12px;
61
- width: 12px;
62
- margin-right: 4px;
63
- vertical-align: top;
64
- margin-top: 3px;
65
- }
66
-
67
- .storybook-page .tip-wrapper svg path {
68
- fill: #1ea7fd;
69
- }