@joralvmel/cosmos-core 0.3.0 → 0.4.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/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +11 -3
- package/dist/catalog.js.map +1 -1
- package/dist/codegen.d.ts +6 -0
- package/dist/codegen.d.ts.map +1 -1
- package/dist/codegen.js +207 -4
- package/dist/codegen.js.map +1 -1
- package/dist/headless/calendar.d.ts +32 -0
- package/dist/headless/calendar.d.ts.map +1 -0
- package/dist/headless/calendar.js +242 -0
- package/dist/headless/calendar.js.map +1 -0
- package/dist/headless/listbox.d.ts.map +1 -1
- package/dist/headless/listbox.js +2 -6
- package/dist/headless/listbox.js.map +1 -1
- package/dist/headless/pagination.d.ts +34 -0
- package/dist/headless/pagination.d.ts.map +1 -0
- package/dist/headless/pagination.js +92 -0
- package/dist/headless/pagination.js.map +1 -0
- package/dist/headless/radio-group.d.ts +10 -0
- package/dist/headless/radio-group.d.ts.map +1 -0
- package/dist/headless/radio-group.js +59 -0
- package/dist/headless/radio-group.js.map +1 -0
- package/dist/headless/select.d.ts +4 -0
- package/dist/headless/select.d.ts.map +1 -0
- package/dist/headless/select.js +7 -0
- package/dist/headless/select.js.map +1 -0
- package/dist/headless/size.d.ts +3 -0
- package/dist/headless/size.d.ts.map +1 -0
- package/dist/headless/size.js +7 -0
- package/dist/headless/size.js.map +1 -0
- package/dist/headless/text-field.d.ts +3 -3
- package/dist/headless/text-field.d.ts.map +1 -1
- package/dist/headless/text-field.js +2 -2
- package/dist/headless/text-field.js.map +1 -1
- package/dist/index.d.ts +1132 -77
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +42 -1
- package/dist/index.js.map +1 -1
- package/dist/specs/badge.d.ts +65 -0
- package/dist/specs/badge.d.ts.map +1 -0
- package/dist/specs/badge.js +64 -0
- package/dist/specs/badge.js.map +1 -0
- package/dist/specs/badge.scenarios.d.ts +21 -0
- package/dist/specs/badge.scenarios.d.ts.map +1 -0
- package/dist/specs/badge.scenarios.js +35 -0
- package/dist/specs/badge.scenarios.js.map +1 -0
- package/dist/specs/calendar.d.ts +120 -0
- package/dist/specs/calendar.d.ts.map +1 -0
- package/dist/specs/calendar.js +121 -0
- package/dist/specs/calendar.js.map +1 -0
- package/dist/specs/calendar.scenarios.d.ts +39 -0
- package/dist/specs/calendar.scenarios.d.ts.map +1 -0
- package/dist/specs/calendar.scenarios.js +139 -0
- package/dist/specs/calendar.scenarios.js.map +1 -0
- package/dist/specs/checkbox.d.ts +139 -0
- package/dist/specs/checkbox.d.ts.map +1 -0
- package/dist/specs/checkbox.js +129 -0
- package/dist/specs/checkbox.js.map +1 -0
- package/dist/specs/checkbox.scenarios.d.ts +28 -0
- package/dist/specs/checkbox.scenarios.d.ts.map +1 -0
- package/dist/specs/checkbox.scenarios.js +54 -0
- package/dist/specs/checkbox.scenarios.js.map +1 -0
- package/dist/specs/dialog.d.ts +167 -0
- package/dist/specs/dialog.d.ts.map +1 -0
- package/dist/specs/dialog.js +136 -0
- package/dist/specs/dialog.js.map +1 -0
- package/dist/specs/dialog.scenarios.d.ts +42 -0
- package/dist/specs/dialog.scenarios.d.ts.map +1 -0
- package/dist/specs/dialog.scenarios.js +129 -0
- package/dist/specs/dialog.scenarios.js.map +1 -0
- package/dist/specs/icon.d.ts +11 -20
- package/dist/specs/icon.d.ts.map +1 -1
- package/dist/specs/icon.js +11 -20
- package/dist/specs/icon.js.map +1 -1
- package/dist/specs/icon.scenarios.d.ts +9 -1
- package/dist/specs/icon.scenarios.d.ts.map +1 -1
- package/dist/specs/icon.scenarios.js +70 -6
- package/dist/specs/icon.scenarios.js.map +1 -1
- package/dist/specs/listbox.d.ts +3 -8
- package/dist/specs/listbox.d.ts.map +1 -1
- package/dist/specs/listbox.js +3 -3
- package/dist/specs/listbox.js.map +1 -1
- package/dist/specs/pagination.d.ts +147 -0
- package/dist/specs/pagination.d.ts.map +1 -0
- package/dist/specs/pagination.js +122 -0
- package/dist/specs/pagination.js.map +1 -0
- package/dist/specs/pagination.scenarios.d.ts +15 -0
- package/dist/specs/pagination.scenarios.d.ts.map +1 -0
- package/dist/specs/pagination.scenarios.js +29 -0
- package/dist/specs/pagination.scenarios.js.map +1 -0
- package/dist/specs/popover.d.ts +16 -28
- package/dist/specs/popover.d.ts.map +1 -1
- package/dist/specs/popover.js +16 -28
- package/dist/specs/popover.js.map +1 -1
- package/dist/specs/popover.scenarios.d.ts +10 -4
- package/dist/specs/popover.scenarios.d.ts.map +1 -1
- package/dist/specs/popover.scenarios.js +38 -38
- package/dist/specs/popover.scenarios.js.map +1 -1
- package/dist/specs/radio-group.d.ts +154 -0
- package/dist/specs/radio-group.d.ts.map +1 -0
- package/dist/specs/radio-group.js +133 -0
- package/dist/specs/radio-group.js.map +1 -0
- package/dist/specs/radio-group.scenarios.d.ts +35 -0
- package/dist/specs/radio-group.scenarios.d.ts.map +1 -0
- package/dist/specs/radio-group.scenarios.js +67 -0
- package/dist/specs/radio-group.scenarios.js.map +1 -0
- package/dist/specs/select.d.ts +167 -0
- package/dist/specs/select.d.ts.map +1 -0
- package/dist/specs/select.js +148 -0
- package/dist/specs/select.js.map +1 -0
- package/dist/specs/select.scenarios.d.ts +37 -0
- package/dist/specs/select.scenarios.d.ts.map +1 -0
- package/dist/specs/select.scenarios.js +77 -0
- package/dist/specs/select.scenarios.js.map +1 -0
- package/dist/specs/switch.d.ts +123 -0
- package/dist/specs/switch.d.ts.map +1 -0
- package/dist/specs/switch.js +113 -0
- package/dist/specs/switch.js.map +1 -0
- package/dist/specs/switch.scenarios.d.ts +27 -0
- package/dist/specs/switch.scenarios.d.ts.map +1 -0
- package/dist/specs/switch.scenarios.js +54 -0
- package/dist/specs/switch.scenarios.js.map +1 -0
- package/dist/specs/text-field.d.ts +8 -22
- package/dist/specs/text-field.d.ts.map +1 -1
- package/dist/specs/text-field.js +8 -17
- package/dist/specs/text-field.js.map +1 -1
- package/dist/specs/text-field.scenarios.d.ts +3 -0
- package/dist/specs/text-field.scenarios.d.ts.map +1 -1
- package/dist/specs/text-field.scenarios.js +18 -0
- package/dist/specs/text-field.scenarios.js.map +1 -1
- package/dist/specs/textarea.d.ts +144 -0
- package/dist/specs/textarea.d.ts.map +1 -0
- package/dist/specs/textarea.js +134 -0
- package/dist/specs/textarea.js.map +1 -0
- package/dist/specs/textarea.scenarios.d.ts +33 -0
- package/dist/specs/textarea.scenarios.d.ts.map +1 -0
- package/dist/specs/textarea.scenarios.js +82 -0
- package/dist/specs/textarea.scenarios.js.map +1 -0
- package/llms.md +550 -21
- package/package.json +1 -1
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAeA,OAAO,EACL,UAAU,EACV,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,OAAO,EACP,YAAY,GACb,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,KAAK,UAAU,EACf,WAAW,EACX,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,wBAAwB,EACxB,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,UAAU,EACV,yBAAyB,EACzB,uBAAuB,EACvB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,WAAW,GACZ,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,QAAQ,EACR,cAAc,EACd,KAAK,SAAS,EACd,UAAU,EACV,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,SAAS,EACT,SAAS,EACT,KAAK,SAAS,EACd,QAAQ,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,eAAe,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,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,iBAAiB,GAClB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,+BAA+B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,13 +1,27 @@
|
|
|
1
|
+
import { badgeContract } from './specs/badge.js';
|
|
2
|
+
import { calendarContract } from './specs/calendar.js';
|
|
3
|
+
import { checkboxContract } from './specs/checkbox.js';
|
|
4
|
+
import { dialogContract } from './specs/dialog.js';
|
|
1
5
|
import { iconContract } from './specs/icon.js';
|
|
2
6
|
import { iconButtonContract } from './specs/icon-button.js';
|
|
3
7
|
import { listboxContract } from './specs/listbox.js';
|
|
8
|
+
import { paginationContract } from './specs/pagination.js';
|
|
4
9
|
import { popoverContract } from './specs/popover.js';
|
|
10
|
+
import { radioGroupContract } from './specs/radio-group.js';
|
|
11
|
+
import { selectContract } from './specs/select.js';
|
|
12
|
+
import { switchContract } from './specs/switch.js';
|
|
5
13
|
import { textFieldContract } from './specs/text-field.js';
|
|
14
|
+
import { textareaContract } from './specs/textarea.js';
|
|
6
15
|
export { buildOrder, catalog, catalogEntry, } from './catalog.js';
|
|
7
|
-
export { activeProps, generateComposedSnippets, generateSnippets, listboxItemExamples, listboxValueExamples, pascalCase, snippetTargets, supportsTarget, toAttribute, } from './codegen.js';
|
|
16
|
+
export { activeProps, generateComposedSnippets, generateSnippets, listboxItemExamples, listboxValueExamples, pascalCase, radioGroupOptionsExamples, radioGroupValueExamples, selectItemExamples, selectValueExamples, snippetTargets, supportsTarget, toAttribute, } from './codegen.js';
|
|
8
17
|
export { defaults, defineContract, eventNames, platforms, propNames, supports, } from './contract.js';
|
|
18
|
+
export { addCalendarDays, addCalendarMonths, canNavigateCalendarMonth, compareCalendarDates, formatCalendarDate, formatCalendarMonth, getCalendarLocaleInfo, getCalendarMonth, getCalendarMonthDates, getCalendarToday, getCalendarTodayLabel, getCalendarWeekdayNames, isCalendarDateSelectable, parseCalendarDate, tryAddCalendarDays, tryAddCalendarMonths, validateCalendarBounds, } from './headless/calendar.js';
|
|
9
19
|
export { findListboxMatch, getListboxInitialActive, getListboxOptions, getListboxSelection, moveListboxActive, validateListboxSize, validateListboxValues, } from './headless/listbox.js';
|
|
20
|
+
export { effectivePaginationPage, getPaginationView, paginationItems, validatePaginationNumber, } from './headless/pagination.js';
|
|
10
21
|
export { getPressableState, } from './headless/pressable.js';
|
|
22
|
+
export { getRadioGroupInitialActive, moveRadioGroupActive, validateRadioGroupOptions, validateRadioGroupValue, } from './headless/radio-group.js';
|
|
23
|
+
export { validateSelectValue } from './headless/select.js';
|
|
24
|
+
export { validateSize } from './headless/size.js';
|
|
11
25
|
export { getTextFieldState, } from './headless/text-field.js';
|
|
12
26
|
export { componentReference, contractMarkdown, eventsMarkdown, propsMarkdown, propType, snippetsMarkdown, snippetTitles, } from './markdown.js';
|
|
13
27
|
export { aiRules, DOCS_URL, isStack, setupGuide, setupMarkdown, stacks, } from './setup.js';
|
|
@@ -22,15 +36,42 @@ export const contracts = {
|
|
|
22
36
|
'icon-button': iconButtonContract,
|
|
23
37
|
popover: popoverContract,
|
|
24
38
|
listbox: listboxContract,
|
|
39
|
+
checkbox: checkboxContract,
|
|
40
|
+
switch: switchContract,
|
|
41
|
+
badge: badgeContract,
|
|
42
|
+
calendar: calendarContract,
|
|
43
|
+
textarea: textareaContract,
|
|
44
|
+
'radio-group': radioGroupContract,
|
|
45
|
+
select: selectContract,
|
|
46
|
+
pagination: paginationContract,
|
|
47
|
+
dialog: dialogContract,
|
|
25
48
|
};
|
|
49
|
+
export { badgeContract } from './specs/badge.js';
|
|
50
|
+
export { badgeScenarios, badgeScenariosFor, } from './specs/badge.scenarios.js';
|
|
51
|
+
export { calendarContract } from './specs/calendar.js';
|
|
52
|
+
export { calendarScenarios, calendarScenariosFor, } from './specs/calendar.scenarios.js';
|
|
53
|
+
export { checkboxContract, } from './specs/checkbox.js';
|
|
54
|
+
export { checkboxScenarios, checkboxScenariosFor, } from './specs/checkbox.scenarios.js';
|
|
55
|
+
export { dialogContract, } from './specs/dialog.js';
|
|
56
|
+
export { dialogLayoutScenarios, dialogScenarios, dialogScenariosFor, } from './specs/dialog.scenarios.js';
|
|
26
57
|
export { iconContract } from './specs/icon.js';
|
|
27
58
|
export { iconScenarios, iconScenariosFor, } from './specs/icon.scenarios.js';
|
|
28
59
|
export { iconButtonContract, } from './specs/icon-button.js';
|
|
29
60
|
export { iconButtonScenarios, iconButtonScenariosFor, } from './specs/icon-button.scenarios.js';
|
|
30
61
|
export { listboxContract, } from './specs/listbox.js';
|
|
31
62
|
export { listboxScenarioItems, listboxScenarios, listboxScenariosFor, } from './specs/listbox.scenarios.js';
|
|
63
|
+
export { paginationContract } from './specs/pagination.js';
|
|
64
|
+
export { paginationScenarios, paginationScenariosFor, } from './specs/pagination.scenarios.js';
|
|
32
65
|
export { popoverContract, } from './specs/popover.js';
|
|
33
66
|
export { popoverScenarios, popoverScenariosFor, } from './specs/popover.scenarios.js';
|
|
67
|
+
export { radioGroupContract, } from './specs/radio-group.js';
|
|
68
|
+
export { radioGroupScenarioOptions, radioGroupScenarios, radioGroupScenariosFor, } from './specs/radio-group.scenarios.js';
|
|
69
|
+
export { selectContract, } from './specs/select.js';
|
|
70
|
+
export { selectScenarioItems, selectScenarios, selectScenariosFor, } from './specs/select.scenarios.js';
|
|
71
|
+
export { switchContract, } from './specs/switch.js';
|
|
72
|
+
export { switchScenarios, switchScenariosFor, } from './specs/switch.scenarios.js';
|
|
34
73
|
export { textFieldContract, } from './specs/text-field.js';
|
|
35
74
|
export { textFieldScenarios, textFieldScenariosFor, } from './specs/text-field.scenarios.js';
|
|
75
|
+
export { textareaContract } from './specs/textarea.js';
|
|
76
|
+
export { textareaScenarios, textareaScenariosFor, } from './specs/textarea.scenarios.js';
|
|
36
77
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,iB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qB,GACtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAA6B,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAGL,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static status or category label. Counts are ordinary caller-formatted text.
|
|
3
|
+
*/
|
|
4
|
+
export declare const badgeContract: {
|
|
5
|
+
readonly name: "badge";
|
|
6
|
+
readonly tag: "cosm-badge";
|
|
7
|
+
readonly description: "Displays a noninteractive status or category label, or caller-formatted count, with an optional decorative leading icon.";
|
|
8
|
+
readonly role: "";
|
|
9
|
+
readonly pattern: "https://html.spec.whatwg.org/multipage/text-level-semantics.html";
|
|
10
|
+
readonly props: {
|
|
11
|
+
readonly variant: {
|
|
12
|
+
readonly type: "enum";
|
|
13
|
+
readonly values: readonly ["soft", "solid", "outline"];
|
|
14
|
+
readonly default: "soft";
|
|
15
|
+
readonly reflect: true;
|
|
16
|
+
readonly description: "Visual treatment of the static label.";
|
|
17
|
+
};
|
|
18
|
+
readonly tone: {
|
|
19
|
+
readonly type: "enum";
|
|
20
|
+
readonly values: readonly ["neutral", "info", "success", "warning", "danger"];
|
|
21
|
+
readonly default: "neutral";
|
|
22
|
+
readonly reflect: true;
|
|
23
|
+
readonly description: "Semantic color intent of the static label.";
|
|
24
|
+
};
|
|
25
|
+
readonly size: {
|
|
26
|
+
readonly type: "enum";
|
|
27
|
+
readonly values: readonly ["sm", "md", "lg"];
|
|
28
|
+
readonly default: "md";
|
|
29
|
+
readonly reflect: true;
|
|
30
|
+
readonly description: "Semantic label size.";
|
|
31
|
+
};
|
|
32
|
+
readonly startIcon: {
|
|
33
|
+
readonly type: "reference";
|
|
34
|
+
readonly reference: "IconDefinition";
|
|
35
|
+
readonly options: readonly ["search", "house", "heart", "star"];
|
|
36
|
+
readonly example: "heart";
|
|
37
|
+
readonly description: "Optional structured decorative icon before the label.";
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
readonly events: {};
|
|
41
|
+
readonly states: readonly [];
|
|
42
|
+
readonly slots: {
|
|
43
|
+
readonly '': "Label or caller-formatted count text.";
|
|
44
|
+
};
|
|
45
|
+
readonly parts: {
|
|
46
|
+
readonly base: "Rounded label container.";
|
|
47
|
+
readonly label: "Label or caller-formatted count text.";
|
|
48
|
+
readonly icon: "Optional decorative leading icon wrapper.";
|
|
49
|
+
};
|
|
50
|
+
readonly cssProperties: {
|
|
51
|
+
readonly '--cosm-badge-background': "Badge background color.";
|
|
52
|
+
readonly '--cosm-badge-color': "Badge text and icon color.";
|
|
53
|
+
readonly '--cosm-badge-border': "Badge border color.";
|
|
54
|
+
readonly '--cosm-badge-padding-inline': "Badge inline padding.";
|
|
55
|
+
readonly '--cosm-badge-padding-block': "Badge block padding.";
|
|
56
|
+
readonly '--cosm-badge-gap': "Space between the icon and label.";
|
|
57
|
+
readonly '--cosm-badge-font-family': "Badge label font family.";
|
|
58
|
+
readonly '--cosm-badge-font-size': "Badge label font size.";
|
|
59
|
+
readonly '--cosm-badge-font-weight': "Badge label font weight.";
|
|
60
|
+
readonly '--cosm-badge-line-height': "Badge label line height.";
|
|
61
|
+
readonly '--cosm-badge-radius': "Badge corner radius.";
|
|
62
|
+
};
|
|
63
|
+
readonly keyboard: readonly [];
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../src/specs/badge.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2DxB,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { defineContract } from '../contract.js';
|
|
2
|
+
/**
|
|
3
|
+
* Static status or category label. Counts are ordinary caller-formatted text.
|
|
4
|
+
*/
|
|
5
|
+
export const badgeContract = defineContract({
|
|
6
|
+
name: 'badge',
|
|
7
|
+
tag: 'cosm-badge',
|
|
8
|
+
description: 'Displays a noninteractive status or category label, or caller-formatted count, with an optional decorative leading icon.',
|
|
9
|
+
role: '',
|
|
10
|
+
pattern: 'https://html.spec.whatwg.org/multipage/text-level-semantics.html',
|
|
11
|
+
props: {
|
|
12
|
+
variant: {
|
|
13
|
+
type: 'enum',
|
|
14
|
+
values: ['soft', 'solid', 'outline'],
|
|
15
|
+
default: 'soft',
|
|
16
|
+
reflect: true,
|
|
17
|
+
description: 'Visual treatment of the static label.',
|
|
18
|
+
},
|
|
19
|
+
tone: {
|
|
20
|
+
type: 'enum',
|
|
21
|
+
values: ['neutral', 'info', 'success', 'warning', 'danger'],
|
|
22
|
+
default: 'neutral',
|
|
23
|
+
reflect: true,
|
|
24
|
+
description: 'Semantic color intent of the static label.',
|
|
25
|
+
},
|
|
26
|
+
size: {
|
|
27
|
+
type: 'enum',
|
|
28
|
+
values: ['sm', 'md', 'lg'],
|
|
29
|
+
default: 'md',
|
|
30
|
+
reflect: true,
|
|
31
|
+
description: 'Semantic label size.',
|
|
32
|
+
},
|
|
33
|
+
startIcon: {
|
|
34
|
+
type: 'reference',
|
|
35
|
+
reference: 'IconDefinition',
|
|
36
|
+
options: ['search', 'house', 'heart', 'star'],
|
|
37
|
+
example: 'heart',
|
|
38
|
+
description: 'Optional structured decorative icon before the label.',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
events: {},
|
|
42
|
+
states: [],
|
|
43
|
+
slots: { '': 'Label or caller-formatted count text.' },
|
|
44
|
+
parts: {
|
|
45
|
+
base: 'Rounded label container.',
|
|
46
|
+
label: 'Label or caller-formatted count text.',
|
|
47
|
+
icon: 'Optional decorative leading icon wrapper.',
|
|
48
|
+
},
|
|
49
|
+
cssProperties: {
|
|
50
|
+
'--cosm-badge-background': 'Badge background color.',
|
|
51
|
+
'--cosm-badge-color': 'Badge text and icon color.',
|
|
52
|
+
'--cosm-badge-border': 'Badge border color.',
|
|
53
|
+
'--cosm-badge-padding-inline': 'Badge inline padding.',
|
|
54
|
+
'--cosm-badge-padding-block': 'Badge block padding.',
|
|
55
|
+
'--cosm-badge-gap': 'Space between the icon and label.',
|
|
56
|
+
'--cosm-badge-font-family': 'Badge label font family.',
|
|
57
|
+
'--cosm-badge-font-size': 'Badge label font size.',
|
|
58
|
+
'--cosm-badge-font-weight': 'Badge label font weight.',
|
|
59
|
+
'--cosm-badge-line-height': 'Badge label line height.',
|
|
60
|
+
'--cosm-badge-radius': 'Badge corner radius.',
|
|
61
|
+
},
|
|
62
|
+
keyboard: [],
|
|
63
|
+
});
|
|
64
|
+
//# sourceMappingURL=badge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.js","sourceRoot":"","sources":["../../src/specs/badge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,cAAc,CAAC;IAC1C,IAAI,EAAE,OAAO;IACb,GAAG,EAAE,YAAY;IACjB,WAAW,EACT,0HAA0H;IAC5H,IAAI,EAAE,EAAE;IACR,OAAO,EAAE,kEAAkE;IAC3E,KAAK,EAAE;QACL,OAAO,EAAE;YACP,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC;YACpC,OAAO,EAAE,MAAM;YACf,OAAO,EAAE,IAAI;YACb,WAAW,EAAE,uCAAuC;SACrD;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,CAAC;YAC3D,OAAO,EAAE,SAAS;YAClB,OAAO,EAAE,IAAI;YACb,WAAW,EAAE,4CAA4C;SAC1D;QACD,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;YAC1B,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,IAAI;YACb,WAAW,EAAE,sBAAsB;SACpC;QACD,SAAS,EAAE;YACT,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,gBAAgB;YAC3B,OAAO,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC;YAC7C,OAAO,EAAE,OAAO;YAChB,WAAW,EAAE,uDAAuD;SACrE;KACF;IACD,MAAM,EAAE,EAAE;IACV,MAAM,EAAE,EAAE;IACV,KAAK,EAAE,EAAE,EAAE,EAAE,uCAAuC,EAAE;IACtD,KAAK,EAAE;QACL,IAAI,EAAE,0BAA0B;QAChC,KAAK,EAAE,uCAAuC;QAC9C,IAAI,EAAE,2CAA2C;KAClD;IACD,aAAa,EAAE;QACb,yBAAyB,EAAE,yBAAyB;QACpD,oBAAoB,EAAE,4BAA4B;QAClD,qBAAqB,EAAE,qBAAqB;QAC5C,6BAA6B,EAAE,uBAAuB;QACtD,4BAA4B,EAAE,sBAAsB;QACpD,kBAAkB,EAAE,mCAAmC;QACvD,0BAA0B,EAAE,0BAA0B;QACtD,wBAAwB,EAAE,wBAAwB;QAClD,0BAA0B,EAAE,0BAA0B;QACtD,0BAA0B,EAAE,0BAA0B;QACtD,qBAAqB,EAAE,sBAAsB;KAC9C;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Platform } from '../contract.js';
|
|
2
|
+
export interface BadgeScenario {
|
|
3
|
+
name: string;
|
|
4
|
+
text: string;
|
|
5
|
+
props: {
|
|
6
|
+
variant?: 'soft' | 'solid' | 'outline';
|
|
7
|
+
tone?: 'neutral' | 'info' | 'success' | 'warning' | 'danger';
|
|
8
|
+
size?: 'sm' | 'md' | 'lg';
|
|
9
|
+
};
|
|
10
|
+
expected: {
|
|
11
|
+
variant: 'soft' | 'solid' | 'outline';
|
|
12
|
+
tone: 'neutral' | 'info' | 'success' | 'warning' | 'danger';
|
|
13
|
+
size: 'sm' | 'md' | 'lg';
|
|
14
|
+
text: string;
|
|
15
|
+
};
|
|
16
|
+
platforms?: readonly Platform[];
|
|
17
|
+
}
|
|
18
|
+
/** Shared static rendering scenarios for the web, React, Angular and native implementations. */
|
|
19
|
+
export declare const badgeScenarios: readonly BadgeScenario[];
|
|
20
|
+
export declare const badgeScenariosFor: (platform: Platform) => BadgeScenario[];
|
|
21
|
+
//# sourceMappingURL=badge.scenarios.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.scenarios.d.ts","sourceRoot":"","sources":["../../src/specs/badge.scenarios.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE;QACL,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;QACvC,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;QAC7D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;KAC3B,CAAC;IACF,QAAQ,EAAE;QACR,OAAO,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;QACtC,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;QAC5D,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;QACzB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,SAAS,CAAC,EAAE,SAAS,QAAQ,EAAE,CAAC;CACjC;AAED,gGAAgG;AAChG,eAAO,MAAM,cAAc,EAAE,SAAS,aAAa,EA+BlD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,UAAU,QAAQ,oBAC6C,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** Shared static rendering scenarios for the web, React, Angular and native implementations. */
|
|
2
|
+
export const badgeScenarios = [
|
|
3
|
+
{
|
|
4
|
+
name: 'renders its caller-provided label with default appearance',
|
|
5
|
+
text: 'Ready',
|
|
6
|
+
props: {},
|
|
7
|
+
expected: { variant: 'soft', tone: 'neutral', size: 'md', text: 'Ready' },
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
name: 'supports an intent tone and solid treatment',
|
|
11
|
+
text: 'Warning',
|
|
12
|
+
props: { variant: 'solid', tone: 'warning' },
|
|
13
|
+
expected: { variant: 'solid', tone: 'warning', size: 'md', text: 'Warning' },
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'supports outline treatment and a compact size',
|
|
17
|
+
text: 'Draft',
|
|
18
|
+
props: { variant: 'outline', tone: 'info', size: 'sm' },
|
|
19
|
+
expected: { variant: 'outline', tone: 'info', size: 'sm', text: 'Draft' },
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'renders zero as ordinary caller-formatted text',
|
|
23
|
+
text: '0',
|
|
24
|
+
props: { tone: 'success', size: 'lg' },
|
|
25
|
+
expected: { variant: 'soft', tone: 'success', size: 'lg', text: '0' },
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'supports the danger tone with the default soft treatment',
|
|
29
|
+
text: 'Blocked',
|
|
30
|
+
props: { tone: 'danger' },
|
|
31
|
+
expected: { variant: 'soft', tone: 'danger', size: 'md', text: 'Blocked' },
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
export const badgeScenariosFor = (platform) => badgeScenarios.filter(scenario => !scenario.platforms || scenario.platforms.includes(platform));
|
|
35
|
+
//# sourceMappingURL=badge.scenarios.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"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,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE;KAC3E;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,QAAkB,EAAE,EAAE,CACtD,cAAc,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,SAAS,IAAI,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/** Proposed calendar selection. */
|
|
2
|
+
export interface CalendarChangeDetail {
|
|
3
|
+
value: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* An inline Gregorian calendar with controlled or autonomous single-date selection.
|
|
7
|
+
*
|
|
8
|
+
* | State | Autonomous | Controlled | Event |
|
|
9
|
+
* | --- | --- | --- | --- |
|
|
10
|
+
* | value | Starts at defaultValue and commits enabled date selection | A supplied value waits for the owner | change |
|
|
11
|
+
*/
|
|
12
|
+
export declare const calendarContract: {
|
|
13
|
+
readonly name: "calendar";
|
|
14
|
+
readonly tag: "cosm-calendar";
|
|
15
|
+
readonly description: "Selects one Gregorian date from an inline, localized calendar with keyboard navigation and optional bounds. Month and year can be selected directly.";
|
|
16
|
+
readonly role: "grid";
|
|
17
|
+
readonly pattern: "https://www.w3.org/WAI/ARIA/apg/patterns/grid/";
|
|
18
|
+
readonly props: {
|
|
19
|
+
readonly value: {
|
|
20
|
+
readonly type: "string";
|
|
21
|
+
readonly description: "Controlled selected date in YYYY-MM-DD format; when supplied, selection proposals wait for the owner to update this value.";
|
|
22
|
+
};
|
|
23
|
+
readonly defaultValue: {
|
|
24
|
+
readonly type: "string";
|
|
25
|
+
readonly description: "Initial autonomous selected date in YYYY-MM-DD format; later changes do not reset selection.";
|
|
26
|
+
};
|
|
27
|
+
readonly min: {
|
|
28
|
+
readonly type: "string";
|
|
29
|
+
readonly description: "Earliest selectable date in YYYY-MM-DD format, inclusive.";
|
|
30
|
+
};
|
|
31
|
+
readonly max: {
|
|
32
|
+
readonly type: "string";
|
|
33
|
+
readonly description: "Latest selectable date in YYYY-MM-DD format, inclusive.";
|
|
34
|
+
};
|
|
35
|
+
readonly locale: {
|
|
36
|
+
readonly type: "string";
|
|
37
|
+
readonly description: "BCP 47 locale for month and weekday names, week start, and text direction; defaults to the environment locale. Invalid locale identifiers are rejected.";
|
|
38
|
+
};
|
|
39
|
+
readonly disabled: {
|
|
40
|
+
readonly type: "boolean";
|
|
41
|
+
readonly default: false;
|
|
42
|
+
readonly reflect: true;
|
|
43
|
+
readonly description: "Disables date selection and calendar navigation.";
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
readonly events: {
|
|
47
|
+
readonly change: {
|
|
48
|
+
readonly description: "Proposes an enabled selected date as a YYYY-MM-DD value; autonomous selection commits and controlled selection waits for the owner.";
|
|
49
|
+
readonly detail: "CalendarChangeDetail";
|
|
50
|
+
readonly names: {
|
|
51
|
+
readonly dom: "cosm-change";
|
|
52
|
+
readonly react: "onChange";
|
|
53
|
+
readonly angular: "valueChange";
|
|
54
|
+
readonly native: "onValueChange";
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
readonly states: readonly [{
|
|
59
|
+
readonly prop: "value";
|
|
60
|
+
readonly event: "change";
|
|
61
|
+
readonly defaultProp: "defaultValue";
|
|
62
|
+
}];
|
|
63
|
+
readonly slots: {};
|
|
64
|
+
readonly parts: {
|
|
65
|
+
readonly base: "Calendar root.";
|
|
66
|
+
readonly header: "Month heading and navigation controls.";
|
|
67
|
+
readonly previous: "Previous-month navigation button.";
|
|
68
|
+
readonly heading: "Localized month and year heading.";
|
|
69
|
+
readonly next: "Next-month navigation button.";
|
|
70
|
+
readonly weekday: "Localized weekday heading.";
|
|
71
|
+
readonly grid: "Seven-column date grid.";
|
|
72
|
+
readonly day: "Date button, including adjacent-month dates.";
|
|
73
|
+
readonly 'month-trigger': "Button that opens direct month selection.";
|
|
74
|
+
readonly 'year-trigger': "Button that opens direct year selection.";
|
|
75
|
+
readonly 'month-option': "Month choice in the month selection view.";
|
|
76
|
+
readonly 'year-option': "Year choice in the year selection view.";
|
|
77
|
+
};
|
|
78
|
+
readonly cssProperties: {
|
|
79
|
+
readonly '--cosm-calendar-background': "Calendar surface background.";
|
|
80
|
+
readonly '--cosm-calendar-color': "Primary calendar text color.";
|
|
81
|
+
readonly '--cosm-calendar-muted-color': "Adjacent-month and weekday text color.";
|
|
82
|
+
readonly '--cosm-calendar-selected-background': "Selected-date background.";
|
|
83
|
+
readonly '--cosm-calendar-selected-color': "Selected-date text color.";
|
|
84
|
+
readonly '--cosm-calendar-day-size': "Minimum date target dimensions.";
|
|
85
|
+
readonly '--cosm-calendar-gap': "Space between date targets.";
|
|
86
|
+
readonly '--cosm-calendar-radius': "Date target corner radius.";
|
|
87
|
+
readonly '--cosm-calendar-focus': "Visible keyboard focus indicator color.";
|
|
88
|
+
readonly '--cosm-calendar-today-border': "Non-color-only today marker.";
|
|
89
|
+
};
|
|
90
|
+
readonly keyboard: readonly [{
|
|
91
|
+
readonly keys: readonly ["Tab", "Shift+Tab"];
|
|
92
|
+
readonly action: "Moves between the navigation controls and one active date.";
|
|
93
|
+
readonly platforms: readonly ["web", "react", "angular"];
|
|
94
|
+
}, {
|
|
95
|
+
readonly keys: readonly ["ArrowLeft", "ArrowRight"];
|
|
96
|
+
readonly action: "Moves the active date by one day; direction follows the visual RTL/LTR order.";
|
|
97
|
+
readonly platforms: readonly ["web", "react", "angular"];
|
|
98
|
+
}, {
|
|
99
|
+
readonly keys: readonly ["ArrowUp", "ArrowDown"];
|
|
100
|
+
readonly action: "Moves the active date by one week.";
|
|
101
|
+
readonly platforms: readonly ["web", "react", "angular"];
|
|
102
|
+
}, {
|
|
103
|
+
readonly keys: readonly ["Home", "End"];
|
|
104
|
+
readonly action: "Moves to the first or last day of the localized week.";
|
|
105
|
+
readonly platforms: readonly ["web", "react", "angular"];
|
|
106
|
+
}, {
|
|
107
|
+
readonly keys: readonly ["PageUp", "PageDown"];
|
|
108
|
+
readonly action: "Moves the active date by one month.";
|
|
109
|
+
readonly platforms: readonly ["web", "react", "angular"];
|
|
110
|
+
}, {
|
|
111
|
+
readonly keys: readonly ["Shift+PageUp", "Shift+PageDown"];
|
|
112
|
+
readonly action: "Moves the active date by one year.";
|
|
113
|
+
readonly platforms: readonly ["web", "react", "angular"];
|
|
114
|
+
}, {
|
|
115
|
+
readonly keys: readonly ["Enter", "Space"];
|
|
116
|
+
readonly action: "Proposes selection of the active enabled date.";
|
|
117
|
+
readonly platforms: readonly ["web", "react", "angular"];
|
|
118
|
+
}];
|
|
119
|
+
};
|
|
120
|
+
//# sourceMappingURL=calendar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../src/specs/calendar.ts"],"names":[],"mappings":"AAEA,mCAAmC;AACnC,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoH3B,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { defineContract } from '../contract.js';
|
|
2
|
+
/**
|
|
3
|
+
* An inline Gregorian calendar with controlled or autonomous single-date selection.
|
|
4
|
+
*
|
|
5
|
+
* | State | Autonomous | Controlled | Event |
|
|
6
|
+
* | --- | --- | --- | --- |
|
|
7
|
+
* | value | Starts at defaultValue and commits enabled date selection | A supplied value waits for the owner | change |
|
|
8
|
+
*/
|
|
9
|
+
export const calendarContract = defineContract({
|
|
10
|
+
name: 'calendar',
|
|
11
|
+
tag: 'cosm-calendar',
|
|
12
|
+
description: 'Selects one Gregorian date from an inline, localized calendar with keyboard navigation and optional bounds. Month and year can be selected directly.',
|
|
13
|
+
role: 'grid',
|
|
14
|
+
pattern: 'https://www.w3.org/WAI/ARIA/apg/patterns/grid/',
|
|
15
|
+
props: {
|
|
16
|
+
value: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: 'Controlled selected date in YYYY-MM-DD format; when supplied, selection proposals wait for the owner to update this value.',
|
|
19
|
+
},
|
|
20
|
+
defaultValue: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'Initial autonomous selected date in YYYY-MM-DD format; later changes do not reset selection.',
|
|
23
|
+
},
|
|
24
|
+
min: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'Earliest selectable date in YYYY-MM-DD format, inclusive.',
|
|
27
|
+
},
|
|
28
|
+
max: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
description: 'Latest selectable date in YYYY-MM-DD format, inclusive.',
|
|
31
|
+
},
|
|
32
|
+
locale: {
|
|
33
|
+
type: 'string',
|
|
34
|
+
description: 'BCP 47 locale for month and weekday names, week start, and text direction; defaults to the environment locale. Invalid locale identifiers are rejected.',
|
|
35
|
+
},
|
|
36
|
+
disabled: {
|
|
37
|
+
type: 'boolean',
|
|
38
|
+
default: false,
|
|
39
|
+
reflect: true,
|
|
40
|
+
description: 'Disables date selection and calendar navigation.',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
events: {
|
|
44
|
+
change: {
|
|
45
|
+
description: 'Proposes an enabled selected date as a YYYY-MM-DD value; autonomous selection commits and controlled selection waits for the owner.',
|
|
46
|
+
detail: 'CalendarChangeDetail',
|
|
47
|
+
names: {
|
|
48
|
+
dom: 'cosm-change',
|
|
49
|
+
react: 'onChange',
|
|
50
|
+
angular: 'valueChange',
|
|
51
|
+
native: 'onValueChange',
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
states: [{ prop: 'value', event: 'change', defaultProp: 'defaultValue' }],
|
|
56
|
+
slots: {},
|
|
57
|
+
parts: {
|
|
58
|
+
base: 'Calendar root.',
|
|
59
|
+
header: 'Month heading and navigation controls.',
|
|
60
|
+
previous: 'Previous-month navigation button.',
|
|
61
|
+
heading: 'Localized month and year heading.',
|
|
62
|
+
next: 'Next-month navigation button.',
|
|
63
|
+
weekday: 'Localized weekday heading.',
|
|
64
|
+
grid: 'Seven-column date grid.',
|
|
65
|
+
day: 'Date button, including adjacent-month dates.',
|
|
66
|
+
'month-trigger': 'Button that opens direct month selection.',
|
|
67
|
+
'year-trigger': 'Button that opens direct year selection.',
|
|
68
|
+
'month-option': 'Month choice in the month selection view.',
|
|
69
|
+
'year-option': 'Year choice in the year selection view.',
|
|
70
|
+
},
|
|
71
|
+
cssProperties: {
|
|
72
|
+
'--cosm-calendar-background': 'Calendar surface background.',
|
|
73
|
+
'--cosm-calendar-color': 'Primary calendar text color.',
|
|
74
|
+
'--cosm-calendar-muted-color': 'Adjacent-month and weekday text color.',
|
|
75
|
+
'--cosm-calendar-selected-background': 'Selected-date background.',
|
|
76
|
+
'--cosm-calendar-selected-color': 'Selected-date text color.',
|
|
77
|
+
'--cosm-calendar-day-size': 'Minimum date target dimensions.',
|
|
78
|
+
'--cosm-calendar-gap': 'Space between date targets.',
|
|
79
|
+
'--cosm-calendar-radius': 'Date target corner radius.',
|
|
80
|
+
'--cosm-calendar-focus': 'Visible keyboard focus indicator color.',
|
|
81
|
+
'--cosm-calendar-today-border': 'Non-color-only today marker.',
|
|
82
|
+
},
|
|
83
|
+
keyboard: [
|
|
84
|
+
{
|
|
85
|
+
keys: ['Tab', 'Shift+Tab'],
|
|
86
|
+
action: 'Moves between the navigation controls and one active date.',
|
|
87
|
+
platforms: ['web', 'react', 'angular'],
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
keys: ['ArrowLeft', 'ArrowRight'],
|
|
91
|
+
action: 'Moves the active date by one day; direction follows the visual RTL/LTR order.',
|
|
92
|
+
platforms: ['web', 'react', 'angular'],
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
keys: ['ArrowUp', 'ArrowDown'],
|
|
96
|
+
action: 'Moves the active date by one week.',
|
|
97
|
+
platforms: ['web', 'react', 'angular'],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
keys: ['Home', 'End'],
|
|
101
|
+
action: 'Moves to the first or last day of the localized week.',
|
|
102
|
+
platforms: ['web', 'react', 'angular'],
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
keys: ['PageUp', 'PageDown'],
|
|
106
|
+
action: 'Moves the active date by one month.',
|
|
107
|
+
platforms: ['web', 'react', 'angular'],
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
keys: ['Shift+PageUp', 'Shift+PageDown'],
|
|
111
|
+
action: 'Moves the active date by one year.',
|
|
112
|
+
platforms: ['web', 'react', 'angular'],
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
keys: ['Enter', 'Space'],
|
|
116
|
+
action: 'Proposes selection of the active enabled date.',
|
|
117
|
+
platforms: ['web', 'react', 'angular'],
|
|
118
|
+
},
|
|
119
|
+
],
|
|
120
|
+
});
|
|
121
|
+
//# sourceMappingURL=calendar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar.js","sourceRoot":"","sources":["../../src/specs/calendar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAOhD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,cAAc,CAAC;IAC7C,IAAI,EAAE,UAAU;IAChB,GAAG,EAAE,eAAe;IACpB,WAAW,EACT,sJAAsJ;IACxJ,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,gDAAgD;IACzD,KAAK,EAAE;QACL,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,WAAW,EACT,4HAA4H;SAC/H;QACD,YAAY,EAAE;YACZ,IAAI,EA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
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Platform } from '../contract.js';
|
|
2
|
+
export type CalendarKey = 'ArrowLeft' | 'ArrowRight' | 'ArrowUp' | 'ArrowDown' | 'Home' | 'End' | 'PageUp' | 'PageDown' | 'Shift+PageUp' | 'Shift+PageDown' | 'Enter' | ' ';
|
|
3
|
+
export type CalendarAction = {
|
|
4
|
+
type: 'select';
|
|
5
|
+
value: string;
|
|
6
|
+
} | {
|
|
7
|
+
type: 'sync';
|
|
8
|
+
value: string | undefined;
|
|
9
|
+
} | {
|
|
10
|
+
type: 'navigate';
|
|
11
|
+
months: number;
|
|
12
|
+
} | {
|
|
13
|
+
type: 'key';
|
|
14
|
+
key: CalendarKey;
|
|
15
|
+
};
|
|
16
|
+
export interface CalendarScenario {
|
|
17
|
+
name: string;
|
|
18
|
+
props: {
|
|
19
|
+
value?: string;
|
|
20
|
+
defaultValue?: string;
|
|
21
|
+
min?: string;
|
|
22
|
+
max?: string;
|
|
23
|
+
locale?: string;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
};
|
|
26
|
+
actions: readonly CalendarAction[];
|
|
27
|
+
expected: {
|
|
28
|
+
value: string | undefined;
|
|
29
|
+
changes: readonly string[];
|
|
30
|
+
month: string;
|
|
31
|
+
activeDate: string | undefined;
|
|
32
|
+
disabled: boolean;
|
|
33
|
+
};
|
|
34
|
+
platforms?: readonly Platform[];
|
|
35
|
+
}
|
|
36
|
+
/** Normative date selection and navigation cases shared by platform drivers. */
|
|
37
|
+
export declare const calendarScenarios: readonly CalendarScenario[];
|
|
38
|
+
export declare const calendarScenariosFor: (platform: Platform) => CalendarScenario[];
|
|
39
|
+
//# sourceMappingURL=calendar.scenarios.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar.scenarios.d.ts","sourceRoot":"","sources":["../../src/specs/calendar.scenarios.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB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