Skip to content

Commit

Permalink
refactor: move stateTerritoryOrMilitaryPostList to @gsa-tts/forms-cor…
Browse files Browse the repository at this point in the history
…e for better modularity and reuse TCKT-277
  • Loading branch information
kalasgarov committed Feb 24, 2025
1 parent d937359 commit e3b4927
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 67 deletions.
68 changes: 1 addition & 67 deletions packages/design/src/Form/components/Address/Address.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,73 +3,7 @@ import { FormProvider, useForm } from 'react-hook-form';
import { type Meta, type StoryObj } from '@storybook/react';

import AddressPattern from './index.js';
// import { stateTerritoryOrMilitaryPostList } from '..';

const stateTerritoryOrMilitaryPostList = [
{ abbr: 'AL', label: 'AL - Alabama' },
{ abbr: 'AK', label: 'AK - Alaska' },
{ abbr: 'AS', label: 'AS - American' },
{ abbr: 'AZ', label: 'AZ - Arizona' },
{ abbr: 'AR', label: 'AR - Arkansas' },
{ abbr: 'CA', label: 'CA - California' },
{ abbr: 'CO', label: 'CO - Colorado' },
{ abbr: 'CT', label: 'CT - Connecticut' },
{ abbr: 'DE', label: 'DE - Delaware' },
{ abbr: 'DC', label: 'DC - District' },
{ abbr: 'FL', label: 'FL - Florida' },
{ abbr: 'GA', label: 'GA - Georgia' },
{ abbr: 'GU', label: 'GU - Guam' },
{ abbr: 'HI', label: 'HI - Hawaii' },
{ abbr: 'ID', label: 'ID - Idaho' },
{ abbr: 'IL', label: 'IL - Illinois' },
{ abbr: 'IN', label: 'IN - Indiana' },
{ abbr: 'IA', label: 'IA - Iowa' },
{ abbr: 'KS', label: 'KS - Kansas' },
{ abbr: 'KY', label: 'KY - Kentucky' },
{ abbr: 'LA', label: 'LA - Louisiana' },
{ abbr: 'ME', label: 'ME - Maine' },
{ abbr: 'MD', label: 'MD - Maryland' },
{ abbr: 'MA', label: 'MA - Massachusetts' },
{ abbr: 'MI', label: 'MI - Michigan' },
{ abbr: 'MN', label: 'MN - Minnesota' },
{ abbr: 'MS', label: 'MS - Mississippi' },
{ abbr: 'MO', label: 'MO - Missouri' },
{ abbr: 'MT', label: 'MT - Montana' },
{ abbr: 'NE', label: 'NE - Nebraska' },
{ abbr: 'NV', label: 'NV - Nevada' },
{ abbr: 'NH', label: 'NH - New' },
{ abbr: 'NJ', label: 'NJ - New' },
{ abbr: 'NM', label: 'NM - New' },
{ abbr: 'NY', label: 'NY - New' },
{ abbr: 'NC', label: 'NC - North' },
{ abbr: 'ND', label: 'ND - North' },
{ abbr: 'MP', label: 'MP - Northern' },
{ abbr: 'OH', label: 'OH - Ohio' },
{ abbr: 'OK', label: 'OK - Oklahoma' },
{ abbr: 'OR', label: 'OR - Oregon' },
{ abbr: 'PA', label: 'PA - Pennsylvania' },
{ abbr: 'PR', label: 'PR - Puerto' },
{ abbr: 'RI', label: 'RI - Rhode' },
{ abbr: 'SC', label: 'SC - South' },
{ abbr: 'SD', label: 'SD - South' },
{ abbr: 'TN', label: 'TN - Tennessee' },
{ abbr: 'TX', label: 'TX - Texas' },
{ abbr: 'UM', label: 'UM - United' },
{ abbr: 'UT', label: 'UT - Utah' },
{ abbr: 'VT', label: 'VT - Vermont' },
{ abbr: 'VI', label: 'VI - Virgin' },
{ abbr: 'VA', label: 'VA - Virginia' },
{ abbr: 'WA', label: 'WA - Washington' },
{ abbr: 'WV', label: 'WV - West' },
{ abbr: 'WI', label: 'WI - Wisconsin' },
{ abbr: 'WY', label: 'WY - Wyoming' },
{ abbr: 'AA', label: 'AA - Armed Forces Americas' },
{ abbr: 'AE', label: 'AE - Armed Forces Africa' },
{ abbr: 'AE', label: 'AE - Armed Forces Canada' },
{ abbr: 'AE', label: 'AE - Armed Forces Europe' },
{ abbr: 'AE', label: 'AE - Armed Forces Middle East' },
{ abbr: 'AP', label: 'AP - Armed Forces Pacific' },
] as const;
import { stateTerritoryOrMilitaryPostList } from '@gsa-tts/forms-core';

const meta: Meta<typeof AddressPattern> = {
title: 'patterns/Address',
Expand Down
1 change: 1 addition & 0 deletions packages/forms/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export * from './response.js';
export * from './session.js';
export * from './types.js';
export * from './util/base64.js';
export * from './patterns/address/jurisdictions.js';
export { type FormService, createFormService } from './services/index.js';
export {
defaultFormConfig,
Expand Down

0 comments on commit e3b4927

Please sign in to comment.