@sken-ds/primitives 0.3.0 → 0.3.4
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/dist/decorate-D4FKzyDw.js +9 -0
- package/dist/directive-BcLtPdVO.js +263 -0
- package/dist/directive-BcLtPdVO.js.map +1 -0
- package/dist/index.js +14 -0
- package/dist/ix-bridge.css +608 -0
- package/dist/sken-button.js +125 -0
- package/dist/sken-button.js.map +1 -0
- package/dist/sken-checkbox.js +218 -0
- package/dist/sken-checkbox.js.map +1 -0
- package/dist/sken-combobox-group.js +20 -0
- package/dist/sken-combobox-group.js.map +1 -0
- package/dist/sken-combobox-item.js +20 -0
- package/dist/sken-combobox-item.js.map +1 -0
- package/dist/sken-combobox.js +590 -0
- package/dist/sken-combobox.js.map +1 -0
- package/dist/sken-datatable-BtR-NwRN.js +1563 -0
- package/dist/sken-datatable-BtR-NwRN.js.map +1 -0
- package/dist/sken-datatable.js +2 -0
- package/dist/sken-date-picker.js +42 -0
- package/dist/sken-date-picker.js.map +1 -0
- package/dist/sken-dialog-hRtML2jW.js +243 -0
- package/dist/sken-dialog-hRtML2jW.js.map +1 -0
- package/dist/sken-dialog.js +2 -0
- package/dist/sken-filter-chip.js +111 -0
- package/dist/sken-filter-chip.js.map +1 -0
- package/dist/sken-input.js +270 -0
- package/dist/sken-input.js.map +1 -0
- package/dist/sken-number-input.js +538 -0
- package/dist/sken-number-input.js.map +1 -0
- package/dist/sken-switch.js +196 -0
- package/dist/sken-switch.js.map +1 -0
- package/dist/sken-textarea.js +237 -0
- package/dist/sken-textarea.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { t as e } from "./decorate-D4FKzyDw.js";
|
|
2
|
+
import { LitElement as t, css as n, html as r } from "lit";
|
|
3
|
+
import { customElement as i, property as a, state as o } from "lit/decorators.js";
|
|
4
|
+
//#region src/components/sken-switch.ts
|
|
5
|
+
var s = class extends t {
|
|
6
|
+
constructor(...e) {
|
|
7
|
+
super(...e), this._on = void 0, this._onSet = !1, this.defaultOn = void 0, this.disabled = !1, this.readonly = !1, this.required = !1, this.describedById = void 0, this.name = void 0, this.ariaLabel = null, this._uncontrolled = !1, this.#t = (e) => {
|
|
8
|
+
let t = e.target, n = t.checked;
|
|
9
|
+
if (this.disabled) {
|
|
10
|
+
t.checked = this.#e ? this.on === !0 : this._uncontrolled;
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
if (this.readonly) {
|
|
14
|
+
t.checked = this.#e ? this.on === !0 : this._uncontrolled, this.requestUpdate();
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
this.#e || (this._uncontrolled = n), this.dispatchEvent(new CustomEvent("sken-change", {
|
|
18
|
+
detail: n,
|
|
19
|
+
bubbles: !0,
|
|
20
|
+
composed: !0
|
|
21
|
+
}));
|
|
22
|
+
}, this.#n = (e) => {
|
|
23
|
+
this.dispatchEvent(new CustomEvent("sken-focus", {
|
|
24
|
+
detail: e,
|
|
25
|
+
bubbles: !0,
|
|
26
|
+
composed: !0
|
|
27
|
+
}));
|
|
28
|
+
}, this.#r = (e) => {
|
|
29
|
+
this.dispatchEvent(new CustomEvent("sken-blur", {
|
|
30
|
+
detail: e,
|
|
31
|
+
bubbles: !0,
|
|
32
|
+
composed: !0
|
|
33
|
+
}));
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
set on(e) {
|
|
37
|
+
this._on = e, this._onSet = e !== void 0, this.requestUpdate();
|
|
38
|
+
}
|
|
39
|
+
get on() {
|
|
40
|
+
return this._on;
|
|
41
|
+
}
|
|
42
|
+
get #e() {
|
|
43
|
+
return this._onSet;
|
|
44
|
+
}
|
|
45
|
+
static {
|
|
46
|
+
this.styles = n`
|
|
47
|
+
:host {
|
|
48
|
+
display: inline-block;
|
|
49
|
+
vertical-align: middle;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
:host([disabled]) {
|
|
53
|
+
cursor: not-allowed;
|
|
54
|
+
opacity: var(--sken-disabled);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* The <label> wraps the hidden input + visible track + slot
|
|
58
|
+
label. It carries the layout styles so the whole control
|
|
59
|
+
looks like a single inline-flex row. */
|
|
60
|
+
label {
|
|
61
|
+
display: inline-flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
gap: var(--sken-2);
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
color: var(--sken-foreground);
|
|
66
|
+
font-family: var(--sken-family-sans);
|
|
67
|
+
font-size: var(--sken-size-md);
|
|
68
|
+
line-height: 1.25;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:host([disabled]) label {
|
|
72
|
+
cursor: not-allowed;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Visually hidden but accessible input (same pattern as sken-checkbox). */
|
|
76
|
+
input {
|
|
77
|
+
position: absolute;
|
|
78
|
+
inline-size: 1px;
|
|
79
|
+
block-size: 1px;
|
|
80
|
+
padding: 0;
|
|
81
|
+
margin: -1px;
|
|
82
|
+
overflow: hidden;
|
|
83
|
+
clip: rect(0, 0, 0, 0);
|
|
84
|
+
white-space: nowrap;
|
|
85
|
+
border: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.track {
|
|
89
|
+
position: relative;
|
|
90
|
+
box-sizing: border-box;
|
|
91
|
+
inline-size: 2.5rem;
|
|
92
|
+
block-size: 1.375rem;
|
|
93
|
+
padding: 2px;
|
|
94
|
+
border-radius: 999px;
|
|
95
|
+
background: var(--sken-border);
|
|
96
|
+
transition: background-color 160ms ease;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.thumb {
|
|
100
|
+
display: block;
|
|
101
|
+
inline-size: calc(1.375rem - 4px);
|
|
102
|
+
block-size: calc(1.375rem - 4px);
|
|
103
|
+
border-radius: 50%;
|
|
104
|
+
background: var(--sken-input);
|
|
105
|
+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
|
|
106
|
+
transition: transform 160ms ease;
|
|
107
|
+
transform: translateX(0);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
:host([data-on]) .track {
|
|
111
|
+
background: var(--sken-primary);
|
|
112
|
+
}
|
|
113
|
+
:host([data-on]) .thumb {
|
|
114
|
+
transform: translateX(1.125rem);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
:host(:focus-within) .track {
|
|
118
|
+
outline: 2px solid var(--sken-ring, currentColor);
|
|
119
|
+
outline-offset: 2px;
|
|
120
|
+
}
|
|
121
|
+
:host(:focus-within) {
|
|
122
|
+
outline: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.label {
|
|
126
|
+
user-select: none;
|
|
127
|
+
}
|
|
128
|
+
`;
|
|
129
|
+
}
|
|
130
|
+
connectedCallback() {
|
|
131
|
+
super.connectedCallback(), this.on === void 0 && (this._uncontrolled = this.defaultOn ?? !1);
|
|
132
|
+
}
|
|
133
|
+
updated() {
|
|
134
|
+
let e = this.#i();
|
|
135
|
+
if (!e) return;
|
|
136
|
+
let t = (this.#e ? this.on : this._uncontrolled) ?? !1;
|
|
137
|
+
e.checked = t, t ? this.setAttribute("data-on", "") : this.removeAttribute("data-on");
|
|
138
|
+
}
|
|
139
|
+
render() {
|
|
140
|
+
return r`
|
|
141
|
+
<label>
|
|
142
|
+
<input
|
|
143
|
+
part="input"
|
|
144
|
+
type="checkbox"
|
|
145
|
+
role="switch"
|
|
146
|
+
aria-checked=${this.on === void 0 ? String(this._uncontrolled) : String(this.on)}
|
|
147
|
+
?disabled=${this.disabled}
|
|
148
|
+
?readonly=${this.readonly}
|
|
149
|
+
?required=${this.required}
|
|
150
|
+
aria-describedby=${this.describedById ?? ""}
|
|
151
|
+
aria-label=${this.ariaLabel ?? ""}
|
|
152
|
+
name=${this.name ?? ""}
|
|
153
|
+
@change=${this.#t}
|
|
154
|
+
@focus=${this.#n}
|
|
155
|
+
@blur=${this.#r}
|
|
156
|
+
/>
|
|
157
|
+
<span class="track" part="track" aria-hidden="true">
|
|
158
|
+
<span class="thumb" part="thumb"></span>
|
|
159
|
+
</span>
|
|
160
|
+
<span class="label" part="label">
|
|
161
|
+
<slot></slot>
|
|
162
|
+
</span>
|
|
163
|
+
</label>
|
|
164
|
+
`;
|
|
165
|
+
}
|
|
166
|
+
#t;
|
|
167
|
+
#n;
|
|
168
|
+
#r;
|
|
169
|
+
#i() {
|
|
170
|
+
return this.shadowRoot?.querySelector("input") ?? null;
|
|
171
|
+
}
|
|
172
|
+
};
|
|
173
|
+
e([a({
|
|
174
|
+
attribute: "on",
|
|
175
|
+
converter: {
|
|
176
|
+
fromAttribute: (e) => e !== null || void 0,
|
|
177
|
+
toAttribute: (e) => e ? "" : null
|
|
178
|
+
},
|
|
179
|
+
hasChanged: () => !0
|
|
180
|
+
})], s.prototype, "on", null), e([a({
|
|
181
|
+
attribute: "default-on",
|
|
182
|
+
type: Boolean
|
|
183
|
+
})], s.prototype, "defaultOn", void 0), e([a({
|
|
184
|
+
reflect: !0,
|
|
185
|
+
type: Boolean
|
|
186
|
+
})], s.prototype, "disabled", void 0), e([a({
|
|
187
|
+
reflect: !0,
|
|
188
|
+
type: Boolean
|
|
189
|
+
})], s.prototype, "readonly", void 0), e([a({
|
|
190
|
+
reflect: !0,
|
|
191
|
+
type: Boolean
|
|
192
|
+
})], s.prototype, "required", void 0), e([a({ attribute: "described-by-id" })], s.prototype, "describedById", void 0), e([a()], s.prototype, "name", void 0), e([a({ attribute: "aria-label" })], s.prototype, "ariaLabel", void 0), e([o()], s.prototype, "_uncontrolled", void 0), s = e([i("sken-switch")], s);
|
|
193
|
+
//#endregion
|
|
194
|
+
export { s as SkenSwitch };
|
|
195
|
+
|
|
196
|
+
//# sourceMappingURL=sken-switch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sken-switch.js","names":["#controlled","#getInput","#handleChange","#handleFocus","#handleBlur"],"sources":["../src/components/sken-switch.ts"],"sourcesContent":["// ── <sken-switch> — framework-ready Web Component ────────────────────\n// Wraps a native <input type=\"checkbox\"> with role=\"switch\" and a\n// custom track + thumb. For immediate-effect toggles (the action\n// applies on click, not at form submit). For selections that commit\n// on submit, use <sken-checkbox> instead.\n//\n// Contract uses `on` / `defaultOn` (not `checked` /\n// `defaultChecked`) to reinforce semantic intent: a switch is \"on\"\n// or \"off\", not \"checked\" or \"unchecked\". Requires @sken-ds/theme/css\n// (ADR-0006).\n\nimport { LitElement, html, css } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\n\n@customElement('sken-switch')\nexport class SkenSwitch extends LitElement {\n // `on` distinguishes \"uncontrolled\" (consumer never assigns the\n // prop) from \"controlled\" (consumer assigns `true` or `false`).\n // Lit's `@property({ type: Boolean })` collapses \"absent\" to\n // `false`, which makes the two cases indistinguishable. We use\n // a custom converter that maps the attribute presence\n // (`<sken-switch on>`) to `true` and the attribute absence to\n // `undefined`, and the prop setter distinguishes `undefined`\n // (\"uncontrolled\") from `true`/`false` (\"controlled\"). The Vue\n // adapter must NOT bind the `on` prop when the consumer did\n // not pass `:on`, so the setter is never called and the\n // primitive stays uncontrolled.\n private _on: boolean | undefined = undefined\n private _onSet: boolean = false\n // The custom converter maps attribute absence to `undefined`\n // (the \"uncontrolled\" sentinel) and attribute presence to\n // `true`. The prop setter also accepts `false` (controlled-\n // with-false) and `true` (controlled-with-true).\n @property({\n attribute: 'on',\n converter: {\n fromAttribute: (value: string | null) => (value === null ? undefined : true),\n toAttribute: (value: boolean | undefined) => (value ? '' : null),\n },\n hasChanged: () => true,\n })\n set on(v: boolean | undefined) {\n this._on = v\n this._onSet = v !== undefined\n this.requestUpdate()\n }\n get on(): boolean | undefined {\n return this._on\n }\n /** True when the consumer has explicitly bound the `on` prop. */\n get #controlled(): boolean {\n return this._onSet\n }\n\n @property({ attribute: 'default-on', type: Boolean })\n defaultOn: boolean | undefined = undefined\n @property({ reflect: true, type: Boolean }) disabled = false\n @property({ reflect: true, type: Boolean }) readonly = false\n @property({ reflect: true, type: Boolean }) required = false\n @property({ attribute: 'described-by-id' }) describedById: string | undefined = undefined\n @property() name: string | undefined = undefined\n\n // string | null matches lib.dom.d.ts; the contract normalizes to\n // string | undefined for the public API.\n @property({ attribute: 'aria-label' }) override ariaLabel: string | null = null\n\n // @state so Lit picks up changes and re-runs updated().\n @state() private _uncontrolled: boolean = false\n\n static styles = css`\n :host {\n display: inline-block;\n vertical-align: middle;\n }\n\n :host([disabled]) {\n cursor: not-allowed;\n opacity: var(--sken-disabled);\n }\n\n /* The <label> wraps the hidden input + visible track + slot\n label. It carries the layout styles so the whole control\n looks like a single inline-flex row. */\n label {\n display: inline-flex;\n align-items: center;\n gap: var(--sken-2);\n cursor: pointer;\n color: var(--sken-foreground);\n font-family: var(--sken-family-sans);\n font-size: var(--sken-size-md);\n line-height: 1.25;\n }\n\n :host([disabled]) label {\n cursor: not-allowed;\n }\n\n /* Visually hidden but accessible input (same pattern as sken-checkbox). */\n input {\n position: absolute;\n inline-size: 1px;\n block-size: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n\n .track {\n position: relative;\n box-sizing: border-box;\n inline-size: 2.5rem;\n block-size: 1.375rem;\n padding: 2px;\n border-radius: 999px;\n background: var(--sken-border);\n transition: background-color 160ms ease;\n }\n\n .thumb {\n display: block;\n inline-size: calc(1.375rem - 4px);\n block-size: calc(1.375rem - 4px);\n border-radius: 50%;\n background: var(--sken-input);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);\n transition: transform 160ms ease;\n transform: translateX(0);\n }\n\n :host([data-on]) .track {\n background: var(--sken-primary);\n }\n :host([data-on]) .thumb {\n transform: translateX(1.125rem);\n }\n\n :host(:focus-within) .track {\n outline: 2px solid var(--sken-ring, currentColor);\n outline-offset: 2px;\n }\n :host(:focus-within) {\n outline: none;\n }\n\n .label {\n user-select: none;\n }\n `\n\n override connectedCallback(): void {\n super.connectedCallback()\n if (this.on === undefined) {\n this._uncontrolled = this.defaultOn ?? false\n }\n }\n\n protected override updated(): void {\n const input = this.#getInput()\n if (!input) return\n const isOn = (this.#controlled ? this.on : this._uncontrolled) ?? false\n input.checked = isOn\n if (isOn) this.setAttribute('data-on', '')\n else this.removeAttribute('data-on')\n }\n\n protected override render() {\n // The visible UI (track + thumb + label) is wrapped in a\n // `<label>` element so clicking anywhere on it toggles the\n // hidden input. This is the standard WAI-ARIA pattern for a\n // custom-styled checkbox / switch. Without the label, the\n // visually-hidden input would never receive a click event and\n // the switch would look completely inert to mouse / touch.\n return html`\n <label>\n <input\n part=\"input\"\n type=\"checkbox\"\n role=\"switch\"\n aria-checked=${this.on === undefined ? String(this._uncontrolled) : String(this.on)}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n aria-describedby=${this.describedById ?? ''}\n aria-label=${this.ariaLabel ?? ''}\n name=${this.name ?? ''}\n @change=${this.#handleChange}\n @focus=${this.#handleFocus}\n @blur=${this.#handleBlur}\n />\n <span class=\"track\" part=\"track\" aria-hidden=\"true\">\n <span class=\"thumb\" part=\"thumb\"></span>\n </span>\n <span class=\"label\" part=\"label\">\n <slot></slot>\n </span>\n </label>\n `\n }\n\n #handleChange = (event: Event) => {\n const target = event.target as HTMLInputElement\n const newValue = target.checked\n // Disabled: the browser already blocks the change, but we\n // double-check here in case the input was disabled\n // programmatically (no click event) or in case the consumer\n // toggled `disabled` mid-flight. Either way, do not advance\n // state.\n if (this.disabled) {\n target.checked = this.#controlled ? this.on === true : this._uncontrolled\n return\n }\n // Readonly: the native `<input type=\"checkbox\">` does NOT\n // block the toggle on click (readonly only affects text\n // inputs), so the input flips visually. We revert the flip\n // and skip the change event so the consumer never sees it.\n // The `data-on` attribute is set in `updated()` from the\n // controlled / uncontrolled value, so the visual stays in\n // sync after the revert.\n if (this.readonly) {\n const value = this.#controlled ? this.on === true : this._uncontrolled\n target.checked = value\n this.requestUpdate()\n return\n }\n // In uncontrolled mode, the consumer does not own the value,\n // so we update the internal `@state` and let Lit re-render.\n // In controlled mode, the consumer owns the value: we do NOT\n // touch the internal state (the consumer's next prop change\n // will drive the next render). Either way, the input's\n // `change` event already flipped `target.checked` in the DOM\n // and we emit `sken-change` for both modes so the consumer\n // can sync.\n if (!this.#controlled) {\n this._uncontrolled = newValue\n }\n this.dispatchEvent(\n new CustomEvent<boolean>('sken-change', { detail: newValue, bubbles: true, composed: true }),\n )\n }\n\n #handleFocus = (event: FocusEvent) => {\n this.dispatchEvent(\n new CustomEvent<FocusEvent>('sken-focus', { detail: event, bubbles: true, composed: true }),\n )\n }\n\n #handleBlur = (event: FocusEvent) => {\n this.dispatchEvent(\n new CustomEvent<FocusEvent>('sken-blur', { detail: event, bubbles: true, composed: true }),\n )\n }\n\n #getInput(): HTMLInputElement | null {\n return this.shadowRoot?.querySelector('input') ?? null\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sken-switch': SkenSwitch\n }\n}\n"],"mappings":";;;;AAeO,IAAM,IAAN,cAAyB,EAAW;;EA2O1B,aA/NoB,KAAA,MAAA,KAAA,GACT,KAAA,SAAA,IA2BO,KAAA,YAAA,KAAA,GACsB,KAAA,WAAA,IACA,KAAA,WAAA,IACA,KAAA,WAAA,IACyB,KAAA,gBAAA,KAAA,GACzC,KAAA,OAAA,KAAA,GAIoC,KAAA,YAAA,MAGjC,KAAA,gBAAA,IAwIzB,KAAA,MAAA,MAAiB;GAChC,IAAM,IAAS,EAAM,QACf,IAAW,EAAO;GAMxB,IAAI,KAAK,UAAU;IACjB,EAAO,UAAU,KAAKA,KAAc,KAAK,OAAO,KAAO,KAAK;IAC5D;GACF;GAQA,IAAI,KAAK,UAAU;IAGjB,AADA,EAAO,UADO,KAAKA,KAAc,KAAK,OAAO,KAAO,KAAK,eAEzD,KAAK,cAAc;IACnB;GACF;GAYA,AAHK,KAAKA,OACR,KAAK,gBAAgB,IAEvB,KAAK,cACH,IAAI,YAAqB,eAAe;IAAE,QAAQ;I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, property as a } from "lit/decorators.js";
|
|
4
|
+
//#region src/components/sken-textarea.ts
|
|
5
|
+
var o = class extends t {
|
|
6
|
+
static {
|
|
7
|
+
this.formAssociated = !0;
|
|
8
|
+
}
|
|
9
|
+
#e;
|
|
10
|
+
constructor() {
|
|
11
|
+
super(), this.#e = null, this.size = "md", this.rows = 4, this.cols = void 0, this.maxLength = void 0, this.resize = "vertical", this.placeholder = void 0, this.value = void 0, this.defaultValue = void 0, this.disabled = !1, this.readonly = !1, this.required = !1, this.invalid = !1, this.describedById = void 0, this.name = void 0, this.#t = "", this.#r = (e) => {
|
|
12
|
+
let t = e.target.value;
|
|
13
|
+
this.value === void 0 && (this.#t = t), this.#n(), this.dispatchEvent(new CustomEvent("sken-input", {
|
|
14
|
+
detail: t,
|
|
15
|
+
bubbles: !0,
|
|
16
|
+
composed: !0
|
|
17
|
+
}));
|
|
18
|
+
}, this.#i = (e) => {
|
|
19
|
+
let t = e.target;
|
|
20
|
+
this.#n(), this.dispatchEvent(new CustomEvent("sken-change", {
|
|
21
|
+
detail: t.value,
|
|
22
|
+
bubbles: !0,
|
|
23
|
+
composed: !0
|
|
24
|
+
}));
|
|
25
|
+
}, this.#a = (e) => {
|
|
26
|
+
this.dispatchEvent(new CustomEvent("sken-focus", {
|
|
27
|
+
detail: e,
|
|
28
|
+
bubbles: !0,
|
|
29
|
+
composed: !0
|
|
30
|
+
}));
|
|
31
|
+
}, this.#o = (e) => {
|
|
32
|
+
this.dispatchEvent(new CustomEvent("sken-blur", {
|
|
33
|
+
detail: e,
|
|
34
|
+
bubbles: !0,
|
|
35
|
+
composed: !0
|
|
36
|
+
}));
|
|
37
|
+
};
|
|
38
|
+
try {
|
|
39
|
+
this.#e = this.attachInternals();
|
|
40
|
+
} catch {
|
|
41
|
+
this.#e = null;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
#t;
|
|
45
|
+
static {
|
|
46
|
+
this.styles = n`
|
|
47
|
+
:host {
|
|
48
|
+
display: inline-block;
|
|
49
|
+
inline-size: 100%;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.textarea-wrapper {
|
|
53
|
+
position: relative;
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: column;
|
|
56
|
+
inline-size: 100%;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
textarea {
|
|
60
|
+
box-sizing: border-box;
|
|
61
|
+
inline-size: 100%;
|
|
62
|
+
border: 1px solid var(--sken-border);
|
|
63
|
+
border-radius: var(--sken-md);
|
|
64
|
+
background: var(--sken-input);
|
|
65
|
+
color: var(--sken-foreground);
|
|
66
|
+
font-family: var(--sken-family-sans);
|
|
67
|
+
font-size: var(--sken-size-md);
|
|
68
|
+
line-height: 1.5;
|
|
69
|
+
padding-block: var(--sken-2);
|
|
70
|
+
padding-inline: var(--sken-3);
|
|
71
|
+
min-block-size: 4.5rem;
|
|
72
|
+
transition:
|
|
73
|
+
border-color 120ms ease,
|
|
74
|
+
box-shadow 120ms ease;
|
|
75
|
+
/* Resize is controlled by the resize attribute, not by
|
|
76
|
+
user-agent stylesheet, so consumers can override. */
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
textarea::placeholder {
|
|
80
|
+
color: var(--sken-muted-foreground);
|
|
81
|
+
opacity: 1;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* ── Slot containers ──────────────────────────────────────
|
|
85
|
+
Position: relative (not absolute) so the slotted content
|
|
86
|
+
flows naturally above and below the textarea. The wrapper
|
|
87
|
+
has a flex column, so the textarea's vertical padding is
|
|
88
|
+
NOT auto-adjusted (unlike SkenInput). Slot height adds to
|
|
89
|
+
the wrapper's natural height. */
|
|
90
|
+
.slot {
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
color: var(--sken-muted-foreground);
|
|
94
|
+
min-block-size: 0.25rem;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.slot-start {
|
|
98
|
+
padding-block-end: 0.25rem;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.slot-end {
|
|
102
|
+
padding-block-start: 0.25rem;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* ── Sizes ────────────────────────────────────────────────── */
|
|
106
|
+
:host([size='sm']) textarea {
|
|
107
|
+
padding-block: var(--sken-1);
|
|
108
|
+
padding-inline: var(--sken-2);
|
|
109
|
+
font-size: var(--sken-size-sm);
|
|
110
|
+
}
|
|
111
|
+
:host([size='md']) textarea {
|
|
112
|
+
/* Default styles above. */
|
|
113
|
+
}
|
|
114
|
+
:host([size='lg']) textarea {
|
|
115
|
+
padding-block: var(--sken-3);
|
|
116
|
+
padding-inline: var(--sken-4);
|
|
117
|
+
font-size: var(--sken-size-lg);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* ── Resize policies ────────────────────────────────────── */
|
|
121
|
+
:host([resize='none']) textarea {
|
|
122
|
+
resize: none;
|
|
123
|
+
}
|
|
124
|
+
:host([resize='vertical']) textarea {
|
|
125
|
+
resize: vertical;
|
|
126
|
+
}
|
|
127
|
+
:host([resize='horizontal']) textarea {
|
|
128
|
+
resize: horizontal;
|
|
129
|
+
}
|
|
130
|
+
:host([resize='both']) textarea {
|
|
131
|
+
resize: both;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* ── States ───────────────────────────────────────────────── */
|
|
135
|
+
.textarea-wrapper:hover textarea:not(:disabled):not(:read-only) {
|
|
136
|
+
border-color: var(--sken-foreground);
|
|
137
|
+
}
|
|
138
|
+
.textarea-wrapper:focus-within textarea {
|
|
139
|
+
outline: 2px solid var(--sken-ring, currentColor);
|
|
140
|
+
outline-offset: 2px;
|
|
141
|
+
border-color: var(--sken-primary);
|
|
142
|
+
}
|
|
143
|
+
textarea:disabled {
|
|
144
|
+
cursor: not-allowed;
|
|
145
|
+
opacity: var(--sken-disabled);
|
|
146
|
+
}
|
|
147
|
+
textarea:read-only {
|
|
148
|
+
background: var(--sken-muted);
|
|
149
|
+
}
|
|
150
|
+
:host([invalid]) textarea {
|
|
151
|
+
border-color: var(--sken-destructive);
|
|
152
|
+
}
|
|
153
|
+
:host([invalid]) .textarea-wrapper:focus-within textarea {
|
|
154
|
+
outline-color: var(--sken-destructive);
|
|
155
|
+
}
|
|
156
|
+
`;
|
|
157
|
+
}
|
|
158
|
+
connectedCallback() {
|
|
159
|
+
super.connectedCallback(), this.value === void 0 && (this.#t = this.defaultValue ?? ""), this.#n();
|
|
160
|
+
}
|
|
161
|
+
formResetCallback() {
|
|
162
|
+
if (this.value === void 0) {
|
|
163
|
+
this.#t = this.defaultValue ?? "";
|
|
164
|
+
let e = this.renderRoot.querySelector("textarea");
|
|
165
|
+
e && (e.value = this.#t), this.#n();
|
|
166
|
+
} else this.requestUpdate();
|
|
167
|
+
}
|
|
168
|
+
formDisabledCallback(e) {
|
|
169
|
+
this.disabled = e;
|
|
170
|
+
}
|
|
171
|
+
#n() {
|
|
172
|
+
if (!this.#e) return;
|
|
173
|
+
let e = this.value ?? this.#t;
|
|
174
|
+
this.#e.setFormValue(e);
|
|
175
|
+
}
|
|
176
|
+
render() {
|
|
177
|
+
let e = this.value ?? this.#t;
|
|
178
|
+
return r`
|
|
179
|
+
<div class="textarea-wrapper" part="wrapper">
|
|
180
|
+
<div class="slot slot-start" part="slot-start">
|
|
181
|
+
<slot name="start"></slot>
|
|
182
|
+
</div>
|
|
183
|
+
<textarea
|
|
184
|
+
part="textarea"
|
|
185
|
+
.value=${e}
|
|
186
|
+
rows=${this.rows}
|
|
187
|
+
cols=${this.cols ?? ""}
|
|
188
|
+
maxlength=${this.maxLength ?? ""}
|
|
189
|
+
placeholder=${this.placeholder ?? ""}
|
|
190
|
+
?disabled=${this.disabled}
|
|
191
|
+
?readonly=${this.readonly}
|
|
192
|
+
?required=${this.required}
|
|
193
|
+
aria-invalid=${this.invalid ? "true" : "false"}
|
|
194
|
+
aria-describedby=${this.describedById ?? ""}
|
|
195
|
+
name=${this.name ?? ""}
|
|
196
|
+
@input=${this.#r}
|
|
197
|
+
@change=${this.#i}
|
|
198
|
+
@focus=${this.#a}
|
|
199
|
+
@blur=${this.#o}
|
|
200
|
+
></textarea>
|
|
201
|
+
<div class="slot slot-end" part="slot-end">
|
|
202
|
+
<slot name="end"></slot>
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
`;
|
|
206
|
+
}
|
|
207
|
+
#r;
|
|
208
|
+
#i;
|
|
209
|
+
#a;
|
|
210
|
+
#o;
|
|
211
|
+
};
|
|
212
|
+
e([a({ reflect: !0 })], o.prototype, "size", void 0), e([a({
|
|
213
|
+
reflect: !0,
|
|
214
|
+
type: Number
|
|
215
|
+
})], o.prototype, "rows", void 0), e([a({
|
|
216
|
+
reflect: !0,
|
|
217
|
+
type: Number
|
|
218
|
+
})], o.prototype, "cols", void 0), e([a({
|
|
219
|
+
attribute: "max-length",
|
|
220
|
+
type: Number
|
|
221
|
+
})], o.prototype, "maxLength", void 0), e([a({ reflect: !0 })], o.prototype, "resize", void 0), e([a()], o.prototype, "placeholder", void 0), e([a()], o.prototype, "value", void 0), e([a({ attribute: "default-value" })], o.prototype, "defaultValue", void 0), e([a({
|
|
222
|
+
reflect: !0,
|
|
223
|
+
type: Boolean
|
|
224
|
+
})], o.prototype, "disabled", void 0), e([a({
|
|
225
|
+
reflect: !0,
|
|
226
|
+
type: Boolean
|
|
227
|
+
})], o.prototype, "readonly", void 0), e([a({
|
|
228
|
+
reflect: !0,
|
|
229
|
+
type: Boolean
|
|
230
|
+
})], o.prototype, "required", void 0), e([a({
|
|
231
|
+
reflect: !0,
|
|
232
|
+
type: Boolean
|
|
233
|
+
})], o.prototype, "invalid", void 0), e([a({ attribute: "described-by-id" })], o.prototype, "describedById", void 0), e([a()], o.prototype, "name", void 0), o = e([i("sken-textarea")], o);
|
|
234
|
+
//#endregion
|
|
235
|
+
export { o as SkenTextarea };
|
|
236
|
+
|
|
237
|
+
//# sourceMappingURL=sken-textarea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sken-textarea.js","names":["#internalValue","#syncFormValue","#internals","#handleInput","#handleChange","#handleFocus","#handleBlur"],"sources":["../src/components/sken-textarea.ts"],"sourcesContent":["// ── <sken-textarea> — framework-ready Web Component ────────────────\n// Multiline text input. Wraps a native <textarea> with token-driven\n// styles and the same shadow-DOM event surface as <sken-input>.\n// Slots are placed above (start) and below (end) the textarea, not\n// to the sides — multiline editors don't lend themselves to\n// horizontal adornments the way single-line inputs do.\n//\n// Requires @sken-ds/theme/css (ADR-0006). Pairs with @sken-ds/contracts'\n// SkenTextareaProps / SkenTextareaSlots / SkenTextareaEmits.\n\nimport { LitElement, html, css } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport type {\n SkenTextareaSize,\n SkenTextareaResize,\n} from '@sken-ds/contracts'\n\n@customElement('sken-textarea')\nexport class SkenTextarea extends LitElement {\n // Form-associated custom element. Opt in to the\n // ElementInternals API so this primitive participates in\n // the surrounding <form>'s submit/reset lifecycle and\n // FormData(form) picks up the textarea's value under its\n // `name` attribute. See SkenInput for the full rationale;\n // the pattern is identical. Lit docs:\n // https://lit.dev/docs/components/form/\n static formAssociated = true\n\n // The ElementInternals instance. Created in the constructor\n // via attachInternals(), which the browser only makes\n // available because `formAssociated` is true. Nullable to\n // gracefully degrade in test environments that do not\n // implement ElementInternals.\n #internals: ElementInternals | null = null\n\n constructor() {\n super()\n try {\n this.#internals = this.attachInternals()\n } catch {\n this.#internals = null\n }\n }\n\n @property({ reflect: true }) size: SkenTextareaSize = 'md'\n @property({ reflect: true, type: Number }) rows = 4\n @property({ reflect: true, type: Number }) cols: number | undefined = undefined\n @property({ attribute: 'max-length', type: Number }) maxLength: number | undefined = undefined\n @property({ reflect: true }) resize: SkenTextareaResize = 'vertical'\n @property() placeholder: string | undefined = undefined\n @property() value: string | undefined = undefined\n @property({ attribute: 'default-value' }) defaultValue: string | undefined = undefined\n @property({ reflect: true, type: Boolean }) disabled = false\n @property({ reflect: true, type: Boolean }) readonly = false\n @property({ reflect: true, type: Boolean }) required = false\n @property({ reflect: true, type: Boolean }) invalid = false\n @property({ attribute: 'described-by-id' }) describedById: string | undefined = undefined\n @property() name: string | undefined = undefined\n\n // Internal value for uncontrolled mode. Seeded from `defaultValue`\n // on first connection; from then on the DOM textarea keeps the\n // source of truth. Same pattern as SkenInput.\n #internalValue: string = ''\n\n static styles = css`\n :host {\n display: inline-block;\n inline-size: 100%;\n }\n\n .textarea-wrapper {\n position: relative;\n display: flex;\n flex-direction: column;\n inline-size: 100%;\n }\n\n textarea {\n box-sizing: border-box;\n inline-size: 100%;\n border: 1px solid var(--sken-border);\n border-radius: var(--sken-md);\n background: var(--sken-input);\n color: var(--sken-foreground);\n font-family: var(--sken-family-sans);\n font-size: var(--sken-size-md);\n line-height: 1.5;\n padding-block: var(--sken-2);\n padding-inline: var(--sken-3);\n min-block-size: 4.5rem;\n transition:\n border-color 120ms ease,\n box-shadow 120ms ease;\n /* Resize is controlled by the resize attribute, not by\n user-agent stylesheet, so consumers can override. */\n }\n\n textarea::placeholder {\n color: var(--sken-muted-foreground);\n opacity: 1;\n }\n\n /* ── Slot containers ──────────────────────────────────────\n Position: relative (not absolute) so the slotted content\n flows naturally above and below the textarea. The wrapper\n has a flex column, so the textarea's vertical padding is\n NOT auto-adjusted (unlike SkenInput). Slot height adds to\n the wrapper's natural height. */\n .slot {\n display: flex;\n align-items: center;\n color: var(--sken-muted-foreground);\n min-block-size: 0.25rem;\n }\n\n .slot-start {\n padding-block-end: 0.25rem;\n }\n\n .slot-end {\n padding-block-start: 0.25rem;\n }\n\n /* ── Sizes ────────────────────────────────────────────────── */\n :host([size='sm']) textarea {\n padding-block: var(--sken-1);\n padding-inline: var(--sken-2);\n font-size: var(--sken-size-sm);\n }\n :host([size='md']) textarea {\n /* Default styles above. */\n }\n :host([size='lg']) textarea {\n padding-block: var(--sken-3);\n padding-inline: var(--sken-4);\n font-size: var(--sken-size-lg);\n }\n\n /* ── Resize policies ────────────────────────────────────── */\n :host([resize='none']) textarea {\n resize: none;\n }\n :host([resize='vertical']) textarea {\n resize: vertical;\n }\n :host([resize='horizontal']) textarea {\n resize: horizontal;\n }\n :host([resize='both']) textarea {\n resize: both;\n }\n\n /* ── States ───────────────────────────────────────────────── */\n .textarea-wrapper:hover textarea:not(:disabled):not(:read-only) {\n border-color: var(--sken-foreground);\n }\n .textarea-wrapper:focus-within textarea {\n outline: 2px solid var(--sken-ring, currentColor);\n outline-offset: 2px;\n border-color: var(--sken-primary);\n }\n textarea:disabled {\n cursor: not-allowed;\n opacity: var(--sken-disabled);\n }\n textarea:read-only {\n background: var(--sken-muted);\n }\n :host([invalid]) textarea {\n border-color: var(--sken-destructive);\n }\n :host([invalid]) .textarea-wrapper:focus-within textarea {\n outline-color: var(--sken-destructive);\n }\n `\n\n override connectedCallback(): void {\n super.connectedCallback()\n if (this.value === undefined) {\n this.#internalValue = this.defaultValue ?? ''\n }\n // Publish the initial value to the surrounding form.\n this.#syncFormValue()\n }\n\n // ── Form-association callbacks ─────────────────────────────\n // formResetCallback: for uncontrolled mode, restore the seed\n // value and re-publish. For controlled mode, re-render and\n // let Lit re-publish the controlled value.\n formResetCallback(): void {\n if (this.value === undefined) {\n this.#internalValue = this.defaultValue ?? ''\n const ta = this.renderRoot.querySelector('textarea') as HTMLTextAreaElement | null\n if (ta) ta.value = this.#internalValue\n this.#syncFormValue()\n } else {\n this.requestUpdate()\n }\n }\n\n // formDisabledCallback: mirror the form's :disabled state onto\n // the prop. Lit re-renders; the inner <textarea> picks up\n // `?disabled=${this.disabled}` in the template.\n formDisabledCallback(isDisabled: boolean): void {\n this.disabled = isDisabled\n }\n\n // Publish the current value to the form. Called on every\n // change so FormData and submit/reset stay in sync.\n #syncFormValue(): void {\n if (!this.#internals) return\n const value = this.value ?? this.#internalValue\n this.#internals.setFormValue(value)\n }\n\n protected override render() {\n const value = this.value ?? this.#internalValue\n return html`\n <div class=\"textarea-wrapper\" part=\"wrapper\">\n <div class=\"slot slot-start\" part=\"slot-start\">\n <slot name=\"start\"></slot>\n </div>\n <textarea\n part=\"textarea\"\n .value=${value}\n rows=${this.rows}\n cols=${this.cols ?? ''}\n maxlength=${this.maxLength ?? ''}\n placeholder=${this.placeholder ?? ''}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n aria-invalid=${this.invalid ? 'true' : 'false'}\n aria-describedby=${this.describedById ?? ''}\n name=${this.name ?? ''}\n @input=${this.#handleInput}\n @change=${this.#handleChange}\n @focus=${this.#handleFocus}\n @blur=${this.#handleBlur}\n ></textarea>\n <div class=\"slot slot-end\" part=\"slot-end\">\n <slot name=\"end\"></slot>\n </div>\n </div>\n `\n }\n\n // composed: true on every event so the framework adapter outside\n // the shadow boundary can listen. Mirrors SkenInput.\n #handleInput = (event: Event) => {\n const target = event.target as HTMLTextAreaElement\n const newValue = target.value\n if (this.value === undefined) this.#internalValue = newValue\n // Publish the new value to the surrounding form so submit\n // and FormData see the latest text. Per-keystroke is fine:\n // setFormValue is cheap.\n this.#syncFormValue()\n this.dispatchEvent(\n new CustomEvent<string>('sken-input', { detail: newValue, bubbles: true, composed: true }),\n )\n }\n\n #handleChange = (event: Event) => {\n const target = event.target as HTMLTextAreaElement\n this.#syncFormValue()\n this.dispatchEvent(\n new CustomEvent<string>('sken-change', {\n detail: target.value,\n bubbles: true,\n composed: true,\n }),\n )\n }\n\n #handleFocus = (event: FocusEvent) => {\n this.dispatchEvent(\n new CustomEvent<FocusEvent>('sken-focus', { detail: event, bubbles: true, composed: true }),\n )\n }\n\n #handleBlur = (event: FocusEvent) => {\n this.dispatchEvent(\n new CustomEvent<FocusEvent>('sken-blur', { detail: event, bubbles: true, composed: true }),\n )\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sken-textarea': SkenTextarea\n }\n}\n"],"mappings":";;;;AAkBO,IAAM,IAAN,cAA2B,EAAW;;EAQnB,KAAA,iBAAA;;CAOxB;CAEA,cAAc;EAqPC,AApPb,MAAM,GAH8B,K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
5
|
"registry": "https://registry.npmjs.org",
|
|
6
6
|
"access": "public"
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"@tanstack/match-sorter-utils": "^9.0.0",
|
|
85
85
|
"@tanstack/table-core": "^9.0.0",
|
|
86
86
|
"lit": "^3.3.3",
|
|
87
|
-
"@sken-ds/contracts": "0.3.
|
|
87
|
+
"@sken-ds/contracts": "0.3.1"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"@vitest/coverage-v8": "^4.1.10",
|