@chiralkit/design-system 0.1.0-alpha.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 +11 -0
- package/dist/chiralkit-ds/chiralkit-ds.css +1 -0
- package/dist/chiralkit-ds/chiralkit-ds.esm.js +1 -0
- package/dist/chiralkit-ds/index.esm.js +1 -0
- package/dist/chiralkit-ds/p-038fa008.entry.js +1 -0
- package/dist/chiralkit-ds/p-2fdc1012.entry.js +1 -0
- package/dist/chiralkit-ds/p-306ec33b.entry.js +1 -0
- package/dist/chiralkit-ds/p-3f704698.entry.js +1 -0
- package/dist/chiralkit-ds/p-41081d22.entry.js +1 -0
- package/dist/chiralkit-ds/p-7d7e5aac.entry.js +1 -0
- package/dist/chiralkit-ds/p-84b801f8.entry.js +1 -0
- package/dist/chiralkit-ds/p-a28c71b4.entry.js +1 -0
- package/dist/chiralkit-ds/p-be84312f.entry.js +1 -0
- package/dist/chiralkit-ds/p-c8015fe6.entry.js +1 -0
- package/dist/chiralkit-ds/p-d36a6bea.entry.js +1 -0
- package/dist/chiralkit-ds/p-e-glNjK6.js +2 -0
- package/dist/chiralkit-ds/p-f0f9ff61.entry.js +1 -0
- package/dist/cjs/chiralkit-ds.cjs.js +24 -0
- package/dist/cjs/ds-badge.cjs.entry.js +18 -0
- package/dist/cjs/ds-button.cjs.entry.js +26 -0
- package/dist/cjs/ds-card.cjs.entry.js +17 -0
- package/dist/cjs/ds-checkbox.cjs.entry.js +67 -0
- package/dist/cjs/ds-code-block.cjs.entry.js +39 -0
- package/dist/cjs/ds-dialog.cjs.entry.js +67 -0
- package/dist/cjs/ds-input.cjs.entry.js +50 -0
- package/dist/cjs/ds-loader.cjs.entry.js +26 -0
- package/dist/cjs/ds-select.cjs.entry.js +85 -0
- package/dist/cjs/ds-tabs.cjs.entry.js +138 -0
- package/dist/cjs/ds-textarea.cjs.entry.js +50 -0
- package/dist/cjs/ds-tooltip.cjs.entry.js +233 -0
- package/dist/cjs/index-mMvyq7U_.js +2018 -0
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/loader.cjs.js +12 -0
- package/dist/collection/collection-manifest.json +24 -0
- package/dist/collection/components/ds-badge/ds-badge.css +36 -0
- package/dist/collection/components/ds-badge/ds-badge.js +93 -0
- package/dist/collection/components/ds-button/ds-button.css +66 -0
- package/dist/collection/components/ds-button/ds-button.js +197 -0
- package/dist/collection/components/ds-card/ds-card.css +12 -0
- package/dist/collection/components/ds-card/ds-card.js +68 -0
- package/dist/collection/components/ds-checkbox/ds-checkbox.css +22 -0
- package/dist/collection/components/ds-checkbox/ds-checkbox.js +339 -0
- package/dist/collection/components/ds-code-block/ds-code-block.css +65 -0
- package/dist/collection/components/ds-code-block/ds-code-block.js +162 -0
- package/dist/collection/components/ds-dialog/ds-dialog.css +30 -0
- package/dist/collection/components/ds-dialog/ds-dialog.js +313 -0
- package/dist/collection/components/ds-input/ds-input.css +38 -0
- package/dist/collection/components/ds-input/ds-input.js +353 -0
- package/dist/collection/components/ds-loader/ds-loader.css +94 -0
- package/dist/collection/components/ds-loader/ds-loader.js +149 -0
- package/dist/collection/components/ds-select/ds-select.css +69 -0
- package/dist/collection/components/ds-select/ds-select.js +235 -0
- package/dist/collection/components/ds-tabs/ds-tabs.css +59 -0
- package/dist/collection/components/ds-tabs/ds-tabs.js +248 -0
- package/dist/collection/components/ds-textarea/ds-textarea.css +41 -0
- package/dist/collection/components/ds-textarea/ds-textarea.js +342 -0
- package/dist/collection/components/ds-tooltip/ds-tooltip.css +31 -0
- package/dist/collection/components/ds-tooltip/ds-tooltip.js +318 -0
- package/dist/collection/components.js +2 -0
- package/dist/collection/index.js +1 -0
- package/dist/components/ds-badge.d.ts +11 -0
- package/dist/components/ds-badge.js +1 -0
- package/dist/components/ds-button.d.ts +11 -0
- package/dist/components/ds-button.js +1 -0
- package/dist/components/ds-card.d.ts +11 -0
- package/dist/components/ds-card.js +1 -0
- package/dist/components/ds-checkbox.d.ts +11 -0
- package/dist/components/ds-checkbox.js +1 -0
- package/dist/components/ds-code-block.d.ts +11 -0
- package/dist/components/ds-code-block.js +1 -0
- package/dist/components/ds-dialog.d.ts +11 -0
- package/dist/components/ds-dialog.js +1 -0
- package/dist/components/ds-input.d.ts +11 -0
- package/dist/components/ds-input.js +1 -0
- package/dist/components/ds-loader.d.ts +11 -0
- package/dist/components/ds-loader.js +1 -0
- package/dist/components/ds-select.d.ts +11 -0
- package/dist/components/ds-select.js +1 -0
- package/dist/components/ds-tabs.d.ts +11 -0
- package/dist/components/ds-tabs.js +1 -0
- package/dist/components/ds-textarea.d.ts +11 -0
- package/dist/components/ds-textarea.js +1 -0
- package/dist/components/ds-tooltip.d.ts +11 -0
- package/dist/components/ds-tooltip.js +1 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/p-DDUZow8F.js +1 -0
- package/dist/components/p-ZsYP0VBq.js +1 -0
- package/dist/components/p-k0ywxWpC.js +1 -0
- package/dist/esm/chiralkit-ds.js +20 -0
- package/dist/esm/ds-badge.entry.js +16 -0
- package/dist/esm/ds-button.entry.js +24 -0
- package/dist/esm/ds-card.entry.js +15 -0
- package/dist/esm/ds-checkbox.entry.js +65 -0
- package/dist/esm/ds-code-block.entry.js +37 -0
- package/dist/esm/ds-dialog.entry.js +65 -0
- package/dist/esm/ds-input.entry.js +48 -0
- package/dist/esm/ds-loader.entry.js +24 -0
- package/dist/esm/ds-select.entry.js +83 -0
- package/dist/esm/ds-tabs.entry.js +136 -0
- package/dist/esm/ds-textarea.entry.js +48 -0
- package/dist/esm/ds-tooltip.entry.js +231 -0
- package/dist/esm/index-e-glNjK6.js +2008 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/loader.js +10 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/layouts/app-shell.css +84 -0
- package/dist/tests/a11y.js +55 -0
- package/dist/types/Users/alex/projects/MyGitHub/chiralkit/packages/design-system/.stencil/tests/a11y.d.ts +17 -0
- package/dist/types/components/ds-badge/ds-badge.d.ts +54 -0
- package/dist/types/components/ds-button/ds-button.d.ts +75 -0
- package/dist/types/components/ds-card/ds-card.d.ts +53 -0
- package/dist/types/components/ds-checkbox/ds-checkbox.d.ts +94 -0
- package/dist/types/components/ds-code-block/ds-code-block.d.ts +83 -0
- package/dist/types/components/ds-dialog/ds-dialog.d.ts +148 -0
- package/dist/types/components/ds-input/ds-input.d.ts +104 -0
- package/dist/types/components/ds-loader/ds-loader.d.ts +64 -0
- package/dist/types/components/ds-select/ds-select.d.ts +123 -0
- package/dist/types/components/ds-tabs/ds-tabs.d.ts +155 -0
- package/dist/types/components/ds-textarea/ds-textarea.d.ts +93 -0
- package/dist/types/components/ds-tooltip/ds-tooltip.d.ts +26 -0
- package/dist/types/components.d.ts +3068 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1861 -0
- package/docs.json +2112 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +78 -0
- package/react/components/ds-badge.tsx +25 -0
- package/react/components/ds-button.tsx +25 -0
- package/react/components/ds-card.tsx +25 -0
- package/react/components/ds-checkbox.tsx +25 -0
- package/react/components/ds-code-block.tsx +25 -0
- package/react/components/ds-dialog.tsx +31 -0
- package/react/components/ds-input.tsx +25 -0
- package/react/components/ds-loader.tsx +25 -0
- package/react/components/ds-select.tsx +25 -0
- package/react/components/ds-tabs.tsx +25 -0
- package/react/components/ds-textarea.tsx +25 -0
- package/react/components/ds-tooltip.tsx +25 -0
- package/react/components.ts +162 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* ## Accessibility
|
|
4
|
+
*
|
|
5
|
+
* **Category:** form-field
|
|
6
|
+
* **APG pattern:** N/A — native element. This wraps a native
|
|
7
|
+
* `<textarea>`; there is no WAI-ARIA APG pattern for a plain
|
|
8
|
+
* multi-line text field because the browser already implements it
|
|
9
|
+
* natively. Reference:
|
|
10
|
+
* https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea
|
|
11
|
+
*
|
|
12
|
+
* **Keyboard interactions:**
|
|
13
|
+
* - Tab: moves focus to the native `<textarea>`; Tab inside the
|
|
14
|
+
* textarea inserts a tab character only when the browser is
|
|
15
|
+
* configured to do so (default behavior: Tab moves focus out).
|
|
16
|
+
* - Printable characters: insert at the caret position (native).
|
|
17
|
+
* - Enter: inserts a newline within the value (native), does not
|
|
18
|
+
* submit the enclosing form (unlike a single-line input).
|
|
19
|
+
* - Backspace / Delete: native editing.
|
|
20
|
+
* - Arrow keys: move the caret within the value (native).
|
|
21
|
+
* - Escape: no native meaning for a text area.
|
|
22
|
+
*
|
|
23
|
+
* **ARIA:**
|
|
24
|
+
* - Roles used: none explicit — the native `<textarea>` supplies
|
|
25
|
+
* the implicit `textbox` role with multiline behavior.
|
|
26
|
+
* - State attributes: `disabled` (native attribute, not
|
|
27
|
+
* `aria-disabled`), `aria-invalid` (from the `invalid` prop),
|
|
28
|
+
* `aria-required` (from the `required` prop), `aria-describedby`
|
|
29
|
+
* (from the `describedBy` prop, expected to reference a light-DOM
|
|
30
|
+
* node id — typically a hint or error message rendered by the
|
|
31
|
+
* consumer alongside the field).
|
|
32
|
+
* - Labeling strategy: `aria-label` set from the `label` prop onto
|
|
33
|
+
* the internal `<textarea>`. This is the **canonical, recommended**
|
|
34
|
+
* mode. Wrapping the host in a light-DOM `<label>` also produces
|
|
35
|
+
* an accessible name in Chromium via flattened-tree resolution —
|
|
36
|
+
* same secondary mode documented on `ds-input` and `ds-select`,
|
|
37
|
+
* verified in this component's e2e tests. Setting `aria-label`
|
|
38
|
+
* directly on the `<ds-textarea>` host does NOT work: shadow-DOM
|
|
39
|
+
* attribute forwarding would be required — use the `label` prop.
|
|
40
|
+
*
|
|
41
|
+
* **Focus:**
|
|
42
|
+
* - On mount: nothing auto-focuses.
|
|
43
|
+
* - On value change: focus remains on the native `<textarea>`.
|
|
44
|
+
* - Focus indicator: the browser default `:focus-visible` ring is
|
|
45
|
+
* kept on purpose — a themed focus ring using `--ds-color-focus`
|
|
46
|
+
* is a future decision once the DS ships a shared focus utility.
|
|
47
|
+
*
|
|
48
|
+
* **Motion:**
|
|
49
|
+
* - Animations: none.
|
|
50
|
+
* - Reduced-motion behavior: N/A — no animation to collapse.
|
|
51
|
+
*
|
|
52
|
+
* **Contrast:**
|
|
53
|
+
* - Text: inherits `color: inherit` / `currentColor`; ratio depends
|
|
54
|
+
* on the consumer's theme, not verified in isolation.
|
|
55
|
+
* - Border: `color-mix(in oklch, currentColor 22%, transparent)`,
|
|
56
|
+
* matching `ds-input`.
|
|
57
|
+
*
|
|
58
|
+
* **Screen reader announcement:**
|
|
59
|
+
* - Rendered state: announces the `label` prop text as the
|
|
60
|
+
* accessible name, followed by "edit text, multiline" (browser/AT
|
|
61
|
+
* wording varies). When `required=true` the announcement includes
|
|
62
|
+
* "required"; when `invalid=true` it includes "invalid".
|
|
63
|
+
* - State change: on value edit, AT typically echoes the typed
|
|
64
|
+
* character (native behavior); no `aria-live` added.
|
|
65
|
+
*
|
|
66
|
+
* **Consumer contract:**
|
|
67
|
+
* - `placeholder` is a hint, not a label — always pair with `label`.
|
|
68
|
+
* - When `invalid=true`, pair with a `describedBy` id that points at
|
|
69
|
+
* a visible error message; `aria-invalid` alone gives the AT the
|
|
70
|
+
* status but not the reason.
|
|
71
|
+
* - `rows` sets the initial visible line count. Vertical resize is
|
|
72
|
+
* left to the native default (`resize: vertical`) so users can
|
|
73
|
+
* grow the field for long entries; the consumer's CSS can pin it
|
|
74
|
+
* with `resize: none` when a fixed height matters.
|
|
75
|
+
*/
|
|
76
|
+
export declare class DsTextarea {
|
|
77
|
+
private textareaEl?;
|
|
78
|
+
value?: string;
|
|
79
|
+
name?: string;
|
|
80
|
+
placeholder?: string;
|
|
81
|
+
disabled: boolean;
|
|
82
|
+
required: boolean;
|
|
83
|
+
invalid: boolean;
|
|
84
|
+
describedBy?: string;
|
|
85
|
+
label?: string;
|
|
86
|
+
rows: number;
|
|
87
|
+
size: "md" | "lg";
|
|
88
|
+
dsInput: EventEmitter<string>;
|
|
89
|
+
watchValue(newValue?: string): void;
|
|
90
|
+
componentDidLoad(): void;
|
|
91
|
+
private onInput;
|
|
92
|
+
render(): any;
|
|
93
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare class DsTooltip {
|
|
2
|
+
hostEl: HTMLElement;
|
|
3
|
+
label: string;
|
|
4
|
+
openDelay: number;
|
|
5
|
+
closeDelay: number;
|
|
6
|
+
placement: "top" | "bottom";
|
|
7
|
+
private tooltipId;
|
|
8
|
+
private tooltipEl?;
|
|
9
|
+
private openTimer?;
|
|
10
|
+
private closeTimer?;
|
|
11
|
+
private isOpen;
|
|
12
|
+
watchLabel(): void;
|
|
13
|
+
componentDidLoad(): void;
|
|
14
|
+
disconnectedCallback(): void;
|
|
15
|
+
private wireTrigger;
|
|
16
|
+
private clearTimers;
|
|
17
|
+
private show;
|
|
18
|
+
private hide;
|
|
19
|
+
private applyOpen;
|
|
20
|
+
private onMouseEnter;
|
|
21
|
+
private onMouseLeave;
|
|
22
|
+
private onFocusIn;
|
|
23
|
+
private onFocusOut;
|
|
24
|
+
private onKeyDown;
|
|
25
|
+
render(): any;
|
|
26
|
+
}
|