@scalar/components 0.14.37 → 0.14.40
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/components/ScalarCheckboxInput/ScalarCheckbox.vue.d.ts +23 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckbox.vue.d.ts.map +1 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckbox.vue.js +27 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckbox.vue2.js +4 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxGroup.vue.d.ts +21 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxGroup.vue.d.ts.map +1 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxGroup.vue.js +37 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxGroup.vue2.js +4 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxInput.vue.d.ts +33 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxInput.vue.d.ts.map +1 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxInput.vue.js +45 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxInput.vue2.js +4 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxRadioGroup.vue.d.ts +21 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxRadioGroup.vue.d.ts.map +1 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxRadioGroup.vue.js +38 -0
- package/dist/components/ScalarCheckboxInput/ScalarCheckboxRadioGroup.vue2.js +4 -0
- package/dist/components/ScalarCheckboxInput/index.d.ts +6 -0
- package/dist/components/ScalarCheckboxInput/index.d.ts.map +1 -0
- package/dist/components/ScalarCheckboxInput/types.d.ts +7 -0
- package/dist/components/ScalarCheckboxInput/types.d.ts.map +1 -0
- package/dist/components/ScalarFileUpload/ScalarFileUpload.vue.d.ts +1 -1
- package/dist/components/ScalarForm/ScalarFormInput.vue.d.ts +28 -0
- package/dist/components/ScalarForm/ScalarFormInput.vue.d.ts.map +1 -0
- package/dist/components/ScalarForm/ScalarFormInput.vue.js +39 -0
- package/dist/components/ScalarForm/ScalarFormInput.vue2.js +4 -0
- package/dist/components/ScalarForm/ScalarFormInputGroup.vue.d.ts +39 -0
- package/dist/components/ScalarForm/ScalarFormInputGroup.vue.d.ts.map +1 -0
- package/dist/components/ScalarForm/ScalarFormInputGroup.vue.js +23 -0
- package/dist/components/ScalarForm/ScalarFormInputGroup.vue2.js +4 -0
- package/dist/components/ScalarForm/ScalarFormSection.vue.js +5 -5
- package/dist/components/ScalarForm/index.d.ts +3 -1
- package/dist/components/ScalarForm/index.d.ts.map +1 -1
- package/dist/components/ScalarForm/useFormGroups.d.ts +18 -0
- package/dist/components/ScalarForm/useFormGroups.d.ts.map +1 -0
- package/dist/components/ScalarForm/useFormGroups.js +9 -0
- package/dist/components/ScalarListbox/ScalarListboxInput.vue.d.ts +24 -0
- package/dist/components/ScalarListbox/ScalarListboxInput.vue.d.ts.map +1 -0
- package/dist/components/ScalarListbox/ScalarListboxInput.vue.js +26 -0
- package/dist/components/ScalarListbox/ScalarListboxInput.vue2.js +4 -0
- package/dist/components/ScalarListbox/index.d.ts +2 -1
- package/dist/components/ScalarListbox/index.d.ts.map +1 -1
- package/dist/components/ScalarMarkdown/ScalarMarkdown.vue.d.ts.map +1 -1
- package/dist/components/ScalarMarkdown/samples/index.d.ts +34 -4
- package/dist/components/ScalarMarkdown/samples/index.d.ts.map +1 -1
- package/dist/components/ScalarMarkdown/samples/lists-edge.d.ts +4 -0
- package/dist/components/ScalarMarkdown/samples/lists-edge.d.ts.map +1 -0
- package/dist/components/ScalarMarkdown/samples/lists-interactions.d.ts +3 -0
- package/dist/components/ScalarMarkdown/samples/lists-interactions.d.ts.map +1 -0
- package/dist/components/ScalarMarkdown/samples/lists-mixed.d.ts +3 -0
- package/dist/components/ScalarMarkdown/samples/lists-mixed.d.ts.map +1 -0
- package/dist/components/ScalarMarkdown/samples/lists-ordered.d.ts +3 -0
- package/dist/components/ScalarMarkdown/samples/lists-ordered.d.ts.map +1 -0
- package/dist/components/ScalarMarkdown/samples/lists-tasks.d.ts +3 -0
- package/dist/components/ScalarMarkdown/samples/lists-tasks.d.ts.map +1 -0
- package/dist/components/ScalarMarkdown/samples/lists-unordered.d.ts +3 -0
- package/dist/components/ScalarMarkdown/samples/lists-unordered.d.ts.map +1 -0
- package/dist/components/ScalarMarkdown/samples/tables.d.ts +1 -1
- package/dist/components/ScalarMarkdown/samples/tables.d.ts.map +1 -1
- package/dist/components/ScalarTextArea/ScalarTextArea.vue.d.ts.map +1 -1
- package/dist/components/ScalarTextArea/ScalarTextArea.vue.js +27 -28
- package/dist/components/ScalarTextInput/ScalarTextInput.vue.d.ts +4 -0
- package/dist/components/ScalarTextInput/ScalarTextInput.vue.d.ts.map +1 -1
- package/dist/components/ScalarTextInput/ScalarTextInput.vue.js +53 -44
- package/dist/components/ScalarToggle/ScalarToggle.vue.d.ts +5 -3
- package/dist/components/ScalarToggle/ScalarToggle.vue.d.ts.map +1 -1
- package/dist/components/ScalarToggle/ScalarToggle.vue.js +24 -22
- package/dist/components/ScalarToggle/ScalarToggleGroup.vue.d.ts +21 -0
- package/dist/components/ScalarToggle/ScalarToggleGroup.vue.d.ts.map +1 -0
- package/dist/components/ScalarToggle/ScalarToggleGroup.vue.js +35 -0
- package/dist/components/ScalarToggle/ScalarToggleGroup.vue2.js +4 -0
- package/dist/components/ScalarToggle/ScalarToggleInput.vue.d.ts +28 -0
- package/dist/components/ScalarToggle/ScalarToggleInput.vue.d.ts.map +1 -0
- package/dist/components/ScalarToggle/ScalarToggleInput.vue.js +36 -0
- package/dist/components/ScalarToggle/ScalarToggleInput.vue2.js +4 -0
- package/dist/components/ScalarToggle/index.d.ts +2 -0
- package/dist/components/ScalarToggle/index.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +184 -166
- package/dist/style.css +1 -1
- package/package.json +6 -6
- package/dist/components/ScalarCheckbox/ScalarCheckbox.vue.d.ts +0 -26
- package/dist/components/ScalarCheckbox/ScalarCheckbox.vue.d.ts.map +0 -1
- package/dist/components/ScalarCheckbox/index.d.ts +0 -2
- package/dist/components/ScalarCheckbox/index.d.ts.map +0 -1
- package/dist/components/ScalarMarkdown/samples/lists.d.ts +0 -3
- package/dist/components/ScalarMarkdown/samples/lists.d.ts.map +0 -1
|
@@ -1,32 +1,62 @@
|
|
|
1
|
-
export declare const samples:
|
|
1
|
+
export declare const samples: [{
|
|
2
2
|
readonly label: "Document";
|
|
3
|
+
readonly key: "document";
|
|
3
4
|
readonly value: "\n# One morning, when Gregor Samsa woke from troubled dreams.\nOne morning, when Gregor Samsa woke from troubled dreams, he found himself *transformed* in his bed into a horrible [vermin](http://en.wikipedia.org/wiki/Vermin \"Wikipedia Vermin\"). He lay on his armour-like back, and if he lifted his head a little he could see his brown belly, slightly domed and divided by arches into stiff sections. The bedding was hardly able to cover **strong** it and seemed ready to slide off any moment. His many legs, pitifully thin compared with the size of the rest of him, link waved about helplessly as he looked. <cite>“What's happened to me?”</cite> he thought. It wasn't a dream. His room, a proper human room although a little too small, lay peacefully between its four familiar walls.\n\n## The bedding was hardly able to cover it.\n\nIt showed a lady fitted out with a fur hat and fur boa who sat upright, raising a heavy fur muff that covered the whole of her lower arm towards the viewer a solid fur muff into which her entire forearm disappeared..\n\n### Things we know about Gregor's sleeping habits.\n\n- He always slept on his right side.\n- He has to get up early (to start another dreadful day).\n- He has a drawer and a alarm clock next to his bed.\n- His mother calls him when he gets up to late.\n\nFirst he wanted to stand up quietly and undisturbed, get dressed, above all have breakfast, and only then consider further action, for (he noticed this clearly) by thinking things over in bed he would not reach a reasonable conclusion. He remembered that he had already often felt a light pain or other in bed, perhaps the result of an awkward lying position, which later turned out to be purely imaginary when he stood up, and he was eager to see how his present fantasies would gradually dissipate. That the change in his voice was nothing other than the onset of a real chill, an occupational illness of commercial travelers, of that he had not the slightest doubt.\n";
|
|
4
5
|
}, {
|
|
5
6
|
readonly label: "Alerts";
|
|
7
|
+
readonly key: "alerts";
|
|
6
8
|
readonly value: "\n> [!NOTE] \n> Highlights information that users should take into account, even when skimming.\n\n> [!TIP]\n> Optional information to help a user be more successful.\n\n> [!IMPORTANT] \n> Crucial information necessary for users to succeed.\n\n> [!WARNING] \n> Critical content demanding immediate user attention due to potential risks.\n\n> [!CAUTION]\n> Negative potential consequences of an action.\n";
|
|
7
9
|
}, {
|
|
8
10
|
readonly label: "Blockquotes";
|
|
11
|
+
readonly key: "blockquotes";
|
|
9
12
|
readonly value: "\nNormal Blockquote\n\n> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,\n> consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.\n> Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.\n>\n> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse\n> id sem consectetuer libero luctus adipiscing.\n\n---\n\nBlockquote with hard wraps and no additional `>`\n\n> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,\nconsectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.\nVestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.\n>\n> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse\nid sem consectetuer libero luctus adipiscing.\n\n---\n\nBlockquote with nested blockquote\n\n> This is the first level of quoting.\n>\n> > This is nested blockquote.\n>\n> Back to the first level.\n\n---\n\nBlockquote with nested markdown content\n\n> ## This is a header.\n>\n> 1. This is the first list item.\n> 2. This is the second list item.\n>\n> Here's some example code:\n>\n> return shell_exec(\"echo $input | $markdown_script\");\n";
|
|
10
13
|
}, {
|
|
11
14
|
readonly label: "Codeblocks";
|
|
15
|
+
readonly key: "codeblocks";
|
|
12
16
|
readonly value: "\nCodeblock via indent\n\n tell application \"Foo\"\n beep\n end tell\n\n---\n\nCodeblock via backticks\n\n```javascript\nconst message = 'this is a code block'\n\nconsole.log(message)\n```\n\n---\n\nCodeblock with HTML\n\n```html\n<div class=\"footer\">© 2004 Foo Corporation</div>\n```\n\n---\n\nCodeblock with markdown\n\n\n```md\n# Title\n\nI should not be **bold**.\n```\n";
|
|
13
17
|
}, {
|
|
14
18
|
readonly label: "Headers";
|
|
19
|
+
readonly key: "headers";
|
|
15
20
|
readonly value: "\nATX Headers (Prefixed with `#`'s')\n\n# This is a first level header\n\n## This is a second level header\n\n### This is a third level header\n\n#### This is a fourth level header\n\n##### This is a fifth level header\n\n###### This is a sixth level header\n\n---\n\nATX Headers (Prefixed and suffixed with `#`'s')\n\n# This is a first level header #\n\n## This is a second level header ##\n\n### This is a third level header ###\n\n#### This is a fourth level header ####\n\n##### This is a fifth level header #####\n\n###### This is a sixth level header ######\n\n---\n\nSetext Headers\n\nThis is a first level heading\n=============================\n\nThis is a second level heading\n------------------------------\n";
|
|
16
21
|
}, {
|
|
17
22
|
readonly label: "HTML";
|
|
23
|
+
readonly key: "html";
|
|
18
24
|
readonly value: "\nSummary / Details\n\n<details>\n <summary>Using Details Tags</summary>\n <p>HTML Example</p>\n</details>\n\n---\n\nDescription List\n\n<dl>\n <dt>Beast of Bodmin</dt>\n <dd>A large feline inhabiting Bodmin Moor.</dd>\n <dt>Morgawr</dt>\n <dd>A sea serpent.</dd>\n <dt>Owlman</dt>\n <dd>A giant owl-like creature.</dd>\n</dl>\n";
|
|
19
25
|
}, {
|
|
20
26
|
readonly label: "Inline";
|
|
27
|
+
readonly key: "inline";
|
|
21
28
|
readonly value: "\nParagraph with inline elements\n\nThis is a demo paragraph with **bold text**, _italic text_, a [link](https://example.com), and some `inline code` to show various Markdown inline elements.\n\n---\n\nLink\n\nThis is [an example](http://example.com/) inline link.\n\nThis [link](http://example.com/ \"Title\") has a title attribute.\n\n---\n\nEmphasis\n\n_single asterisks_\n\n_single underscores_\n\n**double asterisks**\n\n**double underscores**\n\n---\n\nInline Code\n\nUse the `printf()` function.\n\n---\n\nEmoji\n\n:sparkles:\n";
|
|
22
29
|
}, {
|
|
23
|
-
readonly label: "Lists";
|
|
24
|
-
readonly
|
|
30
|
+
readonly label: "Unordered Lists";
|
|
31
|
+
readonly key: "lists-unordered";
|
|
32
|
+
readonly value: "\nUnordered list\n\n- Red\n- Green\n- Blue\n\n---\n\nUnordered list with mixed symbols\n\n- Red\n+ Green\n* Blue\n\n---\n\nNested unordered lists \n\n- Level 1\n- Level 1\n - Level 2\n - Level 2\n - Level 3\n - Level 3\n - Level 4\n - Level 4\n - Level 5\n - Level 5\n - Level 6\n - Level 6\n - Level 7\n - Level 7\n - Level 8\n - Level 8\n - Level 2\n - Level 2\n\n---\n\nList with inline elements\n\n- This is a [link](https://scalar.com) and a bunch more content forcing the line to wrap to the next line. This is some **bold text** and some *italic text* and some more text to make sure it wraps.\n- This is some `inline code` and a math formula: (E = mc^2)\n";
|
|
33
|
+
}, {
|
|
34
|
+
readonly label: "Ordered Lists";
|
|
35
|
+
readonly key: "lists-ordered";
|
|
36
|
+
readonly value: "\nOrdered list\n\n1. Bird\n1. McHale\n1. Parish\n\n---\n\nOrdered list with mixed numbers\n\n1. Bird\n3. McHale\n2. Parish\n\n---\n\nNested ordered lists \n\n1. Level 1\n1. Level 1\n 1. Level 2\n 1. Level 2\n 1. Level 3\n 1. Level 3\n 1. Level 4\n 1. Level 4\n 1. Level 5\n 1. Level 5\n 1. Level 6\n 1. Level 6\n 1. Level 7\n 1. Level 7\n 1. Level 8\n 1. Level 8\n 1. Level 2\n 1. Level 2\n\n---\n\nList with inline elements\n\n1. This is a [link](https://scalar.com) and a bunch more content forcing the line to wrap to the next line. This is some **bold text** and some *italic text* and some more text to make sure it wraps.\n2. This is some `inline code` and a math formula: (E = mc^2)\n";
|
|
37
|
+
}, {
|
|
38
|
+
readonly label: "Task Lists";
|
|
39
|
+
readonly key: "lists-task";
|
|
40
|
+
readonly value: "\nTask list\n\n- [x] Write the press release\n- [ ] Update the website\n- [ ] Contact the media\n\n---\n\nTask list with nested lists\n\n- [x] Write the press release\n - [x] Draft the content\n - [x] Review with the team\n- [ ] Update the website\n - Unordered sublist item\n - Another sublist item\n- [ ] Update the website\n 1. Ordered sublist item\n 2. Another sublist item\n- [ ] Contact the media\n\n---\n\nTask Lists with inline elements\n\n- [x] This is a [link](https://scalar.com) and a bunch more content forcing the line to wrap to the next line. This is some **bold text** and some *italic text* and some more text to make sure it wraps.\n- [ ] This is some `inline code` and a math formula: (E = mc^2)\n";
|
|
41
|
+
}, {
|
|
42
|
+
readonly label: "Mixed Lists";
|
|
43
|
+
readonly key: "lists-mixed";
|
|
44
|
+
readonly value: "\nNested mixed lists \n\n* ul level 1\n* ul level 1\n 1. ol level 2\n 1. ol level 2\n * ul level 3\n * ul level 3\n 1. ol level 2\n 1. ol level 2\n\n---\n\nWith task lists\n\n- Unordered item\n- [x] Completed task\n- [ ] Incomplete task\n 1. Ordered item\n 2. Ordered item\n - [x] Completed sub-task\n - [ ] Incomplete sub-Task\n";
|
|
45
|
+
}, {
|
|
46
|
+
readonly label: "List Interactions";
|
|
47
|
+
readonly key: "lists-interactions";
|
|
48
|
+
readonly value: "\n\nList with blockquote\n\n* A list item with a blockquote:\n\n > This is a blockquote\n > inside a list item.\n\n---\n\nList with codeblock\n\n* A list item with a code block:\n\n <code goes here>\n";
|
|
49
|
+
}, {
|
|
50
|
+
readonly label: "List Edge Cases";
|
|
51
|
+
readonly key: "lists-edge-cases";
|
|
52
|
+
readonly value: "\nEscaped ordered list\n\n1994. Was a good year (this should not be a list item)\n";
|
|
25
53
|
}, {
|
|
26
54
|
readonly label: "Paragraphs";
|
|
55
|
+
readonly key: "paragraphs";
|
|
27
56
|
readonly value: "\nA paragraph is simply one or more consecutive lines of text, separated\nby one or more blank lines. (A blank line is any line that looks like a\nblank line -- a line containing nothing but spaces or tabs is considered\nblank.) Normal paragraphs should not be indented with spaces or tabs.\n\n---\n\nLine with a soft break\n...following line.\n\nLine with a hard break \n...following line.\n\n--- \n\nLine with several blank lines after...\n\n\n\n...following paragraph.\n";
|
|
28
57
|
}, {
|
|
29
58
|
readonly label: "Tables";
|
|
30
|
-
readonly
|
|
59
|
+
readonly key: "tables";
|
|
60
|
+
readonly value: "\nBasic Table\n\n| Syntax | Description |\n| ------------------------------------------------- | ----------- |\n| Header | Title |\n| Paragraph | Text |\n| Superlongtextinasinglecolumnshouldwrapatsomepoint | Text |\n\n\n---\n\nTable with alignment\n\n| Syntax | Description | Test Text |\n| :--- | :----: | ---: |\n| Header | Title | Here's this |\n| Paragraph | Text | And more |\n";
|
|
31
61
|
}];
|
|
32
62
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ScalarMarkdown/samples/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ScalarMarkdown/samples/index.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0BgD,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lists-edge.d.ts","sourceRoot":"","sources":["../../../../src/components/ScalarMarkdown/samples/lists-edge.ts"],"names":[],"mappings":"AAAA,sBAAsB;;AACtB,wBAIC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: "\n\nList with blockquote\n\n* A list item with a blockquote:\n\n > This is a blockquote\n > inside a list item.\n\n---\n\nList with codeblock\n\n* A list item with a code block:\n\n <code goes here>\n";
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=lists-interactions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lists-interactions.d.ts","sourceRoot":"","sources":["../../../../src/components/ScalarMarkdown/samples/lists-interactions.ts"],"names":[],"mappings":";AAAA,wBAgBC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: "\nNested mixed lists \n\n* ul level 1\n* ul level 1\n 1. ol level 2\n 1. ol level 2\n * ul level 3\n * ul level 3\n 1. ol level 2\n 1. ol level 2\n\n---\n\nWith task lists\n\n- Unordered item\n- [x] Completed task\n- [ ] Incomplete task\n 1. Ordered item\n 2. Ordered item\n - [x] Completed sub-task\n - [ ] Incomplete sub-Task\n";
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=lists-mixed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lists-mixed.d.ts","sourceRoot":"","sources":["../../../../src/components/ScalarMarkdown/samples/lists-mixed.ts"],"names":[],"mappings":";AAAA,wBAuBC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: "\nOrdered list\n\n1. Bird\n1. McHale\n1. Parish\n\n---\n\nOrdered list with mixed numbers\n\n1. Bird\n3. McHale\n2. Parish\n\n---\n\nNested ordered lists \n\n1. Level 1\n1. Level 1\n 1. Level 2\n 1. Level 2\n 1. Level 3\n 1. Level 3\n 1. Level 4\n 1. Level 4\n 1. Level 5\n 1. Level 5\n 1. Level 6\n 1. Level 6\n 1. Level 7\n 1. Level 7\n 1. Level 8\n 1. Level 8\n 1. Level 2\n 1. Level 2\n\n---\n\nList with inline elements\n\n1. This is a [link](https://scalar.com) and a bunch more content forcing the line to wrap to the next line. This is some **bold text** and some *italic text* and some more text to make sure it wraps.\n2. This is some `inline code` and a math formula: (E = mc^2)\n";
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=lists-ordered.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lists-ordered.d.ts","sourceRoot":"","sources":["../../../../src/components/ScalarMarkdown/samples/lists-ordered.ts"],"names":[],"mappings":";AAAA,wBA4CC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: "\nTask list\n\n- [x] Write the press release\n- [ ] Update the website\n- [ ] Contact the media\n\n---\n\nTask list with nested lists\n\n- [x] Write the press release\n - [x] Draft the content\n - [x] Review with the team\n- [ ] Update the website\n - Unordered sublist item\n - Another sublist item\n- [ ] Update the website\n 1. Ordered sublist item\n 2. Another sublist item\n- [ ] Contact the media\n\n---\n\nTask Lists with inline elements\n\n- [x] This is a [link](https://scalar.com) and a bunch more content forcing the line to wrap to the next line. This is some **bold text** and some *italic text* and some more text to make sure it wraps.\n- [ ] This is some `inline code` and a math formula: (E = mc^2)\n";
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=lists-tasks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lists-tasks.d.ts","sourceRoot":"","sources":["../../../../src/components/ScalarMarkdown/samples/lists-tasks.ts"],"names":[],"mappings":";AAAA,wBA4BC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const _default: "\nUnordered list\n\n- Red\n- Green\n- Blue\n\n---\n\nUnordered list with mixed symbols\n\n- Red\n+ Green\n* Blue\n\n---\n\nNested unordered lists \n\n- Level 1\n- Level 1\n - Level 2\n - Level 2\n - Level 3\n - Level 3\n - Level 4\n - Level 4\n - Level 5\n - Level 5\n - Level 6\n - Level 6\n - Level 7\n - Level 7\n - Level 8\n - Level 8\n - Level 2\n - Level 2\n\n---\n\nList with inline elements\n\n- This is a [link](https://scalar.com) and a bunch more content forcing the line to wrap to the next line. This is some **bold text** and some *italic text* and some more text to make sure it wraps.\n- This is some `inline code` and a math formula: (E = mc^2)\n";
|
|
2
|
+
export default _default;
|
|
3
|
+
//# sourceMappingURL=lists-unordered.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lists-unordered.d.ts","sourceRoot":"","sources":["../../../../src/components/ScalarMarkdown/samples/lists-unordered.ts"],"names":[],"mappings":";AAAA,wBA4CC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const _default: "\nBasic Table\n\n| Syntax
|
|
1
|
+
declare const _default: "\nBasic Table\n\n| Syntax | Description |\n| ------------------------------------------------- | ----------- |\n| Header | Title |\n| Paragraph | Text |\n| Superlongtextinasinglecolumnshouldwrapatsomepoint | Text |\n\n\n---\n\nTable with alignment\n\n| Syntax | Description | Test Text |\n| :--- | :----: | ---: |\n| Header | Title | Here's this |\n| Paragraph | Text | And more |\n";
|
|
2
2
|
export default _default;
|
|
3
3
|
//# sourceMappingURL=tables.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../../../src/components/ScalarMarkdown/samples/tables.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../../../src/components/ScalarMarkdown/samples/tables.ts"],"names":[],"mappings":";AAAA,wBAkBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarTextArea.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTextArea/ScalarTextArea.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarTextArea.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTextArea/ScalarTextArea.vue"],"names":[],"mappings":"AAuDA;;;;;;;GAOG;;iBAuBU,MAAM;;;;iBAAN,MAAM;;;;AAtBnB,wBAwGC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useBindCx as
|
|
3
|
-
import { useTextareaAutosize as
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { defineComponent as u, useModel as m, onMounted as f, createBlock as d, openBlock as c, unref as t, mergeProps as l, withCtx as p, withDirectives as x, createElementVNode as _, vModelText as v } from "vue";
|
|
2
|
+
import { useBindCx as h } from "@scalar/use-hooks/useBindCx";
|
|
3
|
+
import { useTextareaAutosize as k } from "@vueuse/core";
|
|
4
|
+
import C from "../ScalarForm/ScalarFormInput.vue.js";
|
|
5
|
+
const V = {}, T = /* @__PURE__ */ u({
|
|
6
|
+
...V,
|
|
6
7
|
inheritAttrs: !1,
|
|
7
8
|
__name: "ScalarTextArea",
|
|
8
9
|
props: {
|
|
@@ -10,32 +11,30 @@ const g = {}, A = /* @__PURE__ */ a({
|
|
|
10
11
|
modelModifiers: {}
|
|
11
12
|
},
|
|
12
13
|
emits: ["update:modelValue"],
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
14
|
+
setup(a) {
|
|
15
|
+
const o = m(a, "modelValue"), { textarea: r } = k({
|
|
15
16
|
// @ts-expect-error - unexpected type mismatch
|
|
16
|
-
input:
|
|
17
|
+
input: o,
|
|
17
18
|
styleProp: "minHeight"
|
|
18
|
-
}), { classCx: i, otherAttrs:
|
|
19
|
-
return
|
|
20
|
-
"autofocus" in
|
|
21
|
-
}), (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
])
|
|
36
|
-
], 16));
|
|
19
|
+
}), { classCx: i, otherAttrs: n } = h();
|
|
20
|
+
return f(() => {
|
|
21
|
+
"autofocus" in n.value && r.value?.focus();
|
|
22
|
+
}), (w, e) => (c(), d(t(C), l({ is: "div" }, t(i)("custom-scroll flex text-c-1 min-h-0 shrink cursor-text"), {
|
|
23
|
+
onClick: e[1] || (e[1] = (s) => t(r)?.focus())
|
|
24
|
+
}), {
|
|
25
|
+
default: p(() => [
|
|
26
|
+
x(_("textarea", l({
|
|
27
|
+
ref_key: "textarea",
|
|
28
|
+
ref: r,
|
|
29
|
+
"onUpdate:modelValue": e[0] || (e[0] = (s) => o.value = s)
|
|
30
|
+
}, t(n), { class: "w-full resize-none border-none bg-transparent text-sm focus-within:outline-none" }), null, 16), [
|
|
31
|
+
[v, o.value]
|
|
32
|
+
])
|
|
33
|
+
]),
|
|
34
|
+
_: 1
|
|
35
|
+
}, 16));
|
|
37
36
|
}
|
|
38
37
|
});
|
|
39
38
|
export {
|
|
40
|
-
|
|
39
|
+
T as default
|
|
41
40
|
};
|
|
@@ -7,10 +7,14 @@
|
|
|
7
7
|
* <ScalarTextInput v-model="model" />
|
|
8
8
|
*/
|
|
9
9
|
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
10
|
+
readonly?: boolean;
|
|
11
|
+
} & {
|
|
10
12
|
modelValue?: string;
|
|
11
13
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
14
|
"update:modelValue": (value: string | undefined) => any;
|
|
13
15
|
}, string, import("vue").PublicProps, Readonly<{
|
|
16
|
+
readonly?: boolean;
|
|
17
|
+
} & {
|
|
14
18
|
modelValue?: string;
|
|
15
19
|
}> & Readonly<{
|
|
16
20
|
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarTextInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTextInput/ScalarTextInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarTextInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarTextInput/ScalarTextInput.vue"],"names":[],"mappings":"AAwFA;;;;;;;GAOG;;eAGU,OAAO;;iBA6BP,MAAM;;;;eA7BN,OAAO;;iBA6BP,MAAM;;;;aA2GN,CAAC,KAAK,IAAiB,KAAK,GAAG;;aAC/B,CAAC,KAAK,IAAiB,KAAK,GAAG;;aAC/B,CAAC,KAAK,IAAiB,KAAK,GAAG;;YAChC,CAAC,KAAK,IAAiB,KAAK,GAAG;;AA7I3C,wBAkLC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,64 +1,73 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useBindCx as
|
|
3
|
-
|
|
1
|
+
import { defineComponent as y, mergeModels as v, useModel as x, ref as _, onMounted as $, createBlock as k, openBlock as t, unref as r, mergeProps as c, withCtx as w, createElementVNode as i, renderSlot as o, createElementBlock as n, createCommentVNode as l, withDirectives as C, vModelDynamic as V, toDisplayString as b } from "vue";
|
|
2
|
+
import { useBindCx as g } from "@scalar/use-hooks/useBindCx";
|
|
3
|
+
import B from "../ScalarForm/ScalarFormInput.vue.js";
|
|
4
|
+
const M = { class: "flex flex-1 relative" }, D = {
|
|
4
5
|
key: 0,
|
|
5
6
|
class: "select-none whitespace-nowrap text-sm text-transparent"
|
|
6
|
-
},
|
|
7
|
+
}, S = ["readonly", "aria-readonly"], A = {
|
|
7
8
|
key: 1,
|
|
8
9
|
class: "absolute inset-0 select-none overflow-hidden whitespace-nowrap text-sm"
|
|
9
|
-
},
|
|
10
|
+
}, E = {
|
|
10
11
|
key: 0,
|
|
11
12
|
class: "text-c-2"
|
|
12
|
-
},
|
|
13
|
+
}, N = { class: "text-transparent" }, z = {
|
|
13
14
|
key: 1,
|
|
14
15
|
class: "text-c-2"
|
|
15
|
-
},
|
|
16
|
-
...
|
|
16
|
+
}, I = {}, j = /* @__PURE__ */ y({
|
|
17
|
+
...I,
|
|
17
18
|
inheritAttrs: !1,
|
|
18
19
|
__name: "ScalarTextInput",
|
|
19
|
-
props: {
|
|
20
|
+
props: /* @__PURE__ */ v({
|
|
21
|
+
readonly: { type: Boolean }
|
|
22
|
+
}, {
|
|
20
23
|
modelValue: {},
|
|
21
24
|
modelModifiers: {}
|
|
22
|
-
},
|
|
25
|
+
}),
|
|
23
26
|
emits: ["update:modelValue"],
|
|
24
|
-
setup(
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
"autofocus" in u.value &&
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
ref_key: "input",
|
|
42
|
-
ref: i,
|
|
43
|
-
"onUpdate:modelValue": o[0] || (o[0] = (p) => r.value = p),
|
|
44
|
-
class: "z-1 min-w-0 flex-1 border-none bg-transparent text-sm placeholder:font-[inherit] focus-within:outline-none"
|
|
45
|
-
}, f(u)), null, 16), [
|
|
46
|
-
[w, r.value]
|
|
47
|
-
]),
|
|
48
|
-
e.$slots.prefix || e.$slots.suffix ? (s(), t("div", V, [
|
|
49
|
-
e.$slots.prefix ? (s(), t("span", C, [
|
|
50
|
-
n(e.$slots, "prefix")
|
|
27
|
+
setup(d) {
|
|
28
|
+
const a = x(d, "modelValue"), s = _(), { classCx: p, otherAttrs: u } = g();
|
|
29
|
+
$(() => {
|
|
30
|
+
"autofocus" in u.value && s.value?.focus();
|
|
31
|
+
});
|
|
32
|
+
function m() {
|
|
33
|
+
d.readonly ? s.value?.select() : s.value?.focus();
|
|
34
|
+
}
|
|
35
|
+
return (e, f) => (t(), k(r(B), c(
|
|
36
|
+
{ is: "div" },
|
|
37
|
+
r(p)("cursor-text text-c-1", e.readonly ? "" : "focus-within:bg-b-1"),
|
|
38
|
+
{ onClick: m }
|
|
39
|
+
), {
|
|
40
|
+
default: w(() => [
|
|
41
|
+
i("div", M, [
|
|
42
|
+
e.$slots.prefix ? (t(), n("span", D, [
|
|
43
|
+
o(e.$slots, "prefix")
|
|
51
44
|
])) : l("", !0),
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
45
|
+
C(i("input", c({
|
|
46
|
+
ref_key: "input",
|
|
47
|
+
ref: s,
|
|
48
|
+
"onUpdate:modelValue": f[0] || (f[0] = (h) => a.value = h),
|
|
49
|
+
readonly: e.readonly,
|
|
50
|
+
"aria-readonly": e.readonly || void 0,
|
|
51
|
+
class: "z-1 min-w-0 flex-1 border-none bg-transparent text-sm placeholder:font-[inherit] focus-within:outline-none"
|
|
52
|
+
}, r(u)), null, 16, S), [
|
|
53
|
+
[V, a.value]
|
|
54
|
+
]),
|
|
55
|
+
e.$slots.prefix || e.$slots.suffix ? (t(), n("div", A, [
|
|
56
|
+
e.$slots.prefix ? (t(), n("span", E, [
|
|
57
|
+
o(e.$slots, "prefix")
|
|
58
|
+
])) : l("", !0),
|
|
59
|
+
i("span", N, b(a.value || e.$attrs.placeholder), 1),
|
|
60
|
+
e.$slots.suffix ? (t(), n("span", z, [
|
|
61
|
+
o(e.$slots, "suffix")
|
|
62
|
+
])) : l("", !0)
|
|
55
63
|
])) : l("", !0)
|
|
56
|
-
])
|
|
64
|
+
]),
|
|
65
|
+
o(e.$slots, "aside")
|
|
57
66
|
]),
|
|
58
|
-
|
|
59
|
-
|
|
67
|
+
_: 3
|
|
68
|
+
}, 16));
|
|
60
69
|
}
|
|
61
70
|
});
|
|
62
71
|
export {
|
|
63
|
-
|
|
72
|
+
j as default
|
|
64
73
|
};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
type __VLS_Props = {
|
|
2
|
-
modelValue?: boolean;
|
|
3
2
|
disabled?: boolean;
|
|
4
3
|
label?: string;
|
|
5
4
|
};
|
|
6
|
-
|
|
5
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
6
|
+
modelValue?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
9
|
"update:modelValue": (value: boolean) => any;
|
|
8
|
-
}, string, import("vue").PublicProps, Readonly<
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
9
11
|
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
10
12
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
13
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScalarToggle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarToggle/ScalarToggle.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ScalarToggle.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarToggle/ScalarToggle.vue"],"names":[],"mappings":"AA+CA,KAAK,WAAW,GAAG;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAC;AAyBF,KAAK,iBAAiB,GAAG,WAAW,GAAG;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;;;;;;AAmEF,wBAOG"}
|
|
@@ -1,43 +1,45 @@
|
|
|
1
|
-
import { defineComponent as u, createElementBlock as t, openBlock as
|
|
2
|
-
import { cva as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as c, mergeModels as u, useModel as m, createElementBlock as t, openBlock as o, normalizeClass as n, unref as r, createElementVNode as b, createCommentVNode as p, toDisplayString as f } from "vue";
|
|
2
|
+
import { cva as h, cx as v } from "@scalar/use-hooks/useBindCx";
|
|
3
|
+
const g = ["aria-checked", "aria-disabled"], k = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "sr-only"
|
|
6
|
-
},
|
|
6
|
+
}, x = /* @__PURE__ */ c({
|
|
7
7
|
__name: "ScalarToggle",
|
|
8
|
-
props: {
|
|
9
|
-
modelValue: { type: Boolean },
|
|
8
|
+
props: /* @__PURE__ */ u({
|
|
10
9
|
disabled: { type: Boolean },
|
|
11
10
|
label: {}
|
|
12
|
-
},
|
|
11
|
+
}, {
|
|
12
|
+
modelValue: { type: Boolean, default: !1 },
|
|
13
|
+
modelModifiers: {}
|
|
14
|
+
}),
|
|
13
15
|
emits: ["update:modelValue"],
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
function
|
|
17
|
-
|
|
16
|
+
setup(l) {
|
|
17
|
+
const s = l, e = m(l, "modelValue");
|
|
18
|
+
function d() {
|
|
19
|
+
s.disabled || (e.value = !e.value);
|
|
18
20
|
}
|
|
19
|
-
const
|
|
21
|
+
const i = h({
|
|
20
22
|
base: "relative h-3.5 min-w-6 w-6 cursor-pointer rounded-full bg-b-3 transition-colors duration-300",
|
|
21
23
|
variants: {
|
|
22
24
|
checked: { true: "bg-c-accent" },
|
|
23
25
|
disabled: { true: "cursor-not-allowed opacity-40" }
|
|
24
26
|
}
|
|
25
27
|
});
|
|
26
|
-
return (
|
|
27
|
-
"aria-checked": e.
|
|
28
|
-
"aria-disabled":
|
|
29
|
-
class:
|
|
28
|
+
return (a, y) => (o(), t("button", {
|
|
29
|
+
"aria-checked": e.value,
|
|
30
|
+
"aria-disabled": a.disabled,
|
|
31
|
+
class: n(r(v)(r(i)({ checked: e.value, disabled: a.disabled }))),
|
|
30
32
|
role: "switch",
|
|
31
33
|
type: "button",
|
|
32
|
-
onClick:
|
|
34
|
+
onClick: d
|
|
33
35
|
}, [
|
|
34
|
-
|
|
35
|
-
class:
|
|
36
|
+
b("div", {
|
|
37
|
+
class: n(["absolute left-px top-px flex h-3 w-3 items-center justify-center rounded-full bg-b-1 text-c-accent transition-transform duration-300", { "translate-x-2.5": e.value }])
|
|
36
38
|
}, null, 2),
|
|
37
|
-
|
|
38
|
-
], 10,
|
|
39
|
+
a.label ? (o(), t("span", k, f(a.label), 1)) : p("", !0)
|
|
40
|
+
], 10, g));
|
|
39
41
|
}
|
|
40
42
|
});
|
|
41
43
|
export {
|
|
42
|
-
|
|
44
|
+
x as default
|
|
43
45
|
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ScalarCheckboxOption } from '../ScalarCheckboxInput';
|
|
2
|
+
/**
|
|
3
|
+
* Scalar Toggle Group component
|
|
4
|
+
*
|
|
5
|
+
* A group of toggle inputs allowing for multiple selections.
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: import("vue").DefineComponent<{
|
|
8
|
+
options?: ScalarCheckboxOption[];
|
|
9
|
+
} & {
|
|
10
|
+
modelValue?: ScalarCheckboxOption[];
|
|
11
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
12
|
+
"update:modelValue": (value: ScalarCheckboxOption[]) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
14
|
+
options?: ScalarCheckboxOption[];
|
|
15
|
+
} & {
|
|
16
|
+
modelValue?: ScalarCheckboxOption[];
|
|
17
|
+
}> & Readonly<{
|
|
18
|
+
"onUpdate:modelValue"?: ((value: ScalarCheckboxOption[]) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
export default _default;
|
|
21
|
+
//# sourceMappingURL=ScalarToggleGroup.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarToggleGroup.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarToggle/ScalarToggleGroup.vue"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAKlE;;;;GAIG;;cAGS,oBAAoB,EAAE;;iBAYrB,oBAAoB,EAAE;;;;cAZvB,oBAAoB,EAAE;;iBAYrB,oBAAoB,EAAE;;;;AAdnC,wBA8FC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineComponent as n, mergeModels as s, useModel as f, createBlock as o, openBlock as t, unref as c, withCtx as u, createElementBlock as _, Fragment as i, renderList as p, createTextVNode as V, toDisplayString as v } from "vue";
|
|
2
|
+
import g from "./ScalarToggleInput.vue.js";
|
|
3
|
+
import k from "../ScalarForm/ScalarFormInputGroup.vue.js";
|
|
4
|
+
const x = {}, C = /* @__PURE__ */ n({
|
|
5
|
+
...x,
|
|
6
|
+
__name: "ScalarToggleGroup",
|
|
7
|
+
props: /* @__PURE__ */ s({
|
|
8
|
+
options: { default: () => [] }
|
|
9
|
+
}, {
|
|
10
|
+
modelValue: { default: [] },
|
|
11
|
+
modelModifiers: {}
|
|
12
|
+
}),
|
|
13
|
+
emits: ["update:modelValue"],
|
|
14
|
+
setup(r) {
|
|
15
|
+
const l = f(r, "modelValue");
|
|
16
|
+
return (m, B) => (t(), o(c(k), null, {
|
|
17
|
+
default: u(() => [
|
|
18
|
+
(t(!0), _(i, null, p(m.options, (e) => (t(), o(g, {
|
|
19
|
+
modelValue: l.value?.some(({ value: a }) => a === e.value),
|
|
20
|
+
"onUpdate:modelValue": (a) => l.value = a ? [...l.value, e] : l.value.filter(({ value: d }) => d !== e.value),
|
|
21
|
+
key: e.value
|
|
22
|
+
}, {
|
|
23
|
+
default: u(() => [
|
|
24
|
+
V(v(e.label), 1)
|
|
25
|
+
]),
|
|
26
|
+
_: 2
|
|
27
|
+
}, 1032, ["modelValue", "onUpdate:modelValue"]))), 128))
|
|
28
|
+
]),
|
|
29
|
+
_: 1
|
|
30
|
+
}));
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
export {
|
|
34
|
+
C as default
|
|
35
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scalar Toggle Input component
|
|
3
|
+
*
|
|
4
|
+
* A create a toggle input component for use in forms.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* <ScalarToggleInput v-model="model" type="checkbox">
|
|
8
|
+
* Label
|
|
9
|
+
* </ScalarToggleInput>
|
|
10
|
+
*/
|
|
11
|
+
declare const _default: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
12
|
+
modelValue?: boolean;
|
|
13
|
+
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
"update:modelValue": (value: boolean | undefined) => any;
|
|
15
|
+
}, string, import("vue").PublicProps, Readonly<{
|
|
16
|
+
modelValue?: boolean;
|
|
17
|
+
}> & Readonly<{
|
|
18
|
+
"onUpdate:modelValue"?: ((value: boolean | undefined) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
20
|
+
default?: (props: {}) => any;
|
|
21
|
+
}>;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=ScalarToggleInput.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScalarToggleInput.vue.d.ts","sourceRoot":"","sources":["../../../src/components/ScalarToggle/ScalarToggleInput.vue"],"names":[],"mappings":"AA6CA;;;;;;;;;GASG;;iBAYU,OAAO;;;;iBAAP,OAAO;;;;cAsDN,CAAC,KAAK,IAAgB,KAAK,GAAG;;AAjE5C,wBAoGC;AAOD,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { defineComponent as u, useModel as d, createBlock as i, openBlock as c, unref as t, mergeProps as l, withCtx as f, createElementVNode as p, createVNode as _, renderSlot as V } from "vue";
|
|
2
|
+
import { useBindCx as x } from "@scalar/use-hooks/useBindCx";
|
|
3
|
+
import g from "./ScalarToggle.vue.js";
|
|
4
|
+
import h from "../ScalarForm/ScalarFormInput.vue.js";
|
|
5
|
+
const v = { class: "flex-1 text-left min-w-0 truncate" }, B = {}, w = /* @__PURE__ */ u({
|
|
6
|
+
...B,
|
|
7
|
+
inheritAttrs: !1,
|
|
8
|
+
__name: "ScalarToggleInput",
|
|
9
|
+
props: {
|
|
10
|
+
modelValue: { type: Boolean },
|
|
11
|
+
modelModifiers: {}
|
|
12
|
+
},
|
|
13
|
+
emits: ["update:modelValue"],
|
|
14
|
+
setup(r) {
|
|
15
|
+
const e = d(r, "modelValue"), { classCx: a, otherAttrs: s } = x();
|
|
16
|
+
return (n, o) => (c(), i(t(h), l(
|
|
17
|
+
{ is: "label" },
|
|
18
|
+
t(a)("cursor-pointer gap-2 hover:bg-b-2", { "text-c-1": e.value })
|
|
19
|
+
), {
|
|
20
|
+
default: f(() => [
|
|
21
|
+
p("div", v, [
|
|
22
|
+
V(n.$slots, "default")
|
|
23
|
+
]),
|
|
24
|
+
_(g, l({
|
|
25
|
+
modelValue: e.value,
|
|
26
|
+
"onUpdate:modelValue": o[0] || (o[0] = (m) => e.value = m),
|
|
27
|
+
class: "shrink-0"
|
|
28
|
+
}, t(s)), null, 16, ["modelValue"])
|
|
29
|
+
]),
|
|
30
|
+
_: 3
|
|
31
|
+
}, 16));
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
export {
|
|
35
|
+
w as default
|
|
36
|
+
};
|