@quartzds/core 1.0.0-beta.1
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/README.md +136 -0
- package/components/floating-ui.dom.esm.js +1402 -0
- package/components/floating-ui.dom.esm.js.map +1 -0
- package/components/helpers.js +174 -0
- package/components/helpers.js.map +1 -0
- package/components/icon.js +175 -0
- package/components/icon.js.map +1 -0
- package/components/index.d.ts +52 -0
- package/components/index.js +117 -0
- package/components/index.js.map +1 -0
- package/components/label.js +55 -0
- package/components/label.js.map +1 -0
- package/components/qds-button.d.ts +11 -0
- package/components/qds-button.js +148 -0
- package/components/qds-button.js.map +1 -0
- package/components/qds-checkbox.d.ts +11 -0
- package/components/qds-checkbox.js +156 -0
- package/components/qds-checkbox.js.map +1 -0
- package/components/qds-dropdown.d.ts +11 -0
- package/components/qds-dropdown.js +259 -0
- package/components/qds-dropdown.js.map +1 -0
- package/components/qds-icon.d.ts +11 -0
- package/components/qds-icon.js +13 -0
- package/components/qds-icon.js.map +1 -0
- package/components/qds-inline-link.d.ts +11 -0
- package/components/qds-inline-link.js +89 -0
- package/components/qds-inline-link.js.map +1 -0
- package/components/qds-input.d.ts +11 -0
- package/components/qds-input.js +244 -0
- package/components/qds-input.js.map +1 -0
- package/components/qds-label.d.ts +11 -0
- package/components/qds-label.js +13 -0
- package/components/qds-label.js.map +1 -0
- package/components/qds-radio.d.ts +11 -0
- package/components/qds-radio.js +109 -0
- package/components/qds-radio.js.map +1 -0
- package/components/qds-switch.d.ts +11 -0
- package/components/qds-switch.js +119 -0
- package/components/qds-switch.js.map +1 -0
- package/components/qds-title.d.ts +11 -0
- package/components/qds-title.js +94 -0
- package/components/qds-title.js.map +1 -0
- package/components/qds-tooltip.d.ts +11 -0
- package/components/qds-tooltip.js +325 -0
- package/components/qds-tooltip.js.map +1 -0
- package/dist/cjs/floating-ui.dom.esm-71fa96af.js +1410 -0
- package/dist/cjs/floating-ui.dom.esm-71fa96af.js.map +1 -0
- package/dist/cjs/helpers-0b23af3f.js +184 -0
- package/dist/cjs/helpers-0b23af3f.js.map +1 -0
- package/dist/cjs/index-f19b2823.js +2030 -0
- package/dist/cjs/index-f19b2823.js.map +1 -0
- package/dist/cjs/index.cjs.js +115 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/library-4803c801.js +62 -0
- package/dist/cjs/library-4803c801.js.map +1 -0
- package/dist/cjs/loader.cjs.js +29 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/qds-button.cjs.entry.js +110 -0
- package/dist/cjs/qds-button.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-checkbox.cjs.entry.js +116 -0
- package/dist/cjs/qds-checkbox.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-dropdown.cjs.entry.js +227 -0
- package/dist/cjs/qds-dropdown.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-icon.cjs.entry.js +113 -0
- package/dist/cjs/qds-icon.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-inline-link.cjs.entry.js +61 -0
- package/dist/cjs/qds-inline-link.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-input.cjs.entry.js +200 -0
- package/dist/cjs/qds-input.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-label.cjs.entry.js +39 -0
- package/dist/cjs/qds-label.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-radio.cjs.entry.js +74 -0
- package/dist/cjs/qds-radio.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-switch.cjs.entry.js +79 -0
- package/dist/cjs/qds-switch.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-title.cjs.entry.js +66 -0
- package/dist/cjs/qds-title.cjs.entry.js.map +1 -0
- package/dist/cjs/qds-tooltip.cjs.entry.js +284 -0
- package/dist/cjs/qds-tooltip.cjs.entry.js.map +1 -0
- package/dist/cjs/qds.cjs.js +33 -0
- package/dist/cjs/qds.cjs.js.map +1 -0
- package/dist/custom-elements.json +3976 -0
- package/dist/docs.d.ts +148 -0
- package/dist/docs.json +3918 -0
- package/dist/esm/floating-ui.dom.esm-f96ac766.js +1402 -0
- package/dist/esm/floating-ui.dom.esm-f96ac766.js.map +1 -0
- package/dist/esm/helpers-5c189a19.js +174 -0
- package/dist/esm/helpers-5c189a19.js.map +1 -0
- package/dist/esm/index-1bc8e218.js +2000 -0
- package/dist/esm/index-1bc8e218.js.map +1 -0
- package/dist/esm/index.js +106 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/library-aa6893c0.js +58 -0
- package/dist/esm/library-aa6893c0.js.map +1 -0
- package/dist/esm/loader.js +25 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/polyfills/core-js.js +11 -0
- package/dist/esm/polyfills/css-shim.js +1 -0
- package/dist/esm/polyfills/dom.js +79 -0
- package/dist/esm/polyfills/es5-html-element.js +1 -0
- package/dist/esm/polyfills/index.js +34 -0
- package/dist/esm/polyfills/system.js +6 -0
- package/dist/esm/qds-button.entry.js +106 -0
- package/dist/esm/qds-button.entry.js.map +1 -0
- package/dist/esm/qds-checkbox.entry.js +112 -0
- package/dist/esm/qds-checkbox.entry.js.map +1 -0
- package/dist/esm/qds-dropdown.entry.js +223 -0
- package/dist/esm/qds-dropdown.entry.js.map +1 -0
- package/dist/esm/qds-icon.entry.js +109 -0
- package/dist/esm/qds-icon.entry.js.map +1 -0
- package/dist/esm/qds-inline-link.entry.js +57 -0
- package/dist/esm/qds-inline-link.entry.js.map +1 -0
- package/dist/esm/qds-input.entry.js +196 -0
- package/dist/esm/qds-input.entry.js.map +1 -0
- package/dist/esm/qds-label.entry.js +35 -0
- package/dist/esm/qds-label.entry.js.map +1 -0
- package/dist/esm/qds-radio.entry.js +70 -0
- package/dist/esm/qds-radio.entry.js.map +1 -0
- package/dist/esm/qds-switch.entry.js +75 -0
- package/dist/esm/qds-switch.entry.js.map +1 -0
- package/dist/esm/qds-title.entry.js +62 -0
- package/dist/esm/qds-title.entry.js.map +1 -0
- package/dist/esm/qds-tooltip.entry.js +280 -0
- package/dist/esm/qds-tooltip.entry.js.map +1 -0
- package/dist/esm/qds.js +28 -0
- package/dist/esm/qds.js.map +1 -0
- package/dist/types/components/button/button.d.ts +209 -0
- package/dist/types/components/checkbox/checkbox.d.ts +136 -0
- package/dist/types/components/create-story.d.ts +5 -0
- package/dist/types/components/dropdown/dropdown.d.ts +135 -0
- package/dist/types/components/icon/default-library.d.ts +4 -0
- package/dist/types/components/icon/icon.d.ts +31 -0
- package/dist/types/components/icon/library.d.ts +19 -0
- package/dist/types/components/icon/request.d.ts +12 -0
- package/dist/types/components/icon/system-library.d.ts +4 -0
- package/dist/types/components/inline-link/inline-link.d.ts +208 -0
- package/dist/types/components/input/input.d.ts +386 -0
- package/dist/types/components/label/label.d.ts +33 -0
- package/dist/types/components/radio/radio.d.ts +110 -0
- package/dist/types/components/switch/switch.d.ts +115 -0
- package/dist/types/components/title/title.d.ts +42 -0
- package/dist/types/components/tooltip/tooltip.d.ts +147 -0
- package/dist/types/components.d.ts +1692 -0
- package/dist/types/helpers.d.ts +49 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/qds-test.d.ts +18 -0
- package/dist/types/stencil-public-runtime.d.ts +1638 -0
- package/dist/types/utils.d.ts +65 -0
- package/dist/vscode.html-custom-data.json +947 -0
- package/hydrate/index.d.ts +218 -0
- package/hydrate/index.js +9690 -0
- package/hydrate/package.json +6 -0
- package/loader/cdn.js +7 -0
- package/loader/index.cjs.js +7 -0
- package/loader/index.d.ts +21 -0
- package/loader/index.es2017.js +7 -0
- package/loader/index.js +8 -0
- package/loader/package.json +11 -0
- package/package.json +231 -0
- package/styles/core.css +379 -0
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import type { ComponentInterface } from '../../stencil-public-runtime';
|
|
2
|
+
export type CheckboxValue = number | string | null;
|
|
3
|
+
export type CheckboxSize = 'large' | 'small' | 'standard';
|
|
4
|
+
/**
|
|
5
|
+
* `<qds-checkbox>` elements are rendered as boxes that are checked (ticked)
|
|
6
|
+
* when activated, like you might see in an official government paper form. A
|
|
7
|
+
* checkbox allows you to select single values for submission in a form (or not).
|
|
8
|
+
*
|
|
9
|
+
* @see https://quartz.se.com/build/components/checkbox
|
|
10
|
+
*/
|
|
11
|
+
export declare class Checkbox implements ComponentInterface {
|
|
12
|
+
/**
|
|
13
|
+
* Adds vertical margin to the checkbox for alignment.
|
|
14
|
+
*
|
|
15
|
+
* This is useful when creating inline layouts so that the first lines have
|
|
16
|
+
* the correct vertical centering.
|
|
17
|
+
*/
|
|
18
|
+
readonly inline: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* The checkbox's size.
|
|
21
|
+
*/
|
|
22
|
+
readonly size: CheckboxSize;
|
|
23
|
+
/**
|
|
24
|
+
* The checkbox's text.
|
|
25
|
+
*/
|
|
26
|
+
readonly text?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Specify whether the checkbox should have focus when the page loads.
|
|
29
|
+
*
|
|
30
|
+
* @webnative
|
|
31
|
+
*/
|
|
32
|
+
readonly autoFocus?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Sets the checkbox's state.
|
|
35
|
+
*
|
|
36
|
+
* @webnative
|
|
37
|
+
*/
|
|
38
|
+
checked?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Prevents the checkbox from being interacted with: it cannot be pressed or
|
|
41
|
+
* focused.
|
|
42
|
+
*
|
|
43
|
+
* @webnative
|
|
44
|
+
*/
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* The [`<form>`](https://developer.mozilla.org/docs/Web/HTML/Element/form)
|
|
48
|
+
* element to associate the checkbox with (its form owner).
|
|
49
|
+
*
|
|
50
|
+
* The value of this property must be the id of a `<form>` in the same
|
|
51
|
+
* document. If this property is not set, the `<qds-checkbox>` is associated
|
|
52
|
+
* with its ancestor `<form>` element, if any.
|
|
53
|
+
*
|
|
54
|
+
* This property lets you associate `<qds-checkbox>` elements to `<form>`s
|
|
55
|
+
* anywhere in the document, not just inside a `<form>`. It can also override
|
|
56
|
+
* an ancestor `<form>` element.
|
|
57
|
+
*
|
|
58
|
+
* @webnative
|
|
59
|
+
*/
|
|
60
|
+
readonly form?: string;
|
|
61
|
+
/**
|
|
62
|
+
* Sets the checkbox to an indeterminate state. This is usually applied to
|
|
63
|
+
* checkboxes that represents a "select all/none" behavior when associated
|
|
64
|
+
* checkboxes have a mix of checked and unchecked states.
|
|
65
|
+
*
|
|
66
|
+
* @webnative
|
|
67
|
+
*/
|
|
68
|
+
indeterminate?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* The name of the checkbox, which is submitted with the form data. An
|
|
71
|
+
* incrementing ID is used by default.
|
|
72
|
+
*
|
|
73
|
+
* @webnative
|
|
74
|
+
*/
|
|
75
|
+
readonly name: string;
|
|
76
|
+
/**
|
|
77
|
+
* A value must be specified for the checkbox before the owning form can be
|
|
78
|
+
* submitted.
|
|
79
|
+
*
|
|
80
|
+
* See
|
|
81
|
+
* [Client-side validation](https://developer.mozilla.org/docs/Web/HTML/Element/input#client-side_validation)
|
|
82
|
+
* and the
|
|
83
|
+
* [HTML attribute: `required`](https://developer.mozilla.org/docs/Web/HTML/Attributes/required)
|
|
84
|
+
* for more information.
|
|
85
|
+
*
|
|
86
|
+
* @webnative
|
|
87
|
+
*/
|
|
88
|
+
readonly required?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* The value of the checkbox, submitted as a name/value pair with form data.
|
|
91
|
+
*
|
|
92
|
+
* @webnative
|
|
93
|
+
*/
|
|
94
|
+
value?: CheckboxValue;
|
|
95
|
+
/**
|
|
96
|
+
* Emitted when the checkbox loses focus.
|
|
97
|
+
*/
|
|
98
|
+
private readonly blurEmitter;
|
|
99
|
+
/**
|
|
100
|
+
* Emitted when a change to the checkbox's state is committed by the user.
|
|
101
|
+
*/
|
|
102
|
+
private readonly changeEmitter;
|
|
103
|
+
/**
|
|
104
|
+
* Emitted when the checkbox gains focus.
|
|
105
|
+
*/
|
|
106
|
+
private readonly focusEmitter;
|
|
107
|
+
private readonly element;
|
|
108
|
+
private inheritedAttributes;
|
|
109
|
+
private input?;
|
|
110
|
+
private get computedDisabled();
|
|
111
|
+
private get computedIndeterminate();
|
|
112
|
+
private get hasText();
|
|
113
|
+
/**
|
|
114
|
+
* Returns whether a form will validate this checkbox when it is submitted
|
|
115
|
+
* without having to submit it.
|
|
116
|
+
*/
|
|
117
|
+
checkValidity(): Promise<boolean>;
|
|
118
|
+
/**
|
|
119
|
+
* Returns true if the checkbox's value passes validity checks; otherwise,
|
|
120
|
+
* returns false, and (if the event isn't canceled) reports the problem to
|
|
121
|
+
* the user.
|
|
122
|
+
*/
|
|
123
|
+
reportValidity(): Promise<boolean>;
|
|
124
|
+
/**
|
|
125
|
+
* Sets a custom validity message for the checkbox. If this message is not the
|
|
126
|
+
* empty string, then the checkbox is considered invalid.
|
|
127
|
+
*/
|
|
128
|
+
setCustomValidity(message: string): Promise<void>;
|
|
129
|
+
protected onClick(event: MouseEvent): void;
|
|
130
|
+
componentWillLoad(): void;
|
|
131
|
+
render(): any;
|
|
132
|
+
private readonly ref;
|
|
133
|
+
private readonly onBlur;
|
|
134
|
+
private readonly onFocus;
|
|
135
|
+
}
|
|
136
|
+
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Args } from '@storybook/addons';
|
|
2
|
+
import type { StoryObj } from '@storybook/web-components/types-7-0';
|
|
3
|
+
declare const createStory: <TArgs = Args>(story: StoryObj<TArgs>) => StoryObj<TArgs>;
|
|
4
|
+
export default createStory;
|
|
5
|
+
//# sourceMappingURL=create-story.d.ts.map
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import type { AutoUpdateOptions, DetectOverflowOptions, FlipOptions, Placement, ReferenceElement, ShiftOptions, Strategy } from '@floating-ui/dom';
|
|
2
|
+
import type { ComponentInterface } from '../../stencil-public-runtime';
|
|
3
|
+
import type { OffsetOptions } from '../../helpers';
|
|
4
|
+
/**
|
|
5
|
+
* @experimental
|
|
6
|
+
* @slot Content to display in the dropdown.
|
|
7
|
+
* @see https://quartz.se.com/build/components/dropdown
|
|
8
|
+
*/
|
|
9
|
+
export declare class Dropdown implements ComponentInterface {
|
|
10
|
+
/**
|
|
11
|
+
* Options to pass to Floating UI's
|
|
12
|
+
* [`autoUpdate()` function](https://floating-ui.com/docs/autoUpdate).
|
|
13
|
+
*
|
|
14
|
+
* @see https://floating-ui.com/docs/autoupdate#options
|
|
15
|
+
*/
|
|
16
|
+
readonly autoUpdateOptions?: AutoUpdateOptions;
|
|
17
|
+
/**
|
|
18
|
+
* Prevents the dropdown from being shown by user interaction. The dropdown
|
|
19
|
+
* can still be displayed by calling the `show()` method.
|
|
20
|
+
*/
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Options to pass to Floating UI's
|
|
24
|
+
* [`flip` middleware](https://floating-ui.com/docs/flip).
|
|
25
|
+
*
|
|
26
|
+
* The [`crossAxis` option](https://floating-ui.com/docs/flip#crossaxis) is
|
|
27
|
+
* set to the value of the `noShift` property by default for interoperability
|
|
28
|
+
* with the [`shift` middleware](https://floating-ui.com/docs/shift).
|
|
29
|
+
*
|
|
30
|
+
* @see https://floating-ui.com/docs/flip#options
|
|
31
|
+
*/
|
|
32
|
+
readonly flipOptions?: Partial<DetectOverflowOptions & FlipOptions>;
|
|
33
|
+
/**
|
|
34
|
+
* Disable Floating UI's
|
|
35
|
+
* [`flip` middleware](https://floating-ui.com/docs/flip).
|
|
36
|
+
*/
|
|
37
|
+
readonly noFlip: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Disable Floating UI's
|
|
40
|
+
* [`shift` middleware](https://floating-ui.com/docs/shift).
|
|
41
|
+
*/
|
|
42
|
+
readonly noShift: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Options to pass to Floating UI's
|
|
45
|
+
* [`offset` middleware](https://floating-ui.com/docs/offset).
|
|
46
|
+
*
|
|
47
|
+
* The [`mainAxis` option](https://floating-ui.com/docs/offset#mainaxis) is
|
|
48
|
+
* not supported.
|
|
49
|
+
*
|
|
50
|
+
* @see https://floating-ui.com/docs/offset#options
|
|
51
|
+
*/
|
|
52
|
+
readonly offsetOptions?: OffsetOptions;
|
|
53
|
+
/**
|
|
54
|
+
* Where to place the dropdown relative to the `target`.
|
|
55
|
+
*
|
|
56
|
+
* @see https://floating-ui.com/docs/tutorial#placements
|
|
57
|
+
*/
|
|
58
|
+
readonly placement: Placement;
|
|
59
|
+
/**
|
|
60
|
+
* Options to pass to Floating UI's
|
|
61
|
+
* [`shift` middleware](https://floating-ui.com/docs/shift).
|
|
62
|
+
*
|
|
63
|
+
* @see https://floating-ui.com/docs/shift#options
|
|
64
|
+
*/
|
|
65
|
+
readonly shiftOptions?: Partial<DetectOverflowOptions & ShiftOptions>;
|
|
66
|
+
/**
|
|
67
|
+
* The CSS position strategy to use.
|
|
68
|
+
*
|
|
69
|
+
* @see https://floating-ui.com/docs/computeposition#strategy
|
|
70
|
+
*/
|
|
71
|
+
readonly strategy?: Strategy;
|
|
72
|
+
/**
|
|
73
|
+
* The trigger element that will trigger the dropdown. The target specified
|
|
74
|
+
* can be any of the follow:
|
|
75
|
+
*
|
|
76
|
+
* - A CSS selector string
|
|
77
|
+
* - A reference to an
|
|
78
|
+
* [`Element`](https://developer.mozilla.org/docs/Web/API/Element) or
|
|
79
|
+
* [Virtual Element](https://floating-ui.com/docs/virtual-elements)
|
|
80
|
+
* - A function returning a reference to an
|
|
81
|
+
* [`Element`](https://developer.mozilla.org/docs/Web/API/Element),
|
|
82
|
+
* [Virtual Element](https://floating-ui.com/docs/virtual-elements),
|
|
83
|
+
* or a CSS selector string
|
|
84
|
+
*/
|
|
85
|
+
readonly target: ReferenceElement | string | (() => ReferenceElement | string);
|
|
86
|
+
/**
|
|
87
|
+
* Emitted when the user instructs the browser that they wish to dismiss the
|
|
88
|
+
* current open dropdown by pressing the `Esc` key.
|
|
89
|
+
*
|
|
90
|
+
* When a dropdown is dismissed with the `Esc` key, both the `qdsCancel` and
|
|
91
|
+
* `qdsClose` events are emitted.
|
|
92
|
+
*/
|
|
93
|
+
private readonly cancelEmitter;
|
|
94
|
+
/**
|
|
95
|
+
* Emitted when the dropdown is closed.
|
|
96
|
+
*/
|
|
97
|
+
private readonly closeEmitter;
|
|
98
|
+
private readonly element;
|
|
99
|
+
private hostAriaLabelledBy?;
|
|
100
|
+
private hostDisplay?;
|
|
101
|
+
private hostPosition?;
|
|
102
|
+
private hostTransform?;
|
|
103
|
+
private cleanup?;
|
|
104
|
+
private middleware?;
|
|
105
|
+
private referenceElement?;
|
|
106
|
+
private open;
|
|
107
|
+
/**
|
|
108
|
+
* Show the dropdown.
|
|
109
|
+
*/
|
|
110
|
+
show(): Promise<void>;
|
|
111
|
+
/**
|
|
112
|
+
* Close the dropdown.
|
|
113
|
+
*/
|
|
114
|
+
close(): Promise<void>;
|
|
115
|
+
/**
|
|
116
|
+
* Update the dropdown's middleware and position.
|
|
117
|
+
*/
|
|
118
|
+
update(): Promise<void>;
|
|
119
|
+
protected handleMouseDown(event: MouseEvent): Promise<void>;
|
|
120
|
+
private updateReferenceElement;
|
|
121
|
+
private updateMiddleware;
|
|
122
|
+
private updatePosition;
|
|
123
|
+
private startAutoUpdate;
|
|
124
|
+
componentWillLoad(): Promise<void>;
|
|
125
|
+
disconnectedCallback(): void;
|
|
126
|
+
render(): any;
|
|
127
|
+
private handleFocusOut;
|
|
128
|
+
private readonly boundFocusout;
|
|
129
|
+
private handleEscape;
|
|
130
|
+
private readonly boundEscape;
|
|
131
|
+
private handleReferenceClick;
|
|
132
|
+
private readonly boundReferenceClick;
|
|
133
|
+
private disconnectReferenceElement;
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=dropdown.d.ts.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ComponentInterface } from '../../stencil-public-runtime';
|
|
2
|
+
/**
|
|
3
|
+
* @experimental
|
|
4
|
+
*/
|
|
5
|
+
export declare class Icon implements ComponentInterface {
|
|
6
|
+
/**
|
|
7
|
+
* The name of the icon to render.
|
|
8
|
+
*
|
|
9
|
+
* Available names depend on the icon library being used.
|
|
10
|
+
*/
|
|
11
|
+
readonly name: string;
|
|
12
|
+
/**
|
|
13
|
+
* The name of a registered icon library.
|
|
14
|
+
*/
|
|
15
|
+
readonly library: string;
|
|
16
|
+
/**
|
|
17
|
+
* Emitted when the icon has loaded.
|
|
18
|
+
*/
|
|
19
|
+
private readonly loadEmitter;
|
|
20
|
+
/**
|
|
21
|
+
* Emitted when the icon fails to load due to an error.
|
|
22
|
+
*/
|
|
23
|
+
private readonly errorEmitter;
|
|
24
|
+
private readonly element;
|
|
25
|
+
private svg;
|
|
26
|
+
private inheritedAttributes;
|
|
27
|
+
private setIcon;
|
|
28
|
+
componentWillLoad(): Promise<void>;
|
|
29
|
+
render(): any;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=icon.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Except } from 'type-fest';
|
|
2
|
+
export type IconLibraryResolver = (name: string) => string;
|
|
3
|
+
export interface IconLibrary {
|
|
4
|
+
name: string;
|
|
5
|
+
resolver: IconLibraryResolver;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Returns a library from the registry.
|
|
9
|
+
*/
|
|
10
|
+
export declare const getIconLibrary: (name: string) => IconLibrary | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Removes an icon library from the registry.
|
|
13
|
+
*/
|
|
14
|
+
export declare const unregisterIconLibrary: (name: string) => void;
|
|
15
|
+
/**
|
|
16
|
+
* Adds an icon library to the registry or overrides an existing one.
|
|
17
|
+
*/
|
|
18
|
+
export declare const registerIconLibrary: (name: string, options: Except<IconLibrary, 'name'>) => void;
|
|
19
|
+
//# sourceMappingURL=library.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface IconRequestOk {
|
|
2
|
+
ok: true;
|
|
3
|
+
data: string;
|
|
4
|
+
}
|
|
5
|
+
interface IconRequestError {
|
|
6
|
+
ok: false;
|
|
7
|
+
data: undefined;
|
|
8
|
+
}
|
|
9
|
+
type IconRequest = IconRequestError | IconRequestOk;
|
|
10
|
+
declare const requestIcon: (url: string) => Promise<IconRequest>;
|
|
11
|
+
export default requestIcon;
|
|
12
|
+
//# sourceMappingURL=request.d.ts.map
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import type { ComponentInterface } from '../../stencil-public-runtime';
|
|
2
|
+
import type { LiteralUnion } from 'type-fest';
|
|
3
|
+
export type Target = '_blank' | '_parent' | '_self' | '_top';
|
|
4
|
+
/**
|
|
5
|
+
* `<qds-inline-link>` elements, with their `href` property, create a hyperlink
|
|
6
|
+
* to web pages, files, email addresses, locations in the same page, or
|
|
7
|
+
* anything else a URL can address.
|
|
8
|
+
*
|
|
9
|
+
* Content within each `<qds-inline-link>` *should* indicate the inline link's
|
|
10
|
+
* destination. If the `href` property is present, pressing the enter key while
|
|
11
|
+
* focused on the `<qds-inline-link>` element will activate it.
|
|
12
|
+
*
|
|
13
|
+
* @slot Content to display for the inline link.
|
|
14
|
+
* @see https://quartz.se.com/build/components/inline-link
|
|
15
|
+
*/
|
|
16
|
+
export declare class InlineLink implements ComponentInterface {
|
|
17
|
+
/**
|
|
18
|
+
* Prevents the inline link from being interacted with: it cannot be pressed
|
|
19
|
+
* or focused.
|
|
20
|
+
*/
|
|
21
|
+
disabled: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Causes the browser to treat the linked URL as a download. Can be used with
|
|
24
|
+
* or without a `filename` value:
|
|
25
|
+
*
|
|
26
|
+
* - Without a value, the browser will suggest a filename/extension,
|
|
27
|
+
* generated from various sources:
|
|
28
|
+
*
|
|
29
|
+
* - The
|
|
30
|
+
* [`Content-Disposition`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Disposition)
|
|
31
|
+
* HTTP header
|
|
32
|
+
* - The final segment in the URL
|
|
33
|
+
* [path](https://developer.mozilla.org/docs/Web/API/URL/pathname)
|
|
34
|
+
* - The
|
|
35
|
+
* [media type](https://developer.mozilla.org/docs/Glossary/MIME_type)
|
|
36
|
+
* (from the
|
|
37
|
+
* [`Content-Type`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Content-Type)
|
|
38
|
+
* header, the start of a
|
|
39
|
+
* [`data:` URL](https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URLs),
|
|
40
|
+
* or
|
|
41
|
+
* [`Blob.type`](https://developer.mozilla.org/docs/Web/API/Blob/type)
|
|
42
|
+
* for a
|
|
43
|
+
* [`blob:` URL](https://developer.mozilla.org/docs/Web/API/URL/createObjectURL))
|
|
44
|
+
* - `filename`: defining a value suggests it as the filename. `/` and `\`
|
|
45
|
+
* characters are converted to underscores (`_`). Filesystems may forbid
|
|
46
|
+
* other characters in filenames, so browsers will adjust the suggested name
|
|
47
|
+
* if necessary.
|
|
48
|
+
*
|
|
49
|
+
* @webnative
|
|
50
|
+
*/
|
|
51
|
+
readonly download?: boolean | string;
|
|
52
|
+
/**
|
|
53
|
+
* The URL that the inline link points to. Inline links are not restricted to
|
|
54
|
+
* HTTP-based URLs — they can use any URL scheme supported by browsers:
|
|
55
|
+
*
|
|
56
|
+
* - Sections of a page with document fragments
|
|
57
|
+
* - Specific text portions with
|
|
58
|
+
* [text fragments](https://developer.mozilla.org/docs/Web/Text_fragments)
|
|
59
|
+
* - Pieces of media files with media fragments
|
|
60
|
+
* - Telephone numbers with `tel:` URLs
|
|
61
|
+
* - Email addresses with `mailto:` URLs
|
|
62
|
+
* - While web browsers may not support other URL schemes, websites can with
|
|
63
|
+
* [`registerProtocolHandler()`](https://developer.mozilla.org/docs/Web/API/Navigator/registerProtocolHandler)
|
|
64
|
+
*
|
|
65
|
+
* @webnative
|
|
66
|
+
*/
|
|
67
|
+
readonly href?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Hints at the human language of the linked URL. No built-in functionality.
|
|
70
|
+
* Allowed values are the same as
|
|
71
|
+
* [the global `lang` attribute](https://developer.mozilla.org/docs/Web/HTML/Global_attributes/lang).
|
|
72
|
+
*
|
|
73
|
+
* @webnative
|
|
74
|
+
*/
|
|
75
|
+
readonly hreflang?: string;
|
|
76
|
+
/**
|
|
77
|
+
* How much of the
|
|
78
|
+
* [referrer](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)
|
|
79
|
+
* to send when following the inline link.
|
|
80
|
+
*
|
|
81
|
+
* - `no-referrer`: The
|
|
82
|
+
* [`Referer`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)
|
|
83
|
+
* header will not be sent.
|
|
84
|
+
* - `no-referrer-when-downgrade`: The
|
|
85
|
+
* [`Referer`](https://developer.mozilla.org/docs/Web/HTTP/Headers/Referer)
|
|
86
|
+
* header will not be sent to
|
|
87
|
+
* [origin](https://developer.mozilla.org/docs/Glossary/Origin)s
|
|
88
|
+
* without [TLS](https://developer.mozilla.org/docs/Glossary/TLS)
|
|
89
|
+
* ([HTTPS](https://developer.mozilla.org/docs/Glossary/HTTPS)).
|
|
90
|
+
* - `origin`: The sent referrer will be limited to the origin of the
|
|
91
|
+
* referring page: its
|
|
92
|
+
* [scheme](https://developer.mozilla.org/docs/Learn/Common_questions/What_is_a_URL),
|
|
93
|
+
* [host](https://developer.mozilla.org/docs/Glossary/Host), and
|
|
94
|
+
* [port](https://developer.mozilla.org/docs/Glossary/Port).
|
|
95
|
+
* - `origin-when-cross-origin`: The referrer sent to other origins will be
|
|
96
|
+
* limited to the scheme, the host, and the port. Navigations on the same
|
|
97
|
+
* origin will still include the path.
|
|
98
|
+
* - `same-origin`: A referrer will be sent for
|
|
99
|
+
* [same origin](https://developer.mozilla.org/docs/Glossary/Same-origin_policy),
|
|
100
|
+
* but cross-origin requests will contain no referrer information.
|
|
101
|
+
* - `strict-origin`: Only send the origin of the document as the referrer
|
|
102
|
+
* when the protocol security level stays the same (HTTPS→HTTPS), but don't
|
|
103
|
+
* send it to a less secure destination (HTTPS→HTTP).
|
|
104
|
+
* - `strict-origin-when-cross-origin` (default): Send a full URL when
|
|
105
|
+
* performing a same-origin request, only send the origin when the protocol
|
|
106
|
+
* security level stays the same (HTTPS→HTTPS), and send no header to a less
|
|
107
|
+
* secure destination (HTTPS→HTTP).
|
|
108
|
+
* - `unsafe-url`: The referrer will include the origin and the path (but not the
|
|
109
|
+
* [fragment](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/hash),
|
|
110
|
+
* [password](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/password),
|
|
111
|
+
* or [username](https://developer.mozilla.org/docs/Web/API/HTMLAnchorElement/username)).
|
|
112
|
+
* **This value is unsafe** because it leaks origins and paths from
|
|
113
|
+
* TLS-protected resources to insecure origins.
|
|
114
|
+
*
|
|
115
|
+
* @webnative
|
|
116
|
+
*/
|
|
117
|
+
readonly referrerPolicy?: ReferrerPolicy;
|
|
118
|
+
/**
|
|
119
|
+
* The relationship of the linked URL as space-separated
|
|
120
|
+
* [link types](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel).
|
|
121
|
+
*
|
|
122
|
+
* The following list includes some of the most important existing keywords.
|
|
123
|
+
* Every keyword within a space-separated value should be unique within that
|
|
124
|
+
* value.
|
|
125
|
+
*
|
|
126
|
+
* - [`alternate`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-alternate):
|
|
127
|
+
* Alternate representations of the current document.
|
|
128
|
+
* - [`author`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-author):
|
|
129
|
+
* Author of the current document or article.
|
|
130
|
+
* - [`bookmark`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-bookmark):
|
|
131
|
+
* Permalink for the nearest ancestor section.
|
|
132
|
+
* - [`external`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-external):
|
|
133
|
+
* The referenced document is not part of the same site as the current
|
|
134
|
+
* document. An icon will be rendered next to the text if this value is
|
|
135
|
+
* specified.
|
|
136
|
+
* - [`help`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-help):
|
|
137
|
+
* Link to context-sensitive help.
|
|
138
|
+
* - [`license`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-license):
|
|
139
|
+
* Indicates that the main content of the current document is covered by the
|
|
140
|
+
* copyright license described by the referenced document.
|
|
141
|
+
* - [`me`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/me):
|
|
142
|
+
* Indicates that the current document represents the person who owns the
|
|
143
|
+
* linked content.
|
|
144
|
+
* - [`next`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-next):
|
|
145
|
+
* Indicates that the current document is a part of a series and that the
|
|
146
|
+
* next document in the series is the referenced document.
|
|
147
|
+
* - [`nofollow`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-nofollow):
|
|
148
|
+
* Indicates that the current document's original author or publisher does
|
|
149
|
+
* not endorse the referenced document.
|
|
150
|
+
* - [`noopener`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel/noopener):
|
|
151
|
+
* Creates a top-level browsing context that is not an auxiliary browsing
|
|
152
|
+
* context if the hyperlink would create either of those, to begin with (i.e.,
|
|
153
|
+
* has an appropriate `target` attribute value).
|
|
154
|
+
* - [`noreferrer`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-noreferrer):
|
|
155
|
+
* No `Referer` header will be included. Additionally, has the same effect as
|
|
156
|
+
* `noopener`.
|
|
157
|
+
* - [`opener`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-opener):
|
|
158
|
+
* Creates an auxiliary browsing context if the hyperlink would otherwise
|
|
159
|
+
* create a top-level browsing context that is not an auxiliary browsing
|
|
160
|
+
* context (i.e., has "`_blank`" as `target` attribute value).
|
|
161
|
+
* - [`prev`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-prev):
|
|
162
|
+
* Indicates that the current document is a part of a series and that the
|
|
163
|
+
* previous document in the series is the referenced document.
|
|
164
|
+
* - [`search`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-search):
|
|
165
|
+
* Gives a link to a resource that can be used to search through the current
|
|
166
|
+
* document and its related pages.
|
|
167
|
+
* - [`tag`](https://developer.mozilla.org/docs/Web/HTML/Attributes/rel#attr-tag):
|
|
168
|
+
* Gives a tag (identified by the given address) that applies to the current
|
|
169
|
+
* document.
|
|
170
|
+
*
|
|
171
|
+
* @webnative
|
|
172
|
+
*/
|
|
173
|
+
readonly rel?: string;
|
|
174
|
+
/**
|
|
175
|
+
* Where to display the linked URL, as the name for a browsing context (a
|
|
176
|
+
* tab, window, or
|
|
177
|
+
* [`<iframe>`](https://developer.mozilla.org/docs/Web/HTML/Element/iframe).
|
|
178
|
+
* The following keywords have special meanings for where to load the URL:
|
|
179
|
+
*
|
|
180
|
+
* - `_blank`: usually a new tab, but users can configure browsers to open a new
|
|
181
|
+
* window instead.
|
|
182
|
+
* - `_parent`: the parent browsing context of the current one. If no parent,
|
|
183
|
+
* behaves as `_self`.
|
|
184
|
+
* - `_self`: the current browsing context.
|
|
185
|
+
* - `_top`: the topmost browsing context (the "highest" context that's an
|
|
186
|
+
* ancestor of the current one). If no ancestors, behaves as `_self`.
|
|
187
|
+
*
|
|
188
|
+
* @webnative
|
|
189
|
+
*/
|
|
190
|
+
readonly target: LiteralUnion<Target, string>;
|
|
191
|
+
/**
|
|
192
|
+
* Emitted when the inline link loses focus.
|
|
193
|
+
*/
|
|
194
|
+
private readonly blurEmitter;
|
|
195
|
+
/**
|
|
196
|
+
* Emitted when the inline link gains focus.
|
|
197
|
+
*/
|
|
198
|
+
private readonly focusEmitter;
|
|
199
|
+
private readonly element;
|
|
200
|
+
private inheritedAttributes;
|
|
201
|
+
private get computedTabIndex();
|
|
202
|
+
protected onClick(event: MouseEvent): void;
|
|
203
|
+
componentWillLoad(): void;
|
|
204
|
+
render(): any;
|
|
205
|
+
private readonly onBlur;
|
|
206
|
+
private readonly onFocus;
|
|
207
|
+
}
|
|
208
|
+
//# sourceMappingURL=inline-link.d.ts.map
|