frey-ui 1.0.7 → 1.0.9
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/LICENSE +21 -674
- package/README.md +215 -2
- package/dist/cjs/Alert/alert.module.css.js +9 -0
- package/dist/cjs/Alert/alert.module.css.js.map +1 -0
- package/dist/cjs/Alert/index.js +33 -0
- package/dist/cjs/Alert/index.js.map +1 -0
- package/dist/cjs/Button/button.module.css.js +9 -0
- package/dist/cjs/Button/button.module.css.js.map +1 -0
- package/dist/cjs/Button/index.js +34 -0
- package/dist/cjs/Button/index.js.map +1 -0
- package/dist/cjs/Checkbox/checkbox.module.css.js +9 -0
- package/dist/cjs/Checkbox/checkbox.module.css.js.map +1 -0
- package/dist/cjs/Checkbox/index.js +48 -0
- package/dist/cjs/Checkbox/index.js.map +1 -0
- package/dist/cjs/Chip/chip.module.css.js +9 -0
- package/dist/cjs/Chip/chip.module.css.js.map +1 -0
- package/dist/cjs/Chip/index.js +50 -0
- package/dist/cjs/Chip/index.js.map +1 -0
- package/dist/cjs/Skeleton/index.js +21 -0
- package/dist/cjs/Skeleton/index.js.map +1 -0
- package/dist/cjs/Skeleton/skeleton.module.css.js +9 -0
- package/dist/cjs/Skeleton/skeleton.module.css.js.map +1 -0
- package/dist/cjs/Switch/index.js +40 -0
- package/dist/cjs/Switch/index.js.map +1 -0
- package/dist/cjs/Switch/switch.module.css.js +9 -0
- package/dist/cjs/Switch/switch.module.css.js.map +1 -0
- package/dist/cjs/TextInput/index.js +33 -0
- package/dist/cjs/TextInput/index.js.map +1 -0
- package/dist/cjs/TextInput/textinput.module.css.js +9 -0
- package/dist/cjs/TextInput/textinput.module.css.js.map +1 -0
- package/dist/cjs/ThemeProvider/index.js +15 -0
- package/dist/cjs/ThemeProvider/index.js.map +1 -0
- package/dist/cjs/ThemeProvider/themeprovider.module.css.js +9 -0
- package/dist/cjs/ThemeProvider/themeprovider.module.css.js.map +1 -0
- package/dist/cjs/index.js +23 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/esm/Alert/alert.module.css.js +5 -0
- package/dist/esm/Alert/alert.module.css.js.map +1 -0
- package/dist/esm/Alert/index.js +29 -0
- package/dist/esm/Alert/index.js.map +1 -0
- package/dist/esm/Button/button.module.css.js +5 -0
- package/dist/esm/Button/button.module.css.js.map +1 -0
- package/dist/esm/Button/index.js +30 -0
- package/dist/esm/Button/index.js.map +1 -0
- package/dist/esm/Checkbox/checkbox.module.css.js +5 -0
- package/dist/esm/Checkbox/checkbox.module.css.js.map +1 -0
- package/dist/esm/Checkbox/index.js +44 -0
- package/dist/esm/Checkbox/index.js.map +1 -0
- package/dist/esm/Chip/chip.module.css.js +5 -0
- package/dist/esm/Chip/chip.module.css.js.map +1 -0
- package/dist/esm/Chip/index.js +46 -0
- package/dist/esm/Chip/index.js.map +1 -0
- package/dist/esm/Skeleton/index.js +17 -0
- package/dist/esm/Skeleton/index.js.map +1 -0
- package/dist/esm/Skeleton/skeleton.module.css.js +5 -0
- package/dist/esm/Skeleton/skeleton.module.css.js.map +1 -0
- package/dist/esm/Switch/index.js +36 -0
- package/dist/esm/Switch/index.js.map +1 -0
- package/dist/esm/Switch/switch.module.css.js +5 -0
- package/dist/esm/Switch/switch.module.css.js.map +1 -0
- package/dist/esm/TextInput/index.js +29 -0
- package/dist/esm/TextInput/index.js.map +1 -0
- package/dist/esm/TextInput/textinput.module.css.js +5 -0
- package/dist/esm/TextInput/textinput.module.css.js.map +1 -0
- package/dist/esm/ThemeProvider/index.js +11 -0
- package/dist/esm/ThemeProvider/index.js.map +1 -0
- package/dist/esm/ThemeProvider/themeprovider.module.css.js +5 -0
- package/dist/esm/ThemeProvider/themeprovider.module.css.js.map +1 -0
- package/dist/esm/index.js +10 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/index.d.ts +104 -0
- package/dist/styles.css +2 -0
- package/dist/styles.css.map +1 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -0
- package/dist/types/src/Alert/index.d.ts +11 -0
- package/dist/types/src/Button/index.d.ts +20 -0
- package/dist/types/src/Checkbox/index.d.ts +12 -0
- package/dist/types/src/Chip/index.d.ts +19 -0
- package/dist/types/src/Skeleton/index.d.ts +11 -0
- package/dist/types/src/Switch/index.d.ts +11 -0
- package/dist/types/src/TextInput/index.d.ts +12 -0
- package/dist/types/src/ThemeProvider/index.d.ts +11 -0
- package/dist/types/src/index.d.ts +17 -0
- package/package.json +58 -32
package/README.md
CHANGED
|
@@ -1,3 +1,216 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Frey UI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A strict, accessible design system library for internal applications.
|
|
4
|
+
|
|
5
|
+
## Browser Support
|
|
6
|
+
|
|
7
|
+
Frey UI targets **ES2016+** and supports all modern evergreen browsers:
|
|
8
|
+
|
|
9
|
+
- Chrome / Edge 80+
|
|
10
|
+
- Firefox 78+
|
|
11
|
+
- Safari 14+
|
|
12
|
+
|
|
13
|
+
## Accessibility
|
|
14
|
+
|
|
15
|
+
Frey UI is built with **WCAG 2.1 AA** compliance as a goal:
|
|
16
|
+
|
|
17
|
+
- All interactive components use semantic HTML (`button`, `input`, `label`).
|
|
18
|
+
- Non-native interactive elements receive `role`, `tabIndex`, and keyboard handlers automatically.
|
|
19
|
+
- Every form control requires a `label` prop; labels can be visually hidden with `hideLabel`.
|
|
20
|
+
- Focus is always visible (`:focus-visible` styles on every interactive component).
|
|
21
|
+
- Disabled states are functional, not just visual.
|
|
22
|
+
|
|
23
|
+
Automated accessibility checks run via [`jest-axe`](https://github.com/nickcolley/jest-axe) in unit tests and the [`@storybook/addon-a11y`](https://storybook.js.org/addons/@storybook/addon-a11y) panel in Storybook.
|
|
24
|
+
|
|
25
|
+
## Installation
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pnpm add frey-ui
|
|
29
|
+
# OR
|
|
30
|
+
npm install frey-ui
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Setup
|
|
34
|
+
|
|
35
|
+
Import the stylesheet **once** in your app's root file (e.g. `App.tsx` or `layout.tsx`).
|
|
36
|
+
This file includes all component styles **and** the default theme variables — it is required.
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
import 'frey-ui/style.css';
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Usage
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
import { Chip, Switch, ThemeProvider } from 'frey-ui';
|
|
46
|
+
|
|
47
|
+
function App() {
|
|
48
|
+
return (
|
|
49
|
+
<ThemeProvider theme='light'>
|
|
50
|
+
<Chip label='Status' variant='outlined' />
|
|
51
|
+
<Switch label='Enable Dark Mode' />
|
|
52
|
+
</ThemeProvider>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Components
|
|
58
|
+
|
|
59
|
+
Frey UI currently exports:
|
|
60
|
+
|
|
61
|
+
- `Alert`
|
|
62
|
+
- `Button`
|
|
63
|
+
- `Checkbox`
|
|
64
|
+
- `Chip`
|
|
65
|
+
- `Skeleton`
|
|
66
|
+
- `Switch`
|
|
67
|
+
- `TextInput`
|
|
68
|
+
- `ThemeProvider`
|
|
69
|
+
|
|
70
|
+
### `Alert`
|
|
71
|
+
|
|
72
|
+
Inline status and feedback messaging.
|
|
73
|
+
|
|
74
|
+
| Prop | Type | Default | Description |
|
|
75
|
+
| ----------- | ---------------------------------------------- | -------- | ------------------------------------------------ |
|
|
76
|
+
| `variant` | `'error' \| 'success' \| 'warning' \| 'info'` | `'info'` | Visual style and live-region semantics. |
|
|
77
|
+
| `title` | `string` | — | Optional short heading rendered above the body. |
|
|
78
|
+
| `children` | `ReactNode` | — | **Required.** Main alert message content. |
|
|
79
|
+
| `className` | `string` | — | Additional CSS class. |
|
|
80
|
+
| `style` | `CSSProperties` | — | Inline styles / CSS variable overrides. |
|
|
81
|
+
|
|
82
|
+
### `Button`
|
|
83
|
+
|
|
84
|
+
Polymorphic action control with loading and disabled states.
|
|
85
|
+
|
|
86
|
+
| Prop | Type | Default | Description |
|
|
87
|
+
| ----------- | ------------------------------------------------- | ----------- | --------------------------------------------------------------------------------------- |
|
|
88
|
+
| `as` | `'button' \| 'a'` | `'button'` | HTML element to render. |
|
|
89
|
+
| `variant` | `'primary' \| 'secondary' \| 'ghost' \| 'destructive'` | `'primary'` | Visual style variant. |
|
|
90
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Size variant. |
|
|
91
|
+
| `loading` | `boolean` | `false` | Shows spinner and marks element as busy. |
|
|
92
|
+
| `disabled` | `boolean` | `false` | Disables native buttons; for anchors sets `aria-disabled`. |
|
|
93
|
+
| `className` | `string` | — | Additional CSS class. |
|
|
94
|
+
| `style` | `CSSProperties` | — | Inline styles / CSS variable overrides. |
|
|
95
|
+
| `ref` | `Ref<HTMLButtonElement \| HTMLAnchorElement>` | — | Forwarded ref to the underlying element. |
|
|
96
|
+
|
|
97
|
+
Component-specific native attributes are supported based on `as` (`button` or `a`).
|
|
98
|
+
|
|
99
|
+
### `Checkbox`
|
|
100
|
+
|
|
101
|
+
Accessible checkbox with optional indeterminate state.
|
|
102
|
+
|
|
103
|
+
| Prop | Type | Default | Description |
|
|
104
|
+
| --------------- | -------------------------------------- | ------- | --------------------------------------------------------------- |
|
|
105
|
+
| `label` | `string` | — | **Required.** Accessible label text. |
|
|
106
|
+
| `hideLabel` | `boolean` | `false` | Visually hide the label (remains accessible to screen readers). |
|
|
107
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Size variant. |
|
|
108
|
+
| `indeterminate` | `boolean` | `false` | Shows mixed state and sets `aria-checked="mixed"`. |
|
|
109
|
+
| `disabled` | `boolean` | `false` | Disables the checkbox. |
|
|
110
|
+
| `className` | `string` | — | Additional CSS class. |
|
|
111
|
+
| `style` | `CSSProperties` | — | Inline styles / CSS variable overrides. |
|
|
112
|
+
| `ref` | `Ref<HTMLInputElement>` | — | Forwarded ref to the native input. |
|
|
113
|
+
|
|
114
|
+
All standard `<input>` attributes (except `type`, `size`) are also supported and spread onto the underlying element.
|
|
115
|
+
|
|
116
|
+
### `Chip`
|
|
117
|
+
|
|
118
|
+
A polymorphic label / action component.
|
|
119
|
+
|
|
120
|
+
| Prop | Type | Default | Description |
|
|
121
|
+
| ----------- | ------------------------------------ | --------------------------------------------------- | ------------------------------------------------------------------------ |
|
|
122
|
+
| `label` | `string` | — | **Required.** Text content of the chip. |
|
|
123
|
+
| `variant` | `'default' \| 'outlined'` | `'default'` | Visual style variant. |
|
|
124
|
+
| `as` | `'button' \| 'div' \| 'span' \| 'a'` | `'span'` (or `'button'` when `onClick` is provided) | HTML element to render. |
|
|
125
|
+
| `onClick` | `MouseEventHandler` | — | Click handler. When provided, the chip renders as a `button` by default. |
|
|
126
|
+
| `className` | `string` | — | Additional CSS class. |
|
|
127
|
+
| `style` | `CSSProperties` | — | Inline styles / CSS variable overrides. |
|
|
128
|
+
| `ref` | `Ref` | — | Forwarded ref to the underlying element. |
|
|
129
|
+
|
|
130
|
+
Non-native interactive chips (`as="div"` with `onClick`) automatically receive `role="button"`, `tabIndex={0}`, and keyboard support (Enter / Space).
|
|
131
|
+
|
|
132
|
+
### `Skeleton`
|
|
133
|
+
|
|
134
|
+
Loading placeholder for pending UI states.
|
|
135
|
+
|
|
136
|
+
| Prop | Type | Default | Description |
|
|
137
|
+
| ----------- | ------------------------------- | ------------- | ----------------------------------------------------- |
|
|
138
|
+
| `width` | `string \| number` | — | Placeholder width (for circles, can infer from height). |
|
|
139
|
+
| `height` | `string \| number` | — | Placeholder height (for circles, can infer from width). |
|
|
140
|
+
| `shape` | `'rectangle' \| 'circle'` | `'rectangle'` | Skeleton shape. |
|
|
141
|
+
| `className` | `string` | — | Additional CSS class. |
|
|
142
|
+
| `style` | `CSSProperties` | — | Inline styles / CSS variable overrides. |
|
|
143
|
+
|
|
144
|
+
### `Switch`
|
|
145
|
+
|
|
146
|
+
An accessible toggle switch built on a native `<input type="checkbox" role="switch">`.
|
|
147
|
+
|
|
148
|
+
| Prop | Type | Default | Description |
|
|
149
|
+
| ---------------- | -------------------------------------- | ------- | --------------------------------------------------------------- |
|
|
150
|
+
| `label` | `string` | — | **Required.** Accessible label text. |
|
|
151
|
+
| `hideLabel` | `boolean` | `false` | Visually hide the label (remains accessible to screen readers). |
|
|
152
|
+
| `size` | `'sm' \| 'md' \| 'lg'` | `'md'` | Size variant. |
|
|
153
|
+
| `checked` | `boolean` | — | Controlled checked state. |
|
|
154
|
+
| `defaultChecked` | `boolean` | — | Initial checked state (uncontrolled). |
|
|
155
|
+
| `disabled` | `boolean` | `false` | Disables the switch. |
|
|
156
|
+
| `onChange` | `ChangeEventHandler<HTMLInputElement>` | — | Change handler. |
|
|
157
|
+
| `className` | `string` | — | Additional CSS class. |
|
|
158
|
+
| `style` | `CSSProperties` | — | Inline styles / CSS variable overrides. |
|
|
159
|
+
| `ref` | `Ref<HTMLInputElement>` | — | Forwarded ref to the native input. |
|
|
160
|
+
|
|
161
|
+
All standard `<input>` attributes (except `type`, `size`) are also supported and spread onto the underlying element.
|
|
162
|
+
|
|
163
|
+
### `TextInput`
|
|
164
|
+
|
|
165
|
+
Accessible text field with helper and error messaging.
|
|
166
|
+
|
|
167
|
+
| Prop | Type | Default | Description |
|
|
168
|
+
| ------------ | ----------------------------------------------------------------------- | -------- | --------------------------------------------------------------- |
|
|
169
|
+
| `label` | `string` | — | **Required.** Accessible label text. |
|
|
170
|
+
| `hideLabel` | `boolean` | `false` | Visually hide the label (remains accessible to screen readers). |
|
|
171
|
+
| `type` | `'text' \| 'email' \| 'password' \| 'search' \| 'tel' \| 'url'` | `'text'` | Input type. |
|
|
172
|
+
| `error` | `string` | — | Error message text; sets `aria-invalid` and `role="alert"`. |
|
|
173
|
+
| `helperText` | `string` | — | Helper text shown below the input. |
|
|
174
|
+
| `disabled` | `boolean` | `false` | Disables the input. |
|
|
175
|
+
| `className` | `string` | — | Additional CSS class. |
|
|
176
|
+
| `style` | `CSSProperties` | — | Inline styles / CSS variable overrides. |
|
|
177
|
+
| `ref` | `Ref<HTMLInputElement>` | — | Forwarded ref to the native input. |
|
|
178
|
+
|
|
179
|
+
All standard `<input>` attributes (except `type`) are also supported and spread onto the underlying element.
|
|
180
|
+
|
|
181
|
+
### `ThemeProvider`
|
|
182
|
+
|
|
183
|
+
Wraps children with theme CSS variables.
|
|
184
|
+
|
|
185
|
+
| Prop | Type | Default | Description |
|
|
186
|
+
| ----------- | ------------------- | --------- | ---------------------------- |
|
|
187
|
+
| `children` | `ReactNode` | — | **Required.** Child content. |
|
|
188
|
+
| `theme` | `'light' \| 'dark'` | `'light'` | Active theme. |
|
|
189
|
+
| `id` | `string` | — | Container id. |
|
|
190
|
+
| `className` | `string` | — | Additional CSS class. |
|
|
191
|
+
| `style` | `CSSProperties` | — | Inline styles. |
|
|
192
|
+
|
|
193
|
+
## Theming
|
|
194
|
+
|
|
195
|
+
Override component visuals with CSS custom properties on any ancestor:
|
|
196
|
+
|
|
197
|
+
```css
|
|
198
|
+
.my-switch {
|
|
199
|
+
--switch-track-active: #22c55e;
|
|
200
|
+
--switch-track-inactive: #94a3b8;
|
|
201
|
+
--switch-focus-ring: #22c55e;
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## Storybook
|
|
206
|
+
|
|
207
|
+
Browse interactive component docs at the [hosted Storybook](https://BlizzardBlast.github.io/frey-ui) or run locally:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
pnpm install
|
|
211
|
+
pnpm storybook
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
## License
|
|
215
|
+
|
|
216
|
+
[MIT](./LICENSE)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var styles = {"alert":"alert-module_alert__j-fLL","alert-error":"alert-module_alert-error__U8yC8","alert-success":"alert-module_alert-success__FYP1Q","alert-warning":"alert-module_alert-warning__tuLWQ","alert-info":"alert-module_alert-info__d2xVj","alert-icon":"alert-module_alert-icon__j-8MC","alert-content":"alert-module_alert-content__PUQPc","alert-title":"alert-module_alert-title__3yZS1","alert-message":"alert-module_alert-message__0AJ04"};
|
|
7
|
+
|
|
8
|
+
exports.default = styles;
|
|
9
|
+
//# sourceMappingURL=alert.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"alert.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var clsx = require('clsx');
|
|
8
|
+
var alert_module = require('./alert.module.css.js');
|
|
9
|
+
|
|
10
|
+
const VariantClassMap = {
|
|
11
|
+
error: alert_module.default['alert-error'],
|
|
12
|
+
success: alert_module.default['alert-success'],
|
|
13
|
+
warning: alert_module.default['alert-warning'],
|
|
14
|
+
info: alert_module.default['alert-info']
|
|
15
|
+
};
|
|
16
|
+
const VariantRoleMap = {
|
|
17
|
+
error: 'alert',
|
|
18
|
+
warning: 'alert',
|
|
19
|
+
success: 'status',
|
|
20
|
+
info: 'status'
|
|
21
|
+
};
|
|
22
|
+
const icons = {
|
|
23
|
+
error: (jsxRuntime.jsx("svg", { xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 20 20', fill: 'currentColor', "aria-hidden": 'true', children: jsxRuntime.jsx("path", { fillRule: 'evenodd', d: 'M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z', clipRule: 'evenodd' }) })),
|
|
24
|
+
success: (jsxRuntime.jsx("svg", { xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 20 20', fill: 'currentColor', "aria-hidden": 'true', children: jsxRuntime.jsx("path", { fillRule: 'evenodd', d: 'M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z', clipRule: 'evenodd' }) })),
|
|
25
|
+
warning: (jsxRuntime.jsx("svg", { xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 20 20', fill: 'currentColor', "aria-hidden": 'true', children: jsxRuntime.jsx("path", { fillRule: 'evenodd', d: 'M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.168 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z', clipRule: 'evenodd' }) })),
|
|
26
|
+
info: (jsxRuntime.jsx("svg", { xmlns: 'http://www.w3.org/2000/svg', viewBox: '0 0 20 20', fill: 'currentColor', "aria-hidden": 'true', children: jsxRuntime.jsx("path", { fillRule: 'evenodd', d: 'M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z', clipRule: 'evenodd' }) }))
|
|
27
|
+
};
|
|
28
|
+
function Alert({ variant = 'info', title, children, className, style }) {
|
|
29
|
+
return (jsxRuntime.jsxs("div", { role: VariantRoleMap[variant], className: clsx(alert_module.default.alert, VariantClassMap[variant], className), style: style, children: [jsxRuntime.jsx("span", { className: alert_module.default['alert-icon'], children: icons[variant] }), jsxRuntime.jsxs("div", { className: alert_module.default['alert-content'], children: [title && jsxRuntime.jsx("p", { className: alert_module.default['alert-title'], children: title }), jsxRuntime.jsx("p", { className: alert_module.default['alert-message'], children: children })] })] }));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
exports.default = Alert;
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/Alert/index.tsx"],"sourcesContent":[null],"names":["styles","_jsx","_jsxs"],"mappings":";;;;;;;;;AAcA,MAAM,eAAe,GAAiC;AACpD,IAAA,KAAK,EAAEA,oBAAM,CAAC,aAAa,CAAC;AAC5B,IAAA,OAAO,EAAEA,oBAAM,CAAC,eAAe,CAAC;AAChC,IAAA,OAAO,EAAEA,oBAAM,CAAC,eAAe,CAAC;AAChC,IAAA,IAAI,EAAEA,oBAAM,CAAC,YAAY;CAC1B;AAED,MAAM,cAAc,GAA6C;AAC/D,IAAA,KAAK,EAAE,OAAO;AACd,IAAA,OAAO,EAAE,OAAO;AAChB,IAAA,OAAO,EAAE,QAAQ;AACjB,IAAA,IAAI,EAAE;CACP;AAED,MAAM,KAAK,GAA0C;AACnD,IAAA,KAAK,GACHC,cAAA,CAAA,KAAA,EAAA,EACE,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,cAAc,EAAA,aAAA,EACP,MAAM,EAAA,QAAA,EAElBA,cAAA,CAAA,MAAA,EAAA,EACE,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,+MAA+M,EACjN,QAAQ,EAAC,SAAS,EAAA,CAClB,GACE,CACP;AACD,IAAA,OAAO,GACLA,cAAA,CAAA,KAAA,EAAA,EACE,KAAK,EAAC,4BAA4B,EAClC,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,cAAc,EAAA,aAAA,EACP,MAAM,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AC,eAAe,CAAC,aACpC,KAAK,IAAIC,cAAA,CAAA,GAAA,EAAA,EAAG,SAAS,EAAED,oBAAM,CAAC,aAAa,CAAC,YAAG,KAAK,EAAA,CAAK,EAC1DC,cAAA,CAAA,GAAA,EAAA,EAAG,SAAS,EAAED,oBAAM,CAAC,eAAe,CAAC,EAAA,QAAA,EAAG,QAAQ,GAAK,CAAA,EAAA,CACjD,CAAA,EAAA,CACF;AAEV;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var styles = {"button":"button-module_button__umKM2","button-sm":"button-module_button-sm__TiGU6","button-md":"button-module_button-md__J7V5e","button-lg":"button-module_button-lg__-SzwA","button-primary":"button-module_button-primary__v1Ube","button-secondary":"button-module_button-secondary__sWT9h","button-ghost":"button-module_button-ghost__s0pgs","button-destructive":"button-module_button-destructive__zxYP7","button-loading":"button-module_button-loading__-ye2x","spinner":"button-module_spinner__1Wrqa"};
|
|
7
|
+
|
|
8
|
+
exports.default = styles;
|
|
9
|
+
//# sourceMappingURL=button.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var tslib = require('tslib');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
var clsx = require('clsx');
|
|
9
|
+
var React = require('react');
|
|
10
|
+
var button_module = require('./button.module.css.js');
|
|
11
|
+
|
|
12
|
+
const VariantClassMap = {
|
|
13
|
+
primary: button_module.default['button-primary'],
|
|
14
|
+
secondary: button_module.default['button-secondary'],
|
|
15
|
+
ghost: button_module.default['button-ghost'],
|
|
16
|
+
destructive: button_module.default['button-destructive']
|
|
17
|
+
};
|
|
18
|
+
const SizeClassMap = {
|
|
19
|
+
sm: button_module.default['button-sm'],
|
|
20
|
+
md: button_module.default['button-md'],
|
|
21
|
+
lg: button_module.default['button-lg']
|
|
22
|
+
};
|
|
23
|
+
function ButtonInner(_a, ref) {
|
|
24
|
+
var { as, variant = 'primary', size = 'md', loading = false, disabled = false, className, style, children } = _a, restProps = tslib.__rest(_a, ["as", "variant", "size", "loading", "disabled", "className", "style", "children"]);
|
|
25
|
+
const Component = (as !== null && as !== void 0 ? as : 'button');
|
|
26
|
+
const isButton = (as !== null && as !== void 0 ? as : 'button') === 'button';
|
|
27
|
+
return (jsxRuntime.jsxs(Component, Object.assign({ ref: ref, className: clsx(button_module.default.button, VariantClassMap[variant], SizeClassMap[size], { [button_module.default['button-loading']]: loading }, className), style: style, disabled: isButton ? disabled || loading : undefined, "aria-disabled": !isButton && (disabled || loading) ? true : undefined, type: isButton ? 'button' : undefined, "aria-busy": loading || undefined }, restProps, { children: [loading && jsxRuntime.jsx("span", { className: button_module.default.spinner, "aria-hidden": 'true' }), children] })));
|
|
28
|
+
}
|
|
29
|
+
const ForwardedButton = React.forwardRef(ButtonInner);
|
|
30
|
+
ForwardedButton.displayName = 'Button';
|
|
31
|
+
const Button = ForwardedButton;
|
|
32
|
+
|
|
33
|
+
exports.default = Button;
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/Button/index.tsx"],"sourcesContent":[null],"names":["styles","__rest","_jsxs","_jsx"],"mappings":";;;;;;;;;;;AA+BA,MAAM,eAAe,GAAkC;AACrD,IAAA,OAAO,EAAEA,qBAAM,CAAC,gBAAgB,CAAC;AACjC,IAAA,SAAS,EAAEA,qBAAM,CAAC,kBAAkB,CAAC;AACrC,IAAA,KAAK,EAAEA,qBAAM,CAAC,cA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AQ,IAAI,OAAO,CAAC,GAAG,IAAI,GAAG,SAAS,EACpE,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,EAAA,WAAA,EAC1B,OAAO,IAAI,SAAS,EAAA,EAC3B,SAAS,EAAA,EAAA,QAAA,EAAA,CAEZ,OAAO,IAAIG,cAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAEH,qBAAM,CAAC,OAAO,EAAA,aAAA,EAAc,MAAM,GAAG,EACjE,QAAQ,CAAA,EAAA,CAAA,CACC;AAEhB;AAEA,MAAM,eAAe,GAAG,KAAK,CAAC,UAAU,CAAC,WAAW,CAAC;AAErD,eAAe,CAAC,WAAW,GAAG,QAAQ;AAEtC,MAAM,MAAM,GAAG;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var styles = {"checkbox-container":"checkbox-module_checkbox-container__ljwCZ","checkbox":"checkbox-module_checkbox__-voPf","checkbox-sm":"checkbox-module_checkbox-sm__W4Bsc","checkbox-md":"checkbox-module_checkbox-md__GtRQX","checkbox-lg":"checkbox-module_checkbox-lg__Hl7wJ","checkbox-box":"checkbox-module_checkbox-box__1KZI9","checkbox-disabled":"checkbox-module_checkbox-disabled__e9Ufr","check-icon":"checkbox-module_check-icon__O2v-a","indeterminate-icon":"checkbox-module_indeterminate-icon__ujYHN","label":"checkbox-module_label__4jx3z","visually-hidden":"checkbox-module_visually-hidden__1AzKx"};
|
|
7
|
+
|
|
8
|
+
exports.default = styles;
|
|
9
|
+
//# sourceMappingURL=checkbox.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkbox.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var tslib = require('tslib');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
var clsx = require('clsx');
|
|
9
|
+
var React = require('react');
|
|
10
|
+
var checkbox_module = require('./checkbox.module.css.js');
|
|
11
|
+
|
|
12
|
+
const SizeClassMap = {
|
|
13
|
+
sm: checkbox_module.default['checkbox-sm'],
|
|
14
|
+
md: checkbox_module.default['checkbox-md'],
|
|
15
|
+
lg: checkbox_module.default['checkbox-lg']
|
|
16
|
+
};
|
|
17
|
+
const Checkbox = React.forwardRef(function Checkbox(_a, forwardedRef) {
|
|
18
|
+
var { label, hideLabel = false, size = 'md', indeterminate = false, className, style, id, disabled = false } = _a, inputProps = tslib.__rest(_a, ["label", "hideLabel", "size", "indeterminate", "className", "style", "id", "disabled"]);
|
|
19
|
+
const generatedId = React.useId();
|
|
20
|
+
const inputId = id !== null && id !== void 0 ? id : generatedId;
|
|
21
|
+
const internalRef = React.useRef(null);
|
|
22
|
+
React.useLayoutEffect(() => {
|
|
23
|
+
if (internalRef.current) {
|
|
24
|
+
internalRef.current.indeterminate = indeterminate;
|
|
25
|
+
}
|
|
26
|
+
}, [indeterminate]);
|
|
27
|
+
const setRef = (node) => {
|
|
28
|
+
internalRef.current = node;
|
|
29
|
+
if (node) {
|
|
30
|
+
node.indeterminate = indeterminate;
|
|
31
|
+
}
|
|
32
|
+
if (typeof forwardedRef === 'function') {
|
|
33
|
+
forwardedRef(node);
|
|
34
|
+
}
|
|
35
|
+
else if (forwardedRef) {
|
|
36
|
+
forwardedRef.current = node;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
return (jsxRuntime.jsxs("div", { className: clsx(checkbox_module.default['checkbox-container'], className), style: style, children: [jsxRuntime.jsxs("span", { className: clsx(checkbox_module.default.checkbox, SizeClassMap[size], {
|
|
40
|
+
[checkbox_module.default['checkbox-disabled']]: disabled
|
|
41
|
+
}), "aria-disabled": disabled || undefined, children: [jsxRuntime.jsx("input", Object.assign({ type: 'checkbox', id: inputId, disabled: disabled, ref: setRef, "aria-checked": indeterminate ? 'mixed' : undefined }, inputProps)), jsxRuntime.jsxs("span", { className: checkbox_module.default['checkbox-box'], "aria-hidden": 'true', children: [jsxRuntime.jsx("svg", { className: checkbox_module.default['check-icon'], viewBox: '0 0 12 12', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-hidden": 'true', children: jsxRuntime.jsx("path", { d: 'M2.5 6L5 8.5L9.5 3.5', stroke: 'currentColor', strokeWidth: '2', strokeLinecap: 'round', strokeLinejoin: 'round' }) }), jsxRuntime.jsx("svg", { className: checkbox_module.default['indeterminate-icon'], viewBox: '0 0 12 12', fill: 'none', xmlns: 'http://www.w3.org/2000/svg', "aria-hidden": 'true', children: jsxRuntime.jsx("path", { d: 'M2.5 6H9.5', stroke: 'currentColor', strokeWidth: '2', strokeLinecap: 'round' }) })] })] }), jsxRuntime.jsx("label", { htmlFor: inputId, className: clsx(checkbox_module.default.label, {
|
|
42
|
+
[checkbox_module.default['visually-hidden']]: hideLabel
|
|
43
|
+
}), children: label })] }));
|
|
44
|
+
});
|
|
45
|
+
Checkbox.displayName = 'Checkbox';
|
|
46
|
+
|
|
47
|
+
exports.default = Checkbox;
|
|
48
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/Checkbox/index.tsx"],"sourcesContent":[null],"names":["styles","__rest","useId","useRef","useLayoutEffect","_jsxs","_jsx"],"mappings":";;;;;;;;;;;AAkBA,MAAM,YAAY,GAAiC;AACjD,IAAA,EAAE,EAAEA,uBAAM,CAAC,aAAa,CAAC;AACzB,IAAA,EAAE,EAAEA,uBAAM,CAAC,aAAa,CAAC;AACzB,IAAA,EAAE,EAAEA,uBAAM,CAAC,aAAa;CACzB;AAED,MAAM,QAAQ,GAAG,KAAK,CAAC,UAAU,CA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CACrB,EAAA,CACE,CAAA,EAAA,CACD,CAAA,EAAA,CACF,EACPA,cAAA,CAAA,OAAA,EAAA,EACE,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,IAAI,CAACN,uBAAM,CAAC,KAAK,EAAE;AAC5B,oBAAA,CAACA,uBAAM,CAAC,iBAAiB,CAAC,GAAG;AAC9B,iBAAA,CAAC,EAAA,QAAA,EAED,KAAK,EAAA,CACA,CAAA,EAAA,CACJ;AAEV,CAAC;AAGH,QAAQ,CAAC,WAAW,GAAG,UAAU;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var styles = {"chip-outlined":"chip-module_chip-outlined__nsWch","chip-default":"chip-module_chip-default__W71L9","chip-default-clickable":"chip-module_chip-default-clickable__xqeqN","chip-outlined-clickable":"chip-module_chip-outlined-clickable__slYmY","chip-text":"chip-module_chip-text__VIJnW"};
|
|
7
|
+
|
|
8
|
+
exports.default = styles;
|
|
9
|
+
//# sourceMappingURL=chip.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chip.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var tslib = require('tslib');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
var clsx = require('clsx');
|
|
9
|
+
var React = require('react');
|
|
10
|
+
var chip_module = require('./chip.module.css.js');
|
|
11
|
+
|
|
12
|
+
const VariantDefaultMap = {
|
|
13
|
+
default: chip_module.default['chip-default'],
|
|
14
|
+
outlined: chip_module.default['chip-outlined']
|
|
15
|
+
};
|
|
16
|
+
const VariantClickableMap = {
|
|
17
|
+
default: chip_module.default['chip-default-clickable'],
|
|
18
|
+
outlined: chip_module.default['chip-outlined-clickable']
|
|
19
|
+
};
|
|
20
|
+
function ChipInner(_a, ref) {
|
|
21
|
+
var { label, onClick, as, style, className, variant = 'default' } = _a, elementProps = tslib.__rest(_a, ["label", "onClick", "as", "style", "className", "variant"]);
|
|
22
|
+
const resolvedElement = as !== null && as !== void 0 ? as : (onClick ? 'button' : 'span');
|
|
23
|
+
const Component = resolvedElement;
|
|
24
|
+
const href = resolvedElement === 'a'
|
|
25
|
+
? elementProps.href
|
|
26
|
+
: undefined;
|
|
27
|
+
const hasHref = typeof href === 'string' && href.trim().length > 0;
|
|
28
|
+
const isInteractive = resolvedElement === 'button' ||
|
|
29
|
+
(resolvedElement === 'a' && hasHref) ||
|
|
30
|
+
Boolean(onClick);
|
|
31
|
+
const isNonNativeInteractive = isInteractive && resolvedElement !== 'button' && resolvedElement !== 'a';
|
|
32
|
+
const handleKeyDown = isNonNativeInteractive
|
|
33
|
+
? (event) => {
|
|
34
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
35
|
+
event.preventDefault();
|
|
36
|
+
event.currentTarget.click();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
: undefined;
|
|
40
|
+
const classes = clsx(VariantDefaultMap[variant], {
|
|
41
|
+
[VariantClickableMap[variant]]: isInteractive
|
|
42
|
+
}, className);
|
|
43
|
+
return (jsxRuntime.jsx(Component, Object.assign({}, elementProps, { ref: ref, className: classes, onClick: onClick, style: style, type: resolvedElement === 'button' ? 'button' : undefined, role: isNonNativeInteractive ? 'button' : undefined, tabIndex: isNonNativeInteractive ? 0 : undefined, onKeyDown: isNonNativeInteractive ? handleKeyDown : undefined, children: jsxRuntime.jsx("span", { className: chip_module.default['chip-text'], children: label }) })));
|
|
44
|
+
}
|
|
45
|
+
const ForwardedChip = React.forwardRef(ChipInner);
|
|
46
|
+
ForwardedChip.displayName = 'Chip';
|
|
47
|
+
const Chip = ForwardedChip;
|
|
48
|
+
|
|
49
|
+
exports.default = Chip;
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/Chip/index.tsx"],"sourcesContent":[null],"names":["styles","__rest","_jsx"],"mappings":";;;;;;;;;;;AA+BA,MAAM,iBAAiB,GAA4B;AACjD,IAAA,OAAO,EAAEA,mBAAM,CAAC,cAAc,CAAC;AAC/B,IAAA,QAAQ,EAAEA,mBAAM,CAAC,eAAe;CACjC;AAED,MAAM,mBAAmB,GAA4B;AACnD,IAAA,OAAO,EAAEA,mBAAM,CAAC,wBAAwB,CAAC;AACzC,IAAA,QAAQ,EAAEA,mBAAM,CAAC,yBAAyB;CAC3C;AAMD,SAAS,SAAS,CAChB,EAQyB,EACzB,GAA2C,EAAA;AAT3C,IAAA,IAAA,EACE,KAAK,EACL,OAAO,EACP,EAAE,EACF,KAAK,EACL,SAAS,EACT,OAAO,GAAG,SAAS,EAAA,GAAA,EAEI,EADpB,YAAY,GAAAC,YAAA,CAAA,EAAA,EAPjB,2DAQC,CADgB;AAIjB,IAAA,MAAM,eAAe,GAAG,EAAE,aAAF,EAAE,KAAA,MAAA,GAAF,EAAE,IAAK,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3D,MAAM,SAAS,GAAG,eAAoC;AACtD,IAAA,MAAM,IAAI,GACR,eAAe,KAAK;UACf,YAA8D,CAAC;UAChE,SAAS;AACf,IAAA,MAAM,OAAO,GAAG,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC;AAClE,IAAA,MAAM,aAAa,GACjB,eAAe,KAAK,QAAQ;AAC5B,SAAC,eAAe,KAAK,GAAG,IAAI,OAAO,CAAC;QACpC,OAAO,CAAC,OAAO,CAAC;IAElB,MAAM,sBAAsB,GAC1B,aAAa,IAAI,eAAe,KAAK,QAAQ,IAAI,eAAe,KAAK,GAAG;IAE1E,MAAM,aAAa,GAAG;AACpB,UAAE,CAAC,KAA0B,KAAI;AAC7B,YAAA,IAAI,KAAK,CAAC,GAAG,KAAK,OAAO,IAAI,KAAK,CAAC,GAAG,KAAK,GAAG,EAAE;gBAC9C,KAAK,CAAC,cAAc,EAAE;AACrB,gBAAA,KAAK,CAAC,aAA6B,CAAC,KAAK,EAAE;YAC9C;QACF;UACA,SAAS;IAEb,MAAM,OAAO,GAAG,IAAI,CAClB,iBAAiB,CAAC,OAAO,CAAC,EAC1B;AACE,QAAA,CAAC,mBAAmB,CAAC,OAAO,CAAC,GAAG;KACjC,EACD,SAAS,CACV;AAED,IAAA,QACEC,cAAA,CAAC,SAAS,oBACJ,YAAY,EAAA,EAChB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,OAAO,EAClB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,eAAe,KAAK,QAAQ,GAAG,QAAQ,GAAG,SAAS,EACzD,IAAI,EAAE,sBAAsB,GAAG,QAAQ,GAAG,SAAS,EACnD,QAAQ,EAAE,sBAAsB,GAAG,CAAC,GAAG,SAAS,EAChD,SAAS,EAAE,sBAAsB,GAAG,aAAa,GAAG,SAAS,EAAA,QAAA,EAE7DA,yBAAM,SAAS,EAAEF,mBAAM,CAAC,WAAW,CAAC,EAAA,QAAA,EAAG,KAAK,EAAA,CAAQ,EAAA,CAAA,CAC1C;AAEhB;AAEA,MAAM,aAAa,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC;AAEjD,aAAa,CAAC,WAAW,GAAG,MAAM;AAElC,MAAM,IAAI,GAAG;;;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var clsx = require('clsx');
|
|
8
|
+
var skeleton_module = require('./skeleton.module.css.js');
|
|
9
|
+
|
|
10
|
+
const ShapeClassMap = {
|
|
11
|
+
rectangle: skeleton_module.default['skeleton-rectangle'],
|
|
12
|
+
circle: skeleton_module.default['skeleton-circle']
|
|
13
|
+
};
|
|
14
|
+
function Skeleton({ width, height, shape = 'rectangle', className, style }) {
|
|
15
|
+
const resolvedWidth = shape === 'circle' && !width && height ? height : width;
|
|
16
|
+
const resolvedHeight = shape === 'circle' && !height && width ? width : height;
|
|
17
|
+
return (jsxRuntime.jsx("span", { className: clsx(skeleton_module.default.skeleton, ShapeClassMap[shape], className), style: Object.assign({ width: resolvedWidth, height: resolvedHeight }, style), "aria-hidden": 'true', role: 'presentation' }));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
exports.default = Skeleton;
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/Skeleton/index.tsx"],"sourcesContent":[null],"names":["styles","_jsx"],"mappings":";;;;;;;;;AAcA,MAAM,aAAa,GAAkC;AACnD,IAAA,SAAS,EAAEA,uBAAM,CAAC,oBAAoB,CAAC;AACvC,IAAA,MAAM,EAAEA,uBAAM,CAAC,iBAAiB;CACjC;AAED,SAAS,QAAQ,CAAC,EAChB,KAAK,EACL,MAAM,EACN,KAAK,GAAG,WAAW,EACnB,SAAS,EACT,KAAK,EACmB,EAAA;AACxB,IAAA,MAAM,aAAa,GAAG,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,MAAM,GAAG,MAAM,GAAG,KAAK;AAC7E,IAAA,MAAM,cAAc,GAClB,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,IAAI,KAAK,GAAG,KAAK,GAAG,MAAM;AAEzD,IAAA,QACEC,cAAA,CAAA,MAAA,EAAA,EACE,SAAS,EAAE,IAAI,CAACD,uBAAM,CAAC,QAAQ,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,EACjE,KAAK,EAAA,MAAA,CAAA,MAAA,CAAA,EACH,KAAK,EAAE,aAAa,EACpB,MAAM,EAAE,cAAc,EAAA,EACnB,KAAK,CAAA,EAAA,aAAA,EAEE,MAAM,EAClB,IAAI,EAAC,cAAc,EAAA,CACnB;AAEN;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var styles = {"skeleton":"skeleton-module_skeleton__aiyBZ","skeleton-rectangle":"skeleton-module_skeleton-rectangle__qQlNt","skeleton-circle":"skeleton-module_skeleton-circle__wO-AS"};
|
|
7
|
+
|
|
8
|
+
exports.default = styles;
|
|
9
|
+
//# sourceMappingURL=skeleton.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skeleton.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var tslib = require('tslib');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
var clsx = require('clsx');
|
|
9
|
+
var React = require('react');
|
|
10
|
+
var switch_module = require('./switch.module.css.js');
|
|
11
|
+
|
|
12
|
+
const SizeClassMap = {
|
|
13
|
+
sm: switch_module.default['switch-sm'],
|
|
14
|
+
md: switch_module.default['switch-md'],
|
|
15
|
+
lg: switch_module.default['switch-lg']
|
|
16
|
+
};
|
|
17
|
+
const Switch = React.forwardRef(function Switch(_a, ref) {
|
|
18
|
+
var { label, hideLabel = false, size = 'md', className, style, id, disabled = false, onChange, onKeyDown } = _a, inputProps = tslib.__rest(_a, ["label", "hideLabel", "size", "className", "style", "id", "disabled", "onChange", "onKeyDown"]);
|
|
19
|
+
const generatedId = React.useId();
|
|
20
|
+
const inputId = id !== null && id !== void 0 ? id : generatedId;
|
|
21
|
+
const handleChange = (event) => {
|
|
22
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(event);
|
|
23
|
+
};
|
|
24
|
+
const handleKeyDown = (event) => {
|
|
25
|
+
if (event.key === 'Enter' && !disabled) {
|
|
26
|
+
event.preventDefault();
|
|
27
|
+
event.currentTarget.click();
|
|
28
|
+
}
|
|
29
|
+
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(event);
|
|
30
|
+
};
|
|
31
|
+
return (jsxRuntime.jsxs("div", { className: clsx(switch_module.default['switch-container'], className), style: style, children: [jsxRuntime.jsxs("span", { className: clsx(switch_module.default.switch, SizeClassMap[size], {
|
|
32
|
+
[switch_module.default['switch-disabled']]: disabled
|
|
33
|
+
}), "aria-disabled": disabled || undefined, children: [jsxRuntime.jsx("input", Object.assign({ type: 'checkbox', role: 'switch', id: inputId, onChange: handleChange, onKeyDown: handleKeyDown, disabled: disabled, "aria-checked": inputProps.checked, ref: ref }, inputProps)), jsxRuntime.jsx("span", { className: switch_module.default.slider, "aria-hidden": 'true' })] }), jsxRuntime.jsx("label", { htmlFor: inputId, className: clsx(switch_module.default.label, {
|
|
34
|
+
[switch_module.default['visually-hidden']]: hideLabel
|
|
35
|
+
}), children: label })] }));
|
|
36
|
+
});
|
|
37
|
+
Switch.displayName = 'Switch';
|
|
38
|
+
|
|
39
|
+
exports.default = Switch;
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/Switch/index.tsx"],"sourcesContent":[null],"names":["styles","__rest","useId","_jsxs","_jsx"],"mappings":";;;;;;;;;;;AAiBA,MAAM,YAAY,GAA+B;AAC/C,IAAA,EAAE,EAAEA,qBAAM,CAAC,WAAW,CAAC;AACvB,IAAA,EAAE,EAAEA,qBAAM,CAAC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AA,CAEZG,eAAA,CAAA,MAAA,EAAA,EACE,SAAS,EAAE,IAAI,CAACH,qBAAM,CAAC,MAAM,EAAE,YAAY,CAAC,IAAI,CAAC,EAAE;AACjD,oBAAA,CAACA,qBAAM,CAAC,iBAAiB,CAAC,GAAG;AAC9B,iBAAA,CAAC,EAAA,eAAA,EACa,QAAQ,IAAI,SAAS,EAAA,QAAA,EAAA,CAEpCI,cAAA,CAAA,OAAA,EAAA,MAAA,CAAA,MAAA,CAAA,EACE,IAAI,EAAC,UAAU,EACf,IAAI,EAAC,QAAQ,EACb,EAAE,EAAE,OAAO,EACX,QAAQ,EAAE,YAAY,EACtB,SAAS,EAAE,aAAa,EACxB,QAAQ,EAAE,QAAQ,kBACJ,UAAU,CAAC,OAAO,EAChC,GAAG,EAAE,GAAG,EAAA,EACJ,UAAU,CAAA,CACd,EACFA,cAAA,CAAA,MAAA,EAAA,EAAM,SAAS,EAAEJ,qBAAM,CAAC,MAAM,EAAA,aAAA,EAAc,MAAM,EAAA,CAAQ,CAAA,EAAA,CACrD,EACPI,cAAA,CAAA,OAAA,EAAA,EACE,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,IAAI,CAACJ,qBAAM,CAAC,KAAK,EAAE;AAC5B,oBAAA,CAACA,qBAAM,CAAC,iBAAiB,CAAC,GAAG;AAC9B,iBAAA,CAAC,EAAA,QAAA,EAED,KAAK,EAAA,CACA,CAAA,EAAA,CACJ;AAEV,CAAC;AAGH,MAAM,CAAC,WAAW,GAAG,QAAQ;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var styles = {"switch-container":"switch-module_switch-container__xDEo5","switch":"switch-module_switch__kA7Xe","switch-sm":"switch-module_switch-sm__7SvPY","switch-md":"switch-module_switch-md__loKg6","switch-lg":"switch-module_switch-lg__pU031","slider":"switch-module_slider__fJ2t2","switch-disabled":"switch-module_switch-disabled__4YjrP","label":"switch-module_label__JDK9V","visually-hidden":"switch-module_visually-hidden__-QPG1"};
|
|
7
|
+
|
|
8
|
+
exports.default = styles;
|
|
9
|
+
//# sourceMappingURL=switch.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"switch.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var tslib = require('tslib');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
var clsx = require('clsx');
|
|
9
|
+
var React = require('react');
|
|
10
|
+
var textinput_module = require('./textinput.module.css.js');
|
|
11
|
+
|
|
12
|
+
const TextInput = React.forwardRef(function TextInput(_a, ref) {
|
|
13
|
+
var { label, hideLabel = false, error, helperText, type = 'text', className, style, id, disabled = false } = _a, inputProps = tslib.__rest(_a, ["label", "hideLabel", "error", "helperText", "type", "className", "style", "id", "disabled"]);
|
|
14
|
+
const generatedId = React.useId();
|
|
15
|
+
const inputId = id !== null && id !== void 0 ? id : generatedId;
|
|
16
|
+
const errorId = `${inputId}-error`;
|
|
17
|
+
const helperId = `${inputId}-helper`;
|
|
18
|
+
const hasError = typeof error === 'string' && error.length > 0;
|
|
19
|
+
const hasHelper = typeof helperText === 'string' && helperText.length > 0;
|
|
20
|
+
const describedBy = [hasError ? errorId : undefined, hasHelper ? helperId : undefined]
|
|
21
|
+
.filter(Boolean)
|
|
22
|
+
.join(' ') || undefined;
|
|
23
|
+
return (jsxRuntime.jsxs("div", { className: clsx(textinput_module.default['text-input-container'], className), style: style, children: [jsxRuntime.jsx("label", { htmlFor: inputId, className: clsx(textinput_module.default.label, {
|
|
24
|
+
[textinput_module.default['label-disabled']]: disabled,
|
|
25
|
+
[textinput_module.default['visually-hidden']]: hideLabel
|
|
26
|
+
}), children: label }), jsxRuntime.jsx("input", Object.assign({ ref: ref, id: inputId, type: type, disabled: disabled, "aria-invalid": hasError || undefined, "aria-describedby": describedBy, className: clsx(textinput_module.default.input, {
|
|
27
|
+
[textinput_module.default['input-error']]: hasError
|
|
28
|
+
}) }, inputProps)), hasError && (jsxRuntime.jsx("p", { id: errorId, className: textinput_module.default['error-text'], role: 'alert', children: error })), hasHelper && (jsxRuntime.jsx("p", { id: helperId, className: textinput_module.default['helper-text'], children: helperText }))] }));
|
|
29
|
+
});
|
|
30
|
+
TextInput.displayName = 'TextInput';
|
|
31
|
+
|
|
32
|
+
exports.default = TextInput;
|
|
33
|
+
//# sourceMappingURL=index.js.map
|