@sfgov/design-system 0.0.1 → 2.0.0--canary.171.42084730475.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.
Files changed (199) hide show
  1. package/README.md +96 -5
  2. package/dist/formio/factories/index.d.mts +23 -0
  3. package/dist/formio/factories/index.d.ts +23 -0
  4. package/dist/formio/factories/index.js +142938 -0
  5. package/dist/formio/factories/index.js.map +1 -0
  6. package/dist/formio/factories/index.mjs +142913 -0
  7. package/dist/formio/factories/index.mjs.map +1 -0
  8. package/dist/formio/index.d.mts +66 -0
  9. package/dist/formio/index.d.ts +66 -0
  10. package/dist/formio/index.js +2382 -0
  11. package/dist/formio/index.js.map +1 -0
  12. package/dist/formio/index.mjs +2341 -0
  13. package/dist/formio/index.mjs.map +1 -0
  14. package/dist/index-BS9wLSsa.d.mts +608 -0
  15. package/dist/index-BS9wLSsa.d.ts +608 -0
  16. package/dist/index-DYMbrQaa.d.mts +653 -0
  17. package/dist/index-DYMbrQaa.d.ts +653 -0
  18. package/dist/index-DsMhfRKm.d.mts +750 -0
  19. package/dist/index-DsMhfRKm.d.ts +750 -0
  20. package/dist/index.d.mts +5 -0
  21. package/dist/index.d.ts +5 -0
  22. package/dist/index.js +2236 -0
  23. package/dist/index.js.map +1 -0
  24. package/dist/index.mjs +2204 -0
  25. package/dist/index.mjs.map +1 -0
  26. package/dist/react/index.d.mts +5 -5725
  27. package/dist/react/index.d.ts +5 -5725
  28. package/dist/react/index.js +1709 -1
  29. package/dist/react/index.js.map +1 -0
  30. package/dist/react/index.mjs +1543 -1
  31. package/dist/react/index.mjs.map +1 -0
  32. package/dist/tailwind-preset/index.d.mts +5 -0
  33. package/dist/tailwind-preset/index.d.ts +5 -0
  34. package/dist/tailwind-preset/index.js +1486 -0
  35. package/dist/tailwind-preset/index.js.map +1 -0
  36. package/dist/tailwind-preset/index.mjs +1489 -0
  37. package/dist/tailwind-preset/index.mjs.map +1 -0
  38. package/dist/tokens/index.d.mts +1 -0
  39. package/dist/tokens/index.d.ts +1 -0
  40. package/dist/tokens/index.js +675 -0
  41. package/dist/tokens/index.js.map +1 -0
  42. package/dist/tokens/index.mjs +645 -0
  43. package/dist/tokens/index.mjs.map +1 -0
  44. package/package.json +170 -331
  45. package/css/src/base.css +0 -26
  46. package/css/src/components/button.css +0 -61
  47. package/css/src/components/details.css +0 -10
  48. package/css/src/components/grid.css +0 -12
  49. package/css/src/components/index.css +0 -4
  50. package/css/src/components/kbd.css +0 -5
  51. package/css/src/components.css +0 -1
  52. package/css/src/fonts.css +0 -1
  53. package/css/src/icons.css +0 -7
  54. package/css/src/overrides.css +0 -3
  55. package/css/src/sfds.css +0 -6
  56. package/css/src/theme.js +0 -104
  57. package/css/src/tokens/breakpoints.js +0 -5
  58. package/css/src/tokens/colors.js +0 -116
  59. package/css/src/tokens/index.js +0 -8
  60. package/css/src/tokens/spacing.js +0 -27
  61. package/css/src/tokens/typography.js +0 -66
  62. package/css/src/tokens/widths.js +0 -11
  63. package/css/src/typography.css +0 -103
  64. package/css/src/utilities.css +0 -1
  65. package/dist/css/base.css +0 -2
  66. package/dist/css/base.css.map +0 -1
  67. package/dist/css/components.css +0 -2
  68. package/dist/css/components.css.map +0 -1
  69. package/dist/css/fonts.css +0 -2
  70. package/dist/css/fonts.css.map +0 -1
  71. package/dist/css/icons.css +0 -2
  72. package/dist/css/icons.css.map +0 -1
  73. package/dist/css/overrides.css +0 -2
  74. package/dist/css/overrides.css.map +0 -1
  75. package/dist/css/sfds.css +0 -2
  76. package/dist/css/sfds.css.map +0 -1
  77. package/dist/css/typography.css +0 -2
  78. package/dist/css/typography.css.map +0 -1
  79. package/dist/css/utilities.css +0 -2
  80. package/dist/css/utilities.css.map +0 -1
  81. package/dist/css/utilities.json +0 -7350
  82. package/dist/elements/index.d.mts +0 -30
  83. package/dist/elements/index.d.mts.map +0 -1
  84. package/dist/elements/index.d.ts +0 -30
  85. package/dist/elements/index.d.ts.map +0 -1
  86. package/dist/elements/index.js +0 -1
  87. package/dist/elements/index.mjs +0 -1
  88. package/dist/manifest.json +0 -45
  89. package/dist/react/index.d.mts.map +0 -1
  90. package/dist/react/index.d.ts.map +0 -1
  91. package/elements/index.js +0 -1
  92. package/elements/index.mjs +0 -1
  93. package/elements/src/index.js +0 -7
  94. package/elements/src/sfgov-icon.js +0 -109
  95. package/icons/index.json +0 -439
  96. package/icons/svg/accessibility.svg +0 -4
  97. package/icons/svg/alert.svg +0 -5
  98. package/icons/svg/archive.svg +0 -4
  99. package/icons/svg/arrow-down.svg +0 -3
  100. package/icons/svg/arrow-left.svg +0 -3
  101. package/icons/svg/arrow-right.svg +0 -3
  102. package/icons/svg/arrow-up.svg +0 -3
  103. package/icons/svg/building.svg +0 -7
  104. package/icons/svg/calendar.svg +0 -3
  105. package/icons/svg/caution.svg +0 -3
  106. package/icons/svg/chart.svg +0 -6
  107. package/icons/svg/check.svg +0 -3
  108. package/icons/svg/chevron-down.svg +0 -3
  109. package/icons/svg/chevron-left.svg +0 -3
  110. package/icons/svg/chevron-right.svg +0 -3
  111. package/icons/svg/chevron-up.svg +0 -3
  112. package/icons/svg/clock.svg +0 -4
  113. package/icons/svg/close.svg +0 -3
  114. package/icons/svg/document.svg +0 -3
  115. package/icons/svg/globe.svg +0 -3
  116. package/icons/svg/hamburger-button.svg +0 -5
  117. package/icons/svg/index.json +0 -346
  118. package/icons/svg/info.svg +0 -5
  119. package/icons/svg/location.svg +0 -4
  120. package/icons/svg/mail.svg +0 -3
  121. package/icons/svg/minus.svg +0 -3
  122. package/icons/svg/pencil.svg +0 -3
  123. package/icons/svg/phone.svg +0 -3
  124. package/icons/svg/plus.svg +0 -3
  125. package/icons/svg/question.svg +0 -4
  126. package/icons/svg/search.svg +0 -3
  127. package/icons/svg/wip.svg +0 -3
  128. package/lib/markdownlint/frontmatter.js +0 -51
  129. package/lib/markdownlint/no-empty.js +0 -19
  130. package/lib/tailwind/details.js +0 -14
  131. package/react/README.md +0 -36
  132. package/react/index.js +0 -1
  133. package/react/index.mjs +0 -1
  134. package/react/src/components/Box.tsx +0 -6
  135. package/react/src/components/Button.tsx +0 -94
  136. package/react/src/components/Container.tsx +0 -19
  137. package/react/src/components/Flex.tsx +0 -16
  138. package/react/src/components/GlobalStyle.tsx +0 -35
  139. package/react/src/components/GoogleFonts.tsx +0 -67
  140. package/react/src/components/Grid.tsx +0 -15
  141. package/react/src/components/SSRStyle.tsx +0 -47
  142. package/react/src/components/SVGIcon.tsx +0 -42
  143. package/react/src/components/Text.tsx +0 -78
  144. package/react/src/components/Tile.tsx +0 -93
  145. package/react/src/components/index.ts +0 -11
  146. package/react/src/components/page/AboutSection.tsx +0 -90
  147. package/react/src/components/page/AgencyHeader.tsx +0 -56
  148. package/react/src/components/page/ArchiveInformation.tsx +0 -43
  149. package/react/src/components/page/ContactSection.tsx +0 -92
  150. package/react/src/components/page/Section.tsx +0 -53
  151. package/react/src/components/page/Spotlight.tsx +0 -70
  152. package/react/src/components/page/index.ts +0 -6
  153. package/react/src/constants.ts +0 -48
  154. package/react/src/icons/IconAccessibility.jsx +0 -3
  155. package/react/src/icons/IconAlert.jsx +0 -3
  156. package/react/src/icons/IconArchive.jsx +0 -3
  157. package/react/src/icons/IconArrowDown.jsx +0 -3
  158. package/react/src/icons/IconArrowLeft.jsx +0 -3
  159. package/react/src/icons/IconArrowRight.jsx +0 -3
  160. package/react/src/icons/IconArrowUp.jsx +0 -3
  161. package/react/src/icons/IconBuilding.jsx +0 -3
  162. package/react/src/icons/IconCalendar.jsx +0 -3
  163. package/react/src/icons/IconCaution.jsx +0 -3
  164. package/react/src/icons/IconChart.jsx +0 -3
  165. package/react/src/icons/IconCheck.jsx +0 -3
  166. package/react/src/icons/IconChevronDown.jsx +0 -3
  167. package/react/src/icons/IconChevronLeft.jsx +0 -3
  168. package/react/src/icons/IconChevronRight.jsx +0 -3
  169. package/react/src/icons/IconChevronUp.jsx +0 -3
  170. package/react/src/icons/IconClock.jsx +0 -3
  171. package/react/src/icons/IconClose.jsx +0 -3
  172. package/react/src/icons/IconDocument.jsx +0 -3
  173. package/react/src/icons/IconGlobe.jsx +0 -3
  174. package/react/src/icons/IconHamburgerButton.jsx +0 -3
  175. package/react/src/icons/IconInfo.jsx +0 -3
  176. package/react/src/icons/IconLocation.jsx +0 -3
  177. package/react/src/icons/IconMail.jsx +0 -3
  178. package/react/src/icons/IconMinus.jsx +0 -3
  179. package/react/src/icons/IconPencil.jsx +0 -3
  180. package/react/src/icons/IconPhone.jsx +0 -3
  181. package/react/src/icons/IconPlus.jsx +0 -3
  182. package/react/src/icons/IconQuestion.jsx +0 -3
  183. package/react/src/icons/IconSearch.jsx +0 -3
  184. package/react/src/icons/IconWIP.jsx +0 -3
  185. package/react/src/icons/index.js +0 -31
  186. package/react/src/icons/index.json +0 -346
  187. package/react/src/icons.tsx +0 -34
  188. package/react/src/index.ts +0 -4
  189. package/react/src/stitches.config.ts +0 -85
  190. package/react/src/theme/breakpoints.ts +0 -14
  191. package/react/src/theme/colors.ts +0 -34
  192. package/react/src/theme/index.tsx +0 -31
  193. package/react/src/theme/space.ts +0 -16
  194. package/react/src/theme/typography.ts +0 -136
  195. package/react/src/types.ts +0 -31
  196. package/react/src/utils.tsx +0 -25
  197. package/svgo.config.js +0 -27
  198. package/tailwind.config.js +0 -5
  199. package/tailwind.preset.js +0 -128
