@und-ui/react 0.0.0-stage → 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.
- package/LICENSE +21 -0
- package/README.md +35 -2
- package/dist/generated/index.d.ts +44 -0
- package/dist/generated/index.d.ts.map +1 -0
- package/dist/generated/index.js +45 -0
- package/dist/generated/index.js.map +1 -0
- package/dist/generated/jsx.d.ts +176 -0
- package/dist/generated/jsx.d.ts.map +1 -0
- package/dist/generated/jsx.js +2 -0
- package/dist/generated/jsx.js.map +1 -0
- package/dist/generated/shared.d.ts +20 -0
- package/dist/generated/shared.d.ts.map +1 -0
- package/dist/generated/shared.js +55 -0
- package/dist/generated/shared.js.map +1 -0
- package/dist/generated/und-accordion.d.ts +11 -0
- package/dist/generated/und-accordion.d.ts.map +1 -0
- package/dist/generated/und-accordion.js +11 -0
- package/dist/generated/und-accordion.js.map +1 -0
- package/dist/generated/und-alert.d.ts +20 -0
- package/dist/generated/und-alert.d.ts.map +1 -0
- package/dist/generated/und-alert.js +16 -0
- package/dist/generated/und-alert.js.map +1 -0
- package/dist/generated/und-avatar-group.d.ts +17 -0
- package/dist/generated/und-avatar-group.d.ts.map +1 -0
- package/dist/generated/und-avatar-group.js +11 -0
- package/dist/generated/und-avatar-group.js.map +1 -0
- package/dist/generated/und-avatar.d.ts +27 -0
- package/dist/generated/und-avatar.d.ts.map +1 -0
- package/dist/generated/und-avatar.js +11 -0
- package/dist/generated/und-avatar.js.map +1 -0
- package/dist/generated/und-badge.d.ts +17 -0
- package/dist/generated/und-badge.d.ts.map +1 -0
- package/dist/generated/und-badge.js +11 -0
- package/dist/generated/und-badge.js.map +1 -0
- package/dist/generated/und-breadcrumb-item.d.ts +13 -0
- package/dist/generated/und-breadcrumb-item.d.ts.map +1 -0
- package/dist/generated/und-breadcrumb-item.js +11 -0
- package/dist/generated/und-breadcrumb-item.js.map +1 -0
- package/dist/generated/und-breadcrumb.d.ts +11 -0
- package/dist/generated/und-breadcrumb.d.ts.map +1 -0
- package/dist/generated/und-breadcrumb.js +11 -0
- package/dist/generated/und-breadcrumb.js.map +1 -0
- package/dist/generated/und-button.d.ts +54 -0
- package/dist/generated/und-button.d.ts.map +1 -0
- package/dist/generated/und-button.js +16 -0
- package/dist/generated/und-button.js.map +1 -0
- package/dist/generated/und-card.d.ts +19 -0
- package/dist/generated/und-card.d.ts.map +1 -0
- package/dist/generated/und-card.js +11 -0
- package/dist/generated/und-card.js.map +1 -0
- package/dist/generated/und-checkbox.d.ts +36 -0
- package/dist/generated/und-checkbox.d.ts.map +1 -0
- package/dist/generated/und-checkbox.js +23 -0
- package/dist/generated/und-checkbox.js.map +1 -0
- package/dist/generated/und-combobox.d.ts +56 -0
- package/dist/generated/und-combobox.d.ts.map +1 -0
- package/dist/generated/und-combobox.js +25 -0
- package/dist/generated/und-combobox.js.map +1 -0
- package/dist/generated/und-dialog.d.ts +39 -0
- package/dist/generated/und-dialog.d.ts.map +1 -0
- package/dist/generated/und-dialog.js +18 -0
- package/dist/generated/und-dialog.js.map +1 -0
- package/dist/generated/und-divider.d.ts +13 -0
- package/dist/generated/und-divider.d.ts.map +1 -0
- package/dist/generated/und-divider.js +11 -0
- package/dist/generated/und-divider.js.map +1 -0
- package/dist/generated/und-drawer.d.ts +41 -0
- package/dist/generated/und-drawer.d.ts.map +1 -0
- package/dist/generated/und-drawer.js +18 -0
- package/dist/generated/und-drawer.js.map +1 -0
- package/dist/generated/und-form-field.d.ts +19 -0
- package/dist/generated/und-form-field.d.ts.map +1 -0
- package/dist/generated/und-form-field.js +11 -0
- package/dist/generated/und-form-field.js.map +1 -0
- package/dist/generated/und-icon-button.d.ts +54 -0
- package/dist/generated/und-icon-button.d.ts.map +1 -0
- package/dist/generated/und-icon-button.js +16 -0
- package/dist/generated/und-icon-button.js.map +1 -0
- package/dist/generated/und-link.d.ts +23 -0
- package/dist/generated/und-link.d.ts.map +1 -0
- package/dist/generated/und-link.js +11 -0
- package/dist/generated/und-link.js.map +1 -0
- package/dist/generated/und-menu-group.d.ts +11 -0
- package/dist/generated/und-menu-group.d.ts.map +1 -0
- package/dist/generated/und-menu-group.js +11 -0
- package/dist/generated/und-menu-group.js.map +1 -0
- package/dist/generated/und-menu-item.d.ts +21 -0
- package/dist/generated/und-menu-item.d.ts.map +1 -0
- package/dist/generated/und-menu-item.js +11 -0
- package/dist/generated/und-menu-item.js.map +1 -0
- package/dist/generated/und-menu-separator.d.ts +9 -0
- package/dist/generated/und-menu-separator.d.ts.map +1 -0
- package/dist/generated/und-menu-separator.js +11 -0
- package/dist/generated/und-menu-separator.js.map +1 -0
- package/dist/generated/und-menu.d.ts +25 -0
- package/dist/generated/und-menu.d.ts.map +1 -0
- package/dist/generated/und-menu.js +17 -0
- package/dist/generated/und-menu.js.map +1 -0
- package/dist/generated/und-pagination.d.ts +30 -0
- package/dist/generated/und-pagination.d.ts.map +1 -0
- package/dist/generated/und-pagination.js +16 -0
- package/dist/generated/und-pagination.js.map +1 -0
- package/dist/generated/und-popover.d.ts +31 -0
- package/dist/generated/und-popover.d.ts.map +1 -0
- package/dist/generated/und-popover.js +18 -0
- package/dist/generated/und-popover.js.map +1 -0
- package/dist/generated/und-progress.d.ts +23 -0
- package/dist/generated/und-progress.d.ts.map +1 -0
- package/dist/generated/und-progress.js +11 -0
- package/dist/generated/und-progress.js.map +1 -0
- package/dist/generated/und-radio-group.d.ts +32 -0
- package/dist/generated/und-radio-group.d.ts.map +1 -0
- package/dist/generated/und-radio-group.js +23 -0
- package/dist/generated/und-radio-group.js.map +1 -0
- package/dist/generated/und-radio.d.ts +19 -0
- package/dist/generated/und-radio.d.ts.map +1 -0
- package/dist/generated/und-radio.js +11 -0
- package/dist/generated/und-radio.js.map +1 -0
- package/dist/generated/und-select.d.ts +38 -0
- package/dist/generated/und-select.d.ts.map +1 -0
- package/dist/generated/und-select.js +24 -0
- package/dist/generated/und-select.js.map +1 -0
- package/dist/generated/und-skeleton.d.ts +13 -0
- package/dist/generated/und-skeleton.d.ts.map +1 -0
- package/dist/generated/und-skeleton.js +11 -0
- package/dist/generated/und-skeleton.js.map +1 -0
- package/dist/generated/und-slider.d.ts +50 -0
- package/dist/generated/und-slider.d.ts.map +1 -0
- package/dist/generated/und-slider.js +23 -0
- package/dist/generated/und-slider.js.map +1 -0
- package/dist/generated/und-spinner.d.ts +15 -0
- package/dist/generated/und-spinner.d.ts.map +1 -0
- package/dist/generated/und-spinner.js +11 -0
- package/dist/generated/und-spinner.js.map +1 -0
- package/dist/generated/und-switch.d.ts +34 -0
- package/dist/generated/und-switch.d.ts.map +1 -0
- package/dist/generated/und-switch.js +23 -0
- package/dist/generated/und-switch.js.map +1 -0
- package/dist/generated/und-tab-panel.d.ts +11 -0
- package/dist/generated/und-tab-panel.d.ts.map +1 -0
- package/dist/generated/und-tab-panel.js +11 -0
- package/dist/generated/und-tab-panel.js.map +1 -0
- package/dist/generated/und-tab.d.ts +15 -0
- package/dist/generated/und-tab.d.ts.map +1 -0
- package/dist/generated/und-tab.js +11 -0
- package/dist/generated/und-tab.js.map +1 -0
- package/dist/generated/und-table.d.ts +26 -0
- package/dist/generated/und-table.d.ts.map +1 -0
- package/dist/generated/und-table.js +16 -0
- package/dist/generated/und-table.js.map +1 -0
- package/dist/generated/und-tabs.d.ts +20 -0
- package/dist/generated/und-tabs.d.ts.map +1 -0
- package/dist/generated/und-tabs.js +16 -0
- package/dist/generated/und-tabs.js.map +1 -0
- package/dist/generated/und-text-field.d.ts +58 -0
- package/dist/generated/und-text-field.d.ts.map +1 -0
- package/dist/generated/und-text-field.js +23 -0
- package/dist/generated/und-text-field.js.map +1 -0
- package/dist/generated/und-textarea.d.ts +48 -0
- package/dist/generated/und-textarea.d.ts.map +1 -0
- package/dist/generated/und-textarea.js +23 -0
- package/dist/generated/und-textarea.js.map +1 -0
- package/dist/generated/und-toast.d.ts +26 -0
- package/dist/generated/und-toast.d.ts.map +1 -0
- package/dist/generated/und-toast.js +16 -0
- package/dist/generated/und-toast.js.map +1 -0
- package/dist/generated/und-toaster.d.ts +15 -0
- package/dist/generated/und-toaster.d.ts.map +1 -0
- package/dist/generated/und-toaster.js +11 -0
- package/dist/generated/und-toaster.js.map +1 -0
- package/dist/generated/und-tooltip.d.ts +29 -0
- package/dist/generated/und-tooltip.d.ts.map +1 -0
- package/dist/generated/und-tooltip.js +16 -0
- package/dist/generated/und-tooltip.js.map +1 -0
- package/dist/generated/und-visually-hidden.d.ts +11 -0
- package/dist/generated/und-visually-hidden.d.ts.map +1 -0
- package/dist/generated/und-visually-hidden.js +11 -0
- package/dist/generated/und-visually-hidden.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/package.json +61 -3
- package/src/generated/index.ts +46 -0
- package/src/generated/jsx.ts +166 -0
- package/src/generated/shared.ts +67 -0
- package/src/generated/und-accordion.ts +19 -0
- package/src/generated/und-alert.ts +32 -0
- package/src/generated/und-avatar-group.ts +25 -0
- package/src/generated/und-avatar.ts +35 -0
- package/src/generated/und-badge.ts +25 -0
- package/src/generated/und-breadcrumb-item.ts +21 -0
- package/src/generated/und-breadcrumb.ts +19 -0
- package/src/generated/und-button.ts +64 -0
- package/src/generated/und-card.ts +27 -0
- package/src/generated/und-checkbox.ts +55 -0
- package/src/generated/und-combobox.ts +77 -0
- package/src/generated/und-dialog.ts +50 -0
- package/src/generated/und-divider.ts +21 -0
- package/src/generated/und-drawer.ts +52 -0
- package/src/generated/und-form-field.ts +27 -0
- package/src/generated/und-icon-button.ts +64 -0
- package/src/generated/und-link.ts +31 -0
- package/src/generated/und-menu-group.ts +19 -0
- package/src/generated/und-menu-item.ts +29 -0
- package/src/generated/und-menu-separator.ts +17 -0
- package/src/generated/und-menu.ts +33 -0
- package/src/generated/und-pagination.ts +42 -0
- package/src/generated/und-popover.ts +42 -0
- package/src/generated/und-progress.ts +31 -0
- package/src/generated/und-radio-group.ts +51 -0
- package/src/generated/und-radio.ts +27 -0
- package/src/generated/und-select.ts +58 -0
- package/src/generated/und-skeleton.ts +21 -0
- package/src/generated/und-slider.ts +69 -0
- package/src/generated/und-spinner.ts +23 -0
- package/src/generated/und-switch.ts +53 -0
- package/src/generated/und-tab-panel.ts +19 -0
- package/src/generated/und-tab.ts +23 -0
- package/src/generated/und-table.ts +38 -0
- package/src/generated/und-tabs.ts +32 -0
- package/src/generated/und-text-field.ts +77 -0
- package/src/generated/und-textarea.ts +67 -0
- package/src/generated/und-toast.ts +36 -0
- package/src/generated/und-toaster.ts +23 -0
- package/src/generated/und-tooltip.ts +38 -0
- package/src/generated/und-visually-hidden.ts +19 -0
- package/src/index.ts +1 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactElement, type Ref } from 'react';
|
|
2
|
+
import '@und-ui/core/textarea.js';
|
|
3
|
+
import type { UndTextarea as UndTextareaElement } from '@und-ui/core';
|
|
4
|
+
import { type UndEvent } from './shared.js';
|
|
5
|
+
export interface UndTextareaProps extends Omit<HTMLAttributes<UndTextareaElement>, 'value' | 'defaultValue' | 'rows' | 'autoResize' | 'resize' | 'readOnly' | 'placeholder' | 'autocomplete' | 'minLength' | 'maxLength' | 'label' | 'description' | 'error' | 'required' | 'optional' | 'disabled' | 'name' | 'onInput' | 'onChange'> {
|
|
6
|
+
/** Current value. The initial value is also the default restored by a form reset, as on a native textarea. */
|
|
7
|
+
value?: UndTextareaElement['value'];
|
|
8
|
+
/** Value restored on form reset (defaults to the initial `value`). */
|
|
9
|
+
defaultValue?: UndTextareaElement['defaultValue'];
|
|
10
|
+
/** Visible rows (the minimum while auto-resizing). */
|
|
11
|
+
rows?: UndTextareaElement['rows'];
|
|
12
|
+
/** Grows the field with its content (up to `--und-textarea-max-height`). */
|
|
13
|
+
autoResize?: UndTextareaElement['autoResize'];
|
|
14
|
+
/** Which directions the user can resize the field in. */
|
|
15
|
+
resize?: UndTextareaElement['resize'];
|
|
16
|
+
/** Makes the value read-only (still focusable and submitted). */
|
|
17
|
+
readOnly?: UndTextareaElement['readOnly'];
|
|
18
|
+
/** Placeholder hint. Never a substitute for a label. */
|
|
19
|
+
placeholder?: UndTextareaElement['placeholder'];
|
|
20
|
+
/** Autofill hint, passed through (WCAG 1.3.5). */
|
|
21
|
+
autocomplete?: UndTextareaElement['autocomplete'];
|
|
22
|
+
/** Minimum length (native validation). */
|
|
23
|
+
minLength?: UndTextareaElement['minLength'];
|
|
24
|
+
/** Maximum length (native, counted in UTF-16 code units). */
|
|
25
|
+
maxLength?: UndTextareaElement['maxLength'];
|
|
26
|
+
/** Visible label text. Rich content (links) can be passed as children instead on choice controls. */
|
|
27
|
+
label?: UndTextareaElement['label'];
|
|
28
|
+
/** Help text under the label, referenced by `aria-describedby`. */
|
|
29
|
+
description?: UndTextareaElement['description'];
|
|
30
|
+
/** Error message. Setting it marks the control invalid (`aria-invalid`, `setCustomValidity`) and shows the message, prefixed with a visually hidden "Error:". Native validation messages are shown automatically after a failed submit and cleared once the value is valid. */
|
|
31
|
+
error?: UndTextareaElement['error'];
|
|
32
|
+
/** Requires a value before the form submits (native constraint validation). */
|
|
33
|
+
required?: UndTextareaElement['required'];
|
|
34
|
+
/** Shows an "(optional)" marker after the label (GOV.UK style). Ignored when `required` is set. */
|
|
35
|
+
optional?: UndTextareaElement['optional'];
|
|
36
|
+
/** Disables the control. A disabled ancestor `<fieldset>` also disables it. */
|
|
37
|
+
disabled?: UndTextareaElement['disabled'];
|
|
38
|
+
/** Name submitted with the form data. */
|
|
39
|
+
name?: UndTextareaElement['name'];
|
|
40
|
+
/** Native `input` from the inner `<textarea>`. `event.isComposing` is true during IME composition. */
|
|
41
|
+
onInput?: (event: UndEvent<InputEvent, UndTextareaElement>) => void;
|
|
42
|
+
/** Native `change`: fires when the value is committed, never in the middle of IME composition. */
|
|
43
|
+
onChange?: (event: UndEvent<Event, UndTextareaElement>) => void;
|
|
44
|
+
ref?: Ref<UndTextareaElement>;
|
|
45
|
+
}
|
|
46
|
+
/** A labelled multi-line text input that can grow with its content. */
|
|
47
|
+
export declare function UndTextarea(props: UndTextareaProps): ReactElement;
|
|
48
|
+
//# sourceMappingURL=und-textarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"und-textarea.d.ts","sourceRoot":"","sources":["../../src/generated/und-textarea.ts"],"names":[],"mappings":"AAIA,OAAO,EAAiB,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AACxF,OAAO,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,WAAW,IAAI,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EAAqB,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE/D,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC,EAAE,OAAO,GAAG,cAAc,GAAG,MAAM,GAAG,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,aAAa,GAAG,cAAc,GAAG,WAAW,GAAG,WAAW,GAAG,OAAO,GAAG,aAAa,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,UAAU,CAAC;IACpS,8GAA8G;IAC9G,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACpC,sEAAsE;IACtE,YAAY,CAAC,EAAE,kBAAkB,CAAC,cAAc,CAAC,CAAC;IAClD,sDAAsD;IACtD,IAAI,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAClC,4EAA4E;IAC5E,UAAU,CAAC,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC;IAC9C,yDAAyD;IACzD,MAAM,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;IACtC,iEAAiE;IACjE,QAAQ,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAC1C,wDAAwD;IACxD,WAAW,CAAC,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAChD,kDAAkD;IAClD,YAAY,CAAC,EAAE,kBAAkB,CAAC,cAAc,CAAC,CAAC;IAClD,0CAA0C;IAC1C,SAAS,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC5C,6DAA6D;IAC7D,SAAS,CAAC,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC5C,qGAAqG;IACrG,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACpC,mEAAmE;IACnE,WAAW,CAAC,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;IAChD,+QAA+Q;IAC/Q,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;IACpC,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAC1C,mGAAmG;IACnG,QAAQ,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAC1C,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;IAC1C,yCAAyC;IACzC,IAAI,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAClC,sGAAsG;IACtG,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC,KAAK,IAAI,CAAC;IACpE,kGAAkG;IAClG,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC,KAAK,IAAI,CAAC;IAChE,GAAG,CAAC,EAAE,GAAG,CAAC,kBAAkB,CAAC,CAAC;CAC/B;AAED,uEAAuE;AACvE,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,YAAY,CAajE"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
3
|
+
// Source: @und-ui/core custom-elements.json, via tools/codegen/wrappers.mjs.
|
|
4
|
+
// Run `pnpm codegen` (or `pnpm build`) after changing a component.
|
|
5
|
+
import { createElement } from 'react';
|
|
6
|
+
import '@und-ui/core/textarea.js';
|
|
7
|
+
import { useControlledProp } from './shared.js';
|
|
8
|
+
/** A labelled multi-line text input that can grow with its content. */
|
|
9
|
+
export function UndTextarea(props) {
|
|
10
|
+
const { onInput, onChange, ref, ...rest } = props;
|
|
11
|
+
// Controlled when `value` is set: a change the handler rejects is undone.
|
|
12
|
+
const controlled = useControlledProp('value', props.value, ref);
|
|
13
|
+
return createElement('und-textarea', {
|
|
14
|
+
...rest,
|
|
15
|
+
ref: controlled.ref,
|
|
16
|
+
'oninput': (event) => {
|
|
17
|
+
onInput?.(event);
|
|
18
|
+
controlled.settle();
|
|
19
|
+
},
|
|
20
|
+
'onchange': onChange,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=und-textarea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"und-textarea.js","sourceRoot":"","sources":["../../src/generated/und-textarea.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,+BAA+B;AAC/B,6EAA6E;AAC7E,mEAAmE;AACnE,OAAO,EAAE,aAAa,EAAoD,MAAM,OAAO,CAAC;AACxF,OAAO,0BAA0B,CAAC;AAElC,OAAO,EAAE,iBAAiB,EAAiB,MAAM,aAAa,CAAC;AA6C/D,uEAAuE;AACvE,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAClD,0EAA0E;IAC1E,MAAM,UAAU,GAAG,iBAAiB,CAA8B,OAAO,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;IAC7F,OAAO,aAAa,CAAC,cAAc,EAAE;QACnC,GAAG,IAAI;QACP,GAAG,EAAE,UAAU,CAAC,GAAG;QACnB,SAAS,EAAE,CAAC,KAA+C,EAAE,EAAE;YAC7D,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;YACjB,UAAU,CAAC,MAAM,EAAE,CAAC;QACtB,CAAC;QACD,UAAU,EAAE,QAAQ;KACrB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactElement, type Ref } from 'react';
|
|
2
|
+
import '@und-ui/core/toast.js';
|
|
3
|
+
import type { UndToast as UndToastElement } from '@und-ui/core';
|
|
4
|
+
import { type UndEvent } from './shared.js';
|
|
5
|
+
export interface UndToastProps extends Omit<HTMLAttributes<UndToastElement>, 'label' | 'tone' | 'duration' | 'priority' | 'dismissible' | 'closeLabel' | 'onUndDismiss'> {
|
|
6
|
+
/** The title. */
|
|
7
|
+
label?: UndToastElement['label'];
|
|
8
|
+
/** Color intent. */
|
|
9
|
+
tone?: UndToastElement['tone'];
|
|
10
|
+
/** Time in ms before the toast dismisses itself; `0` keeps it until closed. Defaults to 5000, or 0 when the toast has an action. */
|
|
11
|
+
duration?: UndToastElement['duration'];
|
|
12
|
+
/** `assertive` interrupts the screen reader; reserve it for errors. */
|
|
13
|
+
priority?: UndToastElement['priority'];
|
|
14
|
+
/** Shows the close button (default). Set `dismissible="false"` to hide it; Escape and swipe still work. */
|
|
15
|
+
dismissible?: UndToastElement['dismissible'];
|
|
16
|
+
/** Accessible name of the close button. */
|
|
17
|
+
closeLabel?: UndToastElement['closeLabel'];
|
|
18
|
+
/** The toast is closing (`timeout`, `close-button`, `escape`, `swipe` or `programmatic`). It is removed after its exit animation. */
|
|
19
|
+
onUndDismiss?: (event: UndEvent<CustomEvent<{
|
|
20
|
+
reason: string;
|
|
21
|
+
}>, UndToastElement>) => void;
|
|
22
|
+
ref?: Ref<UndToastElement>;
|
|
23
|
+
}
|
|
24
|
+
/** A brief notification. */
|
|
25
|
+
export declare function UndToast(props: UndToastProps): ReactElement;
|
|
26
|
+
//# sourceMappingURL=und-toast.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"und-toast.d.ts","sourceRoot":"","sources":["../../src/generated/und-toast.ts"],"names":[],"mappings":"AAIA,OAAO,EAAiB,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AACxF,OAAO,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,QAAQ,IAAI,eAAe,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,UAAU,GAAG,UAAU,GAAG,aAAa,GAAG,YAAY,GAAG,cAAc,CAAC;IACzI,iBAAiB;IACjB,KAAK,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IACjC,oBAAoB;IACpB,IAAI,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAC/B,oIAAoI;IACpI,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IACvC,uEAAuE;IACvE,QAAQ,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IACvC,2GAA2G;IAC3G,WAAW,CAAC,EAAE,eAAe,CAAC,aAAa,CAAC,CAAC;IAC7C,2CAA2C;IAC3C,UAAU,CAAC,EAAE,eAAe,CAAC,YAAY,CAAC,CAAC;IAC3C,qIAAqI;IACrI,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,WAAW,CAAC;QAAE,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,eAAe,CAAC,KAAK,IAAI,CAAC;IAC3F,GAAG,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC;CAC5B;AAED,4BAA4B;AAC5B,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,YAAY,CAM3D"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
3
|
+
// Source: @und-ui/core custom-elements.json, via tools/codegen/wrappers.mjs.
|
|
4
|
+
// Run `pnpm codegen` (or `pnpm build`) after changing a component.
|
|
5
|
+
import { createElement } from 'react';
|
|
6
|
+
import '@und-ui/core/toast.js';
|
|
7
|
+
import {} from './shared.js';
|
|
8
|
+
/** A brief notification. */
|
|
9
|
+
export function UndToast(props) {
|
|
10
|
+
const { onUndDismiss, ...rest } = props;
|
|
11
|
+
return createElement('und-toast', {
|
|
12
|
+
...rest,
|
|
13
|
+
'onund-dismiss': onUndDismiss,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=und-toast.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"und-toast.js","sourceRoot":"","sources":["../../src/generated/und-toast.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,+BAA+B;AAC/B,6EAA6E;AAC7E,mEAAmE;AACnE,OAAO,EAAE,aAAa,EAAoD,MAAM,OAAO,CAAC;AACxF,OAAO,uBAAuB,CAAC;AAE/B,OAAO,EAAiB,MAAM,aAAa,CAAC;AAqB5C,4BAA4B;AAC5B,MAAM,UAAU,QAAQ,CAAC,KAAoB;IAC3C,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IACxC,OAAO,aAAa,CAAC,WAAW,EAAE;QAChC,GAAG,IAAI;QACP,eAAe,EAAE,YAAY;KAC9B,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactElement, type Ref } from 'react';
|
|
2
|
+
import '@und-ui/core/toaster.js';
|
|
3
|
+
import type { UndToaster as UndToasterElement } from '@und-ui/core';
|
|
4
|
+
export interface UndToasterProps extends Omit<HTMLAttributes<UndToasterElement>, 'placement' | 'label' | 'hotkey'> {
|
|
5
|
+
/** Corner or edge of the viewport where toasts appear. */
|
|
6
|
+
placement?: UndToasterElement['placement'];
|
|
7
|
+
/** Accessible name of the region. */
|
|
8
|
+
label?: UndToasterElement['label'];
|
|
9
|
+
/** Key (with optional `Alt+`, `Ctrl+`, `Shift+`, `Meta+`) that moves focus to the newest toast. Set it to an empty string to turn it off. */
|
|
10
|
+
hotkey?: UndToasterElement['hotkey'];
|
|
11
|
+
ref?: Ref<UndToasterElement>;
|
|
12
|
+
}
|
|
13
|
+
/** The region that shows toast notifications. */
|
|
14
|
+
export declare function UndToaster(props: UndToasterProps): ReactElement;
|
|
15
|
+
//# sourceMappingURL=und-toaster.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"und-toaster.d.ts","sourceRoot":"","sources":["../../src/generated/und-toaster.ts"],"names":[],"mappings":"AAIA,OAAO,EAAiB,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AACxF,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEpE,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,WAAW,GAAG,OAAO,GAAG,QAAQ,CAAC;IACjF,0DAA0D;IAC1D,SAAS,CAAC,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAC3C,qCAAqC;IACrC,KAAK,CAAC,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACnC,6IAA6I;IAC7I,MAAM,CAAC,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACrC,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;CAC9B;AAED,iDAAiD;AACjD,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CAE/D"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
3
|
+
// Source: @und-ui/core custom-elements.json, via tools/codegen/wrappers.mjs.
|
|
4
|
+
// Run `pnpm codegen` (or `pnpm build`) after changing a component.
|
|
5
|
+
import { createElement } from 'react';
|
|
6
|
+
import '@und-ui/core/toaster.js';
|
|
7
|
+
/** The region that shows toast notifications. */
|
|
8
|
+
export function UndToaster(props) {
|
|
9
|
+
return createElement('und-toaster', props);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=und-toaster.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"und-toaster.js","sourceRoot":"","sources":["../../src/generated/und-toaster.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,+BAA+B;AAC/B,6EAA6E;AAC7E,mEAAmE;AACnE,OAAO,EAAE,aAAa,EAAoD,MAAM,OAAO,CAAC;AACxF,OAAO,yBAAyB,CAAC;AAcjC,iDAAiD;AACjD,MAAM,UAAU,UAAU,CAAC,KAAsB;IAC/C,OAAO,aAAa,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactElement, type Ref } from 'react';
|
|
2
|
+
import '@und-ui/core/tooltip.js';
|
|
3
|
+
import type { UndTooltip as UndTooltipElement } from '@und-ui/core';
|
|
4
|
+
import { type UndEvent } from './shared.js';
|
|
5
|
+
export interface UndTooltipProps extends Omit<HTMLAttributes<UndTooltipElement>, 'open' | 'htmlFor' | 'placement' | 'offset' | 'openDelay' | 'closeDelay' | 'disabled' | 'onUndOpenChange'> {
|
|
6
|
+
/** Whether the tooltip is visible. Set it to show or hide the tooltip from code. */
|
|
7
|
+
open?: UndTooltipElement['open'];
|
|
8
|
+
/** Id of the trigger element, in the same tree as the tooltip. Defaults to the previous sibling element. */
|
|
9
|
+
htmlFor?: UndTooltipElement['htmlFor'];
|
|
10
|
+
/** Preferred side; flips when there is not enough room. */
|
|
11
|
+
placement?: UndTooltipElement['placement'];
|
|
12
|
+
/** Gap between the trigger and the tooltip, in pixels. */
|
|
13
|
+
offset?: UndTooltipElement['offset'];
|
|
14
|
+
/** Hover delay before showing, in ms. Keyboard focus shows it immediately. */
|
|
15
|
+
openDelay?: UndTooltipElement['openDelay'];
|
|
16
|
+
/** Delay before hiding after the pointer leaves, in ms, so the pointer can reach the tooltip. */
|
|
17
|
+
closeDelay?: UndTooltipElement['closeDelay'];
|
|
18
|
+
/** Stops the tooltip from showing. */
|
|
19
|
+
disabled?: UndTooltipElement['disabled'];
|
|
20
|
+
/** The tooltip was shown or hidden. */
|
|
21
|
+
onUndOpenChange?: (event: UndEvent<CustomEvent<{
|
|
22
|
+
open: boolean;
|
|
23
|
+
reason: string;
|
|
24
|
+
}>, UndTooltipElement>) => void;
|
|
25
|
+
ref?: Ref<UndTooltipElement>;
|
|
26
|
+
}
|
|
27
|
+
/** A text hint shown on hover and keyboard focus. */
|
|
28
|
+
export declare function UndTooltip(props: UndTooltipProps): ReactElement;
|
|
29
|
+
//# sourceMappingURL=und-tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"und-tooltip.d.ts","sourceRoot":"","sources":["../../src/generated/und-tooltip.ts"],"names":[],"mappings":"AAIA,OAAO,EAAiB,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AACxF,OAAO,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,IAAI,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,WAAW,eACf,SAAQ,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,GAAG,YAAY,GAAG,UAAU,GAAG,iBAAiB,CAAC;IAC1J,oFAAoF;IACpF,IAAI,CAAC,EAAE,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACjC,4GAA4G;IAC5G,OAAO,CAAC,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC;IACvC,2DAA2D;IAC3D,SAAS,CAAC,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAC3C,0DAA0D;IAC1D,MAAM,CAAC,EAAE,iBAAiB,CAAC,QAAQ,CAAC,CAAC;IACrC,8EAA8E;IAC9E,SAAS,CAAC,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAC3C,iGAAiG;IACjG,UAAU,CAAC,EAAE,iBAAiB,CAAC,YAAY,CAAC,CAAC;IAC7C,sCAAsC;IACtC,QAAQ,CAAC,EAAE,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACzC,uCAAuC;IACvC,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,WAAW,CAAC;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,EAAE,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC/G,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;CAC9B;AAED,qDAAqD;AACrD,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,CAM/D"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
3
|
+
// Source: @und-ui/core custom-elements.json, via tools/codegen/wrappers.mjs.
|
|
4
|
+
// Run `pnpm codegen` (or `pnpm build`) after changing a component.
|
|
5
|
+
import { createElement } from 'react';
|
|
6
|
+
import '@und-ui/core/tooltip.js';
|
|
7
|
+
import {} from './shared.js';
|
|
8
|
+
/** A text hint shown on hover and keyboard focus. */
|
|
9
|
+
export function UndTooltip(props) {
|
|
10
|
+
const { onUndOpenChange, ...rest } = props;
|
|
11
|
+
return createElement('und-tooltip', {
|
|
12
|
+
...rest,
|
|
13
|
+
'onund-open-change': onUndOpenChange,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=und-tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"und-tooltip.js","sourceRoot":"","sources":["../../src/generated/und-tooltip.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,+BAA+B;AAC/B,6EAA6E;AAC7E,mEAAmE;AACnE,OAAO,EAAE,aAAa,EAAoD,MAAM,OAAO,CAAC;AACxF,OAAO,yBAAyB,CAAC;AAEjC,OAAO,EAAiB,MAAM,aAAa,CAAC;AAuB5C,qDAAqD;AACrD,MAAM,UAAU,UAAU,CAAC,KAAsB;IAC/C,MAAM,EAAE,eAAe,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAC3C,OAAO,aAAa,CAAC,aAAa,EAAE;QAClC,GAAG,IAAI;QACP,mBAAmB,EAAE,eAAe;KACrC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactElement, type Ref } from 'react';
|
|
2
|
+
import '@und-ui/core/visually-hidden.js';
|
|
3
|
+
import type { UndVisuallyHidden as UndVisuallyHiddenElement } from '@und-ui/core';
|
|
4
|
+
export interface UndVisuallyHiddenProps extends Omit<HTMLAttributes<UndVisuallyHiddenElement>, 'focusable'> {
|
|
5
|
+
/** Show the content while something inside it has focus (skip links). */
|
|
6
|
+
focusable?: UndVisuallyHiddenElement['focusable'];
|
|
7
|
+
ref?: Ref<UndVisuallyHiddenElement>;
|
|
8
|
+
}
|
|
9
|
+
/** Screen-reader-only content. */
|
|
10
|
+
export declare function UndVisuallyHidden(props: UndVisuallyHiddenProps): ReactElement;
|
|
11
|
+
//# sourceMappingURL=und-visually-hidden.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"und-visually-hidden.d.ts","sourceRoot":"","sources":["../../src/generated/und-visually-hidden.ts"],"names":[],"mappings":"AAIA,OAAO,EAAiB,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AACxF,OAAO,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,IAAI,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAElF,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,cAAc,CAAC,wBAAwB,CAAC,EAAE,WAAW,CAAC;IACnE,yEAAyE;IACzE,SAAS,CAAC,EAAE,wBAAwB,CAAC,WAAW,CAAC,CAAC;IAClD,GAAG,CAAC,EAAE,GAAG,CAAC,wBAAwB,CAAC,CAAC;CACrC;AAED,kCAAkC;AAClC,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,YAAY,CAE7E"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
3
|
+
// Source: @und-ui/core custom-elements.json, via tools/codegen/wrappers.mjs.
|
|
4
|
+
// Run `pnpm codegen` (or `pnpm build`) after changing a component.
|
|
5
|
+
import { createElement } from 'react';
|
|
6
|
+
import '@und-ui/core/visually-hidden.js';
|
|
7
|
+
/** Screen-reader-only content. */
|
|
8
|
+
export function UndVisuallyHidden(props) {
|
|
9
|
+
return createElement('und-visually-hidden', props);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=und-visually-hidden.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"und-visually-hidden.js","sourceRoot":"","sources":["../../src/generated/und-visually-hidden.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AACb,+BAA+B;AAC/B,6EAA6E;AAC7E,mEAAmE;AACnE,OAAO,EAAE,aAAa,EAAoD,MAAM,OAAO,CAAC;AACxF,OAAO,iCAAiC,CAAC;AAUzC,kCAAkC;AAClC,MAAM,UAAU,iBAAiB,CAAC,KAA6B;IAC7D,OAAO,aAAa,CAAC,qBAAqB,EAAE,KAAK,CAAC,CAAC;AACrD,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,64 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@und-ui/react",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Generated React 19 wrappers for UND UI web components (typed props and events, 'use client').",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"react",
|
|
8
|
+
"web-components",
|
|
9
|
+
"design-system",
|
|
10
|
+
"ui",
|
|
11
|
+
"und-ui"
|
|
12
|
+
],
|
|
13
|
+
"homepage": "https://github.com/mayank-urnextdoor/und-ui/tree/main/packages/react#readme",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/mayank-urnextdoor/und-ui/issues"
|
|
16
|
+
},
|
|
17
|
+
"type": "module",
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/mayank-urnextdoor/und-ui.git",
|
|
21
|
+
"directory": "packages/react"
|
|
22
|
+
},
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"default": "./dist/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./package.json": "./package.json"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist",
|
|
33
|
+
"src",
|
|
34
|
+
"README.md",
|
|
35
|
+
"LICENSE"
|
|
36
|
+
],
|
|
37
|
+
"sideEffects": false,
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@und-ui/core": "0.1.0"
|
|
40
|
+
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"react": "^19.0.0"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/react": "^19.3.3",
|
|
46
|
+
"@types/react-dom": "^19.3.0",
|
|
47
|
+
"@und-ui/test-utils": "0.0.0",
|
|
48
|
+
"@vitest/browser-playwright": "^4.1.12",
|
|
49
|
+
"playwright": "^1.65.1",
|
|
50
|
+
"react": "^19.3.1",
|
|
51
|
+
"react-dom": "^19.3.1",
|
|
52
|
+
"vitest": "^4.1.12"
|
|
53
|
+
},
|
|
54
|
+
"publishConfig": {
|
|
55
|
+
"access": "public",
|
|
56
|
+
"provenance": true
|
|
57
|
+
},
|
|
58
|
+
"scripts": {
|
|
59
|
+
"build": "node ../../tools/codegen/wrappers.mjs --target react && tsc -p tsconfig.build.json",
|
|
60
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
61
|
+
"test": "vitest run",
|
|
62
|
+
"test:chromium": "vitest run"
|
|
63
|
+
}
|
|
6
64
|
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
2
|
+
// Source: @und-ui/core custom-elements.json, via tools/codegen/wrappers.mjs.
|
|
3
|
+
// Run `pnpm codegen` (or `pnpm build`) after changing a component.
|
|
4
|
+
export * from './und-accordion.js';
|
|
5
|
+
export * from './und-alert.js';
|
|
6
|
+
export * from './und-avatar.js';
|
|
7
|
+
export * from './und-avatar-group.js';
|
|
8
|
+
export * from './und-badge.js';
|
|
9
|
+
export * from './und-breadcrumb.js';
|
|
10
|
+
export * from './und-breadcrumb-item.js';
|
|
11
|
+
export * from './und-button.js';
|
|
12
|
+
export * from './und-card.js';
|
|
13
|
+
export * from './und-checkbox.js';
|
|
14
|
+
export * from './und-combobox.js';
|
|
15
|
+
export * from './und-dialog.js';
|
|
16
|
+
export * from './und-divider.js';
|
|
17
|
+
export * from './und-drawer.js';
|
|
18
|
+
export * from './und-form-field.js';
|
|
19
|
+
export * from './und-icon-button.js';
|
|
20
|
+
export * from './und-link.js';
|
|
21
|
+
export * from './und-menu.js';
|
|
22
|
+
export * from './und-menu-group.js';
|
|
23
|
+
export * from './und-menu-item.js';
|
|
24
|
+
export * from './und-menu-separator.js';
|
|
25
|
+
export * from './und-pagination.js';
|
|
26
|
+
export * from './und-popover.js';
|
|
27
|
+
export * from './und-progress.js';
|
|
28
|
+
export * from './und-radio.js';
|
|
29
|
+
export * from './und-radio-group.js';
|
|
30
|
+
export * from './und-select.js';
|
|
31
|
+
export * from './und-skeleton.js';
|
|
32
|
+
export * from './und-slider.js';
|
|
33
|
+
export * from './und-spinner.js';
|
|
34
|
+
export * from './und-switch.js';
|
|
35
|
+
export * from './und-tab.js';
|
|
36
|
+
export * from './und-tab-panel.js';
|
|
37
|
+
export * from './und-table.js';
|
|
38
|
+
export * from './und-tabs.js';
|
|
39
|
+
export * from './und-text-field.js';
|
|
40
|
+
export * from './und-textarea.js';
|
|
41
|
+
export * from './und-toast.js';
|
|
42
|
+
export * from './und-toaster.js';
|
|
43
|
+
export * from './und-tooltip.js';
|
|
44
|
+
export * from './und-visually-hidden.js';
|
|
45
|
+
export type { UndEvent } from './shared.js';
|
|
46
|
+
export type { UndIntrinsicElements } from './jsx.js';
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
// GENERATED FILE. DO NOT EDIT.
|
|
2
|
+
// Source: @und-ui/core custom-elements.json, via tools/codegen/wrappers.mjs.
|
|
3
|
+
// Run `pnpm codegen` (or `pnpm build`) after changing a component.
|
|
4
|
+
// Types for the raw `<und-*>` tags in TSX. The wrappers are still preferred:
|
|
5
|
+
// they map `onUndOpenChange` to `und-open-change` and support controlled props.
|
|
6
|
+
import type { HTMLAttributes } from 'react';
|
|
7
|
+
import type { UndAccordion as UndAccordionElement, UndAlert as UndAlertElement, UndAvatar as UndAvatarElement, UndAvatarGroup as UndAvatarGroupElement, UndBadge as UndBadgeElement, UndBreadcrumb as UndBreadcrumbElement, UndBreadcrumbItem as UndBreadcrumbItemElement, UndButton as UndButtonElement, UndCard as UndCardElement, UndCheckbox as UndCheckboxElement, UndCombobox as UndComboboxElement, UndDialog as UndDialogElement, UndDivider as UndDividerElement, UndDrawer as UndDrawerElement, UndFormField as UndFormFieldElement, UndIconButton as UndIconButtonElement, UndLink as UndLinkElement, UndMenu as UndMenuElement, UndMenuGroup as UndMenuGroupElement, UndMenuItem as UndMenuItemElement, UndMenuSeparator as UndMenuSeparatorElement, UndPagination as UndPaginationElement, UndPopover as UndPopoverElement, UndProgress as UndProgressElement, UndRadio as UndRadioElement, UndRadioGroup as UndRadioGroupElement, UndSelect as UndSelectElement, UndSkeleton as UndSkeletonElement, UndSlider as UndSliderElement, UndSpinner as UndSpinnerElement, UndSwitch as UndSwitchElement, UndTab as UndTabElement, UndTabPanel as UndTabPanelElement, UndTable as UndTableElement, UndTabs as UndTabsElement, UndTextField as UndTextFieldElement, UndTextarea as UndTextareaElement, UndToast as UndToastElement, UndToaster as UndToasterElement, UndTooltip as UndTooltipElement, UndVisuallyHidden as UndVisuallyHiddenElement } from '@und-ui/core';
|
|
8
|
+
import type { UndEvent } from './shared.js';
|
|
9
|
+
import type { UndAccordionProps } from './und-accordion.js';
|
|
10
|
+
import type { UndAlertProps } from './und-alert.js';
|
|
11
|
+
import type { UndAvatarProps } from './und-avatar.js';
|
|
12
|
+
import type { UndAvatarGroupProps } from './und-avatar-group.js';
|
|
13
|
+
import type { UndBadgeProps } from './und-badge.js';
|
|
14
|
+
import type { UndBreadcrumbProps } from './und-breadcrumb.js';
|
|
15
|
+
import type { UndBreadcrumbItemProps } from './und-breadcrumb-item.js';
|
|
16
|
+
import type { UndButtonProps } from './und-button.js';
|
|
17
|
+
import type { UndCardProps } from './und-card.js';
|
|
18
|
+
import type { UndCheckboxProps } from './und-checkbox.js';
|
|
19
|
+
import type { UndComboboxProps } from './und-combobox.js';
|
|
20
|
+
import type { UndDialogProps } from './und-dialog.js';
|
|
21
|
+
import type { UndDividerProps } from './und-divider.js';
|
|
22
|
+
import type { UndDrawerProps } from './und-drawer.js';
|
|
23
|
+
import type { UndFormFieldProps } from './und-form-field.js';
|
|
24
|
+
import type { UndIconButtonProps } from './und-icon-button.js';
|
|
25
|
+
import type { UndLinkProps } from './und-link.js';
|
|
26
|
+
import type { UndMenuProps } from './und-menu.js';
|
|
27
|
+
import type { UndMenuGroupProps } from './und-menu-group.js';
|
|
28
|
+
import type { UndMenuItemProps } from './und-menu-item.js';
|
|
29
|
+
import type { UndMenuSeparatorProps } from './und-menu-separator.js';
|
|
30
|
+
import type { UndPaginationProps } from './und-pagination.js';
|
|
31
|
+
import type { UndPopoverProps } from './und-popover.js';
|
|
32
|
+
import type { UndProgressProps } from './und-progress.js';
|
|
33
|
+
import type { UndRadioProps } from './und-radio.js';
|
|
34
|
+
import type { UndRadioGroupProps } from './und-radio-group.js';
|
|
35
|
+
import type { UndSelectProps } from './und-select.js';
|
|
36
|
+
import type { UndSkeletonProps } from './und-skeleton.js';
|
|
37
|
+
import type { UndSliderProps } from './und-slider.js';
|
|
38
|
+
import type { UndSpinnerProps } from './und-spinner.js';
|
|
39
|
+
import type { UndSwitchProps } from './und-switch.js';
|
|
40
|
+
import type { UndTabProps } from './und-tab.js';
|
|
41
|
+
import type { UndTabPanelProps } from './und-tab-panel.js';
|
|
42
|
+
import type { UndTableProps } from './und-table.js';
|
|
43
|
+
import type { UndTabsProps } from './und-tabs.js';
|
|
44
|
+
import type { UndTextFieldProps } from './und-text-field.js';
|
|
45
|
+
import type { UndTextareaProps } from './und-textarea.js';
|
|
46
|
+
import type { UndToastProps } from './und-toast.js';
|
|
47
|
+
import type { UndToasterProps } from './und-toaster.js';
|
|
48
|
+
import type { UndTooltipProps } from './und-tooltip.js';
|
|
49
|
+
import type { UndVisuallyHiddenProps } from './und-visually-hidden.js';
|
|
50
|
+
|
|
51
|
+
/** Props of every raw `<und-*>` tag, merged into `React.JSX.IntrinsicElements`. */
|
|
52
|
+
export interface UndIntrinsicElements {
|
|
53
|
+
'und-accordion': UndAccordionProps;
|
|
54
|
+
'und-alert': Omit<UndAlertProps, 'onUndDismiss'> & {
|
|
55
|
+
/** Before the alert hides after the dismiss button is pressed. Cancelable: call `preventDefault()` to keep it visible. */
|
|
56
|
+
'onund-dismiss'?: (event: UndEvent<CustomEvent<unknown>, UndAlertElement>) => void;
|
|
57
|
+
};
|
|
58
|
+
'und-avatar': UndAvatarProps;
|
|
59
|
+
'und-avatar-group': UndAvatarGroupProps;
|
|
60
|
+
'und-badge': UndBadgeProps;
|
|
61
|
+
'und-breadcrumb': UndBreadcrumbProps;
|
|
62
|
+
'und-breadcrumb-item': UndBreadcrumbItemProps;
|
|
63
|
+
'und-button': Omit<UndButtonProps, 'onUndPressedChange'> & {
|
|
64
|
+
/** A toggle button is about to change its pressed state. Cancelable: `preventDefault()` keeps the current state (controlled mode). */
|
|
65
|
+
'onund-pressed-change'?: (event: UndEvent<CustomEvent<{ pressed: boolean }>, UndButtonElement>) => void;
|
|
66
|
+
};
|
|
67
|
+
'und-card': UndCardProps;
|
|
68
|
+
'und-checkbox': Omit<UndCheckboxProps, 'onInput' | 'onChange'> &
|
|
69
|
+
Pick<HTMLAttributes<UndCheckboxElement>, 'onInput' | 'onChange'>;
|
|
70
|
+
'und-combobox': Omit<UndComboboxProps, 'onChange' | 'onInput' | 'onUndSearch' | 'onUndOpenChange'> &
|
|
71
|
+
Pick<HTMLAttributes<UndComboboxElement>, 'onChange' | 'onInput'> & {
|
|
72
|
+
/** The user typed; use it to load options asynchronously. */
|
|
73
|
+
'onund-search'?: (event: UndEvent<CustomEvent<unknown>, UndComboboxElement>) => void;
|
|
74
|
+
/** The listbox opened or closed. */
|
|
75
|
+
'onund-open-change'?: (event: UndEvent<CustomEvent<unknown>, UndComboboxElement>) => void;
|
|
76
|
+
};
|
|
77
|
+
'und-dialog': Omit<UndDialogProps, 'onUndOpenChange' | 'onUndAfterOpen' | 'onUndAfterClose'> & {
|
|
78
|
+
/** The user asked to open or close the dialog (Escape, backdrop, close button, invoker command, `method="dialog"` form). Cancelable: call `preventDefault()` to keep the current state. */
|
|
79
|
+
'onund-open-change'?: (event: UndEvent<CustomEvent<{ open: boolean; reason: string }>, UndDialogElement>) => void;
|
|
80
|
+
/** The dialog opened and its entry animation finished. */
|
|
81
|
+
'onund-after-open'?: (event: UndEvent<CustomEvent<undefined>, UndDialogElement>) => void;
|
|
82
|
+
/** The dialog closed and its exit animation finished. */
|
|
83
|
+
'onund-after-close'?: (event: UndEvent<CustomEvent<undefined>, UndDialogElement>) => void;
|
|
84
|
+
};
|
|
85
|
+
'und-divider': UndDividerProps;
|
|
86
|
+
'und-drawer': Omit<UndDrawerProps, 'onUndOpenChange' | 'onUndAfterOpen' | 'onUndAfterClose'> & {
|
|
87
|
+
/** The user asked to open or close the drawer. Cancelable. */
|
|
88
|
+
'onund-open-change'?: (event: UndEvent<CustomEvent<{ open: boolean; reason: string }>, UndDrawerElement>) => void;
|
|
89
|
+
/** The drawer opened and its entry animation finished. */
|
|
90
|
+
'onund-after-open'?: (event: UndEvent<CustomEvent<undefined>, UndDrawerElement>) => void;
|
|
91
|
+
/** The drawer closed and its exit animation finished. */
|
|
92
|
+
'onund-after-close'?: (event: UndEvent<CustomEvent<undefined>, UndDrawerElement>) => void;
|
|
93
|
+
};
|
|
94
|
+
'und-form-field': UndFormFieldProps;
|
|
95
|
+
'und-icon-button': Omit<UndIconButtonProps, 'onUndPressedChange'> & {
|
|
96
|
+
/** A toggle button is about to change its pressed state. Cancelable. */
|
|
97
|
+
'onund-pressed-change'?: (event: UndEvent<CustomEvent<{ pressed: boolean }>, UndIconButtonElement>) => void;
|
|
98
|
+
};
|
|
99
|
+
'und-link': UndLinkProps;
|
|
100
|
+
'und-menu': Omit<UndMenuProps, 'onUndOpenChange' | 'onUndSelect'> & {
|
|
101
|
+
/** The menu opened or closed. */
|
|
102
|
+
'onund-open-change'?: (event: UndEvent<CustomEvent<{ open: boolean }>, UndMenuElement>) => void;
|
|
103
|
+
/** An item was chosen (dispatched on the item, bubbles). Cancelable: `preventDefault()` keeps the menu open. */
|
|
104
|
+
'onund-select'?: (event: UndEvent<CustomEvent<{ value: string; checked: boolean }>, UndMenuElement>) => void;
|
|
105
|
+
};
|
|
106
|
+
'und-menu-group': UndMenuGroupProps;
|
|
107
|
+
'und-menu-item': UndMenuItemProps;
|
|
108
|
+
'und-menu-separator': UndMenuSeparatorProps;
|
|
109
|
+
'und-pagination': Omit<UndPaginationProps, 'onUndPageChange'> & {
|
|
110
|
+
/** Before the page changes. Cancelable: call `preventDefault()` to handle navigation yourself. */
|
|
111
|
+
'onund-page-change'?: (event: UndEvent<CustomEvent<unknown>, UndPaginationElement>) => void;
|
|
112
|
+
};
|
|
113
|
+
'und-popover': Omit<UndPopoverProps, 'onUndOpenChange' | 'onUndAfterOpen' | 'onUndAfterClose'> & {
|
|
114
|
+
/** The popover is about to open or close. Cancelable only when opening. */
|
|
115
|
+
'onund-open-change'?: (event: UndEvent<CustomEvent<{ open: boolean; reason: string }>, UndPopoverElement>) => void;
|
|
116
|
+
/** The popover opened and its entry animation finished. */
|
|
117
|
+
'onund-after-open'?: (event: UndEvent<CustomEvent<undefined>, UndPopoverElement>) => void;
|
|
118
|
+
/** The popover closed and its exit animation finished. */
|
|
119
|
+
'onund-after-close'?: (event: UndEvent<CustomEvent<undefined>, UndPopoverElement>) => void;
|
|
120
|
+
};
|
|
121
|
+
'und-progress': UndProgressProps;
|
|
122
|
+
'und-radio': UndRadioProps;
|
|
123
|
+
'und-radio-group': Omit<UndRadioGroupProps, 'onInput' | 'onChange'> &
|
|
124
|
+
Pick<HTMLAttributes<UndRadioGroupElement>, 'onInput' | 'onChange'>;
|
|
125
|
+
'und-select': Omit<UndSelectProps, 'onInput' | 'onChange' | 'onUndOpenChange'> &
|
|
126
|
+
Pick<HTMLAttributes<UndSelectElement>, 'onInput' | 'onChange'> & {
|
|
127
|
+
/** The custom listbox opened or closed. */
|
|
128
|
+
'onund-open-change'?: (event: UndEvent<CustomEvent<unknown>, UndSelectElement>) => void;
|
|
129
|
+
};
|
|
130
|
+
'und-skeleton': UndSkeletonProps;
|
|
131
|
+
'und-slider': Omit<UndSliderProps, 'onInput' | 'onChange'> &
|
|
132
|
+
Pick<HTMLAttributes<UndSliderElement>, 'onInput' | 'onChange'>;
|
|
133
|
+
'und-spinner': UndSpinnerProps;
|
|
134
|
+
'und-switch': Omit<UndSwitchProps, 'onInput' | 'onChange'> &
|
|
135
|
+
Pick<HTMLAttributes<UndSwitchElement>, 'onInput' | 'onChange'>;
|
|
136
|
+
'und-tab': UndTabProps;
|
|
137
|
+
'und-tab-panel': UndTabPanelProps;
|
|
138
|
+
'und-table': Omit<UndTableProps, 'onUndSort'> & {
|
|
139
|
+
/** A sortable header was activated. Cancel it to sort the data yourself; `aria-sort` and the announcement still update. */
|
|
140
|
+
'onund-sort'?: (event: UndEvent<CustomEvent<unknown>, UndTableElement>) => void;
|
|
141
|
+
};
|
|
142
|
+
'und-tabs': Omit<UndTabsProps, 'onUndChange'> & {
|
|
143
|
+
/** The user selected another tab. */
|
|
144
|
+
'onund-change'?: (event: UndEvent<CustomEvent<unknown>, UndTabsElement>) => void;
|
|
145
|
+
};
|
|
146
|
+
'und-text-field': Omit<UndTextFieldProps, 'onInput' | 'onChange'> &
|
|
147
|
+
Pick<HTMLAttributes<UndTextFieldElement>, 'onInput' | 'onChange'>;
|
|
148
|
+
'und-textarea': Omit<UndTextareaProps, 'onInput' | 'onChange'> &
|
|
149
|
+
Pick<HTMLAttributes<UndTextareaElement>, 'onInput' | 'onChange'>;
|
|
150
|
+
'und-toast': Omit<UndToastProps, 'onUndDismiss'> & {
|
|
151
|
+
/** The toast is closing (`timeout`, `close-button`, `escape`, `swipe` or `programmatic`). It is removed after its exit animation. */
|
|
152
|
+
'onund-dismiss'?: (event: UndEvent<CustomEvent<{ reason: string }>, UndToastElement>) => void;
|
|
153
|
+
};
|
|
154
|
+
'und-toaster': UndToasterProps;
|
|
155
|
+
'und-tooltip': Omit<UndTooltipProps, 'onUndOpenChange'> & {
|
|
156
|
+
/** The tooltip was shown or hidden. */
|
|
157
|
+
'onund-open-change'?: (event: UndEvent<CustomEvent<{ open: boolean; reason: string }>, UndTooltipElement>) => void;
|
|
158
|
+
};
|
|
159
|
+
'und-visually-hidden': UndVisuallyHiddenProps;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
declare module 'react' {
|
|
163
|
+
namespace JSX {
|
|
164
|
+
interface IntrinsicElements extends UndIntrinsicElements {}
|
|
165
|
+
}
|
|
166
|
+
}
|