aboutsummaryrefslogtreecommitdiffstats
path: root/public/prism/prism-elm.min.js
blob: 2fdcae9dbdd1bea4fb6aff37f327efb4776cad94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Prism.languages.elm = {
  comment: /--.*|\{-[\s\S]*?-\}/,
  char: {
    pattern:
      /'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/,
    greedy: !0,
  },
  string: [
    { pattern: /"""[\s\S]*?"""/, greedy: !0 },
    { pattern: /"(?:[^\\"\r\n]|\\.)*"/, greedy: !0 },
  ],
  'import-statement': {
    pattern:
      /(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,
    lookbehind: !0,
    inside: { keyword: /\b(?:as|exposing|import)\b/ },
  },
  keyword:
    /\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,
  builtin:
    /\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,
  number: /\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,
  operator: /\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,
  hvariable: /\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,
  constant: /\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,
  punctuation: /[{}[\]|(),.:]/,
};
ion3' }, ]; /** * Select - Storybook Meta */ export default { title: 'Atoms/Forms', component: SelectComponent, args: { disabled: false, required: false, }, argTypes: { 'aria-labelledby': { control: { type: 'text', }, description: 'One or more ids that refers to the select field name.', table: { category: 'Accessibility', }, type: { name: 'string', required: false, }, }, className: { control: { type: 'text', }, description: 'Add classnames to the select field.', table: { category: 'Styles', }, type: { name: 'string', required: false, }, }, disabled: { control: { type: 'boolean', }, description: 'Field state: either enabled or disabled.', table: { category: 'Options', defaultValue: { summary: false }, }, type: { name: 'boolean', required: false, }, }, id: { control: { type: 'text', }, description: 'Field id.', type: { name: 'string', required: true, }, }, name: { control: { type: 'text', }, description: 'Field name.', type: { name: 'string', required: true, }, }, options: { description: 'Select options.', type: { name: 'array', required: true, value: { name: 'string', }, }, }, required: { control: { type: 'boolean', }, description: 'Determine if the field is required.', table: { category: 'Options', defaultValue: { summary: false }, }, type: { name: 'boolean', required: false, }, }, setValue: { control: { type: null, }, description: 'Callback function to set field value.', table: { category: 'Events', }, type: { name: 'function', required: true, }, }, value: { control: { type: null, }, description: 'Field value.', type: { name: 'string', required: true, }, }, }, } as ComponentMeta<typeof SelectComponent>; const Template: ComponentStory<typeof SelectComponent> = ({ value, setValue: _setValue, ...args }) => { const [selected, setSelected] = useState<string>(value); return <SelectComponent value={selected} setValue={setSelected} {...args} />; }; /** * Select Story */ export const Select = Template.bind({}); Select.args = { id: 'storybook-select', name: 'storybook-select', options: selectOptions, value: 'option2', };