package/README.md CHANGED
@@ -1,7 +1,98 @@
1
- # San Francisco Design System
1
+ # sf.gov design system
2
2
 
3
- This is the design system for [SF.gov](https://sf.gov) and the City & County
4
- of San Francisco.
3
+ This is the home of the design system for the City & County of San Francisco's
4
+ web site, [sf.gov](https://www.sf.gov/).
5
5
 
6
- Design and developer documentation is available at
7
- [design-system.sf.gov](https://design-system.sf.gov).
6
+ ## Install
7
+
8
+ You can install the design system with [npm] or any npm-compatible package
9
+ manager ([pnpm], [yarn], etc.):
10
+
11
+ ```sh
12
+ npm install @sfgov/design-system
13
+ ```
14
+
15
+ ### Dependencies
16
+
17
+ The `@sfgov/design-system` package requires [Tailwind CSS v3] for styling and
18
+ [React] for rendering components. If you don't have them already, you can
19
+ install them with:
20
+
21
+ ```sh
22
+ npm install tailwindcss@3 react@18 react-dom@18
23
+ ```
24
+
25
+ ## Entrypoints
26
+
27
+ The package provides the following entrypoints:
28
+
29
+ - `@sfgov/design-system` exports the `react` and `tokens` namespaces.
30
+ - `@sfgov/design-system/react` exports the React components and helpers,
31
+ including `classed()`.
32
+ - `@sfgov/design-system/tailwind-preset` is the [Tailwind preset](#tailwind).
33
+ - `@sfgov/design-system/tokens` exports the design tokens: `breakpoints`,
34
+ `colors`, `spacing`, and `widths`.
35
+ - `@sfgov/design-system/formio` exports the `FormioForm` React component and
36
+ other support code.
37
+ - `@sfgov/design-system/formio/factories` exports form.io-specific test
38
+ factories like `FormFactory` that are used by sf.gov's `FormPage` tests.
39
+
40
+ ## React components
41
+
42
+ React components are exported from `@sfgov/design-system/react`:
43
+
44
+ ```tsx
45
+ import { Button, Container } from '@sfgov/design-system/react'
46
+
47
+ export function Greeting() {
48
+ return (
49
+ <Container>
50
+ <Button onClick={() => alert('hello!')}>Say hi</Button>
51
+ </Container>
52
+ )
53
+ }
54
+ ```
55
+
56
+ ### `classed()` components
57
+
58
+ The components entrypoint also exports a `classed()` function that can be used
59
+ to create new, higher order components:
60
+
61
+ ```tsx
62
+ import { classed, Button } from '@sfgov/design-system/react'
63
+
64
+ // renders <Button className="fancy">
65
+ export const FancyButton = classed(Button, 'fancy')
66
+ ```
67
+
68
+ ## Tailwind
69
+
70
+ The `@sfgov/design-system` package includes a [Tailwind preset] that you can use
71
+ in your own configuration. In order for Tailwind to include styles for the
72
+ included React components, you'll also need to add an entry to the [content
73
+ sources] option that tells Tailwind to look for class names in _this_ package:
74
+
75
+ ```js
76
+ // tailwind.config.js
77
+ const sfgov = require('@sfgov/design-system/tailwind-preset')
78
+ const { dirname } = require('node:path')
79
+
80
+ const designSystemDist = dirname(require.resolve('@sfgov/design-system'))
81
+
82
+ /** @type {import('tailwindcss').Config} */
83
+ module.exports = {
84
+ presets: [sfgov],
85
+ content: [
86
+ './src/**/*.tsx',
87
+ `${designSystemDist}/**/*.{js,mjs}`
88
+ ]
89
+ }
90
+ ```
91
+
92
+ [content sources]: https://v3.tailwindcss.com/docs/upgrade-guide#configure-content-sources
93
+ [npm]: https://www.npmjs.com/
94
+ [pnpm]: https://pnpm.io/
95
+ [react]: https://react.dev/
96
+ [tailwind css v3]: https://v3.tailwindcss.com/
97
+ [tailwind preset]: https://v3.tailwindcss.com/docs/presets
98
+ [yarn]: https://yarnpkg.com/
@@ -0,0 +1,23 @@
1
+ import * as node_factory from 'node-factory';
2
+ import { CheckboxSchema, ColumnsSchema, AnyComponentSchema, ContainerSchema, FieldsetSchema, FlatFormSchema, InputOption, PanelSchema, RadioSchema, SelectBoxesSchema, SelectSchema, WellSchema, WizardFormSchema } from '../index.mjs';
3
+ import 'formiojs';
4
+ import 'formiojs/types/eventEmitter';
5
+ import 'i18next';
6
+ import '@formio/choices.js';
7
+
8
+ declare const FormFactory: node_factory.Factory<FlatFormSchema> & node_factory.GenericExtension<FlatFormSchema>;
9
+ declare const WizardFactory: node_factory.Factory<WizardFormSchema> & node_factory.GenericExtension<WizardFormSchema>;
10
+ declare const ComponentFactory: node_factory.Factory<AnyComponentSchema> & node_factory.GenericExtension<AnyComponentSchema>;
11
+ declare const ContainerComponentFactory: node_factory.Factory<ContainerSchema> & node_factory.GenericExtension<ContainerSchema>;
12
+ declare const PageFactory: node_factory.Factory<PanelSchema> & node_factory.GenericExtension<PanelSchema>;
13
+ declare const WellFactory: node_factory.Factory<WellSchema> & node_factory.GenericExtension<WellSchema>;
14
+ declare const FieldsetFactory: node_factory.Factory<FieldsetSchema> & node_factory.GenericExtension<FieldsetSchema>;
15
+ declare const OptionFactory: node_factory.Factory<InputOption> & node_factory.GenericExtension<InputOption>;
16
+ declare const CheckboxFactory: node_factory.Factory<CheckboxSchema> & node_factory.GenericExtension<CheckboxSchema>;
17
+ declare const RadioFactory: node_factory.Factory<RadioSchema> & node_factory.GenericExtension<RadioSchema>;
18
+ declare const SelectBoxesFactory: node_factory.Factory<SelectBoxesSchema> & node_factory.GenericExtension<SelectBoxesSchema>;
19
+ declare const SelectFactory: node_factory.Factory<SelectSchema> & node_factory.GenericExtension<SelectSchema>;
20
+ declare const ColumnsFactory: node_factory.Factory<ColumnsSchema> & node_factory.GenericExtension<ColumnsSchema>;
21
+ declare const MailingAddressFactory: node_factory.Factory<ContainerSchema> & node_factory.GenericExtension<ContainerSchema>;
22
+
23
+ export { CheckboxFactory, ColumnsFactory, ComponentFactory, ContainerComponentFactory, FieldsetFactory, FormFactory, MailingAddressFactory, OptionFactory, PageFactory, RadioFactory, SelectBoxesFactory, SelectFactory, WellFactory, WizardFactory };
@@ -0,0 +1,23 @@
1
+ import * as node_factory from 'node-factory';
2
+ import { CheckboxSchema, ColumnsSchema, AnyComponentSchema, ContainerSchema, FieldsetSchema, FlatFormSchema, InputOption, PanelSchema, RadioSchema, SelectBoxesSchema, SelectSchema, WellSchema, WizardFormSchema } from '../index.js';
3
+ import 'formiojs';
4
+ import 'formiojs/types/eventEmitter';
5
+ import 'i18next';
6
+ import '@formio/choices.js';
7
+
8
+ declare const FormFactory: node_factory.Factory<FlatFormSchema> & node_factory.GenericExtension<FlatFormSchema>;
9
+ declare const WizardFactory: node_factory.Factory<WizardFormSchema> & node_factory.GenericExtension<WizardFormSchema>;
10
+ declare const ComponentFactory: node_factory.Factory<AnyComponentSchema> & node_factory.GenericExtension<AnyComponentSchema>;
11
+ declare const ContainerComponentFactory: node_factory.Factory<ContainerSchema> & node_factory.GenericExtension<ContainerSchema>;
12
+ declare const PageFactory: node_factory.Factory<PanelSchema> & node_factory.GenericExtension<PanelSchema>;
13
+ declare const WellFactory: node_factory.Factory<WellSchema> & node_factory.GenericExtension<WellSchema>;
14
+ declare const FieldsetFactory: node_factory.Factory<FieldsetSchema> & node_factory.GenericExtension<FieldsetSchema>;
15
+ declare const OptionFactory: node_factory.Factory<InputOption> & node_factory.GenericExtension<InputOption>;
16
+ declare const CheckboxFactory: node_factory.Factory<CheckboxSchema> & node_factory.GenericExtension<CheckboxSchema>;
17
+ declare const RadioFactory: node_factory.Factory<RadioSchema> & node_factory.GenericExtension<RadioSchema>;
18
+ declare const SelectBoxesFactory: node_factory.Factory<SelectBoxesSchema> & node_factory.GenericExtension<SelectBoxesSchema>;
19
+ declare const SelectFactory: node_factory.Factory<SelectSchema> & node_factory.GenericExtension<SelectSchema>;
20
+ declare const ColumnsFactory: node_factory.Factory<ColumnsSchema> & node_factory.GenericExtension<ColumnsSchema>;
21
+ declare const MailingAddressFactory: node_factory.Factory<ContainerSchema> & node_factory.GenericExtension<ContainerSchema>;
22
+
23
+ export { CheckboxFactory, ColumnsFactory, ComponentFactory, ContainerComponentFactory, FieldsetFactory, FormFactory, MailingAddressFactory, OptionFactory, PageFactory, RadioFactory, SelectBoxesFactory, SelectFactory, WellFactory, WizardFactory };