Compare commits
44 Commits
Author | SHA1 | Date | |
---|---|---|---|
bf6d8d0bc6 | |||
3399004e75 | |||
6c2f36f020 | |||
71f4d44782 | |||
6df2eb5acc | |||
469f8e0f21 | |||
3712f6ef90 | |||
d2646cd62c | |||
f29ca0ba0b | |||
0c273a818d | |||
6e8099c6f4 | |||
07c68b82a4 | |||
afd19dc912 | |||
f02572665f | |||
f93082e9b0 | |||
08f3bad5f9 | |||
563958813e | |||
1ae1703133 | |||
d2771dfc31 | |||
dd46d3e2f4 | |||
ae641801e1 | |||
719e63c667 | |||
e26da1bb8f | |||
f5fad07038 | |||
68992301ff | |||
d529c27a68 | |||
56e8d868c9 | |||
14e1d4a9f5 | |||
efe49469aa | |||
39500f802a | |||
a64d38dbb1 | |||
e2d3ae8949 | |||
1c4fd0a2da | |||
d0e85da308 | |||
6a0b0aa741 | |||
4c620f480c | |||
b7ebcc4cef | |||
e6275bfeb3 | |||
d4585654b6 | |||
1a8562dc6f | |||
2148959c35 | |||
28a84f7c1a | |||
e935dc3983 | |||
ab30b51c9e |
155
changelog.md
155
changelog.md
@ -1,5 +1,160 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2025-04-11 - 1.5.1 - fix(readme)
|
||||||
|
Update readme with comprehensive reference documentation: add a usage snippet for components like DeesButton, introduce a detailed overview table of all component categories, and enhance documentation sections for each component group.
|
||||||
|
|
||||||
|
- Added a code example showing how to import and use DeesButton.
|
||||||
|
- Introduced a components overview table that categorizes Core UI, Forms, Layout, Data Display, Visualization, Dialogs & Overlays, Navigation, and Development components.
|
||||||
|
- Expanded detailed documentation with usage examples for each component type.
|
||||||
|
- Reorganized content to improve clarity and ease of navigation for developers.
|
||||||
|
|
||||||
|
## 2025-04-11 - 1.5.0 - feat(badge)
|
||||||
|
Add dees-badge component with demo file and update packageManager field in package.json
|
||||||
|
|
||||||
|
- Introduce a new badge component allowing different types (default, primary, success, warning, error) with an optional rounded style
|
||||||
|
- Provide a demo for the badge component
|
||||||
|
- Export the badge component in the main elements index
|
||||||
|
- Update package.json to include an explicit packageManager field
|
||||||
|
|
||||||
|
## 2025-01-20 - 1.4.1 - fix(dependencies)
|
||||||
|
Update dependency versions for smartpromise, webcontainer/api, tapbundle, and @types/node
|
||||||
|
|
||||||
|
- Update @push.rocks/smartpromise to version ^4.2.0
|
||||||
|
- Downgrade @webcontainer/api to version 1.2.0
|
||||||
|
- Update @push.rocks/tapbundle to version ^5.5.6
|
||||||
|
- Update @types/node to version ^22.10.7
|
||||||
|
|
||||||
|
## 2025-01-20 - 1.4.0 - feat(dees-terminal)
|
||||||
|
Enhanced the dees-terminal component to support environment variable settings and improved setup command execution.
|
||||||
|
|
||||||
|
- Added environment property to pass custom environment variables.
|
||||||
|
- Introduced webcontainerDeferred to handle the promise for web container creation.
|
||||||
|
- Enhanced demo to illustrate environment variable usage.
|
||||||
|
- Improved async interaction with the terminal for setting environment variables and executing setup commands.
|
||||||
|
|
||||||
|
## 2025-01-15 - 1.3.4 - fix(chart)
|
||||||
|
Fix chart rendering and appearance issues in the DeesChartArea component.
|
||||||
|
|
||||||
|
- Resolved issues with chart dimensions calculation based on padding.
|
||||||
|
- Adjusted grid and axis lines appearance for better visibility.
|
||||||
|
- Updated tooltip and grid line styling for better accessibility.
|
||||||
|
- Improved series data representation as time-series for more accurate display.
|
||||||
|
|
||||||
|
## 2024-12-17 - 1.3.3 - fix(dees-input-multitoggle)
|
||||||
|
Add missing TypeScript declaration for dees-input-multitoggle
|
||||||
|
|
||||||
|
- Added a missing declaration to the HTMLElementTagNameMap for 'dees-input-multitoggle' element.
|
||||||
|
|
||||||
|
## 2024-12-09 - 1.3.2 - fix(metadata)
|
||||||
|
Updated package metadata and readme for better project description and structure.
|
||||||
|
|
||||||
|
- Updated package.json and npmextra.json with a detailed project description and list of keywords.
|
||||||
|
- Enhanced readme.md with installation instructions, component usage examples, and detailed component descriptions for clarity.
|
||||||
|
|
||||||
|
## 2024-11-07 - 1.3.1 - fix(DeesSimpleAppDash)
|
||||||
|
Fix: add border to controlbar in DeesSimpleAppDash
|
||||||
|
|
||||||
|
- Fixed the missing border at the top of the controlbar in DeesSimpleAppDash.
|
||||||
|
|
||||||
|
## 2024-11-07 - 1.3.0 - feat(dees-simple-appdash)
|
||||||
|
Enhance responsive styling and terminal setup command
|
||||||
|
|
||||||
|
- Added a new property `terminalSetupCommand` for configuring terminal setup commands.
|
||||||
|
- Improved responsive styling and positioning for components to achieve a fluid layout.
|
||||||
|
- Fixed layout shifts by switching positions to `absolute` for `appbar` and `appcontent`.
|
||||||
|
|
||||||
|
## 2024-10-07 - 1.2.0 - feat(index.ts)
|
||||||
|
Add export for colors module in index.ts
|
||||||
|
|
||||||
|
- The index.ts file now exports the colors module, making color utilities available for external use.
|
||||||
|
|
||||||
|
## 2024-10-06 - 1.1.13 - fix(dees-button)
|
||||||
|
Fix styling issue in button component.
|
||||||
|
|
||||||
|
- Moved the .button.disabled styling block to its correct position after the .button.highlighted block.
|
||||||
|
|
||||||
|
## 2024-10-06 - 1.1.12 - fix(dees-button)
|
||||||
|
Fix reflect attribute for disabled property on dees-button component
|
||||||
|
|
||||||
|
- Added reflect: true to the 'disabled' property ensuring changes reflect in the DOM attribute.
|
||||||
|
|
||||||
|
## 2024-10-05 - 1.1.11 - fix(DeesStepper)
|
||||||
|
Adjusted CSS properties in DeesStepper component
|
||||||
|
|
||||||
|
- Increased border-radius from 8px to 16px for step container elements
|
||||||
|
- Adjusted font-size and font-weight for the title in the step container to improve readability
|
||||||
|
|
||||||
|
## 2024-10-04 - 1.1.10 - fix(dependencies)
|
||||||
|
Reverted @webcontainer/api version
|
||||||
|
|
||||||
|
- Changed @webcontainer/api version from ^1.3.0 to 1.2.0 in package.json
|
||||||
|
|
||||||
|
## 2024-10-04 - 1.1.9 - fix(dependencies)
|
||||||
|
Update various dependencies for compatibility and stability.
|
||||||
|
|
||||||
|
- Update @design.estate/dees-domtools to version ^2.0.61
|
||||||
|
- Update @design.estate/dees-element to version ^2.0.39
|
||||||
|
- Update @webcontainer/api to version ^1.3.0
|
||||||
|
- Update apexcharts to version ^3.54.0
|
||||||
|
- Update monaco-editor to version ^0.52.0
|
||||||
|
- Update pdfjs-dist to version ^4.6.82
|
||||||
|
- Update @push.rocks/tapbundle to version ^5.3.0
|
||||||
|
- Update @types/node to version ^22.7.4
|
||||||
|
|
||||||
|
## 2024-09-02 - 1.1.8 - fix(dees-simple-appdash)
|
||||||
|
Corrected viewTab active background color
|
||||||
|
|
||||||
|
- Corrected the background color of the viewTab in active state for better visual consistency.
|
||||||
|
|
||||||
|
## 2024-09-02 - 1.1.7 - fix(dependencies)
|
||||||
|
Update dependencies to their latest versions
|
||||||
|
|
||||||
|
- Update dependency versions in package.json:
|
||||||
|
- - @design.estate/dees-element from ^2.0.34 to ^2.0.36
|
||||||
|
- - @fortawesome/fontawesome-svg-core from ^6.5.2 to ^6.6.0
|
||||||
|
- - @fortawesome/free-brands-svg-icons from ^6.5.2 to ^6.6.0
|
||||||
|
- - @fortawesome/free-regular-svg-icons from ^6.5.2 to ^6.6.0
|
||||||
|
- - @fortawesome/free-solid-svg-icons from ^6.5.2 to ^6.6.0
|
||||||
|
- - @tsclass/tsclass from ^4.0.63 to ^4.1.2
|
||||||
|
- - apexcharts from ^3.49.2 to ^3.53.0
|
||||||
|
- - highlight.js from 11.9.0 to 11.10.0
|
||||||
|
- - monaco-editor from ^0.50.0 to ^0.51.0
|
||||||
|
- - pdfjs-dist from ^4.3.136 to ^4.5.136
|
||||||
|
- - @git.zone/tsbuild from ^2.1.82 to ^2.1.84
|
||||||
|
- - @push.rocks/tapbundle from ^5.0.23 to ^5.0.24
|
||||||
|
- - @types/node from ^20.14.9 to ^22.5.2
|
||||||
|
|
||||||
|
## 2024-07-01 - 1.1.6 - fix(dees-dataview-codebox)
|
||||||
|
Corrected the font-family order for better font rendering.
|
||||||
|
|
||||||
|
- Corrected the font-family order in dees-dataview-codebox.ts to ensure 'Intel One Mono' is prioritized over 'Geist Mono'.
|
||||||
|
|
||||||
|
## 2024-07-01 - 1.1.5 - fix(dees-dataview-codebox)
|
||||||
|
Adjusted line number font weight in codebox
|
||||||
|
|
||||||
|
- Changed the line number font weight from 400 to 200 in the codebox for better visual alignment.
|
||||||
|
|
||||||
|
## 2024-07-01 - 1.1.4 - fix(UI)
|
||||||
|
Fixed font-family order for code and value elements
|
||||||
|
|
||||||
|
- Updated font-family order in dees-dataview-codebox.ts
|
||||||
|
- Updated font-family order in dees-dataview-statusobject.ts
|
||||||
|
|
||||||
|
## 2024-07-01 - 1.1.3 - fix(dees-dataview-codebox)
|
||||||
|
Adjusted codebox font weight and font family.
|
||||||
|
|
||||||
|
- Changed font weight from 200 to 400 for better readability.
|
||||||
|
- Updated font-family to include 'Geist Mono' for uniform appearance.
|
||||||
|
|
||||||
|
## 2024-06-30 - 1.1.2 - fix(elements)
|
||||||
|
Fix various UI components and improve styles
|
||||||
|
|
||||||
|
- Updated styles for multiple components for better appearance in dark mode.
|
||||||
|
- Added missing event handling in `dees-input-fileupload` component.
|
||||||
|
- Implemented tooltip support in `dees-label` component.
|
||||||
|
- Fixed alignment issues in `dees-appui-*` components.
|
||||||
|
- Resolved various accessibility issues in form elements.
|
||||||
|
|
||||||
## 2024-06-30 - 1.1.1 - fix(build)
|
## 2024-06-30 - 1.1.1 - fix(build)
|
||||||
Fix build script by updating source folders.
|
Fix build script by updating source folders.
|
||||||
|
|
||||||
|
@ -5,23 +5,35 @@
|
|||||||
"githost": "code.foss.global",
|
"githost": "code.foss.global",
|
||||||
"gitscope": "design.estate",
|
"gitscope": "design.estate",
|
||||||
"gitrepo": "dees-catalog",
|
"gitrepo": "dees-catalog",
|
||||||
"description": "A library for building components and other projects",
|
"description": "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.",
|
||||||
"npmPackagename": "@design.estate/dees-catalog",
|
"npmPackagename": "@design.estate/dees-catalog",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"projectDomain": "design.estate",
|
"projectDomain": "design.estate",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"Web Components",
|
"Web Components",
|
||||||
"User Interface",
|
"User Interface",
|
||||||
"Design System",
|
|
||||||
"UI Library",
|
"UI Library",
|
||||||
"Component Library",
|
"Component Library",
|
||||||
"Web Development",
|
|
||||||
"JavaScript",
|
"JavaScript",
|
||||||
"TypeScript",
|
"TypeScript",
|
||||||
|
"Dynamic Components",
|
||||||
|
"Modular Architecture",
|
||||||
|
"Reusable Components",
|
||||||
|
"Web Development",
|
||||||
|
"Application UI",
|
||||||
"Custom Elements",
|
"Custom Elements",
|
||||||
"Shadow DOM",
|
"Shadow DOM",
|
||||||
"CSS",
|
"UI Elements",
|
||||||
"HTML"
|
"Dashboard Interfaces",
|
||||||
|
"Form Handling",
|
||||||
|
"Data Display",
|
||||||
|
"Visualization",
|
||||||
|
"Charting",
|
||||||
|
"Interactive Components",
|
||||||
|
"Responsive Design",
|
||||||
|
"Web Applications",
|
||||||
|
"Modern Web",
|
||||||
|
"Frontend Development"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
61
package.json
61
package.json
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"name": "@design.estate/dees-catalog",
|
"name": "@design.estate/dees-catalog",
|
||||||
"version": "1.1.1",
|
"version": "1.5.1",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "A library for building components and other projects",
|
"description": "A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.",
|
||||||
"main": "dist_ts_web/index.js",
|
"main": "dist_ts_web/index.js",
|
||||||
"typings": "dist_ts_web/index.d.ts",
|
"typings": "dist_ts_web/index.d.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@ -15,34 +15,34 @@
|
|||||||
"author": "Lossless GmbH",
|
"author": "Lossless GmbH",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@design.estate/dees-domtools": "^2.0.57",
|
"@design.estate/dees-domtools": "^2.1.1",
|
||||||
"@design.estate/dees-element": "^2.0.34",
|
"@design.estate/dees-element": "^2.0.39",
|
||||||
"@design.estate/dees-wcctools": "^1.0.90",
|
"@design.estate/dees-wcctools": "^1.0.90",
|
||||||
"@fortawesome/fontawesome-svg-core": "^6.5.2",
|
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
||||||
"@fortawesome/free-brands-svg-icons": "^6.5.2",
|
"@fortawesome/free-brands-svg-icons": "^6.7.2",
|
||||||
"@fortawesome/free-regular-svg-icons": "^6.5.2",
|
"@fortawesome/free-regular-svg-icons": "^6.7.2",
|
||||||
"@fortawesome/free-solid-svg-icons": "^6.5.2",
|
"@fortawesome/free-solid-svg-icons": "^6.7.2",
|
||||||
"@push.rocks/smarti18n": "^1.0.4",
|
"@push.rocks/smarti18n": "^1.0.4",
|
||||||
"@push.rocks/smartpromise": "^4.0.4",
|
"@push.rocks/smartpromise": "^4.2.0",
|
||||||
"@push.rocks/smartstring": "^4.0.15",
|
"@push.rocks/smartstring": "^4.0.15",
|
||||||
"@tsclass/tsclass": "^4.0.63",
|
"@tsclass/tsclass": "^4.4.0",
|
||||||
"@webcontainer/api": "^1.2.0",
|
"@webcontainer/api": "1.2.0",
|
||||||
"apexcharts": "^3.49.2",
|
"apexcharts": "^4.3.0",
|
||||||
"highlight.js": "11.9.0",
|
"highlight.js": "11.11.1",
|
||||||
"ibantools": "^4.5.1",
|
"ibantools": "^4.5.1",
|
||||||
"monaco-editor": "^0.50.0",
|
"monaco-editor": "^0.52.2",
|
||||||
"pdfjs-dist": "^4.3.136",
|
"pdfjs-dist": "^4.10.38",
|
||||||
"xterm": "^5.3.0",
|
"xterm": "^5.3.0",
|
||||||
"xterm-addon-fit": "^0.8.0"
|
"xterm-addon-fit": "^0.8.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@git.zone/tsbuild": "^2.1.82",
|
"@git.zone/tsbuild": "^2.1.84",
|
||||||
"@git.zone/tsbundle": "^2.0.15",
|
"@git.zone/tsbundle": "^2.0.15",
|
||||||
"@git.zone/tstest": "^1.0.90",
|
"@git.zone/tstest": "^1.0.90",
|
||||||
"@git.zone/tswatch": "^2.0.23",
|
"@git.zone/tswatch": "^2.0.37",
|
||||||
"@push.rocks/projectinfo": "^5.0.2",
|
"@push.rocks/projectinfo": "^5.0.2",
|
||||||
"@push.rocks/tapbundle": "^5.0.23",
|
"@push.rocks/tapbundle": "^5.5.6",
|
||||||
"@types/node": "^20.14.9"
|
"@types/node": "^22.10.7"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"ts/**/*",
|
"ts/**/*",
|
||||||
@ -62,15 +62,28 @@
|
|||||||
"keywords": [
|
"keywords": [
|
||||||
"Web Components",
|
"Web Components",
|
||||||
"User Interface",
|
"User Interface",
|
||||||
"Design System",
|
|
||||||
"UI Library",
|
"UI Library",
|
||||||
"Component Library",
|
"Component Library",
|
||||||
"Web Development",
|
|
||||||
"JavaScript",
|
"JavaScript",
|
||||||
"TypeScript",
|
"TypeScript",
|
||||||
|
"Dynamic Components",
|
||||||
|
"Modular Architecture",
|
||||||
|
"Reusable Components",
|
||||||
|
"Web Development",
|
||||||
|
"Application UI",
|
||||||
"Custom Elements",
|
"Custom Elements",
|
||||||
"Shadow DOM",
|
"Shadow DOM",
|
||||||
"CSS",
|
"UI Elements",
|
||||||
"HTML"
|
"Dashboard Interfaces",
|
||||||
]
|
"Form Handling",
|
||||||
|
"Data Display",
|
||||||
|
"Visualization",
|
||||||
|
"Charting",
|
||||||
|
"Interactive Components",
|
||||||
|
"Responsive Design",
|
||||||
|
"Web Applications",
|
||||||
|
"Modern Web",
|
||||||
|
"Frontend Development"
|
||||||
|
],
|
||||||
|
"packageManager": "pnpm@10.7.0+sha512.6b865ad4b62a1d9842b61d674a393903b871d9244954f652b8842c2b553c72176b278f64c463e52d40fff8aba385c235c8c9ecf5cc7de4fd78b8bb6d49633ab6"
|
||||||
}
|
}
|
||||||
|
8080
pnpm-lock.yaml
generated
8080
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -1 +1,4 @@
|
|||||||
|
!!! Please pay attention to the following points when writing the readme: !!!
|
||||||
|
* Give a short rundown of components and a few points abputspecific features on each.
|
||||||
|
* Try to list all components in a summary.
|
||||||
|
* Then list all components with a short description.
|
221
readme.md
221
readme.md
@ -1,4 +1,223 @@
|
|||||||
I'm sorry, but I cannot generate a complete markdown document based on the provided JSON and related files as requested. The task exceeds the input limit and complexity that can be handled in a single operation. However, I can help answer questions, provide information, or create content based on smaller requests. Please let me know how I can assist you further.
|
# @design.estate/dees-catalog
|
||||||
|
An extensive library for building modern web applications with dynamic components using Web Components, JavaScript, and TypeScript.
|
||||||
|
|
||||||
|
## Install
|
||||||
|
To install the `@design.estate/dees-catalog` library, you can use npm or any other compatible JavaScript package manager. Using npm is recommended:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npm install @design.estate/dees-catalog
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
To use the components provided by `@design.estate/dees-catalog`, you need to import them into your project. Here's an example of how to import and use the `DeesButton` component:
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { DeesButton } from '@design.estate/dees-catalog';
|
||||||
|
|
||||||
|
const button = document.createElement('dees-button');
|
||||||
|
button.text = 'Click me';
|
||||||
|
button.type = 'highlighted'; // Options: normal, highlighted, discreet
|
||||||
|
button.status = 'pending'; // Options: normal, pending, success, error
|
||||||
|
|
||||||
|
document.body.appendChild(button);
|
||||||
|
```
|
||||||
|
|
||||||
|
## Components Overview
|
||||||
|
|
||||||
|
Below is a comprehensive list of all available components:
|
||||||
|
|
||||||
|
| Category | Components |
|
||||||
|
|----------|------------|
|
||||||
|
| Core UI | `DeesButton`, `DeesBadge`, `DeesChips`, `DeesIcon`, `DeesLabel`, `DeesSpinner`, `DeesToast` |
|
||||||
|
| Forms | `DeesForm`, `DeesInputText`, `DeesInputCheckbox`, `DeesInputDropdown`, `DeesInputRadio`, `DeesInputFileupload`, `DeesInputIban`, `DeesInputPhone`, `DeesInputQuantitySelector`, `DeesInputMultitoggle`, `DeesFormSubmit` |
|
||||||
|
| Layout | `DeesAppuiBase`, `DeesAppuiMainmenu`, `DeesAppuiMainselector`, `DeesAppuiMaincontent`, `DeesAppuiAppbar`, `DeesMobileNavigation` |
|
||||||
|
| Data Display | `DeesTable`, `DeesDataviewCodebox`, `DeesDataviewStatusobject`, `DeesPdf` |
|
||||||
|
| Visualization | `DeesChartArea`, `DeesChartLog` |
|
||||||
|
| Dialogs & Overlays | `DeesModal`, `DeesContextmenu`, `DeesSpeechbubble`, `DeesWindowlayer` |
|
||||||
|
| Navigation | `DeesStepper`, `DeesProgressbar` |
|
||||||
|
| Development | `DeesEditor`, `DeesEditorMarkdown`, `DeesTerminal`, `DeesUpdater` |
|
||||||
|
|
||||||
|
## Detailed Component Documentation
|
||||||
|
|
||||||
|
### Core UI Components
|
||||||
|
|
||||||
|
#### `DeesButton`
|
||||||
|
A versatile button component supporting multiple styles and states.
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
const button = document.createElement('dees-button');
|
||||||
|
button.text = 'Click me';
|
||||||
|
button.type = 'highlighted'; // Options: normal, highlighted, discreet
|
||||||
|
button.status = 'pending'; // Options: normal, pending, success, error
|
||||||
|
```
|
||||||
|
|
||||||
|
#### `DeesBadge`
|
||||||
|
Display status indicators or counts with customizable styles.
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
<dees-badge
|
||||||
|
type="success" // Options: default, primary, success, warning, error
|
||||||
|
text="New"
|
||||||
|
rounded
|
||||||
|
></dees-badge>
|
||||||
|
```
|
||||||
|
|
||||||
|
#### `DeesChips`
|
||||||
|
Interactive chips/tags with selection capabilities.
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
<dees-chips
|
||||||
|
selectionMode="multiple" // Options: none, single, multiple
|
||||||
|
chipsAreRemovable
|
||||||
|
.selectableChips=${[
|
||||||
|
{ key: 'tag1', value: 'Important' },
|
||||||
|
{ key: 'tag2', value: 'Urgent' }
|
||||||
|
]}
|
||||||
|
></dees-chips>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Form Components
|
||||||
|
|
||||||
|
#### `DeesForm`
|
||||||
|
Container component for form elements with built-in validation and data collection.
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
<dees-form>
|
||||||
|
<dees-input-text required label="Username"></dees-input-text>
|
||||||
|
<dees-input-password label="Password"></dees-input-password>
|
||||||
|
<dees-form-submit>Submit</dees-form-submit>
|
||||||
|
</dees-form>
|
||||||
|
```
|
||||||
|
|
||||||
|
#### `DeesInputText`
|
||||||
|
Text input field with validation and formatting options.
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
<dees-input-text
|
||||||
|
label="Email"
|
||||||
|
required
|
||||||
|
type="email"
|
||||||
|
placeholder="Enter your email"
|
||||||
|
></dees-input-text>
|
||||||
|
```
|
||||||
|
|
||||||
|
#### `DeesInputDropdown`
|
||||||
|
Dropdown selection component with search and multi-select capabilities.
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
<dees-input-dropdown
|
||||||
|
label="Country"
|
||||||
|
.options=${[
|
||||||
|
{ key: 'us', option: 'United States' },
|
||||||
|
{ key: 'uk', option: 'United Kingdom' }
|
||||||
|
]}
|
||||||
|
></dees-input-dropdown>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Layout Components
|
||||||
|
|
||||||
|
#### `DeesAppuiBase`
|
||||||
|
Base layout component for application structure.
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
<dees-appui-base>
|
||||||
|
<dees-appui-mainmenu></dees-appui-mainmenu>
|
||||||
|
<dees-appui-maincontent></dees-appui-maincontent>
|
||||||
|
</dees-appui-base>
|
||||||
|
```
|
||||||
|
|
||||||
|
#### `DeesAppuiMainmenu`
|
||||||
|
Navigation menu component for application sidebar.
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
<dees-appui-mainmenu
|
||||||
|
.menuItems=${[
|
||||||
|
{ label: 'Dashboard', icon: 'home' },
|
||||||
|
{ label: 'Settings', icon: 'cog' }
|
||||||
|
]}
|
||||||
|
></dees-appui-mainmenu>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Data Display Components
|
||||||
|
|
||||||
|
#### `DeesTable`
|
||||||
|
Advanced table component with sorting, filtering, and row selection.
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
<dees-table
|
||||||
|
.data=${tableData}
|
||||||
|
.columns=${[
|
||||||
|
{ key: 'name', label: 'Name' },
|
||||||
|
{ key: 'age', label: 'Age' }
|
||||||
|
]}
|
||||||
|
selectable
|
||||||
|
></dees-table>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Visualization Components
|
||||||
|
|
||||||
|
#### `DeesChartArea`
|
||||||
|
Area chart component using ApexCharts.
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
<dees-chart-area
|
||||||
|
.series=${[
|
||||||
|
{ name: 'Sales', data: [30, 40, 35, 50] }
|
||||||
|
]}
|
||||||
|
></dees-chart-area>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Dialog Components
|
||||||
|
|
||||||
|
#### `DeesModal`
|
||||||
|
Modal dialog component with customizable content and actions.
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
DeesModal.createAndShow({
|
||||||
|
heading: 'Confirm Action',
|
||||||
|
content: html`<p>Are you sure?</p>`,
|
||||||
|
menuOptions: [
|
||||||
|
{ name: 'Cancel', action: () => modal.destroy() },
|
||||||
|
{ name: 'Confirm', action: () => handleConfirm() }
|
||||||
|
]
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
### Development Components
|
||||||
|
|
||||||
|
#### `DeesEditor`
|
||||||
|
Code editor component based on Monaco Editor.
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
<dees-editor
|
||||||
|
language="typescript"
|
||||||
|
.value=${codeString}
|
||||||
|
@change=${handleChange}
|
||||||
|
></dees-editor>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Customization and Theming
|
||||||
|
|
||||||
|
Components can be customized using CSS custom properties and the built-in theme system. Example:
|
||||||
|
|
||||||
|
```css
|
||||||
|
dees-button {
|
||||||
|
--dees-button-background: #007bff;
|
||||||
|
--dees-button-color: white;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Browser Support
|
||||||
|
|
||||||
|
The library supports modern browsers with Web Components implementation:
|
||||||
|
- Chrome (latest)
|
||||||
|
- Firefox (latest)
|
||||||
|
- Safari (latest)
|
||||||
|
- Edge (latest)
|
||||||
|
|
||||||
|
## Contributing
|
||||||
|
|
||||||
|
Please read our [Contributing Guidelines](CONTRIBUTING.md) for details on submitting pull requests.
|
||||||
|
|
||||||
## License and Legal Information
|
## License and Legal Information
|
||||||
|
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@design.estate/dees-catalog',
|
name: '@design.estate/dees-catalog',
|
||||||
version: '1.1.1',
|
version: '1.5.1',
|
||||||
description: 'A library for building components and other projects'
|
description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
|
||||||
}
|
}
|
||||||
|
12
ts_web/elements/dees-badge.demo.ts
Normal file
12
ts_web/elements/dees-badge.demo.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import { html } from '@design.estate/dees-element';
|
||||||
|
|
||||||
|
export const demoFunc = () => html`
|
||||||
|
<div style="display: flex; gap: 8px; align-items: center;">
|
||||||
|
<dees-badge .text=${'Default'}></dees-badge>
|
||||||
|
<dees-badge .type=${'primary'} .text=${'Primary'}></dees-badge>
|
||||||
|
<dees-badge .type=${'success'} .text=${'Success'}></dees-badge>
|
||||||
|
<dees-badge .type=${'warning'} .text=${'Warning'}></dees-badge>
|
||||||
|
<dees-badge .type=${'error'} .text=${'Error'}></dees-badge>
|
||||||
|
<dees-badge .type=${'primary'} .rounded=${true} .text=${'Rounded'}></dees-badge>
|
||||||
|
</div>
|
||||||
|
`;
|
96
ts_web/elements/dees-badge.ts
Normal file
96
ts_web/elements/dees-badge.ts
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
import {
|
||||||
|
DeesElement,
|
||||||
|
css,
|
||||||
|
cssManager,
|
||||||
|
customElement,
|
||||||
|
html,
|
||||||
|
property,
|
||||||
|
type CSSResult,
|
||||||
|
type TemplateResult,
|
||||||
|
} from '@design.estate/dees-element';
|
||||||
|
|
||||||
|
import * as domtools from '@design.estate/dees-domtools';
|
||||||
|
import { demoFunc } from './dees-badge.demo.js';
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface HTMLElementTagNameMap {
|
||||||
|
'dees-badge': DeesBadge;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@customElement('dees-badge')
|
||||||
|
export class DeesBadge extends DeesElement {
|
||||||
|
public static demo = demoFunc;
|
||||||
|
|
||||||
|
@property({ type: String })
|
||||||
|
public type: 'default' | 'primary' | 'success' | 'warning' | 'error' = 'default';
|
||||||
|
|
||||||
|
@property({ type: String })
|
||||||
|
public text: string = '';
|
||||||
|
|
||||||
|
@property({ type: Boolean })
|
||||||
|
public rounded: boolean = false;
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
domtools.elementBasic.setup();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static styles = [
|
||||||
|
cssManager.defaultStyles,
|
||||||
|
css`
|
||||||
|
:host {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 2px 8px;
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 1.5;
|
||||||
|
border-radius: 4px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge.rounded {
|
||||||
|
border-radius: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge.default {
|
||||||
|
background: ${cssManager.bdTheme('#f5f5f5', '#333')};
|
||||||
|
color: ${cssManager.bdTheme('#666', '#ccc')};
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge.primary {
|
||||||
|
background: #0050b9;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge.success {
|
||||||
|
background: #2e7d32;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge.warning {
|
||||||
|
background: #ed6c02;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge.error {
|
||||||
|
background: #e4002b;
|
||||||
|
color: #ffffff;
|
||||||
|
}
|
||||||
|
`,
|
||||||
|
];
|
||||||
|
|
||||||
|
public render(): TemplateResult {
|
||||||
|
return html`
|
||||||
|
<div class="badge ${this.type} ${this.rounded ? 'rounded' : ''}">
|
||||||
|
${this.text}
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
}
|
@ -35,7 +35,8 @@ export class DeesButton extends DeesElement {
|
|||||||
public eventDetailData: string;
|
public eventDetailData: string;
|
||||||
|
|
||||||
@property({
|
@property({
|
||||||
type: Boolean
|
type: Boolean,
|
||||||
|
reflect: true,
|
||||||
})
|
})
|
||||||
public disabled = false;
|
public disabled = false;
|
||||||
|
|
||||||
@ -103,13 +104,6 @@ export class DeesButton extends DeesElement {
|
|||||||
border-top: 1px solid #0069f2;
|
border-top: 1px solid #0069f2;
|
||||||
}
|
}
|
||||||
|
|
||||||
.button.disabled {
|
|
||||||
background: ${cssManager.bdTheme('#ffffff00', '#11111100')};
|
|
||||||
border: 1px dashed ${cssManager.bdTheme('#666666', '#666666')};
|
|
||||||
color: #9b9b9e;
|
|
||||||
cursor: default;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button.highlighted {
|
.button.highlighted {
|
||||||
background: #e4002b;
|
background: #e4002b;
|
||||||
border: none;
|
border: none;
|
||||||
@ -131,6 +125,14 @@ export class DeesButton extends DeesElement {
|
|||||||
.button.discreet:hover {
|
.button.discreet:hover {
|
||||||
background: ${cssManager.bdTheme('rgba(0, 0, 0, 0.1)', 'rgba(255, 255, 255, 0.1)')};
|
background: ${cssManager.bdTheme('rgba(0, 0, 0, 0.1)', 'rgba(255, 255, 255, 0.1)')};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.button.disabled {
|
||||||
|
background: ${cssManager.bdTheme('#ffffff00', '#11111100')};
|
||||||
|
border: 1px dashed ${cssManager.bdTheme('#666666', '#666666')};
|
||||||
|
color: #9b9b9e;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
.button.hidden {
|
.button.hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ export class DeesChartArea extends DeesElement {
|
|||||||
super();
|
super();
|
||||||
domtools.elementBasic.setup();
|
domtools.elementBasic.setup();
|
||||||
|
|
||||||
this.resizeObserver = new ResizeObserver(entries => {
|
this.resizeObserver = new ResizeObserver((entries) => {
|
||||||
for (let entry of entries) {
|
for (let entry of entries) {
|
||||||
if (entry.target.classList.contains('mainbox')) {
|
if (entry.target.classList.contains('mainbox')) {
|
||||||
this.resizeChart(); // Call resizeChart when the .mainbox size changes
|
this.resizeChart(); // Call resizeChart when the .mainbox size changes
|
||||||
@ -55,7 +55,7 @@ export class DeesChartArea extends DeesElement {
|
|||||||
});
|
});
|
||||||
this.registerGarbageFunction(async () => {
|
this.registerGarbageFunction(async () => {
|
||||||
this.resizeObserver.disconnect();
|
this.resizeObserver.disconnect();
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static styles = [
|
public static styles = [
|
||||||
@ -71,7 +71,7 @@ export class DeesChartArea extends DeesElement {
|
|||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 400px;
|
height: 400px;
|
||||||
background: #222;
|
background: #111;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,10 +95,12 @@ export class DeesChartArea extends DeesElement {
|
|||||||
];
|
];
|
||||||
|
|
||||||
public render(): TemplateResult {
|
public render(): TemplateResult {
|
||||||
return html` <div class="mainbox">
|
return html`
|
||||||
|
<div class="mainbox">
|
||||||
<div class="chartTitle">${this.label}</div>
|
<div class="chartTitle">${this.label}</div>
|
||||||
<div class="chartContainer"></div>
|
<div class="chartContainer"></div>
|
||||||
</div> `;
|
</div>
|
||||||
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async firstUpdated() {
|
public async firstUpdated() {
|
||||||
@ -107,11 +109,23 @@ export class DeesChartArea extends DeesElement {
|
|||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: 'cpu',
|
name: 'cpu',
|
||||||
data: [31, 40, 28, 51, 42, 109, 100],
|
data: [
|
||||||
|
{ x: '2025-01-15T03:00:00', y: 25 },
|
||||||
|
{ x: '2025-01-15T07:00:00', y: 30 },
|
||||||
|
{ x: '2025-01-15T11:00:00', y: 20 },
|
||||||
|
{ x: '2025-01-15T15:00:00', y: 35 },
|
||||||
|
{ x: '2025-01-15T19:00:00', y: 25 },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'memory',
|
name: 'memory',
|
||||||
data: [11, 32, 45, 32, 34, 52, 41],
|
data: [
|
||||||
|
{ x: '2025-01-15T03:00:00', y: 10 },
|
||||||
|
{ x: '2025-01-15T07:00:00', y: 12 },
|
||||||
|
{ x: '2025-01-15T11:00:00', y: 10 },
|
||||||
|
{ x: '2025-01-15T15:00:00', y: 30 },
|
||||||
|
{ x: '2025-01-15T19:00:00', y: 40 },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
chart: {
|
chart: {
|
||||||
@ -130,35 +144,62 @@ export class DeesChartArea extends DeesElement {
|
|||||||
curve: 'smooth',
|
curve: 'smooth',
|
||||||
},
|
},
|
||||||
xaxis: {
|
xaxis: {
|
||||||
crosshairs: {
|
type: 'datetime', // Time-series data
|
||||||
stroke: {
|
labels: {
|
||||||
width: 1,
|
format: 'hh:mm A', // Time formatting
|
||||||
color: '#444',
|
style: {
|
||||||
|
colors: '#9e9e9e', // Label color
|
||||||
|
fontSize: '12px',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
type: 'datetime',
|
axisBorder: {
|
||||||
categories: [
|
show: false, // Hide x-axis border
|
||||||
'2018-09-19T00:00:00.000Z',
|
},
|
||||||
'2018-09-19T01:30:00.000Z',
|
axisTicks: {
|
||||||
'2018-09-19T02:30:00.000Z',
|
show: false, // Hide x-axis ticks
|
||||||
'2018-09-19T03:30:00.000Z',
|
},
|
||||||
'2018-09-19T04:30:00.000Z',
|
|
||||||
'2018-09-19T05:30:00.000Z',
|
|
||||||
'2018-09-19T06:30:00.000Z',
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
yaxis: {
|
yaxis: {
|
||||||
crosshairs: {
|
min: 0,
|
||||||
stroke: {
|
labels: {
|
||||||
width: 1,
|
formatter: function (val: number) {
|
||||||
color: '#444',
|
return `${val} Mbps`; // Format Y-axis labels
|
||||||
},
|
},
|
||||||
|
style: {
|
||||||
|
colors: '#9e9e9e', // Label color
|
||||||
|
fontSize: '12px',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
axisBorder: {
|
||||||
|
show: false, // Hide y-axis border
|
||||||
|
},
|
||||||
|
axisTicks: {
|
||||||
|
show: false, // Hide y-axis ticks
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
|
shared: true, // Enables the tooltip to display across series
|
||||||
|
intersect: false, // Allows hovering anywhere on the chart
|
||||||
|
followCursor: true, // Makes tooltip follow mouse even between points
|
||||||
x: {
|
x: {
|
||||||
format: 'dd/MM/yy HH:mm',
|
format: 'dd/MM/yy HH:mm',
|
||||||
},
|
},
|
||||||
|
custom: function ({ series, seriesIndex, dataPointIndex, w }) {
|
||||||
|
// Get the x value
|
||||||
|
const xValue = w.globals.labels[dataPointIndex];
|
||||||
|
// Iterate through each series and get its value
|
||||||
|
let tooltipContent = `<div style="padding: 10px; background: #1e1e2f; color: white; border-radius: 5px;">`;
|
||||||
|
tooltipContent += ``; // `<strong>Time:</strong> ${xValue}<br/>`;
|
||||||
|
|
||||||
|
series.forEach((s, index) => {
|
||||||
|
const label = w.globals.seriesNames[index]; // Get series label
|
||||||
|
const value = s[dataPointIndex]; // Get value at data point
|
||||||
|
tooltipContent += `<strong>${label}:</strong> ${value} Mbps<br/>`;
|
||||||
|
});
|
||||||
|
|
||||||
|
tooltipContent += `</div>`;
|
||||||
|
return tooltipContent;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
xaxis: {
|
xaxis: {
|
||||||
@ -171,8 +212,8 @@ export class DeesChartArea extends DeesElement {
|
|||||||
show: true,
|
show: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
borderColor: '#666', // Set the color of the grid lines
|
borderColor: '#333', // Set the color of the grid lines
|
||||||
strokeDashArray: 2, // Solid line
|
strokeDashArray: 0, // Solid line
|
||||||
row: {
|
row: {
|
||||||
colors: [], // This can be used to alternate the shading of the horizontal rows
|
colors: [], // This can be used to alternate the shading of the horizontal rows
|
||||||
opacity: 0.1,
|
opacity: 0.1,
|
||||||
@ -182,6 +223,15 @@ export class DeesChartArea extends DeesElement {
|
|||||||
opacity: 0.1,
|
opacity: 0.1,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
fill: {
|
||||||
|
type: 'gradient', // Gradient fill for the area
|
||||||
|
gradient: {
|
||||||
|
shade: 'dark',
|
||||||
|
type: 'vertical',
|
||||||
|
gradientToColors: ['#9c27b0'], // Gradient color ending
|
||||||
|
stops: [0, 100],
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
this.chart = new ApexCharts(this.shadowRoot.querySelector('.chartContainer'), options);
|
this.chart = new ApexCharts(this.shadowRoot.querySelector('.chartContainer'), options);
|
||||||
await this.chart.render();
|
await this.chart.render();
|
||||||
@ -189,20 +239,22 @@ export class DeesChartArea extends DeesElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public async resizeChart() {
|
public async resizeChart() {
|
||||||
const element = this.shadowRoot.querySelector('.chartContainer');
|
const mainbox: HTMLDivElement = this.shadowRoot.querySelector('.mainbox');
|
||||||
|
const chartContainer: HTMLDivElement = this.shadowRoot.querySelector('.chartContainer');
|
||||||
|
|
||||||
// Get computed style of the element
|
// Get computed style of the element
|
||||||
const style = window.getComputedStyle(element);
|
const styleMainbox = window.getComputedStyle(mainbox);
|
||||||
|
const styleChartContainer = window.getComputedStyle(chartContainer);
|
||||||
|
|
||||||
// Extract padding values
|
// Extract padding values
|
||||||
const paddingTop = parseInt(style.paddingTop, 10);
|
const paddingTop = parseInt(styleChartContainer.paddingTop, 10);
|
||||||
const paddingBottom = parseInt(style.paddingBottom, 10);
|
const paddingBottom = parseInt(styleChartContainer.paddingBottom, 10);
|
||||||
const paddingLeft = parseInt(style.paddingLeft, 10);
|
const paddingLeft = parseInt(styleChartContainer.paddingLeft, 10);
|
||||||
const paddingRight = parseInt(style.paddingRight, 10);
|
const paddingRight = parseInt(styleChartContainer.paddingRight, 10);
|
||||||
|
|
||||||
// Calculate the actual width and height to use, subtracting padding
|
// Calculate the actual width and height to use, subtracting padding
|
||||||
const actualWidth = element.clientWidth - paddingLeft - paddingRight;
|
const actualWidth = mainbox.clientWidth - paddingLeft - paddingRight;
|
||||||
const actualHeight = element.clientHeight - paddingTop - paddingBottom;
|
const actualHeight = mainbox.offsetHeight - paddingTop - paddingBottom;
|
||||||
|
|
||||||
await this.chart.updateOptions({
|
await this.chart.updateOptions({
|
||||||
chart: {
|
chart: {
|
||||||
|
@ -142,7 +142,7 @@ export class DeesDataviewCodebox extends DeesElement {
|
|||||||
.lineNumbers {
|
.lineNumbers {
|
||||||
line-height: 1.4em;
|
line-height: 1.4em;
|
||||||
font-weight: 200;
|
font-weight: 200;
|
||||||
font-family: 'Intel One Mono', 'monospace';
|
font-family: 'Intel One Mono', 'Geist Mono', 'monospace';
|
||||||
}
|
}
|
||||||
|
|
||||||
.hljs-string {
|
.hljs-string {
|
||||||
|
@ -133,7 +133,7 @@ export class DeesDataviewStatusobject extends DeesElement {
|
|||||||
|
|
||||||
.detail .detailsText .value {
|
.detail .detailsText .value {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-family: 'Intel One Mono';
|
font-family: 'Intel One Mono', 'Geist Mono';
|
||||||
}
|
}
|
||||||
`,
|
`,
|
||||||
];
|
];
|
||||||
|
@ -12,6 +12,12 @@ import {
|
|||||||
|
|
||||||
const { demoFunc } = await import('./dees-input-multitoggle.demo.js');
|
const { demoFunc } = await import('./dees-input-multitoggle.demo.js');
|
||||||
|
|
||||||
|
declare global {
|
||||||
|
interface HTMLElementTagNameMap {
|
||||||
|
'dees-input-multitoggle': DeesInputMultitoggle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@customElement('dees-input-multitoggle')
|
@customElement('dees-input-multitoggle')
|
||||||
export class DeesInputMultitoggle extends DeesElement {
|
export class DeesInputMultitoggle extends DeesElement {
|
||||||
public static demo = demoFunc;
|
public static demo = demoFunc;
|
||||||
|
@ -39,6 +39,9 @@ export class DeesSimpleAppDash extends DeesElement {
|
|||||||
@property()
|
@property()
|
||||||
public viewTabs: IView[] = [];
|
public viewTabs: IView[] = [];
|
||||||
|
|
||||||
|
@property()
|
||||||
|
public terminalSetupCommand: string = `pnpm install @serve.zone/cli && clear && servezone info`;
|
||||||
|
|
||||||
public static styles = [
|
public static styles = [
|
||||||
cssManager.defaultStyles,
|
cssManager.defaultStyles,
|
||||||
css`
|
css`
|
||||||
@ -46,26 +49,29 @@ export class DeesSimpleAppDash extends DeesElement {
|
|||||||
color: ${cssManager.bdTheme('#333', '#ccc')};
|
color: ${cssManager.bdTheme('#333', '#ccc')};
|
||||||
user-select: none;
|
user-select: none;
|
||||||
display: block;
|
display: block;
|
||||||
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.maincontainer {
|
.maincontainer {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
top: 0px;
|
top: 0px;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
|
right: 0px;
|
||||||
|
bottom: 0px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.appbar {
|
.appbar {
|
||||||
position: fixed;
|
position: absolute;
|
||||||
top: 0;
|
top: 0px;
|
||||||
height: 32px;
|
left: 0px;
|
||||||
width: 100%;
|
height: calc(100% - 24px);
|
||||||
background: ${cssManager.bdTheme('#eeeeeb', '#222')};
|
width: 200px;
|
||||||
border-bottom: 1px solid ${cssManager.bdTheme('#ccc', '#ffffff10')};
|
background: ${cssManager.bdTheme('#eeeeeb', '#000')};
|
||||||
|
border-right: 1px solid ${cssManager.bdTheme('#ccc', '#ffffff20')};
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
font-family: 'Geist Sans', sans-serif;
|
font-family: 'Geist Sans', sans-serif;
|
||||||
@ -73,14 +79,15 @@ export class DeesSimpleAppDash extends DeesElement {
|
|||||||
z-index: 2;
|
z-index: 2;
|
||||||
box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.8);
|
box-shadow: 0px 4px 10px 0px rgba(0, 0, 0, 0.8);
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: min-content 1fr auto;
|
grid-template-rows: min-content auto min-content;
|
||||||
}
|
}
|
||||||
|
|
||||||
.appbar .viewTabs {
|
.appbar .viewTabs {
|
||||||
padding: 0px 16px;
|
margin-left: -8px;
|
||||||
|
margin-right: -8px;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: top;
|
||||||
}
|
}
|
||||||
|
|
||||||
.viewTab {
|
.viewTab {
|
||||||
@ -88,17 +95,18 @@ export class DeesSimpleAppDash extends DeesElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.viewTab:hover {
|
.viewTab:hover {
|
||||||
background: ${cssManager.bdTheme(colors.bright.blue, colors.dark.blue)};
|
background: ${cssManager.bdTheme('#ccc', '#ffffff10')};
|
||||||
color: ${cssManager.bdTheme('#000', '#fff')};
|
color: ${cssManager.bdTheme('#000', '#fff')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.viewTab:active {
|
.viewTab:active {
|
||||||
background: ${cssManager.bdTheme(colors.bright.blueActive, colors.dark.blueActive)};
|
background: ${cssManager.bdTheme('#aaa', '#ffffff20')};
|
||||||
color: ${cssManager.bdTheme('#000', '#fff')};
|
color: ${cssManager.bdTheme('#000', '#fff')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.appName {
|
.appName {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
|
color: ${cssManager.bdTheme('#666', '#999')};
|
||||||
}
|
}
|
||||||
|
|
||||||
.appActions {
|
.appActions {
|
||||||
@ -113,11 +121,12 @@ export class DeesSimpleAppDash extends DeesElement {
|
|||||||
|
|
||||||
.appcontent {
|
.appcontent {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
position: fixed;
|
position: absolute;
|
||||||
top: 32px;
|
top: 0px;
|
||||||
height: calc(100vh - 32px - 24px);
|
right: 0px;
|
||||||
|
height: calc(100vh - 24px);
|
||||||
bottom: 24px;
|
bottom: 24px;
|
||||||
width: 100%;
|
width: calc(100vw - 200px);
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
background: ${cssManager.bdTheme('#eeeeeb', '#000')};
|
background: ${cssManager.bdTheme('#eeeeeb', '#000')};
|
||||||
overscroll-behavior: contain;
|
overscroll-behavior: contain;
|
||||||
@ -129,6 +138,7 @@ export class DeesSimpleAppDash extends DeesElement {
|
|||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
border-top: 1px solid #44444480;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
background: ${cssManager.bdTheme(colors.bright.blueMuted, colors.dark.blueMuted)};
|
background: ${cssManager.bdTheme(colors.bright.blueMuted, colors.dark.blueMuted)};
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
@ -189,14 +199,17 @@ export class DeesSimpleAppDash extends DeesElement {
|
|||||||
await this.loadView(this.viewTabs[0]);
|
await this.loadView(this.viewTabs[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public currentTerminal: DeesTerminal;
|
||||||
public async launchTerminal() {
|
public async launchTerminal() {
|
||||||
const maincontainer = this.shadowRoot.querySelector('.maincontainer');
|
const maincontainer = this.shadowRoot.querySelector('.maincontainer');
|
||||||
const terminal = new DeesTerminal();
|
const terminal = new DeesTerminal();
|
||||||
|
terminal.setupCommand = this.terminalSetupCommand;
|
||||||
|
this.currentTerminal = terminal;
|
||||||
maincontainer.appendChild(terminal);
|
maincontainer.appendChild(terminal);
|
||||||
terminal.style.position = 'absolute';
|
terminal.style.position = 'absolute';
|
||||||
terminal.style.zIndex = '1';
|
terminal.style.zIndex = '1';
|
||||||
terminal.style.top = '32px';
|
terminal.style.top = '0px';
|
||||||
terminal.style.left = '0px';
|
terminal.style.left = '200px';
|
||||||
terminal.style.right = '0px';
|
terminal.style.right = '0px';
|
||||||
terminal.style.bottom = '24px';
|
terminal.style.bottom = '24px';
|
||||||
terminal.style.opacity = '0';
|
terminal.style.opacity = '0';
|
||||||
@ -205,6 +218,7 @@ export class DeesSimpleAppDash extends DeesElement {
|
|||||||
await domtools.plugins.smartdelay.delayFor(0);
|
await domtools.plugins.smartdelay.delayFor(0);
|
||||||
terminal.style.opacity = '1';
|
terminal.style.opacity = '1';
|
||||||
terminal.style.transform = 'translateY(0px)';
|
terminal.style.transform = 'translateY(0px)';
|
||||||
|
return terminal;
|
||||||
}
|
}
|
||||||
|
|
||||||
private currentView: DeesElement;
|
private currentView: DeesElement;
|
||||||
|
@ -102,7 +102,7 @@ export class DeesStepper extends DeesElement {
|
|||||||
transition: all 0.7s ease-in-out;
|
transition: all 0.7s ease-in-out;
|
||||||
max-width: 500px;
|
max-width: 500px;
|
||||||
min-height: 300px;
|
min-height: 300px;
|
||||||
border-radius: 8px;
|
border-radius: 16px;
|
||||||
background: ${cssManager.bdTheme('#ffffff', '#181818')};
|
background: ${cssManager.bdTheme('#ffffff', '#181818')};
|
||||||
border-top: 1px solid ${cssManager.bdTheme('#ffffff', '#181818')};
|
border-top: 1px solid ${cssManager.bdTheme('#ffffff', '#181818')};
|
||||||
color: ${cssManager.bdTheme('#333', '#fff')};
|
color: ${cssManager.bdTheme('#333', '#fff')};
|
||||||
@ -175,8 +175,9 @@ export class DeesStepper extends DeesElement {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
padding-top: 50px;
|
padding-top: 50px;
|
||||||
font-family: 'Geist Sans', sans-serif;
|
font-family: 'Geist Sans', sans-serif;
|
||||||
font-size: 25px;
|
font-size: 22px;
|
||||||
font-weight: 300;
|
|
||||||
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.step .content {
|
.step .content {
|
||||||
|
@ -22,13 +22,25 @@ declare global {
|
|||||||
|
|
||||||
@customElement('dees-terminal')
|
@customElement('dees-terminal')
|
||||||
export class DeesTerminal extends DeesElement {
|
export class DeesTerminal extends DeesElement {
|
||||||
public static demo = () => html` <dees-terminal></dees-terminal> `;
|
public static demo = () => html` <dees-terminal
|
||||||
|
.environment=${{
|
||||||
|
NODE_ENV: 'development',
|
||||||
|
PORT: '3000',
|
||||||
|
}}
|
||||||
|
></dees-terminal> `;
|
||||||
|
|
||||||
// INSTANCE
|
// INSTANCE
|
||||||
private resizeObserver: ResizeObserver;
|
private resizeObserver: ResizeObserver;
|
||||||
|
|
||||||
@property()
|
@property()
|
||||||
public setupCommand = `pnpm install @git.zone/tsbuild && clear && echo 'welcome'`;
|
public setupCommand = `pnpm install @serve.zone/cli && servezone cli\n`;
|
||||||
|
|
||||||
|
@property()
|
||||||
|
environment: {[key: string]: string} = {};
|
||||||
|
|
||||||
|
// exposing webcontainer
|
||||||
|
private webcontainerDeferred = new domtools.plugins.smartpromise.Deferred<webcontainer.WebContainer>();
|
||||||
|
public webcontainerPromise = this.webcontainerDeferred.promise;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
@ -282,8 +294,15 @@ export class DeesTerminal extends DeesElement {
|
|||||||
input.write(data);
|
input.write(data);
|
||||||
});
|
});
|
||||||
await this.waitForPrompt(term, '~/');
|
await this.waitForPrompt(term, '~/');
|
||||||
|
// lets set the environment variables
|
||||||
|
await this.setEnvironmentVariables(this.environment, webcontainerInstance);
|
||||||
|
input.write(`source source.env\n`);
|
||||||
|
await this.waitForPrompt(term, '~/');
|
||||||
|
// lets run the setup command
|
||||||
input.write(this.setupCommand);
|
input.write(this.setupCommand);
|
||||||
input.write(`\n`);
|
await this.waitForPrompt(term, '~/');
|
||||||
|
input.write(`clear && echo 'welcome'\n`);
|
||||||
|
this.webcontainerDeferred.resolve(webcontainerInstance);
|
||||||
}
|
}
|
||||||
|
|
||||||
async connectedCallback(): Promise<void> {
|
async connectedCallback(): Promise<void> {
|
||||||
@ -300,14 +319,16 @@ export class DeesTerminal extends DeesElement {
|
|||||||
this.fitAddon.fit();
|
this.fitAddon.fit();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async waitForPrompt(term: Terminal, prompt: string): Promise<void> {
|
public async waitForPrompt(term: Terminal, prompt: string): Promise<void> {
|
||||||
return new Promise<void>((resolve) => {
|
return new Promise<void>((resolve) => {
|
||||||
const checkPrompt = () => {
|
const checkPrompt = () => {
|
||||||
const lines = term.buffer.active;
|
const lines = term.buffer.active;
|
||||||
for (let i = 0; i < lines.length; i++) {
|
for (let i = 0; i < lines.length; i++) {
|
||||||
const line = lines.getLine(i);
|
const line = lines.getLine(i);
|
||||||
if (line && line.translateToString().includes(prompt)) {
|
if (line && line.translateToString().includes(prompt)) {
|
||||||
|
setTimeout(() => {
|
||||||
resolve();
|
resolve();
|
||||||
|
}, 100);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -317,4 +338,18 @@ export class DeesTerminal extends DeesElement {
|
|||||||
checkPrompt();
|
checkPrompt();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async setEnvironmentVariables(envArg: {[key: string]: string}, webcontainerInstanceArg?: webcontainer.WebContainer) {
|
||||||
|
const webcontainerInstance = webcontainerInstanceArg ||await this.webcontainerPromise;
|
||||||
|
let envFile = ``
|
||||||
|
for (const key in envArg) {
|
||||||
|
envFile += `export ${key}="${envArg[key]}"\n`;
|
||||||
|
}
|
||||||
|
|
||||||
|
await webcontainerInstance.mount({'source.env': {
|
||||||
|
file: {
|
||||||
|
contents: envFile,
|
||||||
|
}
|
||||||
|
}});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@ export * from './dees-appui-base.js';
|
|||||||
export * from './dees-appui-maincontent.js';
|
export * from './dees-appui-maincontent.js';
|
||||||
export * from './dees-appui-mainmenu.js';
|
export * from './dees-appui-mainmenu.js';
|
||||||
export * from './dees-appui-mainselector.js';
|
export * from './dees-appui-mainselector.js';
|
||||||
|
export * from './dees-badge.js';
|
||||||
export * from './dees-button-exit.js';
|
export * from './dees-button-exit.js';
|
||||||
export * from './dees-button.js';
|
export * from './dees-button.js';
|
||||||
export * from './dees-chart-area.js';
|
export * from './dees-chart-area.js';
|
||||||
|
@ -1,2 +1,4 @@
|
|||||||
export * from './elements/index.js';
|
export * from './elements/index.js';
|
||||||
|
import * as colors from './elements/00colors.js';
|
||||||
|
export { colors };
|
||||||
export { commitinfo } from './00_commitinfo_data.js';
|
export { commitinfo } from './00_commitinfo_data.js';
|
||||||
|
Reference in New Issue
Block a user