UNPKG

@wikimedia/codex

Version:

Codex Design System for Wikimedia

10 lines (9 loc) 2.23 kB
"use strict";function t(i){return e=>typeof e=="string"&&i.includes(e)}/*! * This file contains all constants used in the codex package. * * Exported constants should be marked with `@public` comments in this file, AND explicitly * exported in lib.ts. * * IMPORTANT NOTE: All constants should be added to the Types and Constants page on the Codex docs * site. Refer to `packages/codex-docs/docs/components/types-and-constants.md`. */const o="cdx",n=["default","progressive","destructive"],s=["normal","primary","quiet"],a=["small","medium","large"],l=["x-small","small","medium"],r=["notice","warning","error","success"],c=t(r),d=["text","search","number","email","month","password","tel","url","week","date","datetime-local","time"],b=["default","warning","error","success"],m=["start","center","end","number"],u=["16:9","3:2","4:3","1:1","3:4","2:3"],y=t(u),p=["fill","contain","cover","none","scale-down"],g=t(p),T=["top","bottom","left","right","center"],S=t(T),I=120,f=500,x="cdx-menu-footer-item",A=Symbol("CdxTabs"),F=Symbol("CdxActiveTab"),K=Symbol("CdxAllowArbitrary"),V=Symbol("CdxFieldInputId"),h=Symbol("CdxFieldDescriptionId"),v=Symbol("CdxFieldStatus"),w=Symbol("CdxDisabled"),P="".concat(o,"-no-invert"),C=Symbol("CdxTableRowIdentifier"),D=["top","bottom","both"],B={left:"right","left-start":"right","left-end":"right",top:"bottom","top-start":"bottom","top-end":"bottom",bottom:"top","bottom-start":"top","bottom-end":"top",right:"left","right-start":"left","right-end":"left"};exports.ActiveTabKey=F;exports.AllowArbitraryKey=K;exports.ButtonActions=n;exports.ButtonSizes=a;exports.ButtonWeights=s;exports.DebounceInterval=I;exports.DisabledKey=w;exports.FieldDescriptionIdKey=h;exports.FieldInputIdKey=V;exports.FieldStatusKey=v;exports.IconSizes=l;exports.LibraryPrefix=o;exports.MenuFooterValue=x;exports.NoInvertClass=P;exports.PendingDelay=f;exports.TablePaginationPositions=D;exports.TableRowIdentifier=C;exports.TableTextAlignments=m;exports.TabsKey=A;exports.TextInputTypes=d;exports.ValidationStatusTypes=b;exports.imageAspectRatioValidator=y;exports.imagePositionValidator=S;exports.makeStringTypeValidator=t;exports.objectFitValidator=g;exports.oppositeSides=B;exports.statusTypeValidator=c;