@xplor-education/core-stencil-components 3.1.2 → 3.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/index.js +28 -3
- package/components/index.js.map +1 -1
- package/components/{p-B49oUO_9.js → p-AzuDJugb.js} +3 -3
- package/components/{p-B49oUO_9.js.map → p-AzuDJugb.js.map} +1 -1
- package/components/{p-D4jVa8dE.js → p-BQ6aLuGP.js} +4 -4
- package/components/{p-D4jVa8dE.js.map → p-BQ6aLuGP.js.map} +1 -1
- package/components/{p-VIJbFoA4.js → p-BZQ63ULK.js} +3 -3
- package/components/{p-VIJbFoA4.js.map → p-BZQ63ULK.js.map} +1 -1
- package/components/{p-BRWe4TXp.js → p-C-gHaxf1.js} +3 -3
- package/components/p-C-gHaxf1.js.map +1 -0
- package/components/{p-Bs_ocvfe.js → p-CyGsSa4H.js} +7 -4
- package/components/p-CyGsSa4H.js.map +1 -0
- package/components/{p-B3zR7peH.js → p-oanCZPh6.js} +4 -4
- package/components/{p-B3zR7peH.js.map → p-oanCZPh6.js.map} +1 -1
- package/components/xplor-alert-message.js +2 -2
- package/components/xplor-avatar-and-name.js +2 -2
- package/components/xplor-avatar.js +1 -1
- package/components/xplor-badge-active.js +1 -1
- package/components/xplor-badge-archived.js +1 -1
- package/components/xplor-badge-deleted.js +1 -1
- package/components/xplor-badge-expired.js +1 -1
- package/components/xplor-badge-inactive.js +1 -1
- package/components/xplor-badge-recalled.js +1 -1
- package/components/xplor-badge-upcoming.js +1 -1
- package/components/xplor-badge-waitlist.js +1 -1
- package/components/xplor-badge.js +1 -1
- package/components/xplor-btn-back-to-parent.js +1 -1
- package/components/xplor-btn-back.js +1 -1
- package/components/xplor-btn-icon.js +1 -1
- package/components/xplor-btn-toggle-group.js +1 -1
- package/components/xplor-btn-toggle-secondary.js +1 -1
- package/components/xplor-btn-toggle.js +1 -1
- package/components/xplor-btn-tooltip.js +3 -3
- package/components/xplor-button.js +1 -1
- package/components/xplor-canvas-editor.d.ts +11 -0
- package/components/xplor-canvas-editor.js +369 -0
- package/components/xplor-canvas-editor.js.map +1 -0
- package/components/xplor-chat-widget.js +3 -3
- package/components/xplor-checkbox.js +1 -1
- package/components/xplor-combobox.js +5 -5
- package/components/xplor-datatable.js +2 -2
- package/components/xplor-date-picker.js +5 -5
- package/components/xplor-drag-and-drop-input.js +26 -5
- package/components/xplor-drag-and-drop-input.js.map +1 -1
- package/components/xplor-dropdown.js +1 -1
- package/components/xplor-expansion-panel.js +4 -4
- package/components/xplor-expansion-panels.js +1 -1
- package/components/xplor-file-upload.js +2 -2
- package/components/xplor-inline-checkbox.js +2 -2
- package/components/xplor-inline-date-picker.js +1 -1
- package/components/xplor-inline-switch.js +1 -1
- package/components/xplor-input-file.js +1 -1
- package/components/xplor-input-search.js +2 -2
- package/components/xplor-input-select.js +2 -2
- package/components/xplor-input-send.js +3 -3
- package/components/xplor-input-text-area.js +2 -2
- package/components/xplor-input-text-secondary.js +2 -2
- package/components/xplor-input-text.js +2 -2
- package/components/xplor-input-title.js +1 -1
- package/components/xplor-links.js +1 -1
- package/components/xplor-modal-persistent.js +2 -2
- package/components/xplor-modal.js +1 -1
- package/components/xplor-nav-tabs.js +2 -2
- package/components/xplor-radio-btn.js +2 -2
- package/components/xplor-rich-text-editor.d.ts +11 -0
- package/components/xplor-rich-text-editor.js +23754 -0
- package/components/xplor-rich-text-editor.js.map +1 -0
- package/components/xplor-section-card.js +2 -2
- package/components/xplor-section-heading.js +2 -2
- package/components/xplor-table.js +5 -5
- package/components/xplor-text-bubble.js +2 -2
- package/components/xplor-text-field.js +2 -2
- package/components/xplor-time-picker.js +6 -6
- package/components/xplor-tooltip.js +1 -1
- package/dist/cjs/{index-BjAapk2n.js → index--_m3aUsf.js} +32 -7
- package/dist/cjs/index--_m3aUsf.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/xplor-alert-dialog_60.cjs.entry.js +29457 -0
- package/dist/cjs/xplor-alert-dialog_60.cjs.entry.js.map +1 -0
- package/dist/cjs/xplor-component-library.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/xplor-alert-message/xplor-alert-message.js +2 -2
- package/dist/collection/components/xplor-avatar/xplor-avatar.js +2 -2
- package/dist/collection/components/xplor-avatar-and-name/xplor-avatar-and-name.js +1 -1
- package/dist/collection/components/xplor-badge/xplor-badge.js +1 -1
- package/dist/collection/components/xplor-badge-active/xplor-badge-active.js +1 -1
- package/dist/collection/components/xplor-badge-archived/xplor-badge-archived.js +1 -1
- package/dist/collection/components/xplor-badge-deleted/xplor-badge-deleted.js +1 -1
- package/dist/collection/components/xplor-badge-expired/xplor-badge-expired.js +1 -1
- package/dist/collection/components/xplor-badge-inactive/xplor-badge-inactive.js +1 -1
- package/dist/collection/components/xplor-badge-recalled/xplor-badge-recalled.js +1 -1
- package/dist/collection/components/xplor-badge-upcoming/xplor-badge-upcoming.js +1 -1
- package/dist/collection/components/xplor-badge-waitlist/xplor-badge-waitlist.js +1 -1
- package/dist/collection/components/xplor-btn-back/xplor-btn-back.js +1 -1
- package/dist/collection/components/xplor-btn-back-to-parent/xplor-btn-back-to-parent.js +1 -1
- package/dist/collection/components/xplor-btn-icon/xplor-btn-icon.js +1 -1
- package/dist/collection/components/xplor-btn-toggle/xplor-btn-toggle.js +1 -1
- package/dist/collection/components/xplor-btn-toggle-group/xplor-btn-toggle-group.js +1 -1
- package/dist/collection/components/xplor-btn-toggle-secondary/xplor-btn-toggle-secondary.js +1 -1
- package/dist/collection/components/xplor-btn-tooltip/xplor-btn-tooltip.js +1 -1
- package/dist/collection/components/xplor-button/xplor-button.css +8 -3
- package/dist/collection/components/xplor-button/xplor-button.js +23 -1
- package/dist/collection/components/xplor-button/xplor-button.js.map +1 -1
- package/dist/collection/components/xplor-canvas-editor/xplor-canvas-editor.css +1224 -0
- package/dist/collection/components/xplor-canvas-editor/xplor-canvas-editor.js +520 -0
- package/dist/collection/components/xplor-canvas-editor/xplor-canvas-editor.js.map +1 -0
- package/dist/collection/components/xplor-canvas-editor/xplor-canvas-editor.stories.js +280 -0
- package/dist/collection/components/xplor-canvas-editor/xplor-canvas-editor.stories.js.map +1 -0
- package/dist/collection/components/xplor-chat-widget/xplor-chat-widget.js +1 -1
- package/dist/collection/components/xplor-checkbox/xplor-checkbox.js +1 -1
- package/dist/collection/components/xplor-combobox/xplor-combobox.js +5 -5
- package/dist/collection/components/xplor-datatable/xplor-datatable.js +2 -2
- package/dist/collection/components/xplor-date-picker/xplor-date-picker.js +4 -4
- package/dist/collection/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.css +62 -29
- package/dist/collection/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.js +25 -4
- package/dist/collection/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.js.map +1 -1
- package/dist/collection/components/xplor-dropdown/xplor-dropdown.js +1 -1
- package/dist/collection/components/xplor-expansion-panel/xplor-expansion-panel.js +4 -4
- package/dist/collection/components/xplor-expansion-panels/xplor-expansion-panels.js +1 -1
- package/dist/collection/components/xplor-file-upload/xplor-file-upload.js +2 -2
- package/dist/collection/components/xplor-inline-checkbox/xplor-inline-checkbox.js +2 -2
- package/dist/collection/components/xplor-inline-date-picker/xplor-inline-date-picker.js +1 -1
- package/dist/collection/components/xplor-inline-switch/xplor-inline-switch.js +1 -1
- package/dist/collection/components/xplor-input-file/xplor-input-file.js +1 -1
- package/dist/collection/components/xplor-input-search/xplor-input-search.js +2 -2
- package/dist/collection/components/xplor-input-select/xplor-input-select.js +2 -2
- package/dist/collection/components/xplor-input-send/xplor-input-send.js +2 -2
- package/dist/collection/components/xplor-input-text/xplor-input-text.js +2 -2
- package/dist/collection/components/xplor-input-text-area/xplor-input-text-area.js +2 -2
- package/dist/collection/components/xplor-input-text-secondary/xplor-input-text-secondary.js +2 -2
- package/dist/collection/components/xplor-input-title/xplor-input-title.js +1 -1
- package/dist/collection/components/xplor-links/xplor-links.js +1 -1
- package/dist/collection/components/xplor-modal/xplor-modal.css +10 -10
- package/dist/collection/components/xplor-modal-persistent/xplor-modal-persistent.js +1 -1
- package/dist/collection/components/xplor-nav-tabs/xplor-nav-tabs.js +2 -2
- package/dist/collection/components/xplor-radio-btn/xplor-radio-btn.js +2 -2
- package/dist/collection/components/xplor-rich-text-editor/xplor-rich-text-editor.css +1445 -0
- package/dist/collection/components/xplor-rich-text-editor/xplor-rich-text-editor.js +800 -0
- package/dist/collection/components/xplor-rich-text-editor/xplor-rich-text-editor.js.map +1 -0
- package/dist/collection/components/xplor-rich-text-editor/xplor-rich-text-editor.stories.js +260 -0
- package/dist/collection/components/xplor-rich-text-editor/xplor-rich-text-editor.stories.js.map +1 -0
- package/dist/collection/components/xplor-section-card/xplor-section-card.js +2 -2
- package/dist/collection/components/xplor-section-heading/xplor-section-heading.js +2 -2
- package/dist/collection/components/xplor-table/xplor-table.js +5 -5
- package/dist/collection/components/xplor-text-bubble/xplor-text-bubble.js +2 -2
- package/dist/collection/components/xplor-text-field/xplor-text-field.js +2 -2
- package/dist/collection/components/xplor-time-picker/xplor-time-picker.js +6 -6
- package/dist/collection/components/xplor-tooltip/xplor-tooltip.js +2 -2
- package/dist/collection/utils/slate-legacy-converter.js +223 -0
- package/dist/collection/utils/slate-legacy-converter.js.map +1 -0
- package/dist/components/index.js +28 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-04oMLTZR.js → p-B7FEf2_x.js} +3 -3
- package/dist/components/p-B7FEf2_x.js.map +1 -0
- package/dist/components/{p--zhT6rvJ.js → p-DGaHlr-k.js} +4 -4
- package/dist/components/{p--zhT6rvJ.js.map → p-DGaHlr-k.js.map} +1 -1
- package/dist/components/{p-B5rS_jjI.js → p-DWaTb2EJ.js} +7 -4
- package/dist/components/p-DWaTb2EJ.js.map +1 -0
- package/dist/components/{p-J41B2nOt.js → p-DroQBoSo.js} +3 -3
- package/dist/components/{p-J41B2nOt.js.map → p-DroQBoSo.js.map} +1 -1
- package/dist/components/{p-DQ8MCJFX.js → p-TfYzqGwr.js} +3 -3
- package/dist/components/{p-DQ8MCJFX.js.map → p-TfYzqGwr.js.map} +1 -1
- package/dist/components/{p-DbQ6ZNvh.js → p-vl-J3tKJ.js} +4 -4
- package/dist/components/{p-DbQ6ZNvh.js.map → p-vl-J3tKJ.js.map} +1 -1
- package/dist/components/xplor-alert-message.js +2 -2
- package/dist/components/xplor-avatar-and-name.js +2 -2
- package/dist/components/xplor-avatar.js +1 -1
- package/dist/components/xplor-badge-active.js +1 -1
- package/dist/components/xplor-badge-archived.js +1 -1
- package/dist/components/xplor-badge-deleted.js +1 -1
- package/dist/components/xplor-badge-expired.js +1 -1
- package/dist/components/xplor-badge-inactive.js +1 -1
- package/dist/components/xplor-badge-recalled.js +1 -1
- package/dist/components/xplor-badge-upcoming.js +1 -1
- package/dist/components/xplor-badge-waitlist.js +1 -1
- package/dist/components/xplor-badge.js +1 -1
- package/dist/components/xplor-btn-back-to-parent.js +1 -1
- package/dist/components/xplor-btn-back.js +1 -1
- package/dist/components/xplor-btn-icon.js +1 -1
- package/dist/components/xplor-btn-toggle-group.js +1 -1
- package/dist/components/xplor-btn-toggle-secondary.js +1 -1
- package/dist/components/xplor-btn-toggle.js +1 -1
- package/dist/components/xplor-btn-tooltip.js +3 -3
- package/dist/components/xplor-button.js +1 -1
- package/dist/components/xplor-canvas-editor.d.ts +11 -0
- package/dist/components/xplor-canvas-editor.js +370 -0
- package/dist/components/xplor-canvas-editor.js.map +1 -0
- package/dist/components/xplor-chat-widget.js +3 -3
- package/dist/components/xplor-checkbox.js +1 -1
- package/dist/components/xplor-combobox.js +5 -5
- package/dist/components/xplor-datatable.js +2 -2
- package/dist/components/xplor-date-picker.js +5 -5
- package/dist/components/xplor-drag-and-drop-input.js +26 -5
- package/dist/components/xplor-drag-and-drop-input.js.map +1 -1
- package/dist/components/xplor-dropdown.js +1 -1
- package/dist/components/xplor-expansion-panel.js +4 -4
- package/dist/components/xplor-expansion-panels.js +1 -1
- package/dist/components/xplor-file-upload.js +2 -2
- package/dist/components/xplor-inline-checkbox.js +2 -2
- package/dist/components/xplor-inline-date-picker.js +1 -1
- package/dist/components/xplor-inline-switch.js +1 -1
- package/dist/components/xplor-input-file.js +1 -1
- package/dist/components/xplor-input-search.js +2 -2
- package/dist/components/xplor-input-select.js +2 -2
- package/dist/components/xplor-input-send.js +3 -3
- package/dist/components/xplor-input-text-area.js +2 -2
- package/dist/components/xplor-input-text-secondary.js +2 -2
- package/dist/components/xplor-input-text.js +2 -2
- package/dist/components/xplor-input-title.js +1 -1
- package/dist/components/xplor-links.js +1 -1
- package/dist/components/xplor-modal-persistent.js +2 -2
- package/dist/components/xplor-modal.js +1 -1
- package/dist/components/xplor-nav-tabs.js +2 -2
- package/dist/components/xplor-radio-btn.js +2 -2
- package/dist/components/xplor-rich-text-editor.d.ts +11 -0
- package/dist/components/xplor-rich-text-editor.js +23755 -0
- package/dist/components/xplor-rich-text-editor.js.map +1 -0
- package/dist/components/xplor-section-card.js +2 -2
- package/dist/components/xplor-section-heading.js +2 -2
- package/dist/components/xplor-table.js +5 -5
- package/dist/components/xplor-text-bubble.js +2 -2
- package/dist/components/xplor-text-field.js +2 -2
- package/dist/components/xplor-time-picker.js +6 -6
- package/dist/components/xplor-tooltip.js +1 -1
- package/dist/esm/{index-KRfMjDC2.js → index-QwDfQUbw.js} +32 -7
- package/dist/esm/index-QwDfQUbw.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/xplor-alert-dialog_60.entry.js +29396 -0
- package/dist/esm/xplor-alert-dialog_60.entry.js.map +1 -0
- package/dist/esm/xplor-component-library.js +3 -3
- package/dist/hydrate/index.js +24231 -96
- package/dist/hydrate/index.mjs +24231 -96
- package/dist/types/components/xplor-button/xplor-button.d.ts +2 -0
- package/dist/types/components/xplor-canvas-editor/xplor-canvas-editor.d.ts +63 -0
- package/dist/types/components/xplor-canvas-editor/xplor-canvas-editor.stories.d.ts +84 -0
- package/dist/types/components/xplor-drag-and-drop-input/xplor-drag-and-drop-input.d.ts +6 -0
- package/dist/types/components/xplor-rich-text-editor/xplor-rich-text-editor.d.ts +129 -0
- package/dist/types/components/xplor-rich-text-editor/xplor-rich-text-editor.stories.d.ts +105 -0
- package/dist/types/components.d.ts +286 -0
- package/dist/types/utils/slate-legacy-converter.d.ts +83 -0
- package/dist/xplor-component-library/p-0d477ec2.entry.js +2 -0
- package/dist/xplor-component-library/p-0d477ec2.entry.js.map +1 -0
- package/dist/xplor-component-library/p-QwDfQUbw.js +3 -0
- package/dist/xplor-component-library/p-QwDfQUbw.js.map +1 -0
- package/dist/xplor-component-library/xplor-component-library.css +1 -1
- package/dist/xplor-component-library/xplor-component-library.esm.js +1 -1
- package/package.json +7 -1
- package/components/p-BRWe4TXp.js.map +0 -1
- package/components/p-Bs_ocvfe.js.map +0 -1
- package/dist/cjs/index-BjAapk2n.js.map +0 -1
- package/dist/cjs/xplor-alert-dialog_58.cjs.entry.js +0 -5395
- package/dist/cjs/xplor-alert-dialog_58.cjs.entry.js.map +0 -1
- package/dist/components/p-04oMLTZR.js.map +0 -1
- package/dist/components/p-B5rS_jjI.js.map +0 -1
- package/dist/esm/index-KRfMjDC2.js.map +0 -1
- package/dist/esm/xplor-alert-dialog_58.entry.js +0 -5336
- package/dist/esm/xplor-alert-dialog_58.entry.js.map +0 -1
- package/dist/xplor-component-library/p-7ecb45dd.entry.js +0 -2
- package/dist/xplor-component-library/p-7ecb45dd.entry.js.map +0 -1
- package/dist/xplor-component-library/p-KRfMjDC2.js +0 -3
- package/dist/xplor-component-library/p-KRfMjDC2.js.map +0 -1
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Components/Canvas Editor',
|
|
3
|
+
tags: ['autodocs'],
|
|
4
|
+
parameters: {
|
|
5
|
+
actions: {
|
|
6
|
+
handles: ['xplorShapeAdd', 'xplorShapeRemove', 'xplorShapeChange'],
|
|
7
|
+
},
|
|
8
|
+
docs: {
|
|
9
|
+
description: {
|
|
10
|
+
component: `
|
|
11
|
+
An SVG-based canvas editor for drawing and managing shapes. Fully accessible (WCAG 2.1 AA),
|
|
12
|
+
framework-agnostic, and compatible with Vue, React, and Angular.
|
|
13
|
+
|
|
14
|
+
## Features
|
|
15
|
+
- Draw rectangles, ellipses, and lines by clicking and dragging
|
|
16
|
+
- Select and delete shapes with mouse or keyboard (Del / Backspace)
|
|
17
|
+
- Resize selected shapes using 8 directional handles
|
|
18
|
+
- Toolbar with tool selection, delete, and clear-all actions
|
|
19
|
+
- Full keyboard and screen reader support
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
\`\`\`html
|
|
23
|
+
<xplor-canvas-editor
|
|
24
|
+
width="800"
|
|
25
|
+
height="500"
|
|
26
|
+
tool="select"
|
|
27
|
+
></xplor-canvas-editor>
|
|
28
|
+
\`\`\`
|
|
29
|
+
|
|
30
|
+
## Events
|
|
31
|
+
| Event | Payload | Description |
|
|
32
|
+
|---|---|---|
|
|
33
|
+
| \`xplorShapeAdd\` | \`Shape\` | Emitted when a new shape is drawn |
|
|
34
|
+
| \`xplorShapeRemove\` | \`string\` (id) | Emitted when a shape is deleted |
|
|
35
|
+
| \`xplorShapeChange\` | \`Shape\` | Emitted when a shape is resized |
|
|
36
|
+
|
|
37
|
+
## Public Methods
|
|
38
|
+
| Method | Returns | Description |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| \`getShapes()\` | \`Promise<Shape[]>\` | Returns all current shapes |
|
|
41
|
+
| \`clearAll()\` | \`Promise<void>\` | Removes all shapes |
|
|
42
|
+
|
|
43
|
+
## CSS Custom Properties
|
|
44
|
+
| Property | Default | Description |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| \`--canvas-bg\` | \`#ffffff\` | Canvas background colour |
|
|
47
|
+
| \`--canvas-border\` | \`#e5e7eb\` | Border colour |
|
|
48
|
+
| \`--selection-color\` | \`#2196f3\` | Selection outline / handle accent colour |
|
|
49
|
+
| \`--handle-size\` | \`5\` | Resize handle radius (SVG units) |
|
|
50
|
+
| \`--handle-fill\` | \`#ffffff\` | Resize handle fill |
|
|
51
|
+
| \`--handle-stroke\` | \`#2196f3\` | Resize handle stroke |
|
|
52
|
+
`,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
argTypes: {
|
|
57
|
+
width: {
|
|
58
|
+
control: { type: 'number', min: 200, max: 1600, step: 50 },
|
|
59
|
+
description: 'Canvas width in pixels',
|
|
60
|
+
},
|
|
61
|
+
height: {
|
|
62
|
+
control: { type: 'number', min: 100, max: 1000, step: 50 },
|
|
63
|
+
description: 'Canvas height in pixels',
|
|
64
|
+
},
|
|
65
|
+
tool: {
|
|
66
|
+
control: { type: 'select' },
|
|
67
|
+
options: ['select', 'rect', 'circle', 'line'],
|
|
68
|
+
description: 'Initially active drawing tool',
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
};
|
|
72
|
+
// ---------------------------------------------------------------------------
|
|
73
|
+
// Template helper
|
|
74
|
+
// ---------------------------------------------------------------------------
|
|
75
|
+
const Template = (args) => {
|
|
76
|
+
const attrs = Object.entries(args)
|
|
77
|
+
.filter(([, v]) => v !== undefined && v !== '' && v !== false)
|
|
78
|
+
.map(([k, v]) => {
|
|
79
|
+
const attr = k.replace(/([A-Z])/g, '-$1').toLowerCase();
|
|
80
|
+
if (typeof v === 'boolean')
|
|
81
|
+
return v ? attr : '';
|
|
82
|
+
return `${attr}="${v}"`;
|
|
83
|
+
})
|
|
84
|
+
.filter(Boolean)
|
|
85
|
+
.join(' ');
|
|
86
|
+
return `<xplor-canvas-editor ${attrs}></xplor-canvas-editor>`;
|
|
87
|
+
};
|
|
88
|
+
// ---------------------------------------------------------------------------
|
|
89
|
+
// Default — select tool, standard size
|
|
90
|
+
// ---------------------------------------------------------------------------
|
|
91
|
+
export const Default = Template.bind({});
|
|
92
|
+
Default.args = {
|
|
93
|
+
width: 800,
|
|
94
|
+
height: 500,
|
|
95
|
+
tool: 'select',
|
|
96
|
+
};
|
|
97
|
+
Default.storyName = 'Default (select tool)';
|
|
98
|
+
Default.parameters = {
|
|
99
|
+
docs: {
|
|
100
|
+
description: {
|
|
101
|
+
story: 'The default state. Switch to a drawing tool in the toolbar, then click and drag on the canvas to create shapes.',
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
};
|
|
105
|
+
// ---------------------------------------------------------------------------
|
|
106
|
+
// Draw Mode — starts with rect tool active
|
|
107
|
+
// ---------------------------------------------------------------------------
|
|
108
|
+
export const DrawMode = Template.bind({});
|
|
109
|
+
DrawMode.args = {
|
|
110
|
+
width: 800,
|
|
111
|
+
height: 500,
|
|
112
|
+
tool: 'rect',
|
|
113
|
+
};
|
|
114
|
+
DrawMode.storyName = 'Draw Mode (rect)';
|
|
115
|
+
DrawMode.parameters = {
|
|
116
|
+
docs: {
|
|
117
|
+
description: {
|
|
118
|
+
story: 'Opens with the Rectangle tool already active. Click and drag on the canvas to draw rectangles immediately.',
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
// ---------------------------------------------------------------------------
|
|
123
|
+
// Circle / Ellipse tool
|
|
124
|
+
// ---------------------------------------------------------------------------
|
|
125
|
+
export const CircleTool = Template.bind({});
|
|
126
|
+
CircleTool.args = {
|
|
127
|
+
width: 800,
|
|
128
|
+
height: 500,
|
|
129
|
+
tool: 'circle',
|
|
130
|
+
};
|
|
131
|
+
CircleTool.storyName = 'Circle / Ellipse tool';
|
|
132
|
+
CircleTool.parameters = {
|
|
133
|
+
docs: {
|
|
134
|
+
description: {
|
|
135
|
+
story: 'Opens with the Circle/Ellipse tool active. Drag to define the bounding box of the ellipse.',
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
// ---------------------------------------------------------------------------
|
|
140
|
+
// Line tool
|
|
141
|
+
// ---------------------------------------------------------------------------
|
|
142
|
+
export const LineTool = Template.bind({});
|
|
143
|
+
LineTool.args = {
|
|
144
|
+
width: 800,
|
|
145
|
+
height: 500,
|
|
146
|
+
tool: 'line',
|
|
147
|
+
};
|
|
148
|
+
LineTool.storyName = 'Line tool';
|
|
149
|
+
LineTool.parameters = {
|
|
150
|
+
docs: {
|
|
151
|
+
description: {
|
|
152
|
+
story: 'Opens with the Line tool active. Click the start point and drag to the end point.',
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
};
|
|
156
|
+
// ---------------------------------------------------------------------------
|
|
157
|
+
// Small canvas
|
|
158
|
+
// ---------------------------------------------------------------------------
|
|
159
|
+
export const SmallCanvas = Template.bind({});
|
|
160
|
+
SmallCanvas.args = {
|
|
161
|
+
width: 400,
|
|
162
|
+
height: 300,
|
|
163
|
+
tool: 'select',
|
|
164
|
+
};
|
|
165
|
+
SmallCanvas.storyName = 'Small canvas (400×300)';
|
|
166
|
+
SmallCanvas.parameters = {
|
|
167
|
+
docs: {
|
|
168
|
+
description: {
|
|
169
|
+
story: 'Demonstrates a compact canvas size.',
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
};
|
|
173
|
+
// ---------------------------------------------------------------------------
|
|
174
|
+
// Wide canvas
|
|
175
|
+
// ---------------------------------------------------------------------------
|
|
176
|
+
export const WideCanvas = Template.bind({});
|
|
177
|
+
WideCanvas.args = {
|
|
178
|
+
width: 1200,
|
|
179
|
+
height: 500,
|
|
180
|
+
tool: 'select',
|
|
181
|
+
};
|
|
182
|
+
WideCanvas.storyName = 'Wide canvas (1200×500)';
|
|
183
|
+
WideCanvas.parameters = {
|
|
184
|
+
docs: {
|
|
185
|
+
description: {
|
|
186
|
+
story: 'A wider canvas. The SVG wrapper scrolls horizontally if the canvas exceeds the viewport.',
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
};
|
|
190
|
+
// ---------------------------------------------------------------------------
|
|
191
|
+
// Pre-loaded shapes (via JS injection — showcases shape rendering)
|
|
192
|
+
// ---------------------------------------------------------------------------
|
|
193
|
+
export const PreloadedShapes = () => `
|
|
194
|
+
<div style="display:inline-block;">
|
|
195
|
+
<xplor-canvas-editor
|
|
196
|
+
id="preloaded-canvas"
|
|
197
|
+
width="800"
|
|
198
|
+
height="500"
|
|
199
|
+
tool="select"
|
|
200
|
+
></xplor-canvas-editor>
|
|
201
|
+
</div>
|
|
202
|
+
<script>
|
|
203
|
+
(function () {
|
|
204
|
+
var el = document.getElementById('preloaded-canvas');
|
|
205
|
+
// Wait for Stencil hydration
|
|
206
|
+
customElements.whenDefined('xplor-canvas-editor').then(function () {
|
|
207
|
+
// Directly set internal state via a workaround — for demo purposes only.
|
|
208
|
+
// In real integrations, shapes should be drawn by the user or managed via getShapes()/clearAll().
|
|
209
|
+
var preloaded = [
|
|
210
|
+
{ id: 'pre-1', type: 'rect', x: 40, y: 40, width: 160, height: 100, fill: 'rgba(33,150,243,0.25)', stroke: '#1976d2' },
|
|
211
|
+
{ id: 'pre-2', type: 'circle', x: 260, y: 60, width: 140, height: 120, fill: 'rgba(76,175,80,0.25)', stroke: '#388e3c' },
|
|
212
|
+
{ id: 'pre-3', type: 'line', x: 50, y: 220, width: 300, height: 200, fill: 'none', stroke: '#f44336' },
|
|
213
|
+
{ id: 'pre-4', type: 'rect', x: 430, y: 80, width: 180, height: 130, fill: 'rgba(156,39,176,0.25)', stroke: '#7b1fa2' },
|
|
214
|
+
];
|
|
215
|
+
if (el && el.__stencilInstance) {
|
|
216
|
+
el.__stencilInstance.shapes = preloaded;
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
})();
|
|
220
|
+
</script>
|
|
221
|
+
`;
|
|
222
|
+
PreloadedShapes.storyName = 'Pre-loaded shapes';
|
|
223
|
+
PreloadedShapes.parameters = {
|
|
224
|
+
docs: {
|
|
225
|
+
description: {
|
|
226
|
+
story: 'Demonstrates how all three shape types (rect, ellipse, line) are rendered. Use the Select tool and click a shape to see resize handles.',
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
};
|
|
230
|
+
// ---------------------------------------------------------------------------
|
|
231
|
+
// Dark mode
|
|
232
|
+
// ---------------------------------------------------------------------------
|
|
233
|
+
export const DarkMode = () => `
|
|
234
|
+
<div class="dark" style="background:#1e1e2e; padding:2rem; border-radius:0.5rem; display:inline-block;">
|
|
235
|
+
<xplor-canvas-editor
|
|
236
|
+
class="dark"
|
|
237
|
+
width="800"
|
|
238
|
+
height="500"
|
|
239
|
+
tool="select"
|
|
240
|
+
></xplor-canvas-editor>
|
|
241
|
+
</div>
|
|
242
|
+
`;
|
|
243
|
+
DarkMode.storyName = 'Dark mode';
|
|
244
|
+
DarkMode.parameters = {
|
|
245
|
+
backgrounds: { default: 'dark' },
|
|
246
|
+
docs: {
|
|
247
|
+
description: {
|
|
248
|
+
story: 'Apply the `.dark` CSS class to the host element or an ancestor to activate dark mode colour tokens.',
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
};
|
|
252
|
+
// ---------------------------------------------------------------------------
|
|
253
|
+
// Custom CSS tokens
|
|
254
|
+
// ---------------------------------------------------------------------------
|
|
255
|
+
export const CustomTokens = () => `
|
|
256
|
+
<xplor-canvas-editor
|
|
257
|
+
width="800"
|
|
258
|
+
height="500"
|
|
259
|
+
tool="rect"
|
|
260
|
+
style="
|
|
261
|
+
--canvas-bg: #fdf6ec;
|
|
262
|
+
--canvas-border: #f5c68a;
|
|
263
|
+
--selection-color: #f57c00;
|
|
264
|
+
--handle-stroke: #f57c00;
|
|
265
|
+
--canvas-toolbar-bg: #fff8f0;
|
|
266
|
+
--canvas-toolbar-border: #f5c68a;
|
|
267
|
+
--canvas-btn-active-bg: rgba(245,124,0,0.1);
|
|
268
|
+
--canvas-btn-active-color: #f57c00;
|
|
269
|
+
"
|
|
270
|
+
></xplor-canvas-editor>
|
|
271
|
+
`;
|
|
272
|
+
CustomTokens.storyName = 'Custom CSS tokens (orange theme)';
|
|
273
|
+
CustomTokens.parameters = {
|
|
274
|
+
docs: {
|
|
275
|
+
description: {
|
|
276
|
+
story: 'Override CSS custom properties to match any design system. This example applies an orange warm theme.',
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
};
|
|
280
|
+
//# sourceMappingURL=xplor-canvas-editor.stories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"xplor-canvas-editor.stories.js","sourceRoot":"","sources":["../../../src/components/xplor-canvas-editor/xplor-canvas-editor.stories.ts"],"names":[],"mappings":"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","sourcesContent":["export default {\n title: 'Components/Canvas Editor',\n tags: ['autodocs'],\n parameters: {\n actions: {\n handles: ['xplorShapeAdd', 'xplorShapeRemove', 'xplorShapeChange'],\n },\n docs: {\n description: {\n component: `\nAn SVG-based canvas editor for drawing and managing shapes. Fully accessible (WCAG 2.1 AA),\nframework-agnostic, and compatible with Vue, React, and Angular.\n\n## Features\n- Draw rectangles, ellipses, and lines by clicking and dragging\n- Select and delete shapes with mouse or keyboard (Del / Backspace)\n- Resize selected shapes using 8 directional handles\n- Toolbar with tool selection, delete, and clear-all actions\n- Full keyboard and screen reader support\n\n## Usage\n\\`\\`\\`html\n<xplor-canvas-editor\n width=\"800\"\n height=\"500\"\n tool=\"select\"\n></xplor-canvas-editor>\n\\`\\`\\`\n\n## Events\n| Event | Payload | Description |\n|---|---|---|\n| \\`xplorShapeAdd\\` | \\`Shape\\` | Emitted when a new shape is drawn |\n| \\`xplorShapeRemove\\` | \\`string\\` (id) | Emitted when a shape is deleted |\n| \\`xplorShapeChange\\` | \\`Shape\\` | Emitted when a shape is resized |\n\n## Public Methods\n| Method | Returns | Description |\n|---|---|---|\n| \\`getShapes()\\` | \\`Promise<Shape[]>\\` | Returns all current shapes |\n| \\`clearAll()\\` | \\`Promise<void>\\` | Removes all shapes |\n\n## CSS Custom Properties\n| Property | Default | Description |\n|---|---|---|\n| \\`--canvas-bg\\` | \\`#ffffff\\` | Canvas background colour |\n| \\`--canvas-border\\` | \\`#e5e7eb\\` | Border colour |\n| \\`--selection-color\\` | \\`#2196f3\\` | Selection outline / handle accent colour |\n| \\`--handle-size\\` | \\`5\\` | Resize handle radius (SVG units) |\n| \\`--handle-fill\\` | \\`#ffffff\\` | Resize handle fill |\n| \\`--handle-stroke\\` | \\`#2196f3\\` | Resize handle stroke |\n `,\n },\n },\n },\n argTypes: {\n width: {\n control: { type: 'number', min: 200, max: 1600, step: 50 },\n description: 'Canvas width in pixels',\n },\n height: {\n control: { type: 'number', min: 100, max: 1000, step: 50 },\n description: 'Canvas height in pixels',\n },\n tool: {\n control: { type: 'select' },\n options: ['select', 'rect', 'circle', 'line'],\n description: 'Initially active drawing tool',\n },\n },\n};\n\n// ---------------------------------------------------------------------------\n// Template helper\n// ---------------------------------------------------------------------------\n\nconst Template = (args) => {\n const attrs = Object.entries(args)\n .filter(([, v]) => v !== undefined && v !== '' && v !== false)\n .map(([k, v]) => {\n const attr = k.replace(/([A-Z])/g, '-$1').toLowerCase();\n if (typeof v === 'boolean') return v ? attr : '';\n return `${attr}=\"${v}\"`;\n })\n .filter(Boolean)\n .join(' ');\n\n return `<xplor-canvas-editor ${attrs}></xplor-canvas-editor>`;\n};\n\n// ---------------------------------------------------------------------------\n// Default — select tool, standard size\n// ---------------------------------------------------------------------------\n\nexport const Default = Template.bind({});\nDefault.args = {\n width: 800,\n height: 500,\n tool: 'select',\n};\nDefault.storyName = 'Default (select tool)';\nDefault.parameters = {\n docs: {\n description: {\n story:\n 'The default state. Switch to a drawing tool in the toolbar, then click and drag on the canvas to create shapes.',\n },\n },\n};\n\n// ---------------------------------------------------------------------------\n// Draw Mode — starts with rect tool active\n// ---------------------------------------------------------------------------\n\nexport const DrawMode = Template.bind({});\nDrawMode.args = {\n width: 800,\n height: 500,\n tool: 'rect',\n};\nDrawMode.storyName = 'Draw Mode (rect)';\nDrawMode.parameters = {\n docs: {\n description: {\n story:\n 'Opens with the Rectangle tool already active. Click and drag on the canvas to draw rectangles immediately.',\n },\n },\n};\n\n// ---------------------------------------------------------------------------\n// Circle / Ellipse tool\n// ---------------------------------------------------------------------------\n\nexport const CircleTool = Template.bind({});\nCircleTool.args = {\n width: 800,\n height: 500,\n tool: 'circle',\n};\nCircleTool.storyName = 'Circle / Ellipse tool';\nCircleTool.parameters = {\n docs: {\n description: {\n story:\n 'Opens with the Circle/Ellipse tool active. Drag to define the bounding box of the ellipse.',\n },\n },\n};\n\n// ---------------------------------------------------------------------------\n// Line tool\n// ---------------------------------------------------------------------------\n\nexport const LineTool = Template.bind({});\nLineTool.args = {\n width: 800,\n height: 500,\n tool: 'line',\n};\nLineTool.storyName = 'Line tool';\nLineTool.parameters = {\n docs: {\n description: {\n story:\n 'Opens with the Line tool active. Click the start point and drag to the end point.',\n },\n },\n};\n\n// ---------------------------------------------------------------------------\n// Small canvas\n// ---------------------------------------------------------------------------\n\nexport const SmallCanvas = Template.bind({});\nSmallCanvas.args = {\n width: 400,\n height: 300,\n tool: 'select',\n};\nSmallCanvas.storyName = 'Small canvas (400×300)';\nSmallCanvas.parameters = {\n docs: {\n description: {\n story: 'Demonstrates a compact canvas size.',\n },\n },\n};\n\n// ---------------------------------------------------------------------------\n// Wide canvas\n// ---------------------------------------------------------------------------\n\nexport const WideCanvas = Template.bind({});\nWideCanvas.args = {\n width: 1200,\n height: 500,\n tool: 'select',\n};\nWideCanvas.storyName = 'Wide canvas (1200×500)';\nWideCanvas.parameters = {\n docs: {\n description: {\n story:\n 'A wider canvas. The SVG wrapper scrolls horizontally if the canvas exceeds the viewport.',\n },\n },\n};\n\n// ---------------------------------------------------------------------------\n// Pre-loaded shapes (via JS injection — showcases shape rendering)\n// ---------------------------------------------------------------------------\n\nexport const PreloadedShapes = () => `\n<div style=\"display:inline-block;\">\n <xplor-canvas-editor\n id=\"preloaded-canvas\"\n width=\"800\"\n height=\"500\"\n tool=\"select\"\n ></xplor-canvas-editor>\n</div>\n<script>\n (function () {\n var el = document.getElementById('preloaded-canvas');\n // Wait for Stencil hydration\n customElements.whenDefined('xplor-canvas-editor').then(function () {\n // Directly set internal state via a workaround — for demo purposes only.\n // In real integrations, shapes should be drawn by the user or managed via getShapes()/clearAll().\n var preloaded = [\n { id: 'pre-1', type: 'rect', x: 40, y: 40, width: 160, height: 100, fill: 'rgba(33,150,243,0.25)', stroke: '#1976d2' },\n { id: 'pre-2', type: 'circle', x: 260, y: 60, width: 140, height: 120, fill: 'rgba(76,175,80,0.25)', stroke: '#388e3c' },\n { id: 'pre-3', type: 'line', x: 50, y: 220, width: 300, height: 200, fill: 'none', stroke: '#f44336' },\n { id: 'pre-4', type: 'rect', x: 430, y: 80, width: 180, height: 130, fill: 'rgba(156,39,176,0.25)', stroke: '#7b1fa2' },\n ];\n if (el && el.__stencilInstance) {\n el.__stencilInstance.shapes = preloaded;\n }\n });\n })();\n</script>\n`;\nPreloadedShapes.storyName = 'Pre-loaded shapes';\nPreloadedShapes.parameters = {\n docs: {\n description: {\n story:\n 'Demonstrates how all three shape types (rect, ellipse, line) are rendered. Use the Select tool and click a shape to see resize handles.',\n },\n },\n};\n\n// ---------------------------------------------------------------------------\n// Dark mode\n// ---------------------------------------------------------------------------\n\nexport const DarkMode = () => `\n<div class=\"dark\" style=\"background:#1e1e2e; padding:2rem; border-radius:0.5rem; display:inline-block;\">\n <xplor-canvas-editor\n class=\"dark\"\n width=\"800\"\n height=\"500\"\n tool=\"select\"\n ></xplor-canvas-editor>\n</div>\n`;\nDarkMode.storyName = 'Dark mode';\nDarkMode.parameters = {\n backgrounds: { default: 'dark' },\n docs: {\n description: {\n story:\n 'Apply the `.dark` CSS class to the host element or an ancestor to activate dark mode colour tokens.',\n },\n },\n};\n\n// ---------------------------------------------------------------------------\n// Custom CSS tokens\n// ---------------------------------------------------------------------------\n\nexport const CustomTokens = () => `\n<xplor-canvas-editor\n width=\"800\"\n height=\"500\"\n tool=\"rect\"\n style=\"\n --canvas-bg: #fdf6ec;\n --canvas-border: #f5c68a;\n --selection-color: #f57c00;\n --handle-stroke: #f57c00;\n --canvas-toolbar-bg: #fff8f0;\n --canvas-toolbar-border: #f5c68a;\n --canvas-btn-active-bg: rgba(245,124,0,0.1);\n --canvas-btn-active-color: #f57c00;\n \"\n></xplor-canvas-editor>\n`;\nCustomTokens.storyName = 'Custom CSS tokens (orange theme)';\nCustomTokens.parameters = {\n docs: {\n description: {\n story:\n 'Override CSS custom properties to match any design system. This example applies an orange warm theme.',\n },\n },\n};\n"]}
|
|
@@ -52,7 +52,7 @@ export class XplorChatWidget {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
render() {
|
|
55
|
-
return (h(Host, { key: '
|
|
55
|
+
return (h(Host, { key: '5d2dcc41806f640f3dce9dea7aefe60877115b6c' }, h("div", { key: '3624422b51c11f58fa35249e91ab3a5a4ae70cd1', id: "ai-text" }, this.textValue), h("div", { key: 'ba23a8071db26f0695fbfc75a740b9e816c72eac', class: "container" }, h("xplor-dropdown", { key: 'b944f0a90ac707f98bc3ed75736823572d0f77e5', options: this.languageOptions, selected: this.selectedLanguage, handleChange: this.handleChange }), h("xplor-button", { key: 'e9d9b16969b7da1cb1160a7f6c9c77b932da8834', text: "translate", mode: "pg", type: "primary", onClick: this.handleClick }))));
|
|
56
56
|
}
|
|
57
57
|
static get is() { return "xplor-chat-widget"; }
|
|
58
58
|
static get encapsulation() { return "shadow"; }
|
|
@@ -74,7 +74,7 @@ export class XplorCheckbox {
|
|
|
74
74
|
this.indeterminate = this.initialIndeterminate;
|
|
75
75
|
}
|
|
76
76
|
render() {
|
|
77
|
-
return (h("div", { key: '
|
|
77
|
+
return (h("div", { key: '1fe78163ff3fc8d337731e9765628f2dd48bbbb5', class: "checkbox-wrapper" }, h("div", { key: '0ed33fa8c645b4ddce726b991f40da8712758a71', class: this.getCheckboxClass(), onClick: this.handleClick, onMouseEnter: () => this.isHovered = true, onMouseLeave: () => this.isHovered = false, onMouseDown: () => this.isPressed = true, onMouseUp: () => this.isPressed = false, onFocus: () => this.isFocused = true, onBlur: () => this.isFocused = false, onKeyDown: this.handleKeyDown, onKeyUp: this.handleKeyUp, tabIndex: this.disabled ? -1 : 0, role: "checkbox", "aria-checked": this.indeterminate ? 'mixed' : this.checked.toString(), "aria-disabled": this.disabled.toString(), "aria-labelledby": this.label ? this.labelId : undefined }, this.checked && (h("svg", { key: '75bd98168be72bf08998da1058aefe6fe9c46947', class: "check-icon", viewBox: "0 0 16 16", fill: "none" }, h("path", { key: 'ddfb568863af95b55ca70df1ba3dd8be5a3d30cb', d: "M13.3334 4L6.00002 11.3333L2.66669 8", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }))), this.indeterminate && (h("svg", { key: '1eadbf511badc60a60a5419c010c0c9b09014e22', class: "indeterminate-icon", viewBox: "0 0 16 16", fill: "none" }, h("path", { key: 'b654b703226b817484375a9b7d008feb44c8f592', d: "M3.33331 8H12.6666", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round" })))), this.label && h("span", { key: '1e53eb3e690f18f983d1cdded64fe9e8b557e5c8', class: "label", id: this.labelId }, this.label)));
|
|
78
78
|
}
|
|
79
79
|
static get is() { return "xplor-checkbox"; }
|
|
80
80
|
static get encapsulation() { return "shadow"; }
|
|
@@ -210,15 +210,15 @@ export class XplorCombobox {
|
|
|
210
210
|
const listboxId = 'combobox-listbox';
|
|
211
211
|
const labelId = 'combobox-label';
|
|
212
212
|
const activeDescendantId = this.highlightedIndex >= 0 ? `combobox-option-${this.highlightedIndex}` : undefined;
|
|
213
|
-
return (h(Host, { key: '
|
|
213
|
+
return (h(Host, { key: '30d75fafd92568e91b4f695fa48d06fe2c433c40' }, h("div", { key: 'b8c6278923ff28cd85adaf793d8a9c36bc812370', class: {
|
|
214
214
|
'combobox': true,
|
|
215
215
|
'combobox--disabled': this.disabled,
|
|
216
216
|
'combobox--readonly': this.readonly,
|
|
217
217
|
'combobox--open': this.isOpen,
|
|
218
|
-
} }, this.label && (h("label", { key: '
|
|
218
|
+
} }, this.label && (h("label", { key: 'b8c250d88bf3fefc0b83232e3f93123034e43149', class: "combobox__label", id: labelId }, this.label)), h("div", { key: 'b0c00a90810d030afc86f815b4f90bc259841885', class: "combobox__input-wrapper" }, this.multiple && this.selectedItems.length > 0 && (h("div", { key: '50d4ea9a7798b65d6bc52466b458f022358d881a', class: "combobox__chips" }, this.selectedItems.map(value => {
|
|
219
219
|
const chipLabel = this.getSelectedItemLabel(value);
|
|
220
220
|
return (h("div", { class: "combobox__chip" }, h("span", { class: "combobox__chip-label" }, chipLabel), h("button", { type: "button", class: "combobox__chip-remove", onClick: () => this.removeItem(value), disabled: this.disabled || this.readonly, "aria-label": `Remove ${chipLabel}` }, "\u00D7")));
|
|
221
|
-
}))), h("input", { key: '
|
|
221
|
+
}))), h("input", { key: '5fb92aa47a90ce22bc6538b267ab5ebc228ef38c', ref: (el) => (this.inputEl = el), type: "text", class: "combobox__input", placeholder: this.placeholder, value: this.searchQuery, onFocus: this.handleInputFocus, onInput: this.handleInputChange, onKeyDown: this.handleInputKeyDown, disabled: this.disabled, readonly: this.readonly, autocomplete: "off", role: "combobox", "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "listbox", "aria-controls": this.isOpen ? listboxId : undefined, "aria-activedescendant": activeDescendantId, "aria-labelledby": this.label ? labelId : undefined, "aria-label": !this.label ? (this.ariaLabel || this.placeholder) : undefined, "aria-autocomplete": "list" }), h("div", { key: '4ade4fece05a81bc1ac4a0a289beecd6a2068f8c', class: "combobox__actions" }, this.clearable && hasValue && !this.disabled && !this.readonly && (h("button", { key: '8ee876b5e4a35fd0b0af71544bbc2e98a29148fd', type: "button", class: "combobox__clear", onClick: this.handleClear, "aria-label": "Clear selection" }, "\u00D7")), h("span", { key: 'ca1e3180e381b5fe1ace789b0af66092cd9dfeee', class: "combobox__icon", "aria-hidden": "true" }, "\u25BC"))), this.isOpen && (this.filteredItems.length > 0 || showCreateOption) && (h("div", { key: 'cb5501119e5aa39e161de50b1ac6b310dc1edaa3', class: "combobox__dropdown", ref: (el) => (this.dropdownEl = el), role: "listbox", id: listboxId, "aria-label": this.label || this.ariaLabel || 'Options' }, this.filteredItems.map((item, index) => {
|
|
222
222
|
const isSelected = this.multiple
|
|
223
223
|
? this.selectedItems.includes(item.value)
|
|
224
224
|
: this.value === item.value;
|
|
@@ -228,11 +228,11 @@ export class XplorCombobox {
|
|
|
228
228
|
'combobox__item--selected': isSelected,
|
|
229
229
|
'combobox__item--disabled': item.disabled,
|
|
230
230
|
}, onClick: () => this.selectItem(item) }, item.label));
|
|
231
|
-
}), showCreateOption && (h("div", { key: '
|
|
231
|
+
}), showCreateOption && (h("div", { key: 'dddf029e093efa939b5f40b63101c548e11eb654', id: `combobox-option-${this.filteredItems.length}`, "data-index": this.filteredItems.length, role: "option", "aria-selected": "false", class: {
|
|
232
232
|
'combobox__item': true,
|
|
233
233
|
'combobox__item--create': true,
|
|
234
234
|
'combobox__item--highlighted': this.highlightedIndex === this.filteredItems.length,
|
|
235
|
-
}, onClick: () => this.createNewItem() }, h("span", { key: '
|
|
235
|
+
}, onClick: () => this.createNewItem() }, h("span", { key: '478d841838f5b2249f868d5852982bede08fe3de', class: "combobox__create-label" }, this.createMessage, ":"), ' ', h("strong", { key: '05c284c7d27f7107dfc717c5c2376077c627d4c7' }, "\"", this.searchQuery, "\""))))), this.isOpen && this.filteredItems.length === 0 && !showCreateOption && (h("div", { key: 'c333a2909fef4d33e8b1655043340ba4f27d898e', class: "combobox__dropdown", role: "listbox", id: listboxId }, h("div", { key: '1ba3213f34a8f281143e6ead11fc0c90844475fc', class: "combobox__no-results", role: "option", "aria-disabled": "true" }, "No results found"))))));
|
|
236
236
|
}
|
|
237
237
|
static get is() { return "xplor-combobox"; }
|
|
238
238
|
static get encapsulation() { return "scoped"; }
|
|
@@ -163,13 +163,13 @@ export class XplorDatatable {
|
|
|
163
163
|
render() {
|
|
164
164
|
const tableHeight = typeof this.height === 'number' ? `${this.height}px` : this.height;
|
|
165
165
|
const hasHeight = !!this.height;
|
|
166
|
-
return (h(Host, { key: '
|
|
166
|
+
return (h(Host, { key: '31026bbaf1331e11115147771e80fb3d59c02104', class: "xplor-datatable" }, h("div", { key: '6b4feed4000f1cc56bf2ed2e7bb6808996662ca9', class: "datatable-container" }, h("div", { key: '2d395becc036e9e19f3b9397fbf154edf07f36e4', class: {
|
|
167
167
|
'table-wrapper': true,
|
|
168
168
|
'has-height': hasHeight,
|
|
169
169
|
'horizontal-lines': this.horizontalLines,
|
|
170
170
|
'striped': this.striped,
|
|
171
171
|
'is-empty': this.items.length === 0,
|
|
172
|
-
}, style: hasHeight ? { height: tableHeight } : {} }, h("table", { key: '
|
|
172
|
+
}, style: hasHeight ? { height: tableHeight } : {} }, h("table", { key: 'fdf0bf570246d6abd84dfa2e2cf5757dde309e6c', class: { 'hover': this.hover } }, h("thead", { key: '634480ba84300e86339dbbf95dce396cde8395c5' }, h("tr", { key: '08e44beee5fb0c703694b38a7bfbc2da3691611e' }, this.canSelect && (h("th", { key: '9587a2bb1e11e5c8b44f5b7c4de3e2d6d4e7bb30', class: "select-column" }, h("label", { key: 'a2cdfaabd4fff5cba3801568de522eb60104a79e', class: "checkbox-label" }, h("input", { key: '3500b6b71893fc242b6ad956cb1190b2533e13de', type: "checkbox", checked: this.allSelected, indeterminate: this.internalSelected.size > 0 &&
|
|
173
173
|
this.internalSelected.size < this.items.length, onChange: this.handleSelectAll, "aria-label": "Select all rows" })))), this.headers.map(header => (h("th", { class: {
|
|
174
174
|
sortable: header.sortable !== false,
|
|
175
175
|
sorted: this.sortBy === header.value,
|
|
@@ -197,16 +197,16 @@ export class XplorDatePicker {
|
|
|
197
197
|
}
|
|
198
198
|
render() {
|
|
199
199
|
const showDetails = this.hideDetails === false || (this.hideDetails === 'auto' && this.error);
|
|
200
|
-
const calendarIcon = (h("svg", { key: '
|
|
201
|
-
return (h(Host, { key: '
|
|
200
|
+
const calendarIcon = (h("svg", { key: 'd78ff4ab59055d3d19d872651a7e726c0b60cfb5', class: "date-picker__icon-svg", viewBox: "0 0 24 24", width: "20", height: "20", fill: "none", stroke: "currentColor", "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("rect", { key: 'd43dc4e0ca1d8c6b4a55484d0f6ae81f00201954', x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }), h("line", { key: '1f5fe56ffa03cc49409553f0c13184667c0bed62', x1: "16", y1: "2", x2: "16", y2: "6" }), h("line", { key: '18e8c75d559ce76bcd0336241955a4018daaa270', x1: "8", y1: "2", x2: "8", y2: "6" }), h("line", { key: '880167220cb172fc0f5b18b1eb0fabfc3326501b', x1: "3", y1: "10", x2: "21", y2: "10" })));
|
|
201
|
+
return (h(Host, { key: '53584be9a38a833329033b5e547c15671d43b9ea' }, h("div", { key: '32c32b9abd3021718994879c797d15c7c92b200a', class: {
|
|
202
202
|
'date-picker': true,
|
|
203
203
|
'date-picker--disabled': this.disabled,
|
|
204
204
|
'date-picker--error': !!this.error,
|
|
205
205
|
'date-picker--open': this.isOpen,
|
|
206
|
-
} }, this.label && (h("label", { key: '
|
|
206
|
+
} }, this.label && (h("label", { key: '38f0b77a965ecd259037a521984cf3edc81d83d0', class: "date-picker__label", id: this.labelId, htmlFor: this.inputId }, this.label, this.required && h("span", { key: '7d4967354fe742c08170c80286c97f353fa54d5f', class: "date-picker__required" }, "*"))), this.display === 'text' ? (h("div", { class: "date-picker__text-display", onClick: this.handleTextClick, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "dialog", role: "button", tabIndex: 0 }, h("span", { class: "date-picker__text-value" }, this.value ? this.formatDateForDisplay(this.value) : this.placeholder), calendarIcon)) : (h("div", { class: "date-picker__field" }, h("input", { id: this.inputId, type: "text", class: "date-picker__input", value: this.inputText, placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, onFocus: this.handleInputFocus, onBlur: this.handleInputBlur, onInput: this.handleInputChange, style: { backgroundColor: this.bgColor }, "aria-expanded": this.isOpen ? 'true' : 'false', "aria-haspopup": "dialog", "aria-describedby": this.error ? this.errorId : undefined, "aria-invalid": this.error ? 'true' : undefined, "aria-required": this.required ? 'true' : undefined }), h("div", { class: "date-picker__actions" }, this.clearable && this.value && !this.disabled && !this.readonly && (h("button", { type: "button", class: "date-picker__clear", onClick: this.handleClear, "aria-label": "Clear" }, "\u00D7")), h("button", { type: "button", class: "date-picker__icon-btn", onClick: this.toggleDropdown, disabled: this.disabled, "aria-label": "Open calendar" }, calendarIcon)))), showDetails && (h("div", { key: '66ff5c32e4f6ca2db4feac663377afde49476a21', class: "date-picker__details" }, this.error && h("div", { key: '03cfd6ba58a9bb716e24fe008928744403b5d54c', class: "date-picker__error-message", id: this.errorId }, this.error))), this.isOpen && (h("div", { key: '9b3f462b7c80ed5be13090d376d5f74a65563811', class: {
|
|
207
207
|
'date-picker__dropdown': true,
|
|
208
208
|
'date-picker__dropdown--top': this.dropdownPosition === 'top',
|
|
209
|
-
} }, h("xplor-inline-date-picker", { key: '
|
|
209
|
+
} }, h("xplor-inline-date-picker", { key: '214a5858b26b70a77d2ec4e896a5045581167d76', selectedDate: this.value, min: this.min, max: this.max, readonly: this.readonly, color: this.color, startWeekOnSunday: this.startWeekOnSunday, onDateSelected: this.handleDateSelected }))))));
|
|
210
210
|
}
|
|
211
211
|
static get is() { return "xplor-date-picker"; }
|
|
212
212
|
static get encapsulation() { return "scoped"; }
|
|
@@ -1059,22 +1059,22 @@ ul.mdc-list li.mdc-list-item {
|
|
|
1059
1059
|
}
|
|
1060
1060
|
|
|
1061
1061
|
.drag-drop-card {
|
|
1062
|
-
background-color: #
|
|
1063
|
-
border-radius:
|
|
1062
|
+
background-color: #DFF2F1;
|
|
1063
|
+
border-radius: 16px;
|
|
1064
1064
|
border: 2px dashed var(--color-secondary);
|
|
1065
|
-
min-height:
|
|
1066
|
-
padding:
|
|
1065
|
+
min-height: 300px;
|
|
1066
|
+
padding: 3rem 2rem;
|
|
1067
1067
|
text-align: center;
|
|
1068
1068
|
transition: all 0.2s ease;
|
|
1069
1069
|
cursor: default;
|
|
1070
1070
|
}
|
|
1071
1071
|
.drag-drop-card:hover:not(.drag-drop-card--disabled) {
|
|
1072
1072
|
border-color: var(--color-secondary);
|
|
1073
|
-
background-color: #
|
|
1073
|
+
background-color: var(--color-success-100, #c8e6c9);
|
|
1074
1074
|
}
|
|
1075
1075
|
.drag-drop-card--dragover {
|
|
1076
1076
|
border: 2px dashed var(--color-secondary);
|
|
1077
|
-
background-color: #
|
|
1077
|
+
background-color: var(--color-success-100, #c8e6c9);
|
|
1078
1078
|
}
|
|
1079
1079
|
.drag-drop-card--disabled {
|
|
1080
1080
|
opacity: 0.6;
|
|
@@ -1085,37 +1085,85 @@ ul.mdc-list li.mdc-list-item {
|
|
|
1085
1085
|
display: flex;
|
|
1086
1086
|
flex-direction: column;
|
|
1087
1087
|
align-items: center;
|
|
1088
|
-
gap: 0.
|
|
1088
|
+
gap: 0.5rem;
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
.drag-drop-card__body {
|
|
1092
|
+
display: flex;
|
|
1093
|
+
flex-direction: column;
|
|
1094
|
+
align-items: center;
|
|
1095
|
+
gap: 0.5rem;
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
.drag-drop-card__text {
|
|
1099
|
+
display: flex;
|
|
1100
|
+
flex-direction: column;
|
|
1101
|
+
gap: 5px;
|
|
1089
1102
|
}
|
|
1090
1103
|
|
|
1091
1104
|
.drag-drop-card__icon {
|
|
1092
1105
|
color: var(--color-secondary);
|
|
1093
|
-
width:
|
|
1094
|
-
height:
|
|
1106
|
+
width: 48px;
|
|
1107
|
+
height: 48px;
|
|
1108
|
+
flex-shrink: 0;
|
|
1095
1109
|
}
|
|
1096
1110
|
|
|
1097
1111
|
.drag-drop-card__title {
|
|
1098
1112
|
color: #000000;
|
|
1099
1113
|
font-family: Inter, sans-serif;
|
|
1100
|
-
font-size:
|
|
1114
|
+
font-size: 24px;
|
|
1101
1115
|
font-weight: 700;
|
|
1102
|
-
line-height:
|
|
1116
|
+
line-height: 28px;
|
|
1103
1117
|
letter-spacing: 0;
|
|
1104
1118
|
margin: 0;
|
|
1105
1119
|
}
|
|
1106
1120
|
|
|
1107
|
-
.drag-drop-card__accepts
|
|
1121
|
+
.drag-drop-card__accepts {
|
|
1122
|
+
color: #000000;
|
|
1123
|
+
font-family: Inter, sans-serif;
|
|
1124
|
+
font-size: 14px;
|
|
1125
|
+
font-weight: 400;
|
|
1126
|
+
line-height: 23px;
|
|
1127
|
+
margin: 0;
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1108
1130
|
.drag-drop-card__divider {
|
|
1109
1131
|
color: #000000;
|
|
1110
1132
|
font-family: Inter, sans-serif;
|
|
1111
1133
|
font-size: 14px;
|
|
1112
1134
|
font-weight: 400;
|
|
1113
|
-
line-height:
|
|
1135
|
+
line-height: 23px;
|
|
1114
1136
|
margin: 0;
|
|
1115
1137
|
}
|
|
1116
1138
|
|
|
1117
1139
|
.drag-drop-card__action {
|
|
1118
|
-
|
|
1140
|
+
flex-shrink: 0;
|
|
1141
|
+
}
|
|
1142
|
+
|
|
1143
|
+
.drag-drop-zone--horizontal .drag-drop-card {
|
|
1144
|
+
min-height: 210px;
|
|
1145
|
+
padding: 73px 173px;
|
|
1146
|
+
}
|
|
1147
|
+
.drag-drop-zone--horizontal .drag-drop-card__content {
|
|
1148
|
+
flex-direction: row;
|
|
1149
|
+
justify-content: center;
|
|
1150
|
+
align-items: center;
|
|
1151
|
+
gap: 1rem;
|
|
1152
|
+
}
|
|
1153
|
+
.drag-drop-zone--horizontal .drag-drop-card__body {
|
|
1154
|
+
flex-direction: row;
|
|
1155
|
+
align-items: flex-start;
|
|
1156
|
+
gap: 0.5rem;
|
|
1157
|
+
}
|
|
1158
|
+
.drag-drop-zone--horizontal .drag-drop-card__text {
|
|
1159
|
+
text-align: left;
|
|
1160
|
+
max-width: 339px;
|
|
1161
|
+
}
|
|
1162
|
+
.drag-drop-zone--horizontal .drag-drop-card__title {
|
|
1163
|
+
text-align: left;
|
|
1164
|
+
}
|
|
1165
|
+
.drag-drop-zone--horizontal .drag-drop-card__accepts {
|
|
1166
|
+
text-align: left;
|
|
1119
1167
|
}
|
|
1120
1168
|
|
|
1121
1169
|
.file-info {
|
|
@@ -1230,19 +1278,4 @@ ul.mdc-list li.mdc-list-item {
|
|
|
1230
1278
|
.file-info__remove:hover {
|
|
1231
1279
|
background-color: #e0e0e0;
|
|
1232
1280
|
color: #424242;
|
|
1233
|
-
}
|
|
1234
|
-
|
|
1235
|
-
@media (max-width: 768px) {
|
|
1236
|
-
.drag-drop-card {
|
|
1237
|
-
min-height: 140px;
|
|
1238
|
-
}
|
|
1239
|
-
.drag-drop-card__title {
|
|
1240
|
-
font-size: 16px;
|
|
1241
|
-
line-height: 22px;
|
|
1242
|
-
}
|
|
1243
|
-
.drag-drop-card__accepts,
|
|
1244
|
-
.drag-drop-card__divider {
|
|
1245
|
-
font-size: 13px;
|
|
1246
|
-
line-height: 18px;
|
|
1247
|
-
}
|
|
1248
1281
|
}
|