mtrl 0.2.8 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.ts +2 -0
- package/package.json +1 -1
- package/src/components/navigation/api.ts +131 -96
- package/src/components/navigation/features/controller.ts +273 -0
- package/src/components/navigation/features/items.ts +133 -64
- package/src/components/navigation/navigation.ts +17 -2
- package/src/components/navigation/system-types.ts +124 -0
- package/src/components/navigation/system.ts +776 -0
- package/src/components/slider/config.ts +20 -2
- package/src/components/slider/features/controller.ts +761 -0
- package/src/components/slider/features/handlers.ts +18 -15
- package/src/components/slider/features/index.ts +3 -2
- package/src/components/slider/features/range.ts +104 -0
- package/src/components/slider/slider.ts +34 -14
- package/src/components/slider/structure.ts +152 -0
- package/src/components/textfield/api.ts +53 -0
- package/src/components/textfield/features.ts +322 -0
- package/src/components/textfield/textfield.ts +8 -0
- package/src/components/textfield/types.ts +12 -3
- package/src/components/timepicker/clockdial.ts +1 -4
- package/src/core/compose/features/textinput.ts +15 -2
- package/src/core/composition/features/dom.ts +33 -0
- package/src/core/composition/features/icon.ts +131 -0
- package/src/core/composition/features/index.ts +11 -0
- package/src/core/composition/features/label.ts +156 -0
- package/src/core/composition/features/structure.ts +22 -0
- package/src/core/composition/index.ts +26 -0
- package/src/core/index.ts +1 -1
- package/src/core/structure.ts +288 -0
- package/src/index.ts +1 -0
- package/src/styles/components/_navigation-mobile.scss +244 -0
- package/src/styles/components/_navigation-system.scss +151 -0
- package/src/styles/components/_textfield.scss +250 -11
- package/demo/build.ts +0 -349
- package/demo/index.html +0 -110
- package/demo/main.js +0 -448
- package/demo/styles.css +0 -239
- package/server.ts +0 -86
- package/src/components/slider/features/slider.ts +0 -318
- package/src/components/slider/features/structure.ts +0 -181
- package/src/components/slider/features/ui.ts +0 -388
- package/src/components/textfield/constants.ts +0 -100
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
} from '../../core/config/component-config';
|
|
6
6
|
import { SliderConfig } from './types';
|
|
7
7
|
import { SLIDER_COLORS, SLIDER_SIZES } from './constants';
|
|
8
|
+
import { createSliderDefinition } from './structure';
|
|
8
9
|
|
|
9
10
|
/**
|
|
10
11
|
* Default configuration for the Slider component
|
|
@@ -31,8 +32,25 @@ export const defaultConfig: SliderConfig = {
|
|
|
31
32
|
* @param {SliderConfig} config - User provided configuration
|
|
32
33
|
* @returns {SliderConfig} Complete configuration with defaults applied
|
|
33
34
|
*/
|
|
34
|
-
export const createBaseConfig = (config: SliderConfig = {}): SliderConfig =>
|
|
35
|
-
|
|
35
|
+
export const createBaseConfig = (config: SliderConfig = {}): SliderConfig => {
|
|
36
|
+
// Create the base config with defaults applied
|
|
37
|
+
const baseConfig = createComponentConfig(defaultConfig, config, 'slider') as SliderConfig;
|
|
38
|
+
|
|
39
|
+
// Create a basic component object for structure generation
|
|
40
|
+
const baseComponent = {
|
|
41
|
+
componentName: 'slider',
|
|
42
|
+
config: baseConfig,
|
|
43
|
+
getClass: (className) => {
|
|
44
|
+
const prefix = baseConfig.prefix || 'mtrl';
|
|
45
|
+
return `${prefix}-${className}`;
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
// Add the structure definition to the config
|
|
50
|
+
baseConfig.structureDefinition = createSliderDefinition(baseComponent, baseConfig);
|
|
51
|
+
|
|
52
|
+
return baseConfig;
|
|
53
|
+
};
|
|
36
54
|
|
|
37
55
|
/**
|
|
38
56
|
* Generates element configuration for the Slider component
|