@sankhyatronics/sankhya-cms 0.1.15 → 0.1.16

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.
@@ -910,125 +910,6 @@
910
910
  }
911
911
  ]
912
912
  },
913
- {
914
- "kind": "javascript-module",
915
- "path": "src/chip/Chip.ts",
916
- "declarations": [
917
- {
918
- "kind": "class",
919
- "description": "A small rounded status pill: text in the default slot, with an optional leading dot. Tones map\nto the theme's status tokens (soft background, text colour on that background), so a chip reads\nthe same in every theme. Use `neutral` for plain labels, `accent` for the brand tint, and the\nstatus tones for meaning only (success = done, warning = due soon, danger = overdue).\n\nThe pill's box (padding, background) sits on an inner element, not on `:host`: an outer page's\nCSS reset (Tailwind's preflight zeroes padding on every element) beats a component's `:host`\nrules, which would leave the pill without its padding.",
920
- "name": "Chip",
921
- "members": [
922
- {
923
- "kind": "field",
924
- "name": "tone",
925
- "type": {
926
- "text": "'neutral' | 'accent' | 'success' | 'warning' | 'danger'"
927
- },
928
- "default": "'neutral'",
929
- "description": "Colour treatment: a soft tint of the matching theme token.",
930
- "attribute": "tone",
931
- "reflects": true
932
- },
933
- {
934
- "kind": "field",
935
- "name": "size",
936
- "type": {
937
- "text": "'md' | 'sm'"
938
- },
939
- "default": "'md'",
940
- "description": "`sm` for dense lists and table cells.",
941
- "attribute": "size",
942
- "reflects": true
943
- },
944
- {
945
- "kind": "field",
946
- "name": "translucent",
947
- "type": {
948
- "text": "boolean"
949
- },
950
- "default": "false",
951
- "description": "A see-through white pill with white text, for a chip on a coloured card.",
952
- "attribute": "translucent",
953
- "reflects": true
954
- },
955
- {
956
- "kind": "field",
957
- "name": "dot",
958
- "type": {
959
- "text": "boolean"
960
- },
961
- "default": "false",
962
- "description": "Shows a leading dot in the chip's text colour.",
963
- "attribute": "dot",
964
- "reflects": true
965
- }
966
- ],
967
- "attributes": [
968
- {
969
- "name": "tone",
970
- "type": {
971
- "text": "'neutral' | 'accent' | 'success' | 'warning' | 'danger'"
972
- },
973
- "default": "'neutral'",
974
- "description": "Colour treatment: a soft tint of the matching theme token.",
975
- "fieldName": "tone"
976
- },
977
- {
978
- "name": "size",
979
- "type": {
980
- "text": "'md' | 'sm'"
981
- },
982
- "default": "'md'",
983
- "description": "`sm` for dense lists and table cells.",
984
- "fieldName": "size"
985
- },
986
- {
987
- "name": "translucent",
988
- "type": {
989
- "text": "boolean"
990
- },
991
- "default": "false",
992
- "description": "A see-through white pill with white text, for a chip on a coloured card.",
993
- "fieldName": "translucent"
994
- },
995
- {
996
- "name": "dot",
997
- "type": {
998
- "text": "boolean"
999
- },
1000
- "default": "false",
1001
- "description": "Shows a leading dot in the chip's text colour.",
1002
- "fieldName": "dot"
1003
- }
1004
- ],
1005
- "superclass": {
1006
- "name": "LitElement",
1007
- "package": "lit"
1008
- },
1009
- "tagName": "st-chip",
1010
- "customElement": true
1011
- }
1012
- ],
1013
- "exports": [
1014
- {
1015
- "kind": "js",
1016
- "name": "Chip",
1017
- "declaration": {
1018
- "name": "Chip",
1019
- "module": "src/chip/Chip.ts"
1020
- }
1021
- },
1022
- {
1023
- "kind": "custom-element-definition",
1024
- "name": "st-chip",
1025
- "declaration": {
1026
- "name": "Chip",
1027
- "module": "src/chip/Chip.ts"
1028
- }
1029
- }
1030
- ]
1031
- },
1032
913
  {
1033
914
  "kind": "javascript-module",
1034
915
  "path": "src/content-block/ContentBlock.ts",
@@ -1215,6 +1096,125 @@
1215
1096
  }
