@brandsync/wc 0.0.7 → 0.0.9
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/custom-elements.json +1810 -355
- package/dist/brandsync-wc/brandsync-wc.esm.js +1 -1
- package/dist/brandsync-wc/p-0d64ea40.entry.js +1 -0
- package/dist/brandsync-wc/{p-c63d16e1.entry.js → p-1515498e.entry.js} +1 -1
- package/dist/brandsync-wc/p-16a54578.entry.js +1 -0
- package/dist/brandsync-wc/p-18af02df.entry.js +1 -0
- package/dist/brandsync-wc/p-30a0e168.entry.js +1 -0
- package/dist/brandsync-wc/p-3dacae70.entry.js +1 -0
- package/dist/brandsync-wc/p-5333bb5a.entry.js +1 -0
- package/dist/brandsync-wc/p-575ce905.entry.js +1 -0
- package/dist/brandsync-wc/{p-dd0fea0e.entry.js → p-7776b57b.entry.js} +1 -1
- package/dist/brandsync-wc/{p-bfd09c98.entry.js → p-805644e4.entry.js} +1 -1
- package/dist/brandsync-wc/{p-f88d9a6e.entry.js → p-8a78d6ea.entry.js} +1 -1
- package/dist/brandsync-wc/p-8d12ed96.entry.js +1 -0
- package/dist/brandsync-wc/p-94ed898a.entry.js +1 -0
- package/dist/brandsync-wc/{p-9e5d2211.entry.js → p-96f374be.entry.js} +1 -1
- package/dist/brandsync-wc/{p-ab5cc7af.entry.js → p-a34f460d.entry.js} +1 -1
- package/dist/brandsync-wc/p-bc72439a.entry.js +1 -0
- package/dist/brandsync-wc/{p-76eca100.entry.js → p-ce0914a7.entry.js} +1 -1
- package/dist/brandsync-wc/{p-5a0fe72e.entry.js → p-d682675e.entry.js} +1 -1
- package/dist/brandsync-wc/p-dad4a92c.entry.js +1 -0
- package/dist/brandsync-wc/{p-cfc3421b.entry.js → p-dd747a12.entry.js} +1 -1
- package/dist/brandsync-wc/{p-2742ecef.entry.js → p-eb4d87f0.entry.js} +1 -1
- package/dist/cjs/brandsync-wc.cjs.js +1 -1
- package/dist/cjs/bs-ai-disclaimer.cjs.entry.js +17 -0
- package/dist/cjs/bs-ai-greeting.cjs.entry.js +24 -0
- package/dist/cjs/bs-ai-thinking.cjs.entry.js +2 -2
- package/dist/cjs/bs-attachment-list.cjs.entry.js +47 -0
- package/dist/cjs/bs-attachment.cjs.entry.js +46 -0
- package/dist/cjs/bs-badge.cjs.entry.js +1 -1
- package/dist/cjs/bs-button-skeleton.cjs.entry.js +1 -1
- package/dist/cjs/bs-button.cjs.entry.js +1 -1
- package/dist/cjs/bs-card.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-feedback.cjs.entry.js +94 -0
- package/dist/cjs/bs-chatbot-header.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-response-action.cjs.entry.js +1 -1
- package/dist/cjs/bs-chatbot-sources-drawer.cjs.entry.js +38 -0
- package/dist/cjs/bs-chatbot-suggestion-button.cjs.entry.js +1 -1
- package/dist/cjs/bs-composer-status-banner.cjs.entry.js +43 -0
- package/dist/cjs/bs-composer.cjs.entry.js +16 -2
- package/dist/cjs/bs-data-table.cjs.entry.js +2 -2
- package/dist/cjs/bs-input.cjs.entry.js +270 -4
- package/dist/cjs/{bs-menu-item.cjs.entry.js → bs-menu_2.cjs.entry.js} +14 -1
- package/dist/cjs/bs-source-link.cjs.entry.js +39 -0
- package/dist/cjs/bs-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +8 -0
- package/dist/collection/components/bs-ai-chatbot/bs-ai-chatbot.stories.js +180 -0
- package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.cmp.test.js +14 -0
- package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.css +27 -0
- package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.js +41 -0
- package/dist/collection/components/bs-ai-disclaimer/bs-ai-disclaimer.stories.js +15 -0
- package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.cmp.test.js +22 -0
- package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.css +53 -0
- package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.js +103 -0
- package/dist/collection/components/bs-ai-greeting/bs-ai-greeting.stories.js +23 -0
- package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.css +31 -17
- package/dist/collection/components/bs-ai-thinking/bs-ai-thinking.js +9 -11
- package/dist/collection/components/bs-attachment/bs-attachment.cmp.test.js +41 -0
- package/dist/collection/components/bs-attachment/bs-attachment.css +184 -0
- package/dist/collection/components/bs-attachment/bs-attachment.js +230 -0
- package/dist/collection/components/bs-attachment/bs-attachment.stories.js +58 -0
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.cmp.test.js +28 -0
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.css +56 -0
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.js +105 -0
- package/dist/collection/components/bs-attachment-list/bs-attachment-list.stories.js +47 -0
- package/dist/collection/components/bs-badge/bs-badge.js +1 -1
- package/dist/collection/components/bs-button/bs-button.js +1 -1
- package/dist/collection/components/bs-button-skeleton/bs-button-skeleton.js +1 -1
- package/dist/collection/components/bs-card/bs-card.js +1 -1
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.cmp.test.js +73 -0
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.css +253 -0
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.js +324 -0
- package/dist/collection/components/bs-chatbot-feedback/bs-chatbot-feedback.stories.js +54 -0
- package/dist/collection/components/bs-chatbot-header/bs-chatbot-header.js +1 -1
- package/dist/collection/components/bs-chatbot-response-action/bs-chatbot-response-action.js +1 -1
- package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.cmp.test.js +34 -0
- package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.css +106 -0
- package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.js +142 -0
- package/dist/collection/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.stories.js +44 -0
- package/dist/collection/components/bs-chatbot-suggestion-button/bs-chatbot-suggestion-button.js +1 -1
- package/dist/collection/components/bs-composer/bs-composer.cmp.test.js +12 -0
- package/dist/collection/components/bs-composer/bs-composer.css +10 -0
- package/dist/collection/components/bs-composer/bs-composer.js +25 -1
- package/dist/collection/components/bs-composer/bs-composer.stories.js +13 -0
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.cmp.test.js +42 -0
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.css +173 -0
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.js +270 -0
- package/dist/collection/components/bs-composer-status-banner/bs-composer-status-banner.stories.js +75 -0
- package/dist/collection/components/bs-data-table/bs-data-table.js +2 -2
- package/dist/collection/components/bs-input/bs-input.cmp.test.js +296 -0
- package/dist/collection/components/bs-input/bs-input.css +333 -23
- package/dist/collection/components/bs-input/bs-input.js +647 -11
- package/dist/collection/components/bs-input/bs-input.stories.js +128 -1
- package/dist/collection/components/bs-menu/bs-menu.js +1 -1
- package/dist/collection/components/bs-menu-item/bs-menu-item.js +1 -1
- package/dist/collection/components/bs-source-link/bs-source-link.cmp.test.js +42 -0
- package/dist/collection/components/bs-source-link/bs-source-link.css +114 -0
- package/dist/collection/components/bs-source-link/bs-source-link.js +192 -0
- package/dist/collection/components/bs-source-link/bs-source-link.stories.js +33 -0
- package/dist/collection/components/bs-tooltip/bs-tooltip.js +1 -1
- package/dist/components/bs-ai-disclaimer.d.ts +11 -0
- package/dist/components/bs-ai-disclaimer.js +1 -0
- package/dist/components/bs-ai-greeting.d.ts +11 -0
- package/dist/components/bs-ai-greeting.js +1 -0
- package/dist/components/bs-ai-thinking.js +1 -1
- package/dist/components/bs-attachment-list.d.ts +11 -0
- package/dist/components/bs-attachment-list.js +1 -0
- package/dist/components/bs-attachment.d.ts +11 -0
- package/dist/components/bs-attachment.js +1 -0
- package/dist/components/bs-badge.js +1 -1
- package/dist/components/bs-button-skeleton.js +1 -1
- package/dist/components/bs-button.js +1 -1
- package/dist/components/bs-card.js +1 -1
- package/dist/components/bs-chatbot-feedback.d.ts +11 -0
- package/dist/components/bs-chatbot-feedback.js +1 -0
- package/dist/components/bs-chatbot-header.js +1 -1
- package/dist/components/bs-chatbot-response-action.js +1 -1
- package/dist/components/bs-chatbot-sources-drawer.d.ts +11 -0
- package/dist/components/bs-chatbot-sources-drawer.js +1 -0
- package/dist/components/bs-chatbot-suggestion-button.js +1 -1
- package/dist/components/bs-composer-status-banner.d.ts +11 -0
- package/dist/components/bs-composer-status-banner.js +1 -0
- package/dist/components/bs-composer.js +1 -1
- package/dist/components/bs-data-table.js +1 -1
- package/dist/components/bs-input.js +1 -1
- package/dist/components/bs-menu-item.js +1 -1
- package/dist/components/bs-menu.js +1 -1
- package/dist/components/bs-source-link.d.ts +11 -0
- package/dist/components/bs-source-link.js +1 -0
- package/dist/components/bs-tooltip.js +1 -1
- package/dist/components/{p-CoC4LQCI.js → p-Cz2nfz2j.js} +1 -1
- package/dist/components/p-DndQiCMP.js +1 -0
- package/dist/components/p-_vXDfB3V.js +1 -0
- package/dist/esm/brandsync-wc.js +1 -1
- package/dist/esm/bs-ai-disclaimer.entry.js +15 -0
- package/dist/esm/bs-ai-greeting.entry.js +22 -0
- package/dist/esm/bs-ai-thinking.entry.js +2 -2
- package/dist/esm/bs-attachment-list.entry.js +45 -0
- package/dist/esm/bs-attachment.entry.js +44 -0
- package/dist/esm/bs-badge.entry.js +1 -1
- package/dist/esm/bs-button-skeleton.entry.js +1 -1
- package/dist/esm/bs-button.entry.js +1 -1
- package/dist/esm/bs-card.entry.js +1 -1
- package/dist/esm/bs-chatbot-feedback.entry.js +92 -0
- package/dist/esm/bs-chatbot-header.entry.js +1 -1
- package/dist/esm/bs-chatbot-response-action.entry.js +1 -1
- package/dist/esm/bs-chatbot-sources-drawer.entry.js +36 -0
- package/dist/esm/bs-chatbot-suggestion-button.entry.js +1 -1
- package/dist/esm/bs-composer-status-banner.entry.js +41 -0
- package/dist/esm/bs-composer.entry.js +17 -3
- package/dist/esm/bs-data-table.entry.js +2 -2
- package/dist/esm/bs-input.entry.js +271 -5
- package/dist/esm/{bs-menu-item.entry.js → bs-menu_2.entry.js} +15 -3
- package/dist/esm/bs-source-link.entry.js +37 -0
- package/dist/esm/bs-tooltip.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/bs-ai-chatbot/bs-ai-chatbot.stories.d.ts +18 -0
- package/dist/types/components/bs-ai-disclaimer/bs-ai-disclaimer.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-ai-disclaimer/bs-ai-disclaimer.d.ts +26 -0
- package/dist/types/components/bs-ai-disclaimer/bs-ai-disclaimer.stories.d.ts +8 -0
- package/dist/types/components/bs-ai-greeting/bs-ai-greeting.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-ai-greeting/bs-ai-greeting.d.ts +42 -0
- package/dist/types/components/bs-ai-greeting/bs-ai-greeting.stories.d.ts +10 -0
- package/dist/types/components/bs-ai-thinking/bs-ai-thinking.d.ts +8 -10
- package/dist/types/components/bs-attachment/bs-attachment.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-attachment/bs-attachment.d.ts +59 -0
- package/dist/types/components/bs-attachment/bs-attachment.stories.d.ts +17 -0
- package/dist/types/components/bs-attachment-list/bs-attachment-list.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-attachment-list/bs-attachment-list.d.ts +42 -0
- package/dist/types/components/bs-attachment-list/bs-attachment-list.stories.d.ts +10 -0
- package/dist/types/components/bs-chatbot-feedback/bs-chatbot-feedback.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-chatbot-feedback/bs-chatbot-feedback.d.ts +90 -0
- package/dist/types/components/bs-chatbot-feedback/bs-chatbot-feedback.stories.d.ts +16 -0
- package/dist/types/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.d.ts +54 -0
- package/dist/types/components/bs-chatbot-sources-drawer/bs-chatbot-sources-drawer.stories.d.ts +10 -0
- package/dist/types/components/bs-composer/bs-composer.d.ts +14 -0
- package/dist/types/components/bs-composer/bs-composer.stories.d.ts +1 -0
- package/dist/types/components/bs-composer-status-banner/bs-composer-status-banner.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-composer-status-banner/bs-composer-status-banner.d.ts +88 -0
- package/dist/types/components/bs-composer-status-banner/bs-composer-status-banner.stories.d.ts +20 -0
- package/dist/types/components/bs-input/bs-input.d.ts +139 -6
- package/dist/types/components/bs-input/bs-input.stories.d.ts +19 -0
- package/dist/types/components/bs-source-link/bs-source-link.cmp.test.d.ts +1 -0
- package/dist/types/components/bs-source-link/bs-source-link.d.ts +51 -0
- package/dist/types/components/bs-source-link/bs-source-link.stories.d.ts +13 -0
- package/dist/types/components.d.ts +1778 -55
- package/package.json +1 -1
- package/dist/brandsync-wc/p-6abdfaf0.entry.js +0 -1
- package/dist/brandsync-wc/p-6c1fa4da.entry.js +0 -1
- package/dist/brandsync-wc/p-a12d0a60.entry.js +0 -1
- package/dist/brandsync-wc/p-f5f443e2.entry.js +0 -1
- package/dist/cjs/bs-menu.cjs.entry.js +0 -17
- package/dist/esm/bs-menu.entry.js +0 -15
|
@@ -1,33 +1,166 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
/**
|
|
3
|
-
* A single-line text field with an optional label, description, and error state.
|
|
3
|
+
* A single-line text field with an optional label, description, and error state. Also covers a
|
|
4
|
+
* range of related "field" shapes (number stepper, password reveal, date, dropdown trigger,
|
|
5
|
+
* select, textarea, chip input, initials, country, and pin) via the `type` prop, since they all
|
|
6
|
+
* share the same label/description/error/icon-slot chrome.
|
|
4
7
|
*
|
|
5
8
|
* ## When to use
|
|
6
9
|
* - Collecting a single line of free-text, email, password, or numeric input.
|
|
10
|
+
* - Any of the other supported `type`s (search, date, dropdown, select, textarea, chip, initials,
|
|
11
|
+
* country, pin) that share this component's label/description/error chrome.
|
|
7
12
|
* - Pair with `error` for inline validation feedback tied to that specific field.
|
|
8
13
|
*
|
|
9
14
|
* ## When not to use
|
|
10
|
-
* -
|
|
11
|
-
*
|
|
15
|
+
* - A fixed set of choices best served by a dedicated radio/checkbox group rather than a single
|
|
16
|
+
* field. `type="select"` (native `<select>`) and `type="dropdown"` (a `bs-menu` of
|
|
17
|
+
* `bs-menu-item`s from the `options` prop) cover the field-shaped cases; `type="chip"` has no
|
|
18
|
+
* options list at all (freeform chip entry).
|
|
12
19
|
*
|
|
20
|
+
* @slot icon - Optional leading icon, rendered before the native control (e.g. a mail icon for an
|
|
21
|
+
* email field). For `type="search"`, the slot is used if provided, otherwise a default
|
|
22
|
+
* magnifying-glass icon is shown.
|
|
23
|
+
* @slot end-icon - Optional trailing icon, rendered after the native control (e.g. a chevron for a
|
|
24
|
+
* field that opens a picker). Ignored when `type` is `number` (stepper buttons), `password` (show/hide
|
|
25
|
+
* toggle), or `dropdown` (chevron) -- those types always render their own trailing control there.
|
|
26
|
+
* For `type="date"`, the slot is used if provided, otherwise a default calendar icon is shown.
|
|
27
|
+
* @part field - The bordered field wrapper containing the icon(s) and native control(s).
|
|
28
|
+
* @part menu - The `bs-menu` rendered below the field for `type="dropdown"` when `open` and
|
|
29
|
+
* `options` is non-empty.
|
|
13
30
|
* @part label - The `<label>` element.
|
|
14
|
-
* @part
|
|
31
|
+
* @part required - The red `*` rendered after the label text when `required` is set.
|
|
32
|
+
* @part icon - The leading icon wrapper element.
|
|
33
|
+
* @part control - The native control element (`<input>`, `<select>`, or `<textarea>` depending on
|
|
34
|
+
* `type`). Composite types (`initials`, `country`) render this part on more than one element.
|
|
35
|
+
* @part end-icon - The trailing icon wrapper element.
|
|
36
|
+
* @part chip - A single chip pill, when `type="chip"`.
|
|
15
37
|
* @part description - The helper text element (hidden when `error` is set).
|
|
16
38
|
* @part error - The error message element.
|
|
39
|
+
* @part error-icon - The warning icon shown before the error message.
|
|
17
40
|
*/
|
|
18
41
|
export declare class BsInput {
|
|
42
|
+
el: HTMLElement;
|
|
19
43
|
/** Current value. Native `input`/`change` events don't cross the Shadow DOM boundary, so this
|
|
20
|
-
* component re-dispatches them as `bsInput`/`bsChange` custom events instead.
|
|
44
|
+
* component re-dispatches them as `bsInput`/`bsChange` custom events instead. Mutable so the
|
|
45
|
+
* `number` type's stepper buttons can update it directly. */
|
|
21
46
|
value: string;
|
|
22
|
-
type: 'text' | 'email' | 'password' | 'number';
|
|
47
|
+
type: 'text' | 'email' | 'password' | 'number' | 'search' | 'date' | 'dropdown' | 'select' | 'textarea' | 'chip' | 'initials' | 'country' | 'pin';
|
|
23
48
|
label?: string;
|
|
24
49
|
placeholder?: string;
|
|
25
50
|
description?: string;
|
|
26
51
|
error?: string;
|
|
27
52
|
disabled: boolean;
|
|
53
|
+
/** Marks the field as required: renders a red `*` after the label and sets `aria-required="true"`
|
|
54
|
+
* on the control. Applies regardless of `type`. */
|
|
55
|
+
required: boolean;
|
|
56
|
+
/** Step size for `type="number"`'s increment/decrement stepper buttons. */
|
|
57
|
+
step: number;
|
|
58
|
+
/** Minimum value for `type="number"`'s stepper buttons. */
|
|
59
|
+
min?: number;
|
|
60
|
+
/** Maximum value for `type="number"`'s stepper buttons. */
|
|
61
|
+
max?: number;
|
|
62
|
+
/** Options for `type="select"` (rendered as native `<option>`s) and `type="dropdown"` (rendered
|
|
63
|
+
* as a `bs-menu` of `bs-menu-item`s when `open`). Must be set as a JS property, not an HTML
|
|
64
|
+
* attribute -- see CONVENTIONS.md's non-string props rule. */
|
|
65
|
+
options: {
|
|
66
|
+
label: string;
|
|
67
|
+
value: string;
|
|
68
|
+
}[];
|
|
69
|
+
/** Number of visible rows for `type="textarea"`. */
|
|
70
|
+
rows: number;
|
|
71
|
+
/** Current chips for `type="chip"`. Must be set as a JS property, not an HTML attribute -- see
|
|
72
|
+
* CONVENTIONS.md's non-string props rule. */
|
|
73
|
+
chips: string[];
|
|
74
|
+
/** Title select options for `type="initials"` (e.g. `['Mrs.', 'Mr.', 'Dr.']`). Must be set as a
|
|
75
|
+
* JS property, not an HTML attribute -- see CONVENTIONS.md's non-string props rule. */
|
|
76
|
+
titleOptions: string[];
|
|
77
|
+
/** Current selected title for `type="initials"`. Named `initialsTitle` rather than `title` --
|
|
78
|
+
* `title` is a reserved standard HTML attribute (tooltip text) inherited by every element, and
|
|
79
|
+
* Stencil warns against shadowing it with a component `@Prop`. */
|
|
80
|
+
initialsTitle: string;
|
|
81
|
+
/** Country select options for `type="country"`. Must be set as a JS property, not an HTML
|
|
82
|
+
* attribute -- see CONVENTIONS.md's non-string props rule. */
|
|
83
|
+
countryOptions: {
|
|
84
|
+
code: string;
|
|
85
|
+
label: string;
|
|
86
|
+
flagIcon?: string;
|
|
87
|
+
}[];
|
|
88
|
+
/** Current selected country code for `type="country"`. */
|
|
89
|
+
country: string;
|
|
90
|
+
/** Number of cells for `type="pin"`. */
|
|
91
|
+
length: number;
|
|
92
|
+
/** Whether the `type="dropdown"` trigger is open. Reflects to an attribute so consumers can style
|
|
93
|
+
* an open state via CSS. When `options` is non-empty, this also controls whether the `bs-menu`
|
|
94
|
+
* of `bs-menu-item`s is rendered below the field. */
|
|
95
|
+
open: boolean;
|
|
28
96
|
bsInput: EventEmitter<string>;
|
|
29
97
|
bsChange: EventEmitter<string>;
|
|
98
|
+
/** Emitted when `type="dropdown"`'s trigger is toggled. See `open`'s doc comment for this type's
|
|
99
|
+
* shell-only limitation. */
|
|
100
|
+
bsOpen: EventEmitter<boolean>;
|
|
101
|
+
/** Emitted when a chip is committed (Enter pressed in the draft input) for `type="chip"`. */
|
|
102
|
+
bsChipAdd: EventEmitter<string>;
|
|
103
|
+
/** Emitted when a chip's remove button is clicked for `type="chip"`. */
|
|
104
|
+
bsChipRemove: EventEmitter<string>;
|
|
105
|
+
/** Emitted when the title `<select>` changes for `type="initials"`. */
|
|
106
|
+
bsTitleChange: EventEmitter<string>;
|
|
107
|
+
/** Emitted when the country `<select>` changes for `type="country"`. */
|
|
108
|
+
bsCountryChange: EventEmitter<string>;
|
|
109
|
+
/** Tracks whether the `icon` slot has assigned content, so the leading icon wrapper only takes
|
|
110
|
+
* up space in the field when there's actually an icon (same pattern as `bs-button`). */
|
|
111
|
+
hasIcon: boolean;
|
|
112
|
+
/** Tracks whether the `end-icon` slot has assigned content, so the trailing icon wrapper only
|
|
113
|
+
* takes up space in the field when there's actually a trailing icon. */
|
|
114
|
+
hasEndIcon: boolean;
|
|
115
|
+
/** Whether `type="password"`'s native input is currently rendered as `type="text"` (revealed). The
|
|
116
|
+
* `type` prop itself stays `'password'` -- this only toggles the rendered native input's type. */
|
|
117
|
+
passwordVisible: boolean;
|
|
118
|
+
/** Draft text for `type="chip"`'s trailing input, committed to a chip on Enter. */
|
|
119
|
+
chipDraft: string;
|
|
120
|
+
private pinInputs;
|
|
121
|
+
/** Computes the initial `hasIcon`/`hasEndIcon` state directly from the host's light DOM
|
|
122
|
+
* children, before first render -- see `bs-button`'s `componentWillLoad` for why `slotchange`
|
|
123
|
+
* alone isn't enough for a slot that starts (and stays) empty. */
|
|
124
|
+
componentWillLoad(): void;
|
|
125
|
+
private hasSlottedContent;
|
|
126
|
+
private onIconSlotchange;
|
|
127
|
+
private onEndIconSlotchange;
|
|
30
128
|
private onInput;
|
|
31
129
|
private onChange;
|
|
130
|
+
private clampNumber;
|
|
131
|
+
private onStepperIncrement;
|
|
132
|
+
private onStepperDecrement;
|
|
133
|
+
private onTogglePasswordVisibility;
|
|
134
|
+
private onDropdownToggle;
|
|
135
|
+
private onDropdownKeydown;
|
|
136
|
+
private onDropdownOptionSelect;
|
|
137
|
+
/** Closes the `type="dropdown"` menu on Escape, from anywhere within the component (host is the
|
|
138
|
+
* default @Listen target, and both keydown from the native control and from `bs-menu-item`
|
|
139
|
+
* buttons bubble/compose up to it). */
|
|
140
|
+
onHostKeydown(ev: KeyboardEvent): void;
|
|
141
|
+
/** Closes the `type="dropdown"` menu once focus leaves the component entirely (e.g. Tab away, or
|
|
142
|
+
* a click outside that moves focus elsewhere) -- `focusout` is composed, so it bubbles across
|
|
143
|
+
* the `bs-menu-item` shadow boundary too. */
|
|
144
|
+
onHostFocusOut(ev: FocusEvent): void;
|
|
145
|
+
private onChipDraftInput;
|
|
146
|
+
private onChipDraftKeydown;
|
|
147
|
+
private onChipRemove;
|
|
148
|
+
private onTitleChange;
|
|
149
|
+
private onCountryChange;
|
|
150
|
+
private onPinInput;
|
|
151
|
+
private onPinKeydown;
|
|
152
|
+
private get showsEndIconArea();
|
|
153
|
+
private get showsIconArea();
|
|
154
|
+
private renderIconContent;
|
|
155
|
+
private renderEndIconContent;
|
|
156
|
+
private renderStandardControl;
|
|
157
|
+
private renderSelectControl;
|
|
158
|
+
private renderTextareaControl;
|
|
159
|
+
private renderChipControl;
|
|
160
|
+
private renderInitialsControl;
|
|
161
|
+
private renderCountryControl;
|
|
162
|
+
private renderControl;
|
|
163
|
+
private renderField;
|
|
164
|
+
private renderPinField;
|
|
32
165
|
render(): any;
|
|
33
166
|
}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
+
type BsInputType = 'text' | 'email' | 'password' | 'number' | 'search' | 'date' | 'dropdown' | 'select' | 'textarea' | 'chip' | 'initials' | 'country' | 'pin';
|
|
2
3
|
interface BsInputArgs {
|
|
4
|
+
type: BsInputType;
|
|
3
5
|
label: string;
|
|
4
6
|
placeholder: string;
|
|
5
7
|
description: string;
|
|
6
8
|
error: string;
|
|
7
9
|
disabled: boolean;
|
|
10
|
+
required: boolean;
|
|
11
|
+
icon: boolean;
|
|
12
|
+
endIcon: boolean;
|
|
8
13
|
}
|
|
9
14
|
declare const meta: Meta<BsInputArgs>;
|
|
10
15
|
export default meta;
|
|
@@ -13,3 +18,17 @@ export declare const Default: Story;
|
|
|
13
18
|
export declare const WithDescription: Story;
|
|
14
19
|
export declare const WithError: Story;
|
|
15
20
|
export declare const Disabled: Story;
|
|
21
|
+
export declare const WithIcon: Story;
|
|
22
|
+
export declare const WithEndIcon: Story;
|
|
23
|
+
export declare const Required: Story;
|
|
24
|
+
export declare const Search: Story;
|
|
25
|
+
export declare const NumberInput: Story;
|
|
26
|
+
export declare const Password: Story;
|
|
27
|
+
export declare const DateInput: Story;
|
|
28
|
+
export declare const Dropdown: Story;
|
|
29
|
+
export declare const Select: Story;
|
|
30
|
+
export declare const TextArea: Story;
|
|
31
|
+
export declare const Chip: Story;
|
|
32
|
+
export declare const Initials: Story;
|
|
33
|
+
export declare const Country: Story;
|
|
34
|
+
export declare const Pin: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
/**
|
|
3
|
+
* A single citation row inside `bs-chatbot-sources-drawer` -- a file icon + filename on the first
|
|
4
|
+
* line, the originating system and version on the second, and a trailing "open" arrow.
|
|
5
|
+
*
|
|
6
|
+
* ## When to use
|
|
7
|
+
* - One row per source Genie cited in a response, slotted into `bs-chatbot-sources-drawer`.
|
|
8
|
+
*
|
|
9
|
+
* ## When not to use
|
|
10
|
+
* - Outside the sources drawer context -- this is a purpose-built citation row, not a generic
|
|
11
|
+
* link/list-item component.
|
|
12
|
+
*
|
|
13
|
+
* @slot icon - Overrides the default file icon.
|
|
14
|
+
* @part icon - The leading file-type icon.
|
|
15
|
+
* @part filename - The filename text.
|
|
16
|
+
* @part source - The source system name.
|
|
17
|
+
* @part version - The version label.
|
|
18
|
+
* @part arrow - The trailing "open" arrow icon.
|
|
19
|
+
* @prop --bs-source-link-radius - Corner radius of the row. Aliased to `--bs-border-radius-150`.
|
|
20
|
+
* @prop --bs-source-link-padding - Padding around the row. Aliased to `--bs-spacing-150`.
|
|
21
|
+
* @prop --bs-source-link-gap - Gap between the filename+meta block and the trailing arrow.
|
|
22
|
+
* Aliased to `--bs-spacing-50`.
|
|
23
|
+
* @prop --bs-source-link-icon-gap - Gap between the leading icon and the filename text. Aliased
|
|
24
|
+
* to `--bs-spacing-75`.
|
|
25
|
+
* @prop --bs-source-link-hover - Row background on hover/focus. Aliased to `--bs-surface-hover`.
|
|
26
|
+
* @prop --bs-source-link-pressed - Row background while active/pressed. Aliased to
|
|
27
|
+
* `--bs-surface-pressed`.
|
|
28
|
+
* @prop --bs-source-link-focus - Focus-visible outline color. Aliased to
|
|
29
|
+
* `--bs-border-neutral-focus`.
|
|
30
|
+
* @prop --bs-source-link-filename-color - Filename text color. Aliased to `--bs-text-default`.
|
|
31
|
+
* @prop --bs-source-link-meta-color - Source/version text color. Aliased to `--bs-text-secondary`.
|
|
32
|
+
* @prop --bs-source-link-icon-color - File icon and arrow color. Aliased to `--bs-icon-default`.
|
|
33
|
+
* @prop --bs-source-link-dot-color - Separator dot between source and version. Aliased to
|
|
34
|
+
* `--bs-text-secondary`.
|
|
35
|
+
*/
|
|
36
|
+
export declare class BsSourceLink {
|
|
37
|
+
/** The cited document's filename. */
|
|
38
|
+
fileName: string;
|
|
39
|
+
/** The system/app the document came from (e.g. "HoltePortalen"). */
|
|
40
|
+
sourceName?: string;
|
|
41
|
+
/** The document's version label (e.g. "v3.2"). Omit if the source has no version. */
|
|
42
|
+
version?: string;
|
|
43
|
+
/** If set, renders the row as a link that opens this URL; otherwise as a button that only emits `bsOpen`. */
|
|
44
|
+
href?: string;
|
|
45
|
+
/** `target` used when `href` is set. */
|
|
46
|
+
target: string;
|
|
47
|
+
/** Fires on click/activation, whether or not `href` is set -- lets the consuming app log or handle the open. */
|
|
48
|
+
bsOpen: EventEmitter<void>;
|
|
49
|
+
private onClick;
|
|
50
|
+
render(): any;
|
|
51
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
+
interface BsSourceLinkArgs {
|
|
3
|
+
fileName: string;
|
|
4
|
+
sourceName: string;
|
|
5
|
+
version: string;
|
|
6
|
+
href: string;
|
|
7
|
+
}
|
|
8
|
+
declare const meta: Meta<BsSourceLinkArgs>;
|
|
9
|
+
export default meta;
|
|
10
|
+
type Story = StoryObj<BsSourceLinkArgs>;
|
|
11
|
+
export declare const Default: Story;
|
|
12
|
+
export declare const WithoutVersion: Story;
|
|
13
|
+
export declare const WithoutSourceOrVersion: Story;
|