@3dsource/source-ui 0.0.28 → 0.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,7 +9,7 @@ The Source UI library provides Angular components that are optimized for 3D appl
9
9
  - Specialized UI controls for 3D scene manipulation
10
10
  - Integration with Angular Material design system
11
11
  - Responsive and accessible components
12
- - Consistent styling across 3dsource applications
12
+ - Consistent styling across 3D Source applications
13
13
 
14
14
  ## Installation
15
15
 
@@ -45,79 +45,62 @@ Install peer dependencies:
45
45
 
46
46
  ## Usage
47
47
 
48
- ### Module Import
48
+ ### Style imports
49
49
 
50
- Import the SourceUiModule in your Angular application:
50
+ Import both styles for SourceUI Native and SourceUI in your style.scss
51
51
 
52
- ```typescript
53
- import { SourceUiModule } from '@3dsource/source-ui';
54
-
55
- @NgModule({
56
- imports: [SourceUiModule],
57
- })
58
- export class AppModule {}
52
+ ```scss
53
+ // Source UI Native
54
+ @use '../node_modules/@3dsource/source-ui-native/styles/source.ui.native.scss' as source-ui-native;
55
+ // Source UI
56
+ @use '../node_modules/@3dsource/source-ui/styles/source.ui.scss' as source-ui;`;
59
57
  ```
60
58
 
61
- ### Using Components
59
+ ### Material settings
62
60
 
63
- After importing the module, you can use the components in your templates:
61
+ For correct styling provide neccessary outline option for form elements in your appConfig
64
62
 
65
- ```html
66
- <source-3d-viewer [model]="modelUrl"></source-3d-viewer>
63
+ ```typescript
64
+ {
65
+ provide: MAT_FORM_FIELD_DEFAULT_OPTIONS,
66
+ useValue: { appearance: 'outline' },
67
+ },
67
68
  ```
68
69
 
69
- ## Available Components
70
+ ### Import
70
71
 
71
- - **3D Viewers** - Components for displaying 3D models
72
- - **Control Panels** - UI controls for manipulating 3D scenes
73
- - **Property Editors** - Components for editing 3D object properties
74
- - **Navigation Controls** - Components for navigating 3D spaces
75
- - **Material Pickers** - Components for selecting materials and textures
72
+ Import desired component and use it in template as described in components documentation.
76
73
 
77
- ## Component Examples
74
+ ```typescript
75
+ import { SourceSliderGroupComponent } from '@3dsource/source-ui';
78
76
 
79
- ### 3D Viewer
77
+ @NgModule({
78
+ imports: [SourceSliderGroupComponent],
79
+ })
80
+ export class AppComponent {
81
+ value = signal(15);
80
82
 
81
- ```html
82
- <source-3d-viewer [model]="'assets/models/example.glb'" [autoRotate]="true" [controls]="true"> </source-3d-viewer>
83
+ groupValueChange(value: number) {
84
+ console.log('Group value changed:', value);
85
+ }
86
+ }
83
87
  ```
84
88
 
85
- ### Control Panel
86
-
87
89
  ```html
88
- <source-control-panel>
89
- <source-slider label="Zoom" [min]="0.1" [max]="10" [(value)]="zoomLevel"> </source-slider>
90
- </source-control-panel>
90
+ <src-slider-group label="Slider Group" [min]="0" [max]="100" [step]="1" units="" [showRange]="true" [value]="value()" (groupValueChange)="groupValueChange($event)"></src-slider-group>
91
91
  ```
92
92
 
93
- ## Theming
93
+ ## Available Components and Examples
94
94
 
95
- The library supports Angular Material theming:
95
+ - **[src-colorpicker](https://preview.3dsource.com/front-libraries/master/#/components/SourceBadgeComponent)** - Highly customizable colorpicker
96
+ - **[src-modal](https://preview.3dsource.com/front-libraries/master/#/components/SourceModalComponent)** - Service modal component
97
+ - **[src-popover](https://preview.3dsource.com/front-libraries/master/#/components/SourcePopoverComponent)** - Popover with trigger or Service
98
+ - **[src-slider-group](https://preview.3dsource.com/front-libraries/master/#/components/SourceSliderGroupComponent)** - Advanced variant of slider
99
+ - **[src-tabs](https://preview.3dsource.com/front-libraries/master/#/components/SourceTabsComponent)** - Tabs in two options of usage
100
+ - **[src-tooltip](https://preview.3dsource.com/front-libraries/master/#/components/SourceTooltipComponent)** - Directive for custom tooltips
96
101
 
97
- ```scss
98
- @use '@angular/material' as mat;
99
- @use '@3dsource/source-ui/theming' as source-ui;
100
-
101
- $my-primary: mat.define-palette(mat.$indigo-palette);
102
- $my-accent: mat.define-palette(mat.$pink-palette);
103
-
104
- $my-theme: mat.define-light-theme(
105
- (
106
- color: (
107
- primary: $my-primary,
108
- accent: $my-accent,
109
- ),
110
- )
111
- );
112
-
113
- @include mat.all-component-themes($my-theme);
114
- @include source-ui.theme($my-theme);
115
- ```
116
-
117
- ## Examples
102
+ ## Customization
118
103
 
119
- Check the demo application for complete usage examples:
104
+ Customization provided in the same way as in SourceUI Native. Whole table of CSS custom properties is available in the **[documentation site](https://preview.3dsource.com/front-libraries/master/#/components/design-tokens)**.
120
105
 
121
- ```shell
122
- npm run demo:start
123
- ```
106
+ You can see all available options and examples in **[documentation](https://preview.3dsource.com/front-libraries/master/#/components/getting-started)**