1216
1097
  ]
1217
1098
  },
1099
+ {
1100
+ "kind": "javascript-module",
1101
+ "path": "src/chip/Chip.ts",
1102
+ "declarations": [
1103
+ {
1104
+ "kind": "class",
1105
+ "description": "A small rounded status pill: text in the default slot, with an optional leading dot. Tones map\nto the theme's status tokens (soft background, text colour on that background), so a chip reads\nthe same in every theme. Use `neutral` for plain labels, `accent` for the brand tint, and the\nstatus tones for meaning only (success = done, warning = due soon, danger = overdue).\n\nThe pill's box (padding, background) sits on an inner element, not on `:host`: an outer page's\nCSS reset (Tailwind's preflight zeroes padding on every element) beats a component's `:host`\nrules, which would leave the pill without its padding.",
1106
+ "name": "Chip",
1107
+ "members": [
1108
+ {
1109
+ "kind": "field",
1110
+ "name": "tone",
1111
+ "type": {
1112
+ "text": "'neutral' | 'accent' | 'success' | 'warning' | 'danger'"
1113
+ },
1114
+ "default": "'neutral'",
1115
+ "description": "Colour treatment: a soft tint of the matching theme token.",
1116
+ "attribute": "tone",
1117
+ "reflects": true
1118
+ },
1119
+ {
1120
+ "kind": "field",
1121
+ "name": "size",
1122
+ "type": {
1123
+ "text": "'md' | 'sm'"
1124
+ },
1125
+ "default": "'md'",
1126
+ "description": "`sm` for dense lists and table cells.",
1127
+ "attribute": "size",
1128
+ "reflects": true
1129
+ },
1130
+ {
1131
+ "kind": "field",
1132
+ "name": "translucent",
1133
+ "type": {
1134
+ "text": "boolean"
1135
+ },
1136
+ "default": "false",
1137
+ "description": "A see-through white pill with white text, for a chip on a coloured card.",
1138
+ "attribute": "translucent",
1139
+ "reflects": true
1140
+ },
1141
+ {
1142
+ "kind": "field",
1143
+ "name": "dot",
1144
+ "type": {
1145
+ "text": "boolean"
1146
+ },
1147
+ "default": "false",
1148
+ "description": "Shows a leading dot in the chip's text colour.",
1149
+ "attribute": "dot",
1150
+ "reflects": true
1151
+ }
1152
+ ],
1153
+ "attributes": [
1154
+ {
1155
+ "name": "tone",
1156
+ "type": {
1157
+ "text": "'neutral' | 'accent' | 'success' | 'warning' | 'danger'"
1158
+ },
1159
+ "default": "'neutral'",
1160
+ "description": "Colour treatment: a soft tint of the matching theme token.",
1161
+ "fieldName": "tone"
1162
+ },
1163
+ {
1164
+ "name": "size",
1165
+ "type": {
1166
+ "text": "'md' | 'sm'"
1167
+ },
1168
+ "default": "'md'",
1169
+ "description": "`sm` for dense lists and table cells.",
1170
+ "fieldName": "size"
1171
+ },
1172
+ {
1173
+ "name": "translucent",
1174
+ "type": {
1175
+ "text": "boolean"
1176
+ },
1177
+ "default": "false",
1178
+ "description": "A see-through white pill with white text, for a chip on a coloured card.",
1179
+ "fieldName": "translucent"
1180
+ },
1181
+ {
1182
+ "name": "dot",
1183
+ "type": {
1184
+ "text": "boolean"
1185
+ },
1186
+ "default": "false",
1187
+ "description": "Shows a leading dot in the chip's text colour.",
1188
+ "fieldName": "dot"
1189
+ }
1190
+ ],
1191
+ "superclass": {
1192
+ "name": "LitElement",
1193
+ "package": "lit"
1194
+ },
1195
+ "tagName": "st-chip",
1196
+ "customElement": true
1197
+ }
1198
+ ],
1199
+ "exports": [
1200
+ {
1201
+ "kind": "js",
1202
+ "name": "Chip",
1203
+ "declaration": {
1204
+ "name": "Chip",
1205
+ "module": "src/chip/Chip.ts"
1206
+ }
1207
+ },
1208
+ {
1209
+ "kind": "custom-element-definition",
1210
+ "name": "st-chip",
1211
+ "declaration": {
1212
+ "name": "Chip",
1213
+ "module": "src/chip/Chip.ts"
1214
+ }
1215
+ }
1216
+ ]
1217
+ },
1218
1218
  {
1219
1219
  "kind": "javascript-module",
1220
1220
  "path": "src/cookie-consent/CookieConsent.ts",
@@ -44,9 +44,15 @@ Tooltip.styles = css`
44
44
  transition: opacity 0.12s ease;
45
45
  }
46
46
 
47
- :host(:hover) .bubble,
47
+ /* Hover waits a moment, so a passing pointer doesn't flash a label; keyboard focus shows it at once. */
48
+ :host(:hover) .bubble {
49
+ opacity: 1;
50
+ transition-delay: var(--st-tooltip-delay, 300ms);
51
+ }
52
+
48
53
  :host(:focus-within) .bubble {
49
54
  opacity: 1;
55
+ transition-delay: 0s;
50
56
  }
51
57
 
52
58
  @media (prefers-reduced-motion: reduce) {
@@ -65,4 +71,4 @@ Tooltip = __decorateClass([
65
71
  export {
66
72
  Tooltip
67
73
  };
68
- //# sourceMappingURL=chunk-HO44NKJ5.js.map
74
+ //# sourceMappingURL=chunk-XCA3XFFG.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/tooltip/Tooltip.ts"],"sourcesContent":["import { LitElement, css, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { fontFamilyStyles } from '../shared/styles';\n\n/**\n * A small label that shows above a control on hover and on keyboard focus. Wrap the control (a button\n * or an icon button) in it and pass the same words as its accessible name in `text`. The bubble is\n * decorative (`aria-hidden`): the control's own `aria-label` is what a screen reader announces, so the\n * words aren't read twice.\n *\n * The bubble is positioned by the wrapper, so put the tooltip where it has room above: it's not\n * clipped by the wrapper's own box, but it is clipped by an ancestor with `overflow: hidden`.\n */\n@customElement('st-tooltip')\nexport class Tooltip extends LitElement {\n static styles = css`\n ${fontFamilyStyles}\n\n :host {\n position: relative;\n display: inline-flex;\n }\n\n .bubble {\n position: absolute;\n bottom: calc(100% + 6px);\n left: 50%;\n transform: translateX(-50%);\n z-index: 20;\n padding: var(--st-space-4) var(--st-space-8);\n border-radius: var(--st-radius-xs);\n background: var(--st-color-text-strong);\n color: var(--st-color-on-solid);\n font-size: var(--st-text-xs);\n font-weight: var(--st-font-weight-medium);\n line-height: 1.3;\n white-space: nowrap;\n pointer-events: none;\n opacity: 0;\n transition: opacity 0.12s ease;\n }\n\n :host(:hover) .bubble,\n :host(:focus-within) .bubble {\n opacity: 1;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .bubble {\n transition: none;\n }\n }\n `;\n\n /** The words shown in the bubble: the same words as the control's accessible name. */\n @property({ type: String })\n text = '';\n\n render() {\n return html`<slot></slot><span class=\"bubble\" part=\"bubble\" aria-hidden=\"true\">${this.text}</span>`;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,YAAY,KAAK,YAAY;AACtC,SAAS,eAAe,gBAAgB;AAcjC,IAAM,UAAN,cAAsB,WAAW;AAAA,EAAjC;AAAA;AA0CL,gBAAO;AAAA;AAAA,EAEP,SAAS;AACP,WAAO,0EAA0E,KAAK,IAAI;AAAA,EAC5F;AACF;AA/Ca,QACJ,SAAS;AAAA,MACZ,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAwCpB;AAAA,EADC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GAzCf,QA0CX;AA1CW,UAAN;AAAA,EADN,cAAc,YAAY;AAAA,GACd;","names":[]}
1
+ {"version":3,"sources":["../src/tooltip/Tooltip.ts"],"sourcesContent":["import { LitElement, css, html } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\n\nimport { fontFamilyStyles } from '../shared/styles';\n\n/**\n * A small label that shows above a control on hover and on keyboard focus. Wrap the control (a button\n * or an icon button) in it and pass the same words as its accessible name in `text`. The bubble is\n * decorative (`aria-hidden`): the control's own `aria-label` is what a screen reader announces, so the\n * words aren't read twice.\n *\n * The bubble is positioned by the wrapper, so put the tooltip where it has room above: it's not\n * clipped by the wrapper's own box, but it is clipped by an ancestor with `overflow: hidden`.\n */\n@customElement('st-tooltip')\nexport class Tooltip extends LitElement {\n static styles = css`\n ${fontFamilyStyles}\n\n :host {\n position: relative;\n display: inline-flex;\n }\n\n .bubble {\n position: absolute;\n bottom: calc(100% + 6px);\n left: 50%;\n transform: translateX(-50%);\n z-index: 20;\n padding: var(--st-space-4) var(--st-space-8);\n border-radius: var(--st-radius-xs);\n background: var(--st-color-text-strong);\n color: var(--st-color-on-solid);\n font-size: var(--st-text-xs);\n font-weight: var(--st-font-weight-medium);\n line-height: 1.3;\n white-space: nowrap;\n pointer-events: none;\n opacity: 0;\n transition: opacity 0.12s ease;\n }\n\n /* Hover waits a moment, so a passing pointer doesn't flash a label; keyboard focus shows it at once. */\n :host(:hover) .bubble {\n opacity: 1;\n transition-delay: var(--st-tooltip-delay, 300ms);\n }\n\n :host(:focus-within) .bubble {\n opacity: 1;\n transition-delay: 0s;\n }\n\n @media (prefers-reduced-motion: reduce) {\n .bubble {\n transition: none;\n }\n }\n `;\n\n /** The words shown in the bubble: the same words as the control's accessible name. */\n @property({ type: String })\n text = '';\n\n render() {\n return html`<slot></slot><span class=\"bubble\" part=\"bubble\" aria-hidden=\"true\">${this.text}</span>`;\n }\n}\n"],"mappings":";;;;;;;;AAAA,SAAS,YAAY,KAAK,YAAY;AACtC,SAAS,eAAe,gBAAgB;AAcjC,IAAM,UAAN,cAAsB,WAAW;AAAA,EAAjC;AAAA;AAgDL,gBAAO;AAAA;AAAA,EAEP,SAAS;AACP,WAAO,0EAA0E,KAAK,IAAI;AAAA,EAC5F;AACF;AArDa,QACJ,SAAS;AAAA,MACZ,gBAAgB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA8CpB;AAAA,EADC,SAAS,EAAE,MAAM,OAAO,CAAC;AAAA,GA/Cf,QAgDX;AAhDW,UAAN;AAAA,EADN,cAAc,YAAY;AAAA,GACd;","names":[]}
package/dist/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-DH53HZPB.js";
4
4
  import {
5
5
  Tooltip
6
- } from "./chunk-HO44NKJ5.js";
6
+ } from "./chunk-XCA3XFFG.js";
7
7
  import {
8
8
  PromoBanner
9
9
  } from "./chunk-VWS53WY4.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  Tooltip
3
- } from "../chunk-HO44NKJ5.js";
3
+ } from "../chunk-XCA3XFFG.js";
4
4
  import "../chunk-KMU6ABQF.js";
5
5
  import "../chunk-EUXUH3YW.js";
6
6
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sankhyatronics/sankhya-cms",
3
- "version": "0.1.15",
3
+ "version": "0.1.16",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sankhyatronics/SankhyaCMS.git",