@joster-dev/chaos-control 0.1.2 → 0.3.0
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 +86 -86
- package/fesm2022/joster-dev-chaos-control.mjs +512 -580
- package/fesm2022/joster-dev-chaos-control.mjs.map +1 -1
- package/{lib/LICENSE → lib} +9 -9
- package/package.json +6 -8
- package/src/lib/scss/all.scss +7 -0
- package/src/lib/scss/card.scss +78 -0
- package/src/lib/scss/control.scss +49 -0
- package/src/lib/scss/reboot.scss +13 -0
- package/src/lib/scss/utility.scss +179 -0
- package/src/lib/scss/variables.scss +7 -0
- package/src/lib/styles.scss +28 -28
- package/types/joster-dev-chaos-control.d.ts +243 -0
- package/esm2022/joster-dev-chaos-control.mjs +0 -5
- package/esm2022/lib/chaos-control.module.mjs +0 -67
- package/esm2022/lib/chaos-control.service.mjs +0 -14
- package/esm2022/lib/components/choice/choice.component.mjs +0 -52
- package/esm2022/lib/components/color/color.component.mjs +0 -77
- package/esm2022/lib/components/file/file.component.mjs +0 -131
- package/esm2022/lib/components/index.mjs +0 -8
- package/esm2022/lib/components/number/number.component.mjs +0 -134
- package/esm2022/lib/components/readonly/readonly.component.mjs +0 -14
- package/esm2022/lib/components/select/select.component.mjs +0 -98
- package/esm2022/lib/components/text/text.component.mjs +0 -162
- package/esm2022/lib/directives/border-radius.directive.mjs +0 -41
- package/esm2022/lib/directives/control.directive.mjs +0 -46
- package/esm2022/lib/directives/index.mjs +0 -4
- package/esm2022/lib/directives/item.directive.mjs +0 -117
- package/esm2022/lib/models/index.mjs +0 -7
- package/esm2022/lib/models/is-item.function.mjs +0 -8
- package/esm2022/lib/models/is-items.function.mjs +0 -5
- package/esm2022/lib/models/is-number.function.mjs +0 -5
- package/esm2022/lib/models/is-primitive.function.mjs +0 -7
- package/esm2022/lib/models/item.interface.mjs +0 -2
- package/esm2022/lib/models/primitive.type.mjs +0 -2
- package/esm2022/public-api.mjs +0 -6
- package/index.d.ts +0 -5
- package/lib/chaos-control.module.d.ts +0 -20
- package/lib/chaos-control.service.d.ts +0 -6
- package/lib/components/choice/choice.component.d.ts +0 -15
- package/lib/components/color/color.component.d.ts +0 -22
- package/lib/components/file/file.component.d.ts +0 -31
- package/lib/components/index.d.ts +0 -7
- package/lib/components/number/number.component.d.ts +0 -33
- package/lib/components/readonly/readonly.component.d.ts +0 -8
- package/lib/components/select/select.component.d.ts +0 -28
- package/lib/components/text/text.component.d.ts +0 -41
- package/lib/directives/border-radius.directive.d.ts +0 -12
- package/lib/directives/control.directive.d.ts +0 -18
- package/lib/directives/index.d.ts +0 -3
- package/lib/directives/item.directive.d.ts +0 -36
- package/lib/models/index.d.ts +0 -6
- package/lib/models/is-item.function.d.ts +0 -2
- package/lib/models/is-items.function.d.ts +0 -2
- package/lib/models/is-number.function.d.ts +0 -1
- package/lib/models/is-primitive.function.d.ts +0 -2
- package/lib/models/item.interface.d.ts +0 -6
- package/lib/models/primitive.type.d.ts +0 -1
- package/public-api.d.ts +0 -4
package/README.md
CHANGED
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
# Chaos Control Library
|
|
2
|
-
|
|
3
|
-
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.0.0.
|
|
4
|
-
<!-- - provide accessible components to
|
|
5
|
-
- visual indication for validity
|
|
6
|
-
- visual and utility components
|
|
7
|
-
- consistent style -->
|
|
8
|
-
<!-- - styled print view -->
|
|
9
|
-
<!-- - readonly -->
|
|
10
|
-
|
|
11
|
-
> [Repository](https://github.com/joster-dev/chaos-control)
|
|
12
|
-
|
|
13
|
-
> [Github Package](https://github.com/joster-dev/chaos-control/packages/TODO)
|
|
14
|
-
|
|
15
|
-
> [Demo](https://joster-dev.github.io/chaos-control/)
|
|
16
|
-
|
|
17
|
-
## Getting Started
|
|
18
|
-
update your `package.json`
|
|
19
|
-
```bash
|
|
20
|
-
npm install @joster-dev/chaos-control --save
|
|
21
|
-
```
|
|
22
|
-
import the module
|
|
23
|
-
```diff
|
|
24
|
-
+ import { FormControlModule } from '@joster-dev/form-control';
|
|
25
|
-
|
|
26
|
-
@NgModule({
|
|
27
|
-
imports: [
|
|
28
|
-
+ FormControlModule
|
|
29
|
-
],
|
|
30
|
-
})
|
|
31
|
-
```
|
|
32
|
-
## `fc-button` utility component
|
|
33
|
-
to handle click events in an accessible manner
|
|
34
|
-
- style: outset border
|
|
35
|
-
### inputs
|
|
36
|
-
- `isActive: boolean = false`
|
|
37
|
-
- style: inset border
|
|
38
|
-
- `isDisabled: boolean = false`
|
|
39
|
-
- style: solid border
|
|
40
|
-
- when disabled, button will not be tab indexable
|
|
41
|
-
- `isValid: boolean = true`
|
|
42
|
-
- `type: 'button' | 'submit' = 'button'`
|
|
43
|
-
- `borderRadiusLeft: boolean = true`
|
|
44
|
-
- `borderRadiusRight: boolean = true`
|
|
45
|
-
### outputs
|
|
46
|
-
- `onBlur` emits `FocusEvent`
|
|
47
|
-
- `onClick` emits `MouseEvent`
|
|
48
|
-
## `fc-readonly` utility component
|
|
49
|
-
to display information alongside controls
|
|
50
|
-
### inputs
|
|
51
|
-
- `model: string`
|
|
52
|
-
## `fc-text` control component
|
|
53
|
-
result will be `string | null`
|
|
54
|
-
- if line break or overflow
|
|
55
|
-
- height increases
|
|
56
|
-
- if cleared by the user or form
|
|
57
|
-
- height resets
|
|
58
|
-
## `fc-number` control component
|
|
59
|
-
result will be `number | null`
|
|
60
|
-
- if user enters `e` character
|
|
61
|
-
- will not change
|
|
62
|
-
- if user enters `.` character
|
|
63
|
-
- if `[step]` is `>= 1`
|
|
64
|
-
- will not change
|
|
65
|
-
## `fc-choice` control component
|
|
66
|
-
to ask the user to choose from a few items
|
|
67
|
-
|
|
68
|
-
result will be `<item-key>[] | <item-key> | null`
|
|
69
|
-
- where `<item-key>` is the `key` property of the `items` input
|
|
70
|
-
### inputs
|
|
71
|
-
- `isMultiple: boolean = false`
|
|
72
|
-
- `items: { key: boolean | number | string, value: string }[] = []`
|
|
73
|
-
## `fc-color` control component
|
|
74
|
-
result will be `string | null`
|
|
75
|
-
- `string` result matches [`/^[0-9a-fA-F]{6}$/`](https://regexper.com/#%2F%5E%5B0-9a-fA-F%5D%7B6%7D%24%2F)
|
|
76
|
-
## `fc-file` control component
|
|
77
|
-
result will be `FileList | null`
|
|
78
|
-
|
|
79
|
-
## `fc-select` control component
|
|
80
|
-
to ask the user to choose from many items
|
|
81
|
-
- `items: { key: boolean | number | string, value: string }[] = []`
|
|
82
|
-
<!-- ## `fc-select` component -->
|
|
83
|
-
<!-- ## `fc-multi-select` component -->
|
|
84
|
-
<!-- ## `fc-date` component -->
|
|
85
|
-
<!-- ## `fc-date-time` component -->
|
|
86
|
-
<!-- ## `fc-time` component -->
|
|
1
|
+
# Chaos Control Library
|
|
2
|
+
|
|
3
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.0.0.
|
|
4
|
+
<!-- - provide accessible components to
|
|
5
|
+
- visual indication for validity
|
|
6
|
+
- visual and utility components
|
|
7
|
+
- consistent style -->
|
|
8
|
+
<!-- - styled print view -->
|
|
9
|
+
<!-- - readonly -->
|
|
10
|
+
|
|
11
|
+
> [Repository](https://github.com/joster-dev/chaos-control)
|
|
12
|
+
|
|
13
|
+
> [Github Package](https://github.com/joster-dev/chaos-control/packages/TODO)
|
|
14
|
+
|
|
15
|
+
> [Demo](https://joster-dev.github.io/chaos-control/)
|
|
16
|
+
|
|
17
|
+
## Getting Started
|
|
18
|
+
update your `package.json`
|
|
19
|
+
```bash
|
|
20
|
+
npm install @joster-dev/chaos-control --save
|
|
21
|
+
```
|
|
22
|
+
import the module
|
|
23
|
+
```diff
|
|
24
|
+
+ import { FormControlModule } from '@joster-dev/form-control';
|
|
25
|
+
|
|
26
|
+
@NgModule({
|
|
27
|
+
imports: [
|
|
28
|
+
+ FormControlModule
|
|
29
|
+
],
|
|
30
|
+
})
|
|
31
|
+
```
|
|
32
|
+
## `fc-button` utility component
|
|
33
|
+
to handle click events in an accessible manner
|
|
34
|
+
- style: outset border
|
|
35
|
+
### inputs
|
|
36
|
+
- `isActive: boolean = false`
|
|
37
|
+
- style: inset border
|
|
38
|
+
- `isDisabled: boolean = false`
|
|
39
|
+
- style: solid border
|
|
40
|
+
- when disabled, button will not be tab indexable
|
|
41
|
+
- `isValid: boolean = true`
|
|
42
|
+
- `type: 'button' | 'submit' = 'button'`
|
|
43
|
+
- `borderRadiusLeft: boolean = true`
|
|
44
|
+
- `borderRadiusRight: boolean = true`
|
|
45
|
+
### outputs
|
|
46
|
+
- `onBlur` emits `FocusEvent`
|
|
47
|
+
- `onClick` emits `MouseEvent`
|
|
48
|
+
## `fc-readonly` utility component
|
|
49
|
+
to display information alongside controls
|
|
50
|
+
### inputs
|
|
51
|
+
- `model: string`
|
|
52
|
+
## `fc-text` control component
|
|
53
|
+
result will be `string | null`
|
|
54
|
+
- if line break or overflow
|
|
55
|
+
- height increases
|
|
56
|
+
- if cleared by the user or form
|
|
57
|
+
- height resets
|
|
58
|
+
## `fc-number` control component
|
|
59
|
+
result will be `number | null`
|
|
60
|
+
- if user enters `e` character
|
|
61
|
+
- will not change
|
|
62
|
+
- if user enters `.` character
|
|
63
|
+
- if `[step]` is `>= 1`
|
|
64
|
+
- will not change
|
|
65
|
+
## `fc-choice` control component
|
|
66
|
+
to ask the user to choose from a few items
|
|
67
|
+
|
|
68
|
+
result will be `<item-key>[] | <item-key> | null`
|
|
69
|
+
- where `<item-key>` is the `key` property of the `items` input
|
|
70
|
+
### inputs
|
|
71
|
+
- `isMultiple: boolean = false`
|
|
72
|
+
- `items: { key: boolean | number | string, value: string }[] = []`
|
|
73
|
+
## `fc-color` control component
|
|
74
|
+
result will be `string | null`
|
|
75
|
+
- `string` result matches [`/^[0-9a-fA-F]{6}$/`](https://regexper.com/#%2F%5E%5B0-9a-fA-F%5D%7B6%7D%24%2F)
|
|
76
|
+
## `fc-file` control component
|
|
77
|
+
result will be `FileList | null`
|
|
78
|
+
|
|
79
|
+
## `fc-select` control component
|
|
80
|
+
to ask the user to choose from many items
|
|
81
|
+
- `items: { key: boolean | number | string, value: string }[] = []`
|
|
82
|
+
<!-- ## `fc-select` component -->
|
|
83
|
+
<!-- ## `fc-multi-select` component -->
|
|
84
|
+
<!-- ## `fc-date` component -->
|
|
85
|
+
<!-- ## `fc-date-time` component -->
|
|
86
|
+
<!-- ## `fc-time` component -->
|