desy-html 8.13.1 → 9.0.1
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/config/tailwind.config.js +189 -189
- package/docs/_global.foot.njk +1 -0
- package/docs/_include.template-header.njk +5 -0
- package/docs/_macro.example-render.njk +4 -0
- package/docs/componentes.html +3 -0
- package/docs/ds/_ds.section.layout.njk +5 -0
- package/docs/examples-datepicker.html +8 -0
- package/docs/index.html +10 -0
- package/gulpfile.js +32 -36
- package/package.json +9 -2
- package/src/css/styles.css +1 -0
- package/src/js/cally.js +1114 -0
- package/src/js/desy-html.js +88 -0
- package/src/js/filters/filter-caller.js +2 -2
- package/src/js/filters/filter-slugify.js +2 -2
- package/src/js/filters/highlight.js +4 -4
- package/src/js/filters/index.js +6 -5
- package/src/js/globals/get-html-code-from-example.js +8 -6
- package/src/js/globals/get-html-code-from-file.js +7 -7
- package/src/js/globals/get-nunjucks-code-from-example.js +9 -10
- package/src/js/globals/get-nunjucks-code-from-file.js +6 -6
- package/src/js/globals/index.js +6 -6
- package/src/js/index.js +3 -1
- package/src/templates/components/datepicker/_examples.datepicker.njk +347 -0
- package/src/templates/components/datepicker/_macro.datepicker.njk +3 -0
- package/src/templates/components/datepicker/_styles.datepicker.css +85 -0
- package/src/templates/components/datepicker/_template.datepicker.njk +124 -0
- package/src/templates/components/datepicker/params.datepicker.yaml +105 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
params:
|
|
2
|
+
- name: containerClasses
|
|
3
|
+
type: string
|
|
4
|
+
required: false
|
|
5
|
+
description: Classes for the container.
|
|
6
|
+
- name: containerAttributes
|
|
7
|
+
type: object
|
|
8
|
+
required: false
|
|
9
|
+
description: HTML attributes (for example data attributes) to add to the container element.
|
|
10
|
+
- name: standalone
|
|
11
|
+
type: boolean
|
|
12
|
+
required: false
|
|
13
|
+
description: If `true` the datepicker only shows the months and navigation without the input. Defaults to `false.
|
|
14
|
+
- name: id
|
|
15
|
+
type: string
|
|
16
|
+
required: true
|
|
17
|
+
description: The id of the input.
|
|
18
|
+
- name: name
|
|
19
|
+
type: string
|
|
20
|
+
required: true
|
|
21
|
+
description: The name of the input, which is submitted with the form data.
|
|
22
|
+
- name: type
|
|
23
|
+
type: string
|
|
24
|
+
required: false
|
|
25
|
+
description: Type of input control to render. Defaults to "text".
|
|
26
|
+
- name: inputmode
|
|
27
|
+
type: string
|
|
28
|
+
require: false
|
|
29
|
+
description: Optional value for [inputmode](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode).
|
|
30
|
+
- name: value
|
|
31
|
+
type: string
|
|
32
|
+
required: false
|
|
33
|
+
description: Optional initial value of the input.
|
|
34
|
+
- name: describedBy
|
|
35
|
+
type: string
|
|
36
|
+
required: false
|
|
37
|
+
description: One or more element IDs to add to the `aria-describedby` attribute, used to provide additional descriptive information for screenreader users.
|
|
38
|
+
- name: label
|
|
39
|
+
type: object
|
|
40
|
+
required: true
|
|
41
|
+
description: Options for the label component.
|
|
42
|
+
isComponent: true
|
|
43
|
+
- name: hint
|
|
44
|
+
type: object
|
|
45
|
+
required: false
|
|
46
|
+
description: Options for the hint component.
|
|
47
|
+
isComponent: true
|
|
48
|
+
- name: errorMessage
|
|
49
|
+
type: object
|
|
50
|
+
required: false
|
|
51
|
+
description: Options for the error message component. The error message component will not display if you use a falsy value for `errorMessage`, for example `false` or `null`.
|
|
52
|
+
isComponent: true
|
|
53
|
+
- name: errorId
|
|
54
|
+
type: string
|
|
55
|
+
required: false
|
|
56
|
+
description: Custom ID to add to the `aria-errormessage` attribute, used to provide additional descriptive information for screenreader users. Used in date-input component with errors.
|
|
57
|
+
- name: describedBy
|
|
58
|
+
type: string
|
|
59
|
+
required: false
|
|
60
|
+
description: One or more element IDs to add to the `aria-describedby` attribute, used to provide additional descriptive information for screenreader users.
|
|
61
|
+
- name: formGroup
|
|
62
|
+
type: object
|
|
63
|
+
required: false
|
|
64
|
+
description: Options for the form-group wrapper
|
|
65
|
+
params:
|
|
66
|
+
- name: classes
|
|
67
|
+
type: string
|
|
68
|
+
required: false
|
|
69
|
+
description: Classes to add to the form group (e.g. to show error state for the whole group)
|
|
70
|
+
- name: classes
|
|
71
|
+
type: string
|
|
72
|
+
required: false
|
|
73
|
+
description: Classes to add to the input.
|
|
74
|
+
- name: autocomplete
|
|
75
|
+
type: string
|
|
76
|
+
required: false
|
|
77
|
+
description: Attribute to [identify input purpose](https://www.w3.org/WAI/WCAG21/Understanding/identify-input-purpose.html), for instance "postal-code" or "username". See [autofill](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill) for full list of attributes that can be used.
|
|
78
|
+
- name: pattern
|
|
79
|
+
type: string
|
|
80
|
+
required: false
|
|
81
|
+
description: Attribute to [provide a regular expression pattern](https://www.w3.org/TR/html51/sec-forms.html#the-pattern-attribute), used to match allowed character combinations for the input value.
|
|
82
|
+
- name: placeholder
|
|
83
|
+
type: string
|
|
84
|
+
required: false
|
|
85
|
+
description: Placeholder text
|
|
86
|
+
- name: disabled
|
|
87
|
+
type: boolean
|
|
88
|
+
required: false
|
|
89
|
+
description: If true, input will be disabled.
|
|
90
|
+
- name: attributes
|
|
91
|
+
type: object
|
|
92
|
+
required: false
|
|
93
|
+
description: HTML attributes (for example data attributes) to add to the anchor tag.
|
|
94
|
+
- name: dropdown
|
|
95
|
+
type: component
|
|
96
|
+
required: false
|
|
97
|
+
description: dropdown component parameters. If there are any, the datepicker will show a dropdown after the input instead of the calendar icon.
|
|
98
|
+
- name: dropdownClasses
|
|
99
|
+
type: string
|
|
100
|
+
required: false
|
|
101
|
+
description: Classes to add to the dropdown.
|
|
102
|
+
- name: caller
|
|
103
|
+
type: nunjucks-block
|
|
104
|
+
required: false
|
|
105
|
+
description: Not strictly a parameter but [Nunjucks code convention](https://mozilla.github.io/nunjucks/templating.html#call). Using a `call` block enables you to call a macro with all the text inside the tag. This is helpful if you want to pass a lot of content into a macro. To use it, you will need to wrap the entire dropdown component in a `call` block.
|