@sfgov/fillout 0.0.5 → 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2020 San Francisco Digital Services
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,133 +1,106 @@
1
- # Fillout theme for SF.gov
1
+ # SF.gov Fillout theme
2
2
 
3
- This is a Fillout theme for SF.gov.
3
+ This repo contains code and documentation for managing our [Fillout theme].
4
4
 
5
- > [!WARNING]
6
- > The CSS generated by this package may be applied and behave in subtly
7
- > different ways from CSS injected by Fillout's own JavaScript. **Always test
8
- > your changes in the dev theme** or [disable live reload](#disable-live-reload)
9
- > on the dev server before "deploying" new CSS to the shared theme.
5
+ ## Build
10
6
 
11
- ## CSS pipeline
12
-
13
- The theme CSS is built from [src/theme/sfgov.css](./src/theme/sfgov.css). We use
14
- [postcss] to [inline][postcss-import] `@import` rules, process
15
- [nested][postcss-nested] declarations, add a [header][postcss-header] that
16
- includes the version, and [minify][cssnano] the output so that it's both small
17
- and discourages editing by hand.
18
-
19
- The [variables.css](./src/theme/variables.css) file is hand-rolled but will
20
- eventually be either generated in or imported from the design system package.
21
-
22
- ### Building the CSS
7
+ The stylesheet in the [theme directory](./theme/) is built for production with
8
+ [postcss] and [Tailwind][] (the same tools used to build SF.gov's stylesheets
9
+ and React components). This helps us write less CSS (e.g. with nested selectors)
10
+ and more precisely override Fillout's own CSS, which is also built with
11
+ Tailwind. To build the stylesheet, run:
23
12
 
24
13
  ```sh
25
- npm run build:css
14
+ npm run build
26
15
  ```
27
16
 
28
- This will output the minified CSS to `dist/theme-sfgov.css`, which will be
29
- included when the package is published on npm.
30
-
31
- ## Publish the package
17
+ This creates `dist/theme-sfgov.css`. Set `NODE_ENV=production` to enable
18
+ minification. (This is done automatically in the `prepublishOnly` script,
19
+ which is run by `npm publish`.)
32
20
 
33
- Publishing the package on npm is as simple as:
21
+ ## Test
34
22
 
35
- 1. `npm version <version>` to set the `version` field in `package.json`
36
- 2. `npm publish`
23
+ You can test the stylesheet with our [Chrome extension]. Follow the instructions
24
+ in that repo to install it, then right-click on the extension icon in Chrome and
25
+ select <kbd>Options</kbd>.
37
26
 
38
- You'll need to be authenticated to publish. CI-based publishing should use
39
- [trusted publishing] mechanisms, e.g. with [GitHub
40
- Actions](https://docs.npmjs.com/trusted-publishers#for-github-actions).
27
+ ### URL
41
28
 
42
- ### Get the published URL
43
-
44
- You can build a link to the published CSS hosted on [jsDelivr] from this URL
45
- template:
29
+ If you're reading this on GitHub or npm, or you don't need to modify the source
30
+ files and just want to see Fillout forms with this _version_ of the CSS, select
31
+ "URL" and paste this URL into the text field:
46
32
 
47
33
  ```url
48
- https://cdn.jsdelivr.net/npm/@sfgov/fillout@VERSION/dist/theme-sfgov.css
49
- ^^^^^^^
34
+ https://unpkg.com/@sfgov/fillout@<version>/dist/theme-sfgov.css
50
35
  ```
51
36
 
52
- Load that URL up in your browser (or with `curl`), copy its contents, then paste them into the Fillout theme's [custom CSS text box](https://www.fillout.com/help/custom-css#how-to-add-a-custom-css).
53
-
54
- ## Dev server
55
-
56
- The dev server dramatically reduces the effort and time to test CSS changes. Run it with:
37
+ ...where `<version>` is a published version identifier or npm tag. For instance,
38
+ to see version `0.0.6` of the CSS, you would paste:
57
39
 
58
- ```sh
59
- npm run dev
40
+ ```url
41
+ https://unpkg.com/@sfgov/fillout@0.0.6/dist/theme-sfgov.css
60
42
  ```
61
43
 
62
- This will start the dev server on port `8000` by default. The server proxies
63
- every Fillout request to `https://digital.forms.sf.gov` and modifies some of the
64
- HTML and JavaScript on the fly to replace a form's custom CSS with ours.
65
-
66
- ### Live reload
67
-
68
- The dev server offers live-reload-_like_ experience: It replaces the form's
69
- custom CSS with whatever is built locally during the initial load, and then
70
- injects [src/live-reload.js](./src/live-reload.js) into form pages.
71
- The script then polls a JSON endpoint exposed by the proxy server to determine
72
- if:
44
+ Then, navigate to any Fillout form and toggle the "CSS" overlay in the tab or
45
+ frame so that it turns green and says "CSS: custom". From this point on, every
46
+ Fillout form will have its custom CSS replaced by the stylesheet at that URL.
73
47
 
74
- 1. The server code itself has been changed, in which case the page is reloaded;
75
- or
76
- 2. The CSS has changed, in which case the new CSS is fetched and swapped out
77
- without a page reload.
48
+ If you change the URL in the extension options, the styles will update
49
+ automatically. Click the "CSS: custom" toggle at any time to switch back to the
50
+ CSS of the form's selected theme.
78
51
 
79
- > [!NOTE]
80
- > The "versioning" logic and CSS hot-swapping are not perfect. If your styles
81
- > aren't being applied, try reloading the page manually and/or [disable live
82
- > reload](#disable-live-reload) altogether.
52
+ ### Local CSS
83
53
 
84
- ### Disable live reload
85
-
86
- To disable live reload, set `LIVE_RELOAD=0` (or `false` or `no`) before you
87
- start the dev server, i.e.
54
+ If you're working on the stylesheets in this repo, select "Local CSS" and paste
55
+ the full path to `dist/theme-sfgov.css` in the text field, which you can get
56
+ with:
88
57
 
89
58
  ```sh
90
- LIVE_RELOAD=false npm run dev
59
+ realpath dist/theme-sfgov.css
91
60
  ```
92
61
 
93
- ### Enable the proxy cache
62
+ Make sure to also check the "Live reload" checkbox so that changes to the file
63
+ will be applied automatically.
94
64
 
95
- Sometimes it's useful to inspect the CSS and JavaScript that Fillout uses. While
96
- you can do this in browser dev tools, it's way easier to just set `STASH=true`
97
- before running the dev server then looking at the files in the `.stash/`
98
- directory with your favorite text editor or IDE:
65
+ Next, navigate to any Fillout form and toggle the "CSS" overlay in the tab or
66
+ frame so that it turns green and says "CSS: custom". From that point on, the
67
+ form styles should update automatically whenever you rebuild the CSS. This pairs
68
+ nicely with watch mode, which will rebuild whenever source or config files
69
+ change:
99
70
 
100
71
  ```sh
101
- STASH=true npm run dev
72
+ npm run watch
102
73
  ```
103
74
 
104
- The paths of the files in the stash directory correspond to the URIs, so a
105
- request for the [kitchen sink form][] (`GET /t/v4exrkajutus`) will write the HTML
106
- response in `./stash/t/v4exrkajutus` along with all of the Next.js-bundled CSS
107
- and JS dependencies in `./stash/_next/`.
75
+ Click the "CSS: custom" toggle at any time to switch back to the CSS of the
76
+ form's selected theme.
108
77
 
109
- ### Test on other Fillout domains
78
+ ## Deploy
110
79
 
111
- By default, the server proxies `digital.forms.sf.gov`. If you need to proxy a
112
- different domain like `forms.fillout.com` (Fillout's default), just set
113
- `PROXY_DOMAIN` accordingly:
80
+ We "deploy" the CSS by manually copying and pasting it into the custom CSS field
81
+ in Fillout's [advanced designer].
114
82
 
115
- ```sh
116
- PROXY_DOMAIN=forms.fillout.com npm run dev
117
- ```
83
+ 1. Navigate to the edit view of a Fillout form that uses the default SF.gov
84
+ theme, such as the [kitchen sink form][kitchen sink form editor]
85
+ 1. Click the <kbd>🖌️ Theme</kbd> button in the top left of the editor view
86
+ 1. Click the <kbd>Advanced designer</kbd> button at the bottom of the left hand
87
+ panel
88
+ 1. Under "Custom CSS", click the <kbd>Edit CSS</kbd> button
89
+ 1. Copy the contents of `dist/theme-sfgov.css`:
118
90
 
119
- ### Testing forms
91
+ ```sh
92
+ # in macOS terminal
93
+ cat dist/theme-sfgov.css | pbcopy
94
+ ```
120
95
 
121
- To view a Fillout form with the local CSS, replace the
122
- `https://digital.forms.sf.gov` prefix of the URL with `http://localhost:$PORT`
123
- (e.g. `http://localhost:8000`). For instance, to view the [kitchen sink form],
124
- visit [localhost:8000/t/v4exrkajutus](http://localhost:8000/t/v4exrkajutus).
96
+ 1. Paste the CSS into the modal CSS editor
97
+ 1. Click <kbd>Apply CSS</kbd> to save the styles
98
+ 1. Click the <kbd>Publish</kbd> button in the top right to publish the form
99
+ _and_ the theme.
125
100
 
126
- [kitchen sink form]: https://digital.forms.sf.gov/t/v4exrkajutus
127
101
  [postcss]: https://postcss.org/
128
- [postcss-import]: https://www.npmjs.com/package/postcss-import
129
- [postcss-nested]: https://www.npmjs.com/package/postcss-nested
130
- [postcss-header]: https://www.npmjs.com/package/postcss-header
131
- [cssnano]: https://cssnano.github.io/cssnano/
132
- [trusted publishing]: https://docs.npmjs.com/trusted-publishers
133
- [jsdelivr]: https://www.jsdelivr.com/
102
+ [tailwind]: https://v3.tailwindcss.com/
103
+ [advanced designer]: https://www.fillout.com/help/advanced-designer
104
+ [kitchen sink form editor]: https://build.fillout.com/editor/v4exrkajutus
105
+ [fillout theme]: https://www.fillout.com/help/themes
106
+ [chrome extension]: https://github.com/SFDigitalServices/fillout-css-extension
@@ -1 +1,2 @@
1
- /*! @sfgov/fillout@0.0.5 */*{--sf-colors-white:#fcfcfc;--sf-colors-black:#0b0c0c;--sf-colors-primary10:#f3f8fe;--sf-colors-primary50:#e9f1fe;--sf-colors-primary100:#dfebfd;--sf-colors-primary200:#afccf7;--sf-colors-primary300:#83aceb;--sf-colors-primary400:#5a8dd9;--sf-colors-primary500:#2a60af;--sf-colors-primary600:#1b519e;--sf-colors-primary700:#043578;--sf-colors-primary800:#001d4e;--sf-colors-primary900:#000925;--sf-colors-secondary10:#f2f9fa;--sf-colors-secondary50:#e6f4f5;--sf-colors-secondary100:#daeff0;--sf-colors-secondary200:#a2d5d8;--sf-colors-secondary300:#6ababf;--sf-colors-secondary400:#2b9ea5;--sf-colors-secondary500:#008189;--sf-colors-secondary600:#00646c;--sf-colors-secondary700:#00464e;--sf-colors-secondary800:#002a30;--sf-colors-secondary900:#001013;--sf-colors-accent10:#fff5f0;--sf-colors-accent50:#feede3;--sf-colors-accent100:#fde4d7;--sf-colors-accent200:#f6bc9b;--sf-colors-accent300:#e79362;--sf-colors-accent400:#d26d28;--sf-colors-accent500:#b64a00;--sf-colors-accent600:#942a00;--sf-colors-accent700:#6f0f00;--sf-colors-accent800:#470000;--sf-colors-accent900:#200000;--sf-colors-information10:#f2f8ff;--sf-colors-information50:#e5f1ff;--sf-colors-information100:#daebff;--sf-colors-information200:#a3ccff;--sf-colors-information300:#6faaff;--sf-colors-information400:#4088fd;--sf-colors-information500:#1066e5;--sf-colors-information600:#0046c2;--sf-colors-information700:#002996;--sf-colors-information800:#001264;--sf-colors-information900:#000331;--sf-colors-informationSource:#1168e8;--sf-colors-success10:#f3faf0;--sf-colors-success50:#e8f5e2;--sf-colors-success100:#def1d6;--sf-colors-success200:#aed998;--sf-colors-success300:#80bf5b;--sf-colors-success400:#55a30f;--sf-colors-success500:#2d8600;--sf-colors-success600:#026800;--sf-colors-success700:#004a00;--sf-colors-success800:#002c00;--sf-colors-success900:#010;--sf-colors-warning100:#f7e7d3;--sf-colors-warning200:#e8c492;--sf-colors-warning300:#d69f50;--sf-colors-warning400:#bf7d00;--sf-colors-warning500:#a35d00;--sf-colors-warning600:#843f00;--sf-colors-warning700:#612600;--sf-colors-warning800:#3e1200;--sf-colors-warning900:#1b0400;--sf-colors-danger10:#fff4f1;--sf-colors-danger50:#ffeae5;--sf-colors-danger100:#ffe0d9;--sf-colors-danger200:#ffb0a2;--sf-colors-danger300:#ff7f6e;--sf-colors-danger400:#ec4e3e;--sf-colors-danger500:#d0110b;--sf-colors-danger600:#ac0000;--sf-colors-danger700:#810000;--sf-colors-danger800:#500;--sf-colors-danger900:#280000;--sf-colors-dangerSource:#d81c14;--sf-colors-neutral10:#f7f8f8;--sf-colors-neutral50:#eff0f0;--sf-colors-neutral100:#e9eaea;--sf-colors-neutral200:#c9caca;--sf-colors-neutral300:#aaabab;--sf-colors-neutral400:#8b8d8d;--sf-colors-neutral500:#6e7070;--sf-colors-neutral600:#535454;--sf-colors-neutral700:#383939;--sf-colors-neutral800:#202121;--sf-colors-neutral900:#0b0b0b;--sf-colors-link:var(--sf-colors-primary500);--sf-colors-input-bg:#fff;--sf-colors-input-border:var(--sf-colors-neutral200);--sf-fontWeight-light:300;--sf-fontWeight-normal:400;--sf-fontWeight-medium:500;--sf-fontWeight-semibold:600;--sf-fontWeight-bold:700;--sf-fontWeight-extrabold:800;--sf-fontWeight-boldChinese:500;--sf-fontFamily-sans:"Roboto Flex",sans-serif;--sf-fontFamily-slab:"Roboto Slab",serif;--sf-font-body:var(--sf-fontWeight-normal) 16px/24px var(--sf-fontFamily-sans);--sf-font-small:14px/24px var(--sf-fontFamily-sans);--sf-font-label-xs:var(--sf-fontWeight-normal) 14px/20px var(--sf-fontFamily-sans);--sf-font-label-sm:var(--sf-fontWeight-normal) 16px/24px var(--sf-fontFamily-sans);--sf-font-label-md:var(--sf-fontWeight-normal) 20px/28px var(--sf-fontFamily-sans);--sf-font-label-md-button:var(--sf-fontWeight-bold) 20px/28px var(--sf-fontFamily-sans);--sf-font-heading-xs:var(--sf-fontWeight-light) 14px/20px var(--sf-fontFamily-sans);--sf-font-heading-sm:var(--sf-fontWeight-extrabold) 16px/24px var(--sf-fontFamily-sans);--sf-font-heading-md:var(--sf-fontWeight-bold) 20px/28px var(--sf-fontFamily-sans);--sf-font-heading-lg:var(--sf-fontWeight-medium) 24px/32px var(--sf-fontFamily-sans);--sf-font-heading-xl:var(--sf-fontWeight-semibold) 32px/44px var(--sf-fontFamily-slab);--sf-font-heading-xxl:var(--sf-fontWeight-medium) 40px/52px var(--sf-fontFamily-slab);--sf-font-display-lg:var(--sf-fontWeight-normal) 24px/32px var(--sf-fontFamily-sans);--sf-font-display-xxxl:var(--sf-fontWeight-semibold) 46px/56px var(--sf-fontFamily-slab);--sf-font-button:var(--sf-font-label-xs);--radio-size:40px;--radio-dot-size:22px;--theme-input-bg-color:#fff;--theme-primary-color:var(--sf-colors-primary500);font:var(--sf-font-body)}.fillout-field-alert{--alert-text:var(--sf-colors-black)}.fillout-field-alert .rounded-lg:not(.quill){background-color:var(--alert-bg);border-radius:0;border-style:solid;border-width:0 0 0 8px;border-color:var(--alert-border);padding:28px 28px 28px 20px}.fillout-field-alert .rounded-lg:not(.quill) svg{color:var(--alert-border,var(--alert-text))}.fillout-field-alert .rounded-lg:not(.quill) a{color:var(--alert-link,var(--sf-colors-link))}.fillout-field-alert .border-blue-400{--alert-border:var(--sf-colors-information600);--alert-bg:var(--sf-colors-information50)}.fillout-field-alert .border-red-400,.fillout-field-alert .border-yellow-400{--alert-border:var(--sf-colors-danger600);--alert-bg:var(--sf-colors-danger50);--alert-link:var(--sf-colors-danger800)}.fillout-field-alert .border-green-400{--alert-border:var(--sf-colors-success600);--alert-bg:var(--sf-colors-success50);--alert-link:var(--sf-colors-success800)}.fillout-field-alert .flex.items-center{align-items:flex-start}.fillout-field-alert .flex.items-center .flex-col{flex-direction:row}.fillout-field-alert .ql-editor strong{color:var(--alert-text)}.fillout-field-alert .ql-editor p{color:var(--sf-colors-black);background-color:transparent}.fillout-field-button div{text-align:center;font-family:Roboto Flex,sans-serif;font-style:normal;font:var(--sf-font-button)!important}.fillout-field-button button{height:40px;padding:15px 16px;border-radius:4px;border:1px solid var(--sf-colors-primary600);background-color:var(--sf-colors-primary600);box-shadow:none;color:var(--sf-colors-white);font:var(--sf-font-button)!important}.fillout-field-button button:hover{border-color:var(--sf-colors-primary800);background-color:var(--sf-colors-primary800)}.fillout-field-button button:focus{outline:3px solid var(--sf-colors-primary500);box-shadow:none}.fillout-back-button button{border-radius:4px;border:1px solid var(--sf-colors-primary100);background-color:var(--sf-colors-primary100);color:var(--sf-colors-primary900)}.fillout-back-button button:hover{border:1px solid var(--sf-colors-primary200);background-color:var(--sf-colors-primary200)}.fillout-field-button>.flex{justify-content:space-between!important;flex-direction:row!important}.fillout-field-button>.flex div{margin:0!important}.fillout-field-button>.flex .w-full{width:auto!important}div[role=radiogroup]>.gap-y-2{gap:16px}.radio-outer-circle:first-child{background-color:#fff!important;opacity:1!important;transition:none!important;border-color:var(--sf-colors-input-border)!important}.radio-inner-circle,.radio-outer-circle:nth-child(2){transition:none!important}.animate-check{animation-duration:0s}.fillout-field-checkbox button,.fillout-field-checkbox button>svg,.fillout-field-checkboxes button,.fillout-field-checkboxes button>svg{height:40px;width:40px}.fillout-field-checkbox button[aria-checked=true],.fillout-field-checkboxes button[aria-checked=true]{background-color:#386ebf}.fillout-field-checkboxes fieldset{gap:16px}.fillout-field-star-rating button:hover .absolute:last-of-type svg{color:var(--sf-colors-primary400)!important}.react-select__indicator{color:var(--sf-colors-black)}.fillout-error-validation-message{color:var(--sf-colors-danger600);font:var(--sf-font-heading-xs)!important}nav .group .step-name{color:var(--sf-colors-black)!important}#question-alignment-container.h-full{height:fit-content}.fillout-field-switch .ant-switch:focus{outline:3px solid var(--sf-colors-primary500);outline-offset:4px;transition:none}.fillout-field-text h1,.fillout-field-text h2{color:var(--sf-colors-black);font:var(--sf-font-display-xxxl)!important;font-style:normal;margin:0}.fillout-field-paragraph *{font:var(--sf-font-body)}.fillout-field-paragraph h1{font:var(--sf-font-heading-xxl)}.fillout-field-paragraph h2{font:var(--sf-font-heading-xl)}.fillout-field-paragraph h3{font:var(--sf-font-heading-lg)}.fillout-field-paragraph h4{font:var(--sf-font-heading-md)}.fillout-field-paragraph h5{font:var(--sf-font-heading-sm)}.fillout-field-paragraph h6{font:var(--sf-font-heading-xs)}.fillout-field-checkboxes label,.fillout-field-container input[placeholder],.fillout-field-container input[type],.fillout-field-container label[type],.fillout-field-container span[placeholder],.fillout-field-container textarea[placeholder],.fillout-field-label p,.react-select__value-container .react-select__single-value{color:var(--sf-colors-black)!important}.fillout-field-label p{font:var(--sf-font-label-md)!important}.fillout-field-address label{font:var(--sf-font-label-sm)!important}.fillout-field-checkboxes label,.fillout-field-multiple-choice label{display:block;font:var(--sf-font-label-md)!important}.fillout-field-multiple-choice label{padding-left:8px}.fillout-field-checkbox .ml-2{margin-left:0!important}.fillout-field-checkbox p{font:var(--sf-font-label-md)!important;padding-left:4px}.fillout-field-checkboxes label{padding-left:4px}.fillout-field-checkboxes label,.fillout-field-checkboxes label div{font:var(--sf-font-label-md)!important}.fillout-caption{color:var(--sf-colors-neutral600)}.fillout-caption p{font:var(--sf-font-label-sm)!important}input::placeholder{color:var(--sf-colors-neutral600)}a{color:var(--sf-colors-primary500)}.fillout-required-asterisk,p:after{color:var(--sf-colors-danger600)}.filepond--drop-label{padding:16px}.fillout-field-section-collapse>.w-full:first-child{color:var(--sf-colors-link)!important;font:var(--sf-font-label-md-button)!important;background-color:transparent!important;border-bottom:1px solid var(--sf-colors-neutral300);border-radius:0;padding:0 0 12px!important}.fillout-field-section-collapse>.w-full:first-child span{font:inherit!important}.fillout-field-section-collapse>.w-full:first-child svg{color:var(--sf-colors-link)!important}.fillout-field-divider .border-t{border-top:1px solid var(--sf-colors-neutral300)!important}
1
+ /*! @sfgov/fillout@0.1.0
2
+ THIS FILE IS GENERATED; DO NOT EDIT IT! */.fillout-field-alert .border-blue-400{border:1px solid #0046c2;border-radius:0;background-color:#e5f1ff;padding:28px;}.fillout-field-alert .flex.items-center .flex-col{flex-direction:row;}.fillout-field-alert .text-blue-400{color:#0046c2;}.fillout-field-alert .flex.items-center{align-items:flex-start;}.fillout-field-alert .ql-editor p{color:#0b0c0c;background-color:inherit;}.fillout-field-button div{text-align:center;font-family:Roboto Flex,sans-serif;font-size:14px;font-style:normal;font-weight:500;line-height:20px;}.fillout-field-button button{height:40px;padding:15px 16px;border-radius:4px;border:1px solid #1b519e;background-color:#1b519e;box-shadow:none;color:#fcfcfc;font-size:16px;font-weight:400;line-height:24px;}.fillout-field-button button:hover{border-color:#001d4e;background-color:#001d4e;}.fillout-field-button button:focus{outline:3px solid #2a60af;box-shadow:none;}.fillout-back-button button{border-radius:4px;border:1px solid #dfebfd;background-color:#dfebfd;color:#000925;}.fillout-back-button button:hover{border:1px solid #afccf7;background-color:#afccf7;}.fillout-field-button>.justify-start{justify-content:space-between;}.fillout-field-checkbox button,.fillout-field-checkbox button>svg,.fillout-field-checkboxes button,.fillout-field-checkboxes button>svg{height:40px;width:40px;}.fillout-field-checkbox button[aria-checked=true],.fillout-field-checkboxes button[aria-checked=true]{background-color:#386ebf;}.fillout-field-checkboxes fieldset{gap:16px;}.react-select__indicator{color:#0b0c0c;}.fillout-error-validation-message{color:#ac0000;font-size:14px;font-weight:400;line-height:20px;}.fillout-field-file-upload div.filepond--drop-label>label>div{color:#535454!important;}nav .group .step-name{color:#0b0c0c!important;}.fillout-field-multiple-choice [role=radio]{margin:16px 16px 16px 12px;}.fillout-field-multiple-choice span.border-2{height:40px!important;width:40px!important;}.fillout-field-multiple-choice span.transition-transform{height:22px!important;width:22px!important;color:#386ebf!important;}#question-alignment-container.h-full{height:-moz-fit-content;height:fit-content;}.fillout-field-switch .ant-switch:focus{outline:3px solid #2a60af;outline-offset:4px;transition:none;}.fillout-field-text h1{padding-bottom:20px;font-weight:600;font-size:46px;line-height:56px;}.fillout-field-text h1,.fillout-field-text h2{font-family:Roboto Slab,sans-serif;font-style:normal;color:#0b0c0c;}.fillout-field-text h2{font-weight:500;font-size:40px;line-height:52px;}.fillout-field-text h3{font-family:Roboto Slab,sans-serif;font-style:normal;color:#0b0c0c;font-weight:600;font-size:32px;line-height:44px;}.fillout-field-text h4{font-size:24px;line-height:32px;}.fillout-field-text h4,.fillout-field-text h5{font-family:Roboto Slab,sans-serif;font-style:normal;color:#0b0c0c;font-weight:500;}.fillout-field-text h5{font-size:20px;line-height:28px;}div,p,span{font-family:Open Sans,sans-serif;font-style:normal;}.fillout-field-paragraph h1{font-weight:600;font-size:32px;line-height:44px;}.fillout-field-paragraph h2{font-weight:600;font-size:24px;line-height:32px;}.fillout-field-paragraph h3{font-weight:600;font-size:20px;line-height:28px;}.fillout-field-paragraph h4{font-weight:700;font-size:16px;line-height:24px;}.fillout-field-paragraph h5{font-weight:500;font-size:14px;line-height:20px;}.fillout-field-paragraph p{font-weight:400;font-size:16px;line-height:24px;}.fillout-field-label p{color:#0b0c0c;font-size:20px;line-height:28px;}.fillout-field-checkboxes label div,.fillout-field-container input[placeholder],.fillout-field-container input[type],.fillout-field-container label[type],.fillout-field-container span[placeholder],.fillout-field-container textarea[placeholder],.fillout-field-multiple-choice [role=radio] div,.react-select__value-container .react-select__single-value{color:#0b0c0c!important;}input::-moz-placeholder{color:#535454;}.fillout-caption,input::placeholder{color:#535454;}a{color:#2a60af;}.fillout-required-asterisk,p:after{color:#ac0000;}.fillout-field-review span.grow{color:#0b0c0c!important;}.fillout-field-review span.grow.italic{color:#6e7070!important;font-style:italic;}
package/package.json CHANGED
@@ -1,37 +1,47 @@
1
1
  {
2
2
  "name": "@sfgov/fillout",
3
- "version": "0.0.5",
4
- "private": false,
3
+ "version": "0.1.0",
5
4
  "scripts": {
6
- "dev": "npx nodemon -w scripts/server.ts -w src -e ts --exec scripts/server.ts",
7
- "build:css": "postcss src/theme/sfgov.css -o dist/theme-sfgov.css",
8
- "prepublish": "NODE_ENV=production npm run build:css"
5
+ "build": "postcss theme/sfgov.css -o dist/theme-sfgov.css",
6
+ "lint": "eslint",
7
+ "prepublishOnly": "NODE_ENV=production npm run build && publint",
8
+ "watch": "nodemon -w theme -w postcss.config.js -w tailwind.* -e css,js,ts --exec 'npm run build'"
9
9
  },
10
+ "license": "MIT",
11
+ "type": "commonjs",
12
+ "main": "dist/theme-sfgov.css",
10
13
  "files": [
11
- "dist/",
12
- "README.md"
14
+ "dist"
13
15
  ],
16
+ "publishConfig": {
17
+ "access": "public"
18
+ },
14
19
  "devDependencies": {
15
- "@types/cheerio": "^0.22.35",
16
- "@types/express": "^5.0.6",
17
- "@types/express-http-proxy": "^1.6.7",
18
- "@types/morgan": "^1.9.10",
19
- "@types/postcss-css-variables": "^0.18.3",
20
+ "@auto-it/all-contributors": "^11.3.6",
21
+ "@auto-it/conventional-commits": "^11.3.6",
22
+ "@auto-it/npm": "^11.3.6",
23
+ "@eslint/js": "^9.39.1",
24
+ "@stylistic/eslint-plugin": "^5.5.0",
25
+ "@types/node": "^24.10.0",
20
26
  "@types/postcss-header": "^2.0.4",
21
27
  "@types/postcss-import": "^14.0.3",
28
+ "auto": "^11.3.6",
22
29
  "autoprefixer": "^10.5.4",
23
- "cheerio": "^1.2.0",
24
30
  "cssnano": "^8.0.2",
25
- "express": "^5.2.1",
26
- "express-http-proxy": "^2.1.2",
27
- "morgan": "^1.11.0",
31
+ "eslint": "^10.13.0",
32
+ "globals": "^16.5.0",
33
+ "jiti": "^2.7.0",
34
+ "knip": "^6.38.0",
28
35
  "nodemon": "^3.1.14",
29
36
  "postcss": "^8.5.23",
30
- "postcss-cli": "^11.0.1",
31
- "postcss-css-variables": "^0.19.0",
37
+ "postcss-cli": "^12.0.0",
32
38
  "postcss-header": "^3.0.3",
33
39
  "postcss-import": "^16.1.1",
34
40
  "postcss-load-config": "^6.0.1",
35
- "postcss-nested": "^7.0.2"
41
+ "postcss-nested": "^7.0.2",
42
+ "publint": "^0.3.25",
43
+ "tailwindcss": "^3.4.19",
44
+ "typescript": "^5.9.3",
45
+ "typescript-eslint": "^8.46.3"
36
46
  }
37
47
  }