@public-ui/theme-default 2.0.0-rc.1 → 2.0.0-rc.3

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.
package/dist/index.cjs CHANGED
@@ -386,9 +386,10 @@ var TagEnum = /* @__PURE__ */ ((TagEnum2) => {
386
386
 
387
387
  const KoliBri = new Theme("kol", KeyEnum, TagEnum);
388
388
 
389
- const css = (input) => input.join(``);
389
+ const cssWithCustomLayerName = (layerName) => (input) => `@layer ${layerName} { ${input.join(``)} }`;
390
+ const css = (input) => cssWithCustomLayerName("kol-theme-component")(input);
390
391
  const DEFAULT = KoliBri.createTheme("default", {
391
- GLOBAL: css`
392
+ GLOBAL: cssWithCustomLayerName("kol-theme-global")`
392
393
  :host {
393
394
  --border-radius: var(--kolibri-border-radius, 5px);
394
395
  --font-family: var(--kolibri-font-family, BundesSans Web, Calibri, Verdana, Arial, Helvetica, sans-serif);
@@ -1489,71 +1490,6 @@ const DEFAULT = KoliBri.createTheme("default", {
1489
1490
  font-size: 1.2rem;
1490
1491
  }
1491
1492
  `,
1492
- "KOL-SPIN": css`
1493
- .spin {
1494
- display: inline-block;
1495
- height: 1rem;
1496
- position: relative;
1497
- width: 3rem;
1498
- }
1499
- .spin span {
1500
- animation-timing-function: cubic-bezier(0, 1, 1, 0);
1501
- border: 0.1rem solid rgb(255, 255, 255);
1502
- border-radius: 50%;
1503
- height: 0.8rem;
1504
- width: 0.8rem;
1505
- top: 0.1rem;
1506
- position: absolute;
1507
- }
1508
- .spin span:nth-child(1) {
1509
- background-color: #fc0;
1510
- z-index: 0;
1511
- animation: 2s ease 0s infinite normal none running spin1;
1512
- left: 0.1rem;
1513
- }
1514
- .spin span:nth-child(2) {
1515
- background-color: #f00;
1516
- z-index: 1;
1517
- animation: 2s ease 0s infinite normal none running spin2;
1518
- left: 0.1rem;
1519
- }
1520
- .spin span:nth-child(3) {
1521
- background-color: #000;
1522
- z-index: 1;
1523
- animation: 2s ease 0s infinite normal none running spin2;
1524
- left: 1.1rem;
1525
- }
1526
- .spin span:nth-child(4) {
1527
- background-color: #666;
1528
- z-index: 0;
1529
- animation: 2s ease 0s infinite normal none running spin3;
1530
- left: 2.1rem;
1531
- }
1532
- @keyframes spin1 {
1533
- 0% {
1534
- transform: scale(0);
1535
- }
1536
- 100% {
1537
- transform: scale(1);
1538
- }
1539
- }
1540
- @keyframes spin2 {
1541
- 0% {
1542
- transform: translate(0px, 0px);
1543
- }
1544
- 100% {
1545
- transform: translate(1rem, 0px);
1546
- }
1547
- }
1548
- @keyframes spin3 {
1549
- 0% {
1550
- transform: scale(1);
1551
- }
1552
- 100% {
1553
- transform: scale(0);
1554
- }
1555
- }
1556
- `,
1557
1493
  "KOL-PROGRESS": css`
1558
1494
  :host progress,
1559
1495
  :host span {
@@ -1659,13 +1595,15 @@ const DEFAULT = KoliBri.createTheme("default", {
1659
1595
  }
1660
1596
  select option {
1661
1597
  margin: 1px 0;
1662
- padding: 0.5em;
1663
1598
  border-radius: var(--border-radius);
1664
1599
  cursor: pointer;
1665
1600
  }
1666
1601
  select option:disabled {
1667
1602
  cursor: not-allowed;
1668
1603
  }
1604
+ select:not([multiple]) option {
1605
+ padding: 0.5em;
1606
+ }
1669
1607
  option:active:not(:disabled),
1670
1608
  option:checked:not(:disabled),
1671
1609
  option:focus:not(:disabled),
@@ -2240,7 +2178,7 @@ const DEFAULT = KoliBri.createTheme("default", {
2240
2178
  display: grid;
2241
2179
  gap: 0.25em;
2242
2180
  }
2243
- fieldset div {
2181
+ .radio-input-wrapper {
2244
2182
  align-items: center;
2245
2183
  cursor: pointer;
2246
2184
  display: flex;
@@ -2250,16 +2188,16 @@ const DEFAULT = KoliBri.createTheme("default", {
2250
2188
  min-height: var(--a11y-min-size);
2251
2189
  position: relative;
2252
2190
  }
2253
- fieldset div label {
2191
+ .radio-input-wrapper label {
2254
2192
  cursor: pointer;
2255
2193
  display: flex;
2256
2194
  padding-left: calc(var(--spacing) / 2);
2257
2195
  width: 100%;
2258
2196
  }
2259
- fieldset div label span {
2197
+ .radio-input-wrapper label span {
2260
2198
  margin-top: 0.125em;
2261
2199
  }
2262
- fieldset div input[type='radio'] {
2200
+ .radio-input-wrapper input[type='radio'] {
2263
2201
  appearance: none;
2264
2202
  transition: 0.5s;
2265
2203
  border-radius: 100%;
@@ -2267,16 +2205,16 @@ const DEFAULT = KoliBri.createTheme("default", {
2267
2205
  min-width: calc(6 * 0.25rem);
2268
2206
  width: calc(6 * 0.25rem);
2269
2207
  }
2270
- fieldset div input[type='radio']:before {
2208
+ .radio-input-wrapper input[type='radio']:before {
2271
2209
  content: '';
2272
2210
  cursor: pointer;
2273
2211
  border-radius: 100%;
2274
2212
  display: block;
2275
2213
  }
2276
- fieldset div input[type='radio']:checked:before {
2214
+ .radio-input-wrapper input[type='radio']:checked:before {
2277
2215
  background-color: var(--color-primary);
2278
2216
  }
2279
- fieldset div input[type='radio']:disabled {
2217
+ .radio-input-wrapper input[type='radio']:disabled {
2280
2218
  cursor: not-allowed;
2281
2219
  background-color: var(--color-mute-variant);
2282
2220
  }
@@ -2323,7 +2261,7 @@ const DEFAULT = KoliBri.createTheme("default", {
2323
2261
  fieldset .input-slot {
2324
2262
  gap: var(--spacing);
2325
2263
  }
2326
- fieldset div label {
2264
+ .radio-input-wrapper label {
2327
2265
  padding-left: 0;
2328
2266
  }
2329
2267
  `,
@@ -2798,9 +2736,11 @@ const DEFAULT = KoliBri.createTheme("default", {
2798
2736
  cursor: pointer;
2799
2737
  }
2800
2738
  `,
2801
- "KOL-SPLIT-BUTTON": `.popover {
2802
- background: #fff;
2803
- }`
2739
+ "KOL-SPLIT-BUTTON": css`
2740
+ .popover {
2741
+ background: #fff;
2742
+ }
2743
+ `
2804
2744
  });
2805
2745
 
2806
2746
  exports.DEFAULT = DEFAULT;
package/dist/index.mjs CHANGED
@@ -384,9 +384,10 @@ var TagEnum = /* @__PURE__ */ ((TagEnum2) => {
384
384
 
385
385
  const KoliBri = new Theme("kol", KeyEnum, TagEnum);
386
386
 
387
- const css = (input) => input.join(``);
387
+ const cssWithCustomLayerName = (layerName) => (input) => `@layer ${layerName} { ${input.join(``)} }`;
388
+ const css = (input) => cssWithCustomLayerName("kol-theme-component")(input);
388
389
  const DEFAULT = KoliBri.createTheme("default", {
389
- GLOBAL: css`
390
+ GLOBAL: cssWithCustomLayerName("kol-theme-global")`
390
391
  :host {
391
392
  --border-radius: var(--kolibri-border-radius, 5px);
392
393
  --font-family: var(--kolibri-font-family, BundesSans Web, Calibri, Verdana, Arial, Helvetica, sans-serif);
@@ -1487,71 +1488,6 @@ const DEFAULT = KoliBri.createTheme("default", {
1487
1488
  font-size: 1.2rem;
1488
1489
  }
1489
1490
  `,
1490
- "KOL-SPIN": css`
1491
- .spin {
1492
- display: inline-block;
1493
- height: 1rem;
1494
- position: relative;
1495
- width: 3rem;
1496
- }
1497
- .spin span {
1498
- animation-timing-function: cubic-bezier(0, 1, 1, 0);
1499
- border: 0.1rem solid rgb(255, 255, 255);
1500
- border-radius: 50%;
1501
- height: 0.8rem;
1502
- width: 0.8rem;
1503
- top: 0.1rem;
1504
- position: absolute;
1505
- }
1506
- .spin span:nth-child(1) {
1507
- background-color: #fc0;
1508
- z-index: 0;
1509
- animation: 2s ease 0s infinite normal none running spin1;
1510
- left: 0.1rem;
1511
- }
1512
- .spin span:nth-child(2) {
1513
- background-color: #f00;
1514
- z-index: 1;
1515
- animation: 2s ease 0s infinite normal none running spin2;
1516
- left: 0.1rem;
1517
- }
1518
- .spin span:nth-child(3) {
1519
- background-color: #000;
1520
- z-index: 1;
1521
- animation: 2s ease 0s infinite normal none running spin2;
1522
- left: 1.1rem;
1523
- }
1524
- .spin span:nth-child(4) {
1525
- background-color: #666;
1526
- z-index: 0;
1527
- animation: 2s ease 0s infinite normal none running spin3;
1528
- left: 2.1rem;
1529
- }
1530
- @keyframes spin1 {
1531
- 0% {
1532
- transform: scale(0);
1533
- }
1534
- 100% {
1535
- transform: scale(1);
1536
- }
1537
- }
1538
- @keyframes spin2 {
1539
- 0% {
1540
- transform: translate(0px, 0px);
1541
- }
1542
- 100% {
1543
- transform: translate(1rem, 0px);
1544
- }
1545
- }
1546
- @keyframes spin3 {
1547
- 0% {
1548
- transform: scale(1);
1549
- }
1550
- 100% {
1551
- transform: scale(0);
1552
- }
1553
- }
1554
- `,
1555
1491
  "KOL-PROGRESS": css`
1556
1492
  :host progress,
1557
1493
  :host span {
@@ -1657,13 +1593,15 @@ const DEFAULT = KoliBri.createTheme("default", {
1657
1593
  }
1658
1594
  select option {
1659
1595
  margin: 1px 0;
1660
- padding: 0.5em;
1661
1596
  border-radius: var(--border-radius);
1662
1597
  cursor: pointer;
1663
1598
  }
1664
1599
  select option:disabled {
1665
1600
  cursor: not-allowed;
1666
1601
  }
1602
+ select:not([multiple]) option {
1603
+ padding: 0.5em;
1604
+ }
1667
1605
  option:active:not(:disabled),
1668
1606
  option:checked:not(:disabled),
1669
1607
  option:focus:not(:disabled),
@@ -2238,7 +2176,7 @@ const DEFAULT = KoliBri.createTheme("default", {
2238
2176
  display: grid;
2239
2177
  gap: 0.25em;
2240
2178
  }
2241
- fieldset div {
2179
+ .radio-input-wrapper {
2242
2180
  align-items: center;
2243
2181
  cursor: pointer;
2244
2182
  display: flex;
@@ -2248,16 +2186,16 @@ const DEFAULT = KoliBri.createTheme("default", {
2248
2186
  min-height: var(--a11y-min-size);
2249
2187
  position: relative;
2250
2188
  }
2251
- fieldset div label {
2189
+ .radio-input-wrapper label {
2252
2190
  cursor: pointer;
2253
2191
  display: flex;
2254
2192
  padding-left: calc(var(--spacing) / 2);
2255
2193
  width: 100%;
2256
2194
  }
2257
- fieldset div label span {
2195
+ .radio-input-wrapper label span {
2258
2196
  margin-top: 0.125em;
2259
2197
  }
2260
- fieldset div input[type='radio'] {
2198
+ .radio-input-wrapper input[type='radio'] {
2261
2199
  appearance: none;
2262
2200
  transition: 0.5s;
2263
2201
  border-radius: 100%;
@@ -2265,16 +2203,16 @@ const DEFAULT = KoliBri.createTheme("default", {
2265
2203
  min-width: calc(6 * 0.25rem);
2266
2204
  width: calc(6 * 0.25rem);
2267
2205
  }
2268
- fieldset div input[type='radio']:before {
2206
+ .radio-input-wrapper input[type='radio']:before {
2269
2207
  content: '';
2270
2208
  cursor: pointer;
2271
2209
  border-radius: 100%;
2272
2210
  display: block;
2273
2211
  }
2274
- fieldset div input[type='radio']:checked:before {
2212
+ .radio-input-wrapper input[type='radio']:checked:before {
2275
2213
  background-color: var(--color-primary);
2276
2214
  }
2277
- fieldset div input[type='radio']:disabled {
2215
+ .radio-input-wrapper input[type='radio']:disabled {
2278
2216
  cursor: not-allowed;
2279
2217
  background-color: var(--color-mute-variant);
2280
2218
  }
@@ -2321,7 +2259,7 @@ const DEFAULT = KoliBri.createTheme("default", {
2321
2259
  fieldset .input-slot {
2322
2260
  gap: var(--spacing);
2323
2261
  }
2324
- fieldset div label {
2262
+ .radio-input-wrapper label {
2325
2263
  padding-left: 0;
2326
2264
  }
2327
2265
  `,
@@ -2796,9 +2734,11 @@ const DEFAULT = KoliBri.createTheme("default", {
2796
2734
  cursor: pointer;
2797
2735
  }
2798
2736
  `,
2799
- "KOL-SPLIT-BUTTON": `.popover {
2800
- background: #fff;
2801
- }`
2737
+ "KOL-SPLIT-BUTTON": css`
2738
+ .popover {
2739
+ background: #fff;
2740
+ }
2741
+ `
2802
2742
  });
2803
2743
 
2804
2744
  export { DEFAULT };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@public-ui/theme-default",
3
- "version": "2.0.0-rc.1",
3
+ "version": "2.0.0-rc.3",
4
4
  "license": "EUPL-1.2",
5
5
  "homepage": "https://public-ui.github.io",
6
6
  "repository": "https://github.com/public-ui/kolibri",
@@ -38,8 +38,8 @@
38
38
  "wcag"
39
39
  ],
40
40
  "devDependencies": {
41
- "@public-ui/schema": "2.0.0-rc.1",
42
- "@public-ui/visual-tests": "2.0.0-rc.1",
41
+ "@public-ui/schema": "2.0.0-rc.3",
42
+ "@public-ui/visual-tests": "2.0.0-rc.3",
43
43
  "@types/node": "ts5.2",
44
44
  "@typescript-eslint/eslint-plugin": "6.8.0",
45
45
  "@typescript-eslint/parser": "6.8.0",
@@ -49,7 +49,7 @@
49
49
  "unbuild": "1.2.1"
50
50
  },
51
51
  "peerDependencies": {
52
- "@public-ui/components": "2.0.0-rc.1"
52
+ "@public-ui/components": "2.0.0-rc.3"
53
53
  },
54
54
  "sideEffects": false,
55
55
  "type": "module",