diff --git a/agnosticui-svelte/.storybook/preview.js b/agnosticui-svelte/.storybook/preview.js index 4cfa9a745..ad949c064 100644 --- a/agnosticui-svelte/.storybook/preview.js +++ b/agnosticui-svelte/.storybook/preview.js @@ -6,7 +6,7 @@ export const parameters = { docs: { theme: yourTheme, }, - actions: { argTypesRegex: "^on[A-Z].*" }, + actions: { argTypesRegex: "^on.*" }, }; require('!style-loader!css-loader!../src/css/common.min.css') diff --git a/agnosticui-svelte/copystyles.js b/agnosticui-svelte/copystyles.js index e55600f2b..1c29ad81a 100644 --- a/agnosticui-svelte/copystyles.js +++ b/agnosticui-svelte/copystyles.js @@ -81,6 +81,20 @@ const headerNavItemSvelte = fs.readFileSync('./src/stories/HeaderNavItem.svelte' const headerNavItemSynchronized = headerNavItemSvelte.replace(styleRegex, ``); fs.writeFileSync('./src/stories/HeaderNavItem.svelte', headerNavItemSynchronized, 'utf8'); + +/** + * Inputs + */ +css = fs.readFileSync('../agnosticui-css/input.css', 'utf8'); +const inputSvelte = fs.readFileSync('./src/stories/Input.svelte', 'utf8'); +const inputSynchronized = inputSvelte.replace(styleRegex, ``); +fs.writeFileSync('./src/stories/Input.svelte', inputSynchronized, 'utf8'); + +css = fs.readFileSync('../agnosticui-css/inputaddonitem.css', 'utf8'); +const inputAddonItemSvelte = fs.readFileSync('./src/stories/InputAddonItem.svelte', 'utf8'); +const inputAddonItemSynchronized = inputAddonItemSvelte.replace(styleRegex, ``); +fs.writeFileSync('./src/stories/InputAddonItem.svelte', inputAddonItemSynchronized, 'utf8'); + /** * FlexGrid (grid, row, col all copied over. Svelte SFC requires this so that each * component gets it's own CSS stuff copied over) diff --git a/agnosticui-svelte/package.json b/agnosticui-svelte/package.json index 8b8fb85d4..57100eaaf 100644 --- a/agnosticui-svelte/package.json +++ b/agnosticui-svelte/package.json @@ -41,6 +41,7 @@ "rollup-plugin-svelte": "^6.0.0", "rollup-plugin-terser": "^7.0.0", "svelte": "^3.24.1", + "svelte-jester": "^1.1.5", "svelte-loader": "^2.13.6" }, "dependencies": { @@ -49,7 +50,7 @@ "jest": { "transform": { "^.+\\.js$": "babel-jest", - "^.+\\.svelte$": "jest-transform-svelte" + "^.+\\.svelte$": "svelte-jester" }, "moduleFileExtensions": [ "js", @@ -69,4 +70,4 @@ "/storybook-static/" ] } -} +} \ No newline at end of file diff --git a/agnosticui-svelte/src/__snapshots__/Storyshots.test.js.snap b/agnosticui-svelte/src/__snapshots__/Storyshots.test.js.snap index f8abe8c5f..0a0645e6d 100644 --- a/agnosticui-svelte/src/__snapshots__/Storyshots.test.js.snap +++ b/agnosticui-svelte/src/__snapshots__/Storyshots.test.js.snap @@ -5,10 +5,12 @@ exports[`Storyshots Button Button Base 1`] = ` class="storybook-snapshot-container" > @@ -20,10 +22,12 @@ exports[`Storyshots Button Button Blank 1`] = ` class="storybook-snapshot-container" > @@ -35,10 +39,12 @@ exports[`Storyshots Button Button Overrides 1`] = ` class="storybook-snapshot-container" > @@ -50,10 +56,12 @@ exports[`Storyshots Button Button Type Reset 1`] = ` class="storybook-snapshot-container" > @@ -65,10 +73,12 @@ exports[`Storyshots Button Button Type Submit 1`] = ` class="storybook-snapshot-container" > @@ -80,10 +90,12 @@ exports[`Storyshots Button Default 1`] = ` class="storybook-snapshot-container" > @@ -95,10 +107,12 @@ exports[`Storyshots Button Default Bordered 1`] = ` class="storybook-snapshot-container" > @@ -110,10 +124,12 @@ exports[`Storyshots Button Default Bordered Rounded 1`] = ` class="storybook-snapshot-container" > @@ -125,10 +141,12 @@ exports[`Storyshots Button Default Circle 1`] = ` class="storybook-snapshot-container" > @@ -140,10 +158,12 @@ exports[`Storyshots Button Default Raised 1`] = ` class="storybook-snapshot-container" > @@ -155,10 +175,12 @@ exports[`Storyshots Button Default Rounded 1`] = ` class="storybook-snapshot-container" > @@ -170,10 +192,13 @@ exports[`Storyshots Button Disabled 1`] = ` class="storybook-snapshot-container" > @@ -186,25 +211,25 @@ exports[`Storyshots Button Groups Button Group 1`] = ` >
@@ -415,10 +442,12 @@ exports[`Storyshots Button Primary 1`] = ` class="storybook-snapshot-container" > @@ -430,10 +459,12 @@ exports[`Storyshots Button Primary Block 1`] = ` class="storybook-snapshot-container" > @@ -445,10 +476,12 @@ exports[`Storyshots Button Primary Bordered 1`] = ` class="storybook-snapshot-container" > @@ -460,10 +493,12 @@ exports[`Storyshots Button Primary Bordered Rounded 1`] = ` class="storybook-snapshot-container" > @@ -475,10 +510,12 @@ exports[`Storyshots Button Primary Circle 1`] = ` class="storybook-snapshot-container" > @@ -490,10 +527,12 @@ exports[`Storyshots Button Primary Rounded 1`] = ` class="storybook-snapshot-container" > @@ -505,10 +544,12 @@ exports[`Storyshots Button Primary Rounded Raised 1`] = ` class="storybook-snapshot-container" > @@ -520,10 +561,12 @@ exports[`Storyshots Button Primary Test 1`] = ` class="storybook-snapshot-container" > @@ -535,10 +578,12 @@ exports[`Storyshots Button Secondary 1`] = ` class="storybook-snapshot-container" > @@ -550,10 +595,12 @@ exports[`Storyshots Button Secondary Bordered 1`] = ` class="storybook-snapshot-container" > @@ -565,10 +612,12 @@ exports[`Storyshots Button Secondary Bordered Rounded 1`] = ` class="storybook-snapshot-container" > @@ -580,10 +629,12 @@ exports[`Storyshots Button Secondary Circle 1`] = ` class="storybook-snapshot-container" > @@ -595,10 +646,12 @@ exports[`Storyshots Button Secondary Rounded 1`] = ` class="storybook-snapshot-container" > @@ -610,10 +663,12 @@ exports[`Storyshots Button Secondary Rounded Raised 1`] = ` class="storybook-snapshot-container" > @@ -625,10 +680,12 @@ exports[`Storyshots Button Small 1`] = ` class="storybook-snapshot-container" > @@ -640,10 +697,10 @@ exports[`Storyshots Cards Card 1`] = ` class="storybook-snapshot-container" >

@@ -652,7 +709,7 @@ exports[`Storyshots Cards Card 1`] = `

@@ -683,10 +740,10 @@ exports[`Storyshots Cards Card 1`] = `

Card With No Skinning @@ -759,23 +816,27 @@ exports[`Storyshots FlexGrid Grid 1`] = ` >
-

+

xs=12 sm=4 lg=6 xl=4

-

+

xs=12 sm=4 lg=6 xl=8

@@ -785,10 +846,10 @@ exports[`Storyshots FlexGrid Grid 1`] = `

test @@ -799,39 +860,47 @@ exports[`Storyshots FlexGrid Grid 1`] = `
-

+

sm="2"

-

+

sm=2 smOffset=1

-

+

sm=2 smOffset=1

-

+

sm=2 smOffset=2

@@ -845,10 +914,10 @@ exports[`Storyshots FlexGrid Grid 1`] = `

@@ -860,12 +929,13 @@ exports[`Storyshots Header Example Header Test 1`] = ` class="storybook-snapshot-container" >
`; +exports[`Storyshots Input Addons Example Input Addons Test 1`] = ` +
+
+ + +
+
+
+ + L + +
+
+ + + +
+
+ + R + +
+
+
+ +
+
+`; + +exports[`Storyshots Input Default 1`] = ` +
+
+ + + + +
+
+`; + +exports[`Storyshots Input Disabled 1`] = ` +
+
+ + + + +
+
+`; + +exports[`Storyshots Input Email 1`] = ` +
+
+ + + + +
+
+`; + +exports[`Storyshots Input Help Text 1`] = ` +
+
+ + + + + + Some useful help text. + +
+
+`; + +exports[`Storyshots Input Invalid Text 1`] = ` +
+
+ + + + + + This field has errors. + +
+
+`; + +exports[`Storyshots Input Invalid Text Large 1`] = ` +
+
+ + + + + + This field has errors. + +
+
+`; + +exports[`Storyshots Input Invalid Text Small 1`] = ` +
+
+ + + + + + This field has errors. + +
+
+`; + +exports[`Storyshots Input Large 1`] = ` +
+
+ + + + +
+
+`; + +exports[`Storyshots Input Number 1`] = ` +
+
+ + + + +
+
+`; + +exports[`Storyshots Input Password 1`] = ` +
+
+ + + + +
+
+`; + +exports[`Storyshots Input Rounded 1`] = ` +
+
+ + + + +
+
+`; + +exports[`Storyshots Input Search 1`] = ` +
+
+ + + + +
+
+`; + +exports[`Storyshots Input Small 1`] = ` +
+
+ + + + +
+
+`; + +exports[`Storyshots Input Telephone 1`] = ` +
+
+ + + + +
+
+`; + +exports[`Storyshots Input Textarea 1`] = ` +
+
+ + +