@papyrus-ui/styles 0.1.3 → 0.2.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.
@@ -1,15 +1,15 @@
1
- import { BREAKPOINT } from '../const/atoms.js';
1
+ import { BREAKPOINTS } from '../const/breakpoints.js';
2
2
 
3
3
  function bpNext(name) {
4
- const names = Object.keys(BREAKPOINT);
4
+ const names = Object.keys(BREAKPOINTS);
5
5
  const idx = names.indexOf(name);
6
6
  return names[idx + 1];
7
7
  }
8
8
  function bpMin(name) {
9
- return BREAKPOINT[name];
9
+ return BREAKPOINTS[name];
10
10
  }
11
11
  function bpMax(name) {
12
- const val = BREAKPOINT[name];
12
+ const val = BREAKPOINTS[name];
13
13
  return val - 0.2;
14
14
  }
15
15
  function bpUp(name, content) {
@@ -1 +1 @@
1
- {"version":3,"file":"bp.js","sources":["bp.js"],"sourcesContent":["import { BREAKPOINT } from '../const/atoms.js';\n\nfunction bpNext(name) {\n const names = Object.keys(BREAKPOINT);\n const idx = names.indexOf(name);\n return names[idx + 1];\n}\nfunction bpMin(name) {\n return BREAKPOINT[name];\n}\nfunction bpMax(name) {\n const val = BREAKPOINT[name];\n return val - 0.2;\n}\nfunction bpUp(name, content) {\n const minWidth = bpMin(name);\n if (minWidth) {\n return {\n '@media': {\n [`(min-width: ${minWidth}px)`]: content,\n },\n };\n }\n return content;\n}\nfunction bpDown(name, content) {\n const next = bpNext(name);\n const maxWidth = next && bpMax(next);\n if (maxWidth) {\n return {\n '@media': {\n [`(max-width: ${maxWidth}px)`]: content,\n },\n };\n }\n return content;\n}\nfunction bpBetween(min, max, content) {\n const minWidth = bpMin(min);\n const maxWidth = bpMax(max);\n return {\n '@media': {\n [`(min-width: ${minWidth}) and (max-width: ${maxWidth}px)`]: content,\n },\n };\n}\nfunction bpOnly(name, content) {\n const minWidth = bpMin(name);\n const next = bpNext(name);\n const maxWidth = next && bpMax(next);\n if (maxWidth != null) {\n return {\n '@media': {\n [`(min-width: ${minWidth}) and (max-width: ${maxWidth}px)`]: content,\n },\n };\n }\n return bpUp(name, content);\n}\n\nexport { bpBetween, bpDown, bpOnly, bpUp };\n//# sourceMappingURL=bp.js.map\n"],"names":[],"mappings":";;AAEA,SAAS,MAAM,CAAC,IAAI,EAAE;AACtB,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC1C,IAAI,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACpC,IAAI,OAAO,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;AAC1B,CAAC;AACD,SAAS,KAAK,CAAC,IAAI,EAAE;AACrB,IAAI,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC;AACD,SAAS,KAAK,CAAC,IAAI,EAAE;AACrB,IAAI,MAAM,GAAG,GAAG,UAAU,CAAC,IAAI,CAAC,CAAC;AACjC,IAAI,OAAO,GAAG,GAAG,GAAG,CAAC;AACrB,CAAC;AACD,SAAS,IAAI,CAAC,IAAI,EAAE,OAAO,EAAE;AAC7B,IAAI,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;AACjC,IAAI,IAAI,QAAQ,EAAE;AAClB,QAAQ,OAAO;AACf,YAAY,QAAQ,EAAE;AACtB,gBAAgB,CAAC,CAAC,YAAY,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,OAAO;AACvD,aAAa;AACb,SAAS,CAAC;AACV,KAAK;AACL,IAAI,OAAO,OAAO,CAAC;AACnB,CAAC;AACD,SAAS,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE;AAC/B,IAAI,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;AAC9B,IAAI,MAAM,QAAQ,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;AACzC,IAAI,IAAI,QAAQ,EAAE;AAClB,QAAQ,OAAO;AACf,YAAY,QAAQ,EAAE;AACtB,gBAAgB,CAAC,CAAC,YAAY,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,OAAO;AACvD,aAAa;AACb,SAAS,CAAC;AACV,KAAK;AACL,IAAI,OAAO,OAAO,CAAC;AACnB,CAAC;AACD,SAAS,SAAS,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE;AACtC,IAAI,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;AAChC,IAAI,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC;AAChC,IAAI,OAAO;AACX,QAAQ,QAAQ,EAAE;AAClB,YAAY,CAAC,CAAC,YAAY,EAAE,QAAQ,CAAC,kBAAkB,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,OAAO;AAChF,SAAS;AACT,KAAK,CAAC;AACN,CAAC;AACD,SAAS,MAAM,CAAC,IAAI,EAAE,OAAO,EAAE;AAC/B,IAAI,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;AACjC,IAAI,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;AAC9B,IAAI,MAAM,QAAQ,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;AACzC,IAAI,IAAI,QAAQ,IAAI,IAAI,EAAE;AAC1B,QAAQ,OAAO;AACf,YAAY,QAAQ,EAAE;AACtB,gBAAgB,CAAC,CAAC,YAAY,EAAE,QAAQ,CAAC,kBAAkB,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,OAAO;AACpF,aAAa;AACb,SAAS,CAAC;AACV,KAAK;AACL,IAAI,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC/B;;;;"}
1
+ {"version":3,"file":"bp.js","sources":["bp.js"],"sourcesContent":["import { BREAKPOINTS } from '../const/breakpoints.js';\n\nfunction bpNext(name) {\n const names = Object.keys(BREAKPOINTS);\n const idx = names.indexOf(name);\n return names[idx + 1];\n}\nfunction bpMin(name) {\n return BREAKPOINTS[name];\n}\nfunction bpMax(name) {\n const val = BREAKPOINTS[name];\n return val - 0.2;\n}\nfunction bpUp(name, content) {\n const minWidth = bpMin(name);\n if (minWidth) {\n return {\n '@media': {\n [`(min-width: ${minWidth}px)`]: content,\n },\n };\n }\n return content;\n}\nfunction bpDown(name, content) {\n const next = bpNext(name);\n const maxWidth = next && bpMax(next);\n if (maxWidth) {\n return {\n '@media': {\n [`(max-width: ${maxWidth}px)`]: content,\n },\n };\n }\n return content;\n}\nfunction bpBetween(min, max, content) {\n const minWidth = bpMin(min);\n const maxWidth = bpMax(max);\n return {\n '@media': {\n [`(min-width: ${minWidth}) and (max-width: ${maxWidth}px)`]: content,\n },\n };\n}\nfunction bpOnly(name, content) {\n const minWidth = bpMin(name);\n const next = bpNext(name);\n const maxWidth = next && bpMax(next);\n if (maxWidth != null) {\n return {\n '@media': {\n [`(min-width: ${minWidth}) and (max-width: ${maxWidth}px)`]: content,\n },\n };\n }\n return bpUp(name, content);\n}\n\nexport { bpBetween, bpDown, bpOnly, bpUp };\n//# sourceMappingURL=bp.js.map\n"],"names":[],"mappings":";;AAEA,SAAS,MAAM,CAAC,IAAI,EAAE;AACtB,IAAI,MAAM,KAAK,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;AAC3C,IAAI,MAAM,GAAG,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACpC,IAAI,OAAO,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;AAC1B,CAAC;AACD,SAAS,KAAK,CAAC,IAAI,EAAE;AACrB,IAAI,OAAO,WAAW,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;AACD,SAAS,KAAK,CAAC,IAAI,EAAE;AACrB,IAAI,MAAM,GAAG,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;AAClC,IAAI,OAAO,GAAG,GAAG,GAAG,CAAC;AACrB,CAAC;AACD,SAAS,IAA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,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;AAC9B,IAAI,MAAM,QAAQ,GAAG,IAAI,IAAI,KAAK,CAAC,IAAI,CAAC,CAAC;AACzC,IAAI,IAAI,QAAQ,IAAI,IAAI,EAAE;AAC1B,QAAQ,OAAO;AACf,YAAY,QAAQ,EAAE;AACtB,gBAAgB,CAAC,CAAC,YAAY,EAAE,QAAQ,CAAC,kBAAkB,EAAE,QAAQ,CAAC,GAAG,CAAC,GAAG,OAAO;AACpF,aAAa;AACb,SAAS,CAAC;AACV,KAAK;AACL,IAAI,OAAO,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;AAC/B;;;;"}
@@ -1,15 +1,3 @@
1
- /**
2
- * Use this file for const that are used in atoms but can be written
3
- * manually in *.styles files. Values that are used in both atoms and *.styles files
4
- * should be defined in themes.ts and accessed through `vars` object.
5
- */
6
- export declare const BREAKPOINT: {
7
- mobile: number;
8
- mobileLg: number;
9
- tablet: number;
10
- tabletLg: number;
11
- desktop: number;
12
- };
13
1
  export declare const POSITION: readonly ["absolute", "fixed", "relative", "static", "sticky"];
14
2
  export declare const DISPLAY: readonly ["block", "inline-block", "flex", "inline-flex", "inline", "none"];
15
3
  export declare const FLEX: {
@@ -164,6 +152,7 @@ export declare const SPACING: {
164
152
  96: string;
165
153
  auto: string;
166
154
  };
155
+ export declare const POINTER_EVENTS: readonly ["auto", "none"];
167
156
  export declare const INSET: {
168
157
  auto: string;
169
158
  '-px': string;
@@ -0,0 +1,7 @@
1
+ export declare const BREAKPOINTS: {
2
+ mobile: number;
3
+ mobileLg: number;
4
+ tablet: number;
5
+ desktop: number;
6
+ desktopLg: number;
7
+ };
@@ -1,2 +1,3 @@
1
1
  export * from './atoms';
2
+ export * from './breakpoints';
2
3
  export * from './themes';