@quieto/ui 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 +142 -2
- package/custom-elements.json +6126 -0
- package/dist/components/qds-accordion/qds-accordion.d.ts +39 -0
- package/dist/components/qds-accordion/qds-accordion.d.ts.map +1 -0
- package/dist/components/qds-accordion/qds-accordion.js +130 -0
- package/dist/components/qds-accordion/qds-accordion.js.map +1 -0
- package/dist/components/qds-accordion-item/qds-accordion-item.d.ts +68 -0
- package/dist/components/qds-accordion-item/qds-accordion-item.d.ts.map +1 -0
- package/dist/components/qds-accordion-item/qds-accordion-item.js +247 -0
- package/dist/components/qds-accordion-item/qds-accordion-item.js.map +1 -0
- package/dist/components/qds-button/qds-button.d.ts +92 -0
- package/dist/components/qds-button/qds-button.d.ts.map +1 -0
- package/dist/components/qds-button/qds-button.js +418 -0
- package/dist/components/qds-button/qds-button.js.map +1 -0
- package/dist/components/qds-card/qds-card.d.ts +48 -0
- package/dist/components/qds-card/qds-card.d.ts.map +1 -0
- package/dist/components/qds-card/qds-card.js +152 -0
- package/dist/components/qds-card/qds-card.js.map +1 -0
- package/dist/components/qds-checkbox/qds-checkbox.d.ts +85 -0
- package/dist/components/qds-checkbox/qds-checkbox.d.ts.map +1 -0
- package/dist/components/qds-checkbox/qds-checkbox.js +316 -0
- package/dist/components/qds-checkbox/qds-checkbox.js.map +1 -0
- package/dist/components/qds-chip/qds-chip.d.ts +79 -0
- package/dist/components/qds-chip/qds-chip.d.ts.map +1 -0
- package/dist/components/qds-chip/qds-chip.js +314 -0
- package/dist/components/qds-chip/qds-chip.js.map +1 -0
- package/dist/components/qds-input/qds-input.d.ts +64 -0
- package/dist/components/qds-input/qds-input.d.ts.map +1 -0
- package/dist/components/qds-input/qds-input.js +224 -0
- package/dist/components/qds-input/qds-input.js.map +1 -0
- package/dist/components/qds-modal/qds-modal.d.ts +76 -0
- package/dist/components/qds-modal/qds-modal.d.ts.map +1 -0
- package/dist/components/qds-modal/qds-modal.js +362 -0
- package/dist/components/qds-modal/qds-modal.js.map +1 -0
- package/dist/components/qds-progress-bar/qds-progress-bar.d.ts +47 -0
- package/dist/components/qds-progress-bar/qds-progress-bar.d.ts.map +1 -0
- package/dist/components/qds-progress-bar/qds-progress-bar.js +180 -0
- package/dist/components/qds-progress-bar/qds-progress-bar.js.map +1 -0
- package/dist/components/qds-radio/qds-radio.d.ts +62 -0
- package/dist/components/qds-radio/qds-radio.d.ts.map +1 -0
- package/dist/components/qds-radio/qds-radio.js +213 -0
- package/dist/components/qds-radio/qds-radio.js.map +1 -0
- package/dist/components/qds-radio-group/qds-radio-group.d.ts +72 -0
- package/dist/components/qds-radio-group/qds-radio-group.d.ts.map +1 -0
- package/dist/components/qds-radio-group/qds-radio-group.js +317 -0
- package/dist/components/qds-radio-group/qds-radio-group.js.map +1 -0
- package/dist/components/qds-stack/qds-stack.d.ts +46 -0
- package/dist/components/qds-stack/qds-stack.d.ts.map +1 -0
- package/dist/components/qds-stack/qds-stack.js +149 -0
- package/dist/components/qds-stack/qds-stack.js.map +1 -0
- package/dist/components/qds-tab/qds-tab.d.ts +55 -0
- package/dist/components/qds-tab/qds-tab.d.ts.map +1 -0
- package/dist/components/qds-tab/qds-tab.js +162 -0
- package/dist/components/qds-tab/qds-tab.js.map +1 -0
- package/dist/components/qds-tab-panel/qds-tab-panel.d.ts +32 -0
- package/dist/components/qds-tab-panel/qds-tab-panel.d.ts.map +1 -0
- package/dist/components/qds-tab-panel/qds-tab-panel.js +72 -0
- package/dist/components/qds-tab-panel/qds-tab-panel.js.map +1 -0
- package/dist/components/qds-tabs/qds-tabs.d.ts +54 -0
- package/dist/components/qds-tabs/qds-tabs.d.ts.map +1 -0
- package/dist/components/qds-tabs/qds-tabs.js +196 -0
- package/dist/components/qds-tabs/qds-tabs.js.map +1 -0
- package/dist/components/qds-text-field/qds-text-field.d.ts +94 -0
- package/dist/components/qds-text-field/qds-text-field.d.ts.map +1 -0
- package/dist/components/qds-text-field/qds-text-field.js +332 -0
- package/dist/components/qds-text-field/qds-text-field.js.map +1 -0
- package/dist/components/qds-toggle/qds-toggle.d.ts +68 -0
- package/dist/components/qds-toggle/qds-toggle.d.ts.map +1 -0
- package/dist/components/qds-toggle/qds-toggle.js +260 -0
- package/dist/components/qds-toggle/qds-toggle.js.map +1 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/qds-element.d.ts +31 -0
- package/dist/internal/qds-element.d.ts.map +1 -0
- package/dist/internal/qds-element.js +68 -0
- package/dist/internal/qds-element.js.map +1 -0
- package/dist/internal/qds-text-control.d.ts +79 -0
- package/dist/internal/qds-text-control.d.ts.map +1 -0
- package/dist/internal/qds-text-control.js +159 -0
- package/dist/internal/qds-text-control.js.map +1 -0
- package/package.json +125 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @quieto/ui — QDS web components.
|
|
3
|
+
*
|
|
4
|
+
* Importing this module registers every element. To register only what you use,
|
|
5
|
+
* import the component directly instead:
|
|
6
|
+
*
|
|
7
|
+
* ```js
|
|
8
|
+
* import '@quieto/ui/qds-button.js';
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* Components are styled entirely by CSS custom properties from
|
|
12
|
+
* `@quieto/design-tokens`, which inherit through shadow DOM. Load the stylesheet
|
|
13
|
+
* once, at document level:
|
|
14
|
+
*
|
|
15
|
+
* ```js
|
|
16
|
+
* import '@quieto/design-tokens/css';
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* Without it the components fall back to hardcoded values baked into each
|
|
20
|
+
* component — they render, but nothing is themeable and dark mode does nothing.
|
|
21
|
+
*/
|
|
22
|
+
export { QdsElement } from './internal/qds-element.js';
|
|
23
|
+
export { QdsButton } from './components/qds-button/qds-button.js';
|
|
24
|
+
export type { QdsButtonVariant, QdsButtonSize, QdsButtonType, } from './components/qds-button/qds-button.js';
|
|
25
|
+
export { QdsStack } from './components/qds-stack/qds-stack.js';
|
|
26
|
+
export type { QdsStackDirection, QdsStackGap, QdsStackAlign, QdsStackJustify, } from './components/qds-stack/qds-stack.js';
|
|
27
|
+
export { QdsCheckbox } from './components/qds-checkbox/qds-checkbox.js';
|
|
28
|
+
export { QdsRadioGroup } from './components/qds-radio-group/qds-radio-group.js';
|
|
29
|
+
export type { QdsRadioGroupOrientation, } from './components/qds-radio-group/qds-radio-group.js';
|
|
30
|
+
export { QdsRadio } from './components/qds-radio/qds-radio.js';
|
|
31
|
+
export { QdsToggle } from './components/qds-toggle/qds-toggle.js';
|
|
32
|
+
export { QdsInput } from './components/qds-input/qds-input.js';
|
|
33
|
+
export type { QdsInputType, QdsInputSize, } from './components/qds-input/qds-input.js';
|
|
34
|
+
export { QdsTextField } from './components/qds-text-field/qds-text-field.js';
|
|
35
|
+
export type { QdsTextFieldType, } from './components/qds-text-field/qds-text-field.js';
|
|
36
|
+
export { QdsChip } from './components/qds-chip/qds-chip.js';
|
|
37
|
+
export type { QdsChipVariant, } from './components/qds-chip/qds-chip.js';
|
|
38
|
+
export { QdsCard } from './components/qds-card/qds-card.js';
|
|
39
|
+
export type { QdsCardVariant, } from './components/qds-card/qds-card.js';
|
|
40
|
+
export { QdsProgressBar } from './components/qds-progress-bar/qds-progress-bar.js';
|
|
41
|
+
export type { QdsProgressBarVariant, } from './components/qds-progress-bar/qds-progress-bar.js';
|
|
42
|
+
export { QdsAccordion } from './components/qds-accordion/qds-accordion.js';
|
|
43
|
+
export { QdsAccordionItem } from './components/qds-accordion-item/qds-accordion-item.js';
|
|
44
|
+
export type { QdsAccordionItemHeadingLevel, } from './components/qds-accordion-item/qds-accordion-item.js';
|
|
45
|
+
export { QdsTabs } from './components/qds-tabs/qds-tabs.js';
|
|
46
|
+
export { QdsTab } from './components/qds-tab/qds-tab.js';
|
|
47
|
+
export { QdsTabPanel } from './components/qds-tab-panel/qds-tab-panel.js';
|
|
48
|
+
export { QdsModal } from './components/qds-modal/qds-modal.js';
|
|
49
|
+
export type { QdsModalSize, } from './components/qds-modal/qds-modal.js';
|
|
50
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAClE,YAAY,EACV,gBAAgB,EAChB,aAAa,EACb,aAAa,GACd,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,YAAY,EACV,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,eAAe,GAChB,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAExE,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAChF,YAAY,EACV,wBAAwB,GACzB,MAAM,iDAAiD,CAAC;AAEzD,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAElE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,YAAY,EACV,YAAY,EACZ,YAAY,GACb,MAAM,qCAAqC,CAAC;AAE7C,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAC7E,YAAY,EACV,gBAAgB,GACjB,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAC5D,YAAY,EACV,cAAc,GACf,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAC5D,YAAY,EACV,cAAc,GACf,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,MAAM,mDAAmD,CAAC;AACnF,YAAY,EACV,qBAAqB,GACtB,MAAM,mDAAmD,CAAC;AAE3D,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAE3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uDAAuD,CAAC;AACzF,YAAY,EACV,4BAA4B,GAC7B,MAAM,uDAAuD,CAAC;AAE/D,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAE5D,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAE1E,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAC/D,YAAY,EACV,YAAY,GACb,MAAM,qCAAqC,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @quieto/ui — QDS web components.
|
|
3
|
+
*
|
|
4
|
+
* Importing this module registers every element. To register only what you use,
|
|
5
|
+
* import the component directly instead:
|
|
6
|
+
*
|
|
7
|
+
* ```js
|
|
8
|
+
* import '@quieto/ui/qds-button.js';
|
|
9
|
+
* ```
|
|
10
|
+
*
|
|
11
|
+
* Components are styled entirely by CSS custom properties from
|
|
12
|
+
* `@quieto/design-tokens`, which inherit through shadow DOM. Load the stylesheet
|
|
13
|
+
* once, at document level:
|
|
14
|
+
*
|
|
15
|
+
* ```js
|
|
16
|
+
* import '@quieto/design-tokens/css';
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* Without it the components fall back to hardcoded values baked into each
|
|
20
|
+
* component — they render, but nothing is themeable and dark mode does nothing.
|
|
21
|
+
*/
|
|
22
|
+
export { QdsElement } from './internal/qds-element.js';
|
|
23
|
+
export { QdsButton } from './components/qds-button/qds-button.js';
|
|
24
|
+
export { QdsStack } from './components/qds-stack/qds-stack.js';
|
|
25
|
+
export { QdsCheckbox } from './components/qds-checkbox/qds-checkbox.js';
|
|
26
|
+
export { QdsRadioGroup } from './components/qds-radio-group/qds-radio-group.js';
|
|
27
|
+
export { QdsRadio } from './components/qds-radio/qds-radio.js';
|
|
28
|
+
export { QdsToggle } from './components/qds-toggle/qds-toggle.js';
|
|
29
|
+
export { QdsInput } from './components/qds-input/qds-input.js';
|
|
30
|
+
export { QdsTextField } from './components/qds-text-field/qds-text-field.js';
|
|
31
|
+
export { QdsChip } from './components/qds-chip/qds-chip.js';
|
|
32
|
+
export { QdsCard } from './components/qds-card/qds-card.js';
|
|
33
|
+
export { QdsProgressBar } from './components/qds-progress-bar/qds-progress-bar.js';
|
|
34
|
+
export { QdsAccordion } from './components/qds-accordion/qds-accordion.js';
|
|
35
|
+
export { QdsAccordionItem } from './components/qds-accordion-item/qds-accordion-item.js';
|
|
36
|
+
export { QdsTabs } from './components/qds-tabs/qds-tabs.js';
|
|
37
|
+
export { QdsTab } from './components/qds-tab/qds-tab.js';
|
|
38
|
+
export { QdsTabPanel } from './components/qds-tab-panel/qds-tab-panel.js';
|
|
39
|
+
export { QdsModal } from './components/qds-modal/qds-modal.js';
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAEvD,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAOlE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAQ/D,OAAO,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAExE,OAAO,EAAE,aAAa,EAAE,MAAM,iDAAiD,CAAC;AAKhF,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAE/D,OAAO,EAAE,SAAS,EAAE,MAAM,uCAAuC,CAAC;AAElE,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AAM/D,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAK7E,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAK5D,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAK5D,OAAO,EAAE,cAAc,EAAE,MAAM,mDAAmD,CAAC;AAKnF,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAE3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uDAAuD,CAAC;AAKzF,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAE5D,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,MAAM,6CAA6C,CAAC;AAE1E,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* Base class for every QDS element.
|
|
4
|
+
*
|
|
5
|
+
* Exists so that cross-cutting concerns have exactly one home. Shadow DOM gives
|
|
6
|
+
* each component its own stylesheet, which means anything genuinely shared —
|
|
7
|
+
* box-sizing, the `hidden` contract, the focus ring — would otherwise be copied
|
|
8
|
+
* into every component and drift.
|
|
9
|
+
*/
|
|
10
|
+
export declare class QdsElement extends LitElement {
|
|
11
|
+
/**
|
|
12
|
+
* Reset and shared primitives. Components spread this into their own `styles`:
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* static override styles = [QdsElement.baseStyles, css`…`];
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* It is not applied automatically, because a subclass assigning `styles` would
|
|
19
|
+
* silently replace it rather than extend it.
|
|
20
|
+
*/
|
|
21
|
+
static baseStyles: import("lit").CSSResult;
|
|
22
|
+
/**
|
|
23
|
+
* A focus ring drawn from semantic tokens.
|
|
24
|
+
*
|
|
25
|
+
* Uses `:focus-visible` so a pointer click does not draw it, and `outline`
|
|
26
|
+
* rather than `box-shadow` so it survives forced-colors mode, where
|
|
27
|
+
* box-shadow is discarded and the focus indicator would disappear entirely.
|
|
28
|
+
*/
|
|
29
|
+
static focusRingStyles: import("lit").CSSResult;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=qds-element.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qds-element.d.ts","sourceRoot":"","sources":["../../src/internal/qds-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAO,MAAM,KAAK,CAAC;AAEtC;;;;;;;GAOG;AACH,qBAAa,UAAW,SAAQ,UAAU;IACxC;;;;;;;;;OASG;IACH,MAAM,CAAC,UAAU,0BAgCf;IAEF;;;;;;OAMG;IACH,MAAM,CAAC,eAAe,0BAKpB;CACH"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { LitElement, css } from 'lit';
|
|
2
|
+
/**
|
|
3
|
+
* Base class for every QDS element.
|
|
4
|
+
*
|
|
5
|
+
* Exists so that cross-cutting concerns have exactly one home. Shadow DOM gives
|
|
6
|
+
* each component its own stylesheet, which means anything genuinely shared —
|
|
7
|
+
* box-sizing, the `hidden` contract, the focus ring — would otherwise be copied
|
|
8
|
+
* into every component and drift.
|
|
9
|
+
*/
|
|
10
|
+
export class QdsElement extends LitElement {
|
|
11
|
+
/**
|
|
12
|
+
* Reset and shared primitives. Components spread this into their own `styles`:
|
|
13
|
+
*
|
|
14
|
+
* ```ts
|
|
15
|
+
* static override styles = [QdsElement.baseStyles, css`…`];
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* It is not applied automatically, because a subclass assigning `styles` would
|
|
19
|
+
* silently replace it rather than extend it.
|
|
20
|
+
*/
|
|
21
|
+
static { this.baseStyles = css `
|
|
22
|
+
:host {
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
|
|
25
|
+
/*
|
|
26
|
+
* The focus ring, defined once. Components draw it on different elements —
|
|
27
|
+
* the host, an inner button, a drawn box, the outline of a text box — so
|
|
28
|
+
* each writes its own selector and offset, but takes the ring itself from
|
|
29
|
+
* here: outline: var(--_focus-ring). The tokens it reads change in one
|
|
30
|
+
* place.
|
|
31
|
+
*/
|
|
32
|
+
--_focus-ring: var(--qds-semantic-border-primary, 0.125rem) solid
|
|
33
|
+
var(--qds-semantic-color-border-primary, currentColor);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
*,
|
|
37
|
+
*::before,
|
|
38
|
+
*::after {
|
|
39
|
+
box-sizing: inherit;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/*
|
|
43
|
+
* The hidden attribute has no effect on a custom element whose :host sets an
|
|
44
|
+
* explicit display, which every component here does. The !important is
|
|
45
|
+
* warranted: hidden must win over the component's own display.
|
|
46
|
+
*
|
|
47
|
+
* Note: no backticks in these comments. This is inside a css tagged template,
|
|
48
|
+
* so one would terminate the literal and the file would not parse.
|
|
49
|
+
*/
|
|
50
|
+
:host([hidden]) {
|
|
51
|
+
display: none !important;
|
|
52
|
+
}
|
|
53
|
+
`; }
|
|
54
|
+
/**
|
|
55
|
+
* A focus ring drawn from semantic tokens.
|
|
56
|
+
*
|
|
57
|
+
* Uses `:focus-visible` so a pointer click does not draw it, and `outline`
|
|
58
|
+
* rather than `box-shadow` so it survives forced-colors mode, where
|
|
59
|
+
* box-shadow is discarded and the focus indicator would disappear entirely.
|
|
60
|
+
*/
|
|
61
|
+
static { this.focusRingStyles = css `
|
|
62
|
+
.focus-ring:focus-visible {
|
|
63
|
+
outline: var(--_focus-ring);
|
|
64
|
+
outline-offset: 0.125rem;
|
|
65
|
+
}
|
|
66
|
+
`; }
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=qds-element.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qds-element.js","sourceRoot":"","sources":["../../src/internal/qds-element.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAEtC;;;;;;;GAOG;AACH,MAAM,OAAO,UAAW,SAAQ,UAAU;IACxC;;;;;;;;;OASG;aACI,eAAU,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCtB,CAAC;IAEF;;;;;;OAMG;aACI,oBAAe,GAAG,GAAG,CAAA;;;;;GAK3B,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { type PropertyValues } from 'lit';
|
|
2
|
+
import { QdsElement } from './qds-element.js';
|
|
3
|
+
/** The single-line text types the text controls accept. */
|
|
4
|
+
export type QdsTextControlType = 'text' | 'email' | 'password' | 'search' | 'tel' | 'url' | 'number';
|
|
5
|
+
/**
|
|
6
|
+
* Shared base for the components that wrap one native `<input>`: `qds-input`
|
|
7
|
+
* and `qds-text-field`.
|
|
8
|
+
*
|
|
9
|
+
* Holds everything about being a form control that the two would otherwise
|
|
10
|
+
* duplicate — the native input's properties, form association, mirroring the
|
|
11
|
+
* input's constraint validation onto the host, the input and change events, and
|
|
12
|
+
* focusing the input from a click anywhere in the control. Subclasses render the
|
|
13
|
+
* markup around the input, and bind their `<input>` to the handlers here.
|
|
14
|
+
*
|
|
15
|
+
* Not registered as an element, and not exported from the package.
|
|
16
|
+
*/
|
|
17
|
+
export declare class QdsTextControl extends QdsElement {
|
|
18
|
+
static shadowRootOptions: ShadowRootInit;
|
|
19
|
+
static formAssociated: boolean;
|
|
20
|
+
/** Input type. Only the single-line text types; use a dedicated component for dates or files. */
|
|
21
|
+
type: QdsTextControlType;
|
|
22
|
+
/** The current value. The `value` attribute sets the initial value, restored on form reset. */
|
|
23
|
+
value: string;
|
|
24
|
+
/** Field name used when the form is submitted. */
|
|
25
|
+
name: string;
|
|
26
|
+
/** Hint shown while empty. Not a substitute for a label. */
|
|
27
|
+
placeholder: string;
|
|
28
|
+
/** Prevents interaction and excludes the value from form submission. */
|
|
29
|
+
disabled: boolean;
|
|
30
|
+
/** Prevents editing but keeps the value focusable, selectable, and submitted. */
|
|
31
|
+
readonly: boolean;
|
|
32
|
+
/** Makes the form invalid while empty. */
|
|
33
|
+
required: boolean;
|
|
34
|
+
/** Minimum length, as on a native input. */
|
|
35
|
+
minlength?: number;
|
|
36
|
+
/** Maximum length, as on a native input. */
|
|
37
|
+
maxlength?: number;
|
|
38
|
+
/** A regular expression the value must match, as on a native input. */
|
|
39
|
+
pattern?: string;
|
|
40
|
+
/** Autofill hint, as on a native input. */
|
|
41
|
+
autocomplete?: string;
|
|
42
|
+
protected readonly input: HTMLInputElement;
|
|
43
|
+
/** Disabled by its own attribute or by an ancestor `<fieldset disabled>`. */
|
|
44
|
+
protected formDisabled: boolean;
|
|
45
|
+
protected readonly internals: ElementInternals;
|
|
46
|
+
constructor();
|
|
47
|
+
/** The form this control belongs to, if any. */
|
|
48
|
+
get form(): HTMLFormElement | null;
|
|
49
|
+
/** Same as the native `checkValidity()`. */
|
|
50
|
+
checkValidity(): boolean;
|
|
51
|
+
/** Same as the native `reportValidity()`. */
|
|
52
|
+
reportValidity(): boolean;
|
|
53
|
+
/** Same as the native `validity`. */
|
|
54
|
+
get validity(): ValidityState;
|
|
55
|
+
/** Selects all of the text, as the native `select()`. */
|
|
56
|
+
select(): void;
|
|
57
|
+
protected willUpdate(changed: PropertyValues<this>): void;
|
|
58
|
+
protected updated(): void;
|
|
59
|
+
/** Called by the form on reset: restore the value the markup declared. */
|
|
60
|
+
formResetCallback(): void;
|
|
61
|
+
/** Called when this element's disabled state changes, from its own attribute or a fieldset. */
|
|
62
|
+
formDisabledCallback(disabled: boolean): void;
|
|
63
|
+
/**
|
|
64
|
+
* Mirror the native input's validity onto the host, anchored to the input so
|
|
65
|
+
* the browser's validation bubble points at the text rather than the host.
|
|
66
|
+
*/
|
|
67
|
+
protected syncValidity(): void;
|
|
68
|
+
/** Bind to the native input's `input` event. */
|
|
69
|
+
protected handleInput(): void;
|
|
70
|
+
/** Bind to the native input's `change` event. */
|
|
71
|
+
protected handleChange(): void;
|
|
72
|
+
/**
|
|
73
|
+
* Bind to the click of the box drawn around the input. Clicking its padding or
|
|
74
|
+
* an affix should land in the text, as it would on a native input whose box is
|
|
75
|
+
* the whole control.
|
|
76
|
+
*/
|
|
77
|
+
protected focusInput(event: MouseEvent): void;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=qds-text-control.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qds-text-control.d.ts","sourceRoot":"","sources":["../../src/internal/qds-text-control.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,KAAK,CAAC;AAG1C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,2DAA2D;AAC3D,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,CAAC;AAErG;;;;;;;;;;;GAWG;AACH,qBAAa,cAAe,SAAQ,UAAU;IAC5C,OAAgB,iBAAiB,EAAE,cAAc,CAG/C;IAEF,MAAM,CAAC,cAAc,UAAQ;IAE7B,iGAAiG;IAEjG,IAAI,EAAE,kBAAkB,CAAU;IAElC,+FAA+F;IAE/F,KAAK,SAAM;IAEX,kDAAkD;IAElD,IAAI,SAAM;IAEV,4DAA4D;IAE5D,WAAW,SAAM;IAEjB,wEAAwE;IAExE,QAAQ,UAAS;IAEjB,iFAAiF;IAEjF,QAAQ,UAAS;IAEjB,0CAA0C;IAE1C,QAAQ,UAAS;IAEjB,4CAA4C;IAE5C,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,4CAA4C;IAE5C,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,uEAAuE;IAEvE,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,2CAA2C;IAE3C,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAG,gBAAgB,CAAC;IAE5C,6EAA6E;IAE7E,SAAS,CAAC,YAAY,UAAS;IAE/B,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC;;IAO/C,gDAAgD;IAChD,IAAI,IAAI,IAAI,eAAe,GAAG,IAAI,CAEjC;IAED,4CAA4C;IAC5C,aAAa,IAAI,OAAO;IAIxB,6CAA6C;IAC7C,cAAc,IAAI,OAAO;IAIzB,qCAAqC;IACrC,IAAI,QAAQ,IAAI,aAAa,CAE5B;IAED,yDAAyD;IACzD,MAAM,IAAI,IAAI;cAIK,UAAU,CAAC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;cAM/C,OAAO,IAAI,IAAI;IAIlC,0EAA0E;IAC1E,iBAAiB,IAAI,IAAI;IAIzB,+FAA+F;IAC/F,oBAAoB,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI;IAI7C;;;OAGG;IACH,SAAS,CAAC,YAAY,IAAI,IAAI;IAS9B,gDAAgD;IAChD,SAAS,CAAC,WAAW,IAAI,IAAI;IAW7B,iDAAiD;IACjD,SAAS,CAAC,YAAY,IAAI,IAAI;IAM9B;;;;OAIG;IACH,SAAS,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;CAG9C"}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
+
};
|
|
7
|
+
import {} from 'lit';
|
|
8
|
+
import { property, query, state } from 'lit/decorators.js';
|
|
9
|
+
import { QdsElement } from './qds-element.js';
|
|
10
|
+
/**
|
|
11
|
+
* Shared base for the components that wrap one native `<input>`: `qds-input`
|
|
12
|
+
* and `qds-text-field`.
|
|
13
|
+
*
|
|
14
|
+
* Holds everything about being a form control that the two would otherwise
|
|
15
|
+
* duplicate — the native input's properties, form association, mirroring the
|
|
16
|
+
* input's constraint validation onto the host, the input and change events, and
|
|
17
|
+
* focusing the input from a click anywhere in the control. Subclasses render the
|
|
18
|
+
* markup around the input, and bind their `<input>` to the handlers here.
|
|
19
|
+
*
|
|
20
|
+
* Not registered as an element, and not exported from the package.
|
|
21
|
+
*/
|
|
22
|
+
export class QdsTextControl extends QdsElement {
|
|
23
|
+
static { this.shadowRootOptions = {
|
|
24
|
+
...QdsElement.shadowRootOptions,
|
|
25
|
+
delegatesFocus: true,
|
|
26
|
+
}; }
|
|
27
|
+
static { this.formAssociated = true; }
|
|
28
|
+
constructor() {
|
|
29
|
+
super();
|
|
30
|
+
/** Input type. Only the single-line text types; use a dedicated component for dates or files. */
|
|
31
|
+
this.type = 'text';
|
|
32
|
+
/** The current value. The `value` attribute sets the initial value, restored on form reset. */
|
|
33
|
+
this.value = '';
|
|
34
|
+
/** Field name used when the form is submitted. */
|
|
35
|
+
this.name = '';
|
|
36
|
+
/** Hint shown while empty. Not a substitute for a label. */
|
|
37
|
+
this.placeholder = '';
|
|
38
|
+
/** Prevents interaction and excludes the value from form submission. */
|
|
39
|
+
this.disabled = false;
|
|
40
|
+
/** Prevents editing but keeps the value focusable, selectable, and submitted. */
|
|
41
|
+
this.readonly = false;
|
|
42
|
+
/** Makes the form invalid while empty. */
|
|
43
|
+
this.required = false;
|
|
44
|
+
/** Disabled by its own attribute or by an ancestor `<fieldset disabled>`. */
|
|
45
|
+
this.formDisabled = false;
|
|
46
|
+
this.internals = this.attachInternals();
|
|
47
|
+
}
|
|
48
|
+
/** The form this control belongs to, if any. */
|
|
49
|
+
get form() {
|
|
50
|
+
return this.internals.form;
|
|
51
|
+
}
|
|
52
|
+
/** Same as the native `checkValidity()`. */
|
|
53
|
+
checkValidity() {
|
|
54
|
+
return this.internals.checkValidity();
|
|
55
|
+
}
|
|
56
|
+
/** Same as the native `reportValidity()`. */
|
|
57
|
+
reportValidity() {
|
|
58
|
+
return this.internals.reportValidity();
|
|
59
|
+
}
|
|
60
|
+
/** Same as the native `validity`. */
|
|
61
|
+
get validity() {
|
|
62
|
+
return this.internals.validity;
|
|
63
|
+
}
|
|
64
|
+
/** Selects all of the text, as the native `select()`. */
|
|
65
|
+
select() {
|
|
66
|
+
this.input.select();
|
|
67
|
+
}
|
|
68
|
+
willUpdate(changed) {
|
|
69
|
+
if (changed.has('value')) {
|
|
70
|
+
this.internals.setFormValue(this.value);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
updated() {
|
|
74
|
+
this.syncValidity();
|
|
75
|
+
}
|
|
76
|
+
/** Called by the form on reset: restore the value the markup declared. */
|
|
77
|
+
formResetCallback() {
|
|
78
|
+
this.value = this.getAttribute('value') ?? '';
|
|
79
|
+
}
|
|
80
|
+
/** Called when this element's disabled state changes, from its own attribute or a fieldset. */
|
|
81
|
+
formDisabledCallback(disabled) {
|
|
82
|
+
this.formDisabled = disabled;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Mirror the native input's validity onto the host, anchored to the input so
|
|
86
|
+
* the browser's validation bubble points at the text rather than the host.
|
|
87
|
+
*/
|
|
88
|
+
syncValidity() {
|
|
89
|
+
const { validity, validationMessage } = this.input;
|
|
90
|
+
if (validity.valid) {
|
|
91
|
+
this.internals.setValidity({});
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
this.internals.setValidity(validity, validationMessage, this.input);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/** Bind to the native input's `input` event. */
|
|
98
|
+
handleInput() {
|
|
99
|
+
this.value = this.input.value;
|
|
100
|
+
// Synchronously, not left to willUpdate: a listener reading FormData from
|
|
101
|
+
// this very event would otherwise see the previous value.
|
|
102
|
+
this.internals.setFormValue(this.value);
|
|
103
|
+
this.syncValidity();
|
|
104
|
+
this.dispatchEvent(new CustomEvent('qds-input', { detail: { value: this.value }, bubbles: true, composed: true }));
|
|
105
|
+
}
|
|
106
|
+
/** Bind to the native input's `change` event. */
|
|
107
|
+
handleChange() {
|
|
108
|
+
this.dispatchEvent(new CustomEvent('qds-change', { detail: { value: this.value }, bubbles: true, composed: true }));
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Bind to the click of the box drawn around the input. Clicking its padding or
|
|
112
|
+
* an affix should land in the text, as it would on a native input whose box is
|
|
113
|
+
* the whole control.
|
|
114
|
+
*/
|
|
115
|
+
focusInput(event) {
|
|
116
|
+
if (event.target !== this.input)
|
|
117
|
+
this.input.focus();
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
__decorate([
|
|
121
|
+
property()
|
|
122
|
+
], QdsTextControl.prototype, "type", void 0);
|
|
123
|
+
__decorate([
|
|
124
|
+
property()
|
|
125
|
+
], QdsTextControl.prototype, "value", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
property()
|
|
128
|
+
], QdsTextControl.prototype, "name", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
property()
|
|
131
|
+
], QdsTextControl.prototype, "placeholder", void 0);
|
|
132
|
+
__decorate([
|
|
133
|
+
property({ type: Boolean, reflect: true })
|
|
134
|
+
], QdsTextControl.prototype, "disabled", void 0);
|
|
135
|
+
__decorate([
|
|
136
|
+
property({ type: Boolean, reflect: true })
|
|
137
|
+
], QdsTextControl.prototype, "readonly", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
property({ type: Boolean, reflect: true })
|
|
140
|
+
], QdsTextControl.prototype, "required", void 0);
|
|
141
|
+
__decorate([
|
|
142
|
+
property({ type: Number })
|
|
143
|
+
], QdsTextControl.prototype, "minlength", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
property({ type: Number })
|
|
146
|
+
], QdsTextControl.prototype, "maxlength", void 0);
|
|
147
|
+
__decorate([
|
|
148
|
+
property()
|
|
149
|
+
], QdsTextControl.prototype, "pattern", void 0);
|
|
150
|
+
__decorate([
|
|
151
|
+
property()
|
|
152
|
+
], QdsTextControl.prototype, "autocomplete", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
query('input')
|
|
155
|
+
], QdsTextControl.prototype, "input", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
state()
|
|
158
|
+
], QdsTextControl.prototype, "formDisabled", void 0);
|
|
159
|
+
//# sourceMappingURL=qds-text-control.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"qds-text-control.js","sourceRoot":"","sources":["../../src/internal/qds-text-control.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,128 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quieto/ui",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "QDS web components — Lit elements styled entirely by @quieto/design-tokens.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Dillon Schultz",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/dillonschultz93/qds.git",
|
|
11
|
+
"directory": "packages/ui"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"web-components",
|
|
15
|
+
"lit",
|
|
16
|
+
"design-system",
|
|
17
|
+
"custom-elements"
|
|
18
|
+
],
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"default": "./dist/index.js"
|
|
23
|
+
},
|
|
24
|
+
"./qds-button.js": {
|
|
25
|
+
"types": "./dist/components/qds-button/qds-button.d.ts",
|
|
26
|
+
"default": "./dist/components/qds-button/qds-button.js"
|
|
27
|
+
},
|
|
28
|
+
"./qds-stack.js": {
|
|
29
|
+
"types": "./dist/components/qds-stack/qds-stack.d.ts",
|
|
30
|
+
"default": "./dist/components/qds-stack/qds-stack.js"
|
|
31
|
+
},
|
|
32
|
+
"./qds-checkbox.js": {
|
|
33
|
+
"types": "./dist/components/qds-checkbox/qds-checkbox.d.ts",
|
|
34
|
+
"default": "./dist/components/qds-checkbox/qds-checkbox.js"
|
|
35
|
+
},
|
|
36
|
+
"./qds-radio-group.js": {
|
|
37
|
+
"types": "./dist/components/qds-radio-group/qds-radio-group.d.ts",
|
|
38
|
+
"default": "./dist/components/qds-radio-group/qds-radio-group.js"
|
|
39
|
+
},
|
|
40
|
+
"./qds-radio.js": {
|
|
41
|
+
"types": "./dist/components/qds-radio/qds-radio.d.ts",
|
|
42
|
+
"default": "./dist/components/qds-radio/qds-radio.js"
|
|
43
|
+
},
|
|
44
|
+
"./qds-toggle.js": {
|
|
45
|
+
"types": "./dist/components/qds-toggle/qds-toggle.d.ts",
|
|
46
|
+
"default": "./dist/components/qds-toggle/qds-toggle.js"
|
|
47
|
+
},
|
|
48
|
+
"./qds-input.js": {
|
|
49
|
+
"types": "./dist/components/qds-input/qds-input.d.ts",
|
|
50
|
+
"default": "./dist/components/qds-input/qds-input.js"
|
|
51
|
+
},
|
|
52
|
+
"./qds-text-field.js": {
|
|
53
|
+
"types": "./dist/components/qds-text-field/qds-text-field.d.ts",
|
|
54
|
+
"default": "./dist/components/qds-text-field/qds-text-field.js"
|
|
55
|
+
},
|
|
56
|
+
"./qds-chip.js": {
|
|
57
|
+
"types": "./dist/components/qds-chip/qds-chip.d.ts",
|
|
58
|
+
"default": "./dist/components/qds-chip/qds-chip.js"
|
|
59
|
+
},
|
|
60
|
+
"./qds-card.js": {
|
|
61
|
+
"types": "./dist/components/qds-card/qds-card.d.ts",
|
|
62
|
+
"default": "./dist/components/qds-card/qds-card.js"
|
|
63
|
+
},
|
|
64
|
+
"./qds-progress-bar.js": {
|
|
65
|
+
"types": "./dist/components/qds-progress-bar/qds-progress-bar.d.ts",
|
|
66
|
+
"default": "./dist/components/qds-progress-bar/qds-progress-bar.js"
|
|
67
|
+
},
|
|
68
|
+
"./qds-accordion.js": {
|
|
69
|
+
"types": "./dist/components/qds-accordion/qds-accordion.d.ts",
|
|
70
|
+
"default": "./dist/components/qds-accordion/qds-accordion.js"
|
|
71
|
+
},
|
|
72
|
+
"./qds-accordion-item.js": {
|
|
73
|
+
"types": "./dist/components/qds-accordion-item/qds-accordion-item.d.ts",
|
|
74
|
+
"default": "./dist/components/qds-accordion-item/qds-accordion-item.js"
|
|
75
|
+
},
|
|
76
|
+
"./qds-tabs.js": {
|
|
77
|
+
"types": "./dist/components/qds-tabs/qds-tabs.d.ts",
|
|
78
|
+
"default": "./dist/components/qds-tabs/qds-tabs.js"
|
|
79
|
+
},
|
|
80
|
+
"./qds-tab.js": {
|
|
81
|
+
"types": "./dist/components/qds-tab/qds-tab.d.ts",
|
|
82
|
+
"default": "./dist/components/qds-tab/qds-tab.js"
|
|
83
|
+
},
|
|
84
|
+
"./qds-tab-panel.js": {
|
|
85
|
+
"types": "./dist/components/qds-tab-panel/qds-tab-panel.d.ts",
|
|
86
|
+
"default": "./dist/components/qds-tab-panel/qds-tab-panel.js"
|
|
87
|
+
},
|
|
88
|
+
"./qds-modal.js": {
|
|
89
|
+
"types": "./dist/components/qds-modal/qds-modal.d.ts",
|
|
90
|
+
"default": "./dist/components/qds-modal/qds-modal.js"
|
|
91
|
+
},
|
|
92
|
+
"./custom-elements.json": "./custom-elements.json"
|
|
93
|
+
},
|
|
94
|
+
"files": [
|
|
95
|
+
"dist",
|
|
96
|
+
"custom-elements.json"
|
|
97
|
+
],
|
|
98
|
+
"customElements": "custom-elements.json",
|
|
99
|
+
"//sideEffects": "Defining a custom element IS a side effect, so every module that calls customElements.define must be listed — including the index barrel, which registers everything by re-exporting the component modules. Omitting index.js lets a bundler tree-shake `import '@quieto/ui'` down to nothing: no error, no elements registered, and the page shows un-upgraded markup.",
|
|
100
|
+
"sideEffects": [
|
|
101
|
+
"./dist/index.js",
|
|
102
|
+
"./dist/**/qds-*.js"
|
|
103
|
+
],
|
|
104
|
+
"engines": {
|
|
105
|
+
"node": ">=22"
|
|
106
|
+
},
|
|
107
|
+
"dependencies": {
|
|
108
|
+
"lit": "^3.3.3",
|
|
109
|
+
"@quieto/design-tokens": "0.2.0"
|
|
110
|
+
},
|
|
111
|
+
"devDependencies": {
|
|
112
|
+
"@custom-elements-manifest/analyzer": "^0.11.0",
|
|
113
|
+
"@open-wc/testing": "^4.0.0",
|
|
114
|
+
"@web/dev-server-esbuild": "^2.0.0",
|
|
115
|
+
"@web/test-runner": "^1.0.0",
|
|
116
|
+
"@web/test-runner-playwright": "^0.11.1",
|
|
117
|
+
"typescript": "5.9.3"
|
|
118
|
+
},
|
|
119
|
+
"scripts": {
|
|
120
|
+
"build": "tsc --build && npm run analyze",
|
|
121
|
+
"dev": "tsc --build --watch --preserveWatchOutput",
|
|
122
|
+
"analyze": "cem analyze --litelement --globs \"src/**/*.ts\" --exclude \"src/**/*.test.ts\"",
|
|
123
|
+
"test": "wtr --coverage",
|
|
124
|
+
"test:watch": "wtr --watch",
|
|
125
|
+
"type-check": "tsc --build --dry",
|
|
126
|
+
"clean": "rm -rf dist custom-elements.json .turbo tsconfig.tsbuildinfo"
|
|
127
|
+
}
|
|
6
128
|
}